algorithmic modeling for Rhino
when writing c# script in GH, I know how to handle following data types.
Curve, Mesh, Brep, int, bool, double.....
but for example, when trying to reference curve objects in rhino document, I have learned that I have to write something like following,
List<Curve> crvs = new List<Curve>();
List<double> lengths = new List<Double>();
foreach(Rhino.DocObjects.RhinoObject obj in doc.Objects.GetObjectList(Rhino.DocObjects.ObjectType.Curve)){
GH_Curve crv = new GH_Curve();
crv.CastFrom(obj.Geometry);
crvs.Add(crv.Value);
lengths.Add(crv.Value.GetLength());
}
Q1.
how is Rhino.DocObjects.RhinoObject different from grasshopper usual data types(Curve, Mesh, Brep, int, bool, double...)?
Q2.
I do not undetstand exact concept of 'Casting'. how is 'CastFrom' different from .ConvertToXXX, or .ToXXX?
Q3.
how is GH_Curve different from Curve data type?
Q4
When I search Grasshopper3D for similar topics, I often see GemetryBase, GeometricGoo..... What are these?
Sorry in advance that my coding proficiency is very frustrating...
Tags:
Thanks David as always.
See this: http://www.grasshopper3d.com/forum/topics/grasshopper-data-types
Further questions of course welcome.
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by