generative modeling for Rhino
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
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.
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
Plane pl = Plane.WorldXY;
Ellipse el = new Ellipse(pl, 5, 10);
Point3d pn1 = new Point3d(-5, -5, 0);
Point3d pn2 = new Point3d(5, 5, 0);
Line ln = new Line(pn1, pn2);
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 ?