algorithmic modeling for Rhino
Via C# script component:
private void RunScript(double diameter, ref object circles)
{
Rhino.DocObjects.RhinoObject[] rhinoObj = Rhino.RhinoDoc.ActiveDoc.Objects.FindByObjectType(Rhino.DocObjects.ObjectType.Curve);List<Rhino.Geometry.Circle> output = new List<Rhino.Geometry.Circle>();
foreach(Rhino.DocObjects.CurveObject obj in rhinoObj)
{
if (obj.CurveGeometry.IsCircle() == true)
{
Rhino.Geometry.Circle temp = new Rhino.Geometry.Circle(0);
obj.CurveGeometry.TryGetCircle(out temp);if (temp.Diameter == diameter)
output.Add(temp);
}
}
circles = output;
}
It works!
The first, the second does not work. Can you check the definition?
Thanks!
Super!
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