algorithmic modeling for Rhino
Hey guys.
Does anyone know how to control layer (get geometry from a specific layer or bake into a specific layer) in Rhinocommon? (C# format would be great)
I just have figured out.. I can select a layer by doing
Rhino.DocObjects.Layer lay = this.RhinoDocument.Layers[0];
something like this... but I could not find any thing to get or add geometry..
Thanks!!
:)
Tags:
http://4.rhino3d.com/5/rhinocommon/
When you add objects to the current document, you also specify the attributes. When creating the attributes, you can assign a layer.
http://4.rhino3d.com/5/rhinocommon/?topic=html/AllMembers_T_Rhino_D...
Thank you~ still quite not clear to me(haven't done attributes control yet).. T.T but will try!
Could you please explain little more in detail? T.T What should I do if I want to make a List of object from a Layer named 'layer1'... From where should I start?;;
Let's try to create a circle, then add it to current rhino document with some attributes (like layer).
Circle myCircle = new Circle(50);
Rhino.DocObjects.ObjectAttributes myAtt = new Rhino.DocObjects.ObjectAttributes();
String myLayer = "myLayerName";Rhino.RhinoDoc thisDoc = Rhino.RhinoDoc.ActiveDoc;
int layerIndex = thisDoc.Layers.Find(myLayer, false);
if (layerIndex == -1) {
layerIndex = thisDoc.Layers.Add(myLayer, Color.Black);
}myAtt.LayerIndex = layerIndex;
Rhino.RhinoDoc.ActiveDoc.Objects.AddCircle(myCircle, myAtt);
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by