algorithmic modeling for Rhino
hi everybody
i want to split an ellipse using a line or curve in grasshopper C# script. i want everything to be purely in Code , without using grasshpper component .
i already know how to draw primitives using rhino geometry in C# but i dont know how to use something like split function of Rhino
Tags:
Maybe you can try Intersection.CurveCurve method in Rhino.Geometry.intersect namespace.
Indeed, there is no dedicated Ellipse|Line intersector in Rhino, so you'll need to convert your ellipse and your line into actual Curves, then use the Intersection.CurveCurve method.
--
David Rutten
david@mcneel.com
Poprad, Slovakia
ok , but i think intersection.curvecurve just returns points , so how i split the ellipse using those points?
in fact i need to have a quarter of the ellipse
i wrote this code , and it doesn't work
//ellipse
Plane pl = Plane.WorldXY;
Ellipse el = new Ellipse(pl, 5, 10);
//line
Point3d pn1 = new Point3d(-5, -5, 0);
Point3d pn2 = new Point3d(5, 5, 0);
Line ln = new Line(pn1, pn2);
//intersection
Point3d[] pntList = Rhino.Geometry.Intersect.Intersection.CurveCurve(el.ToNurbsCurve(), ln.ToNurbsCurve());
it says "No overload for method CurveCurve takes 2 arguments"
as far as i can understand ,CurveCurve should be a method on Ellipse or line object and should take the another one as argument, but when there is nothing .
whats wrong ?
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