Hi all, I’m trying to split a curve at the intersection point with a line and select one of the two segments. How can I do it. Thank you for the help
split curve with line.gh (8.4 KB)
Hi all, I’m trying to split a curve at the intersection point with a line and select one of the two segments. How can I do it. Thank you for the help
split curve with line.gh (8.4 KB)
thank you very much
How do split lines into segments with a point or points using Rhinocommon?
Thanks in advance
Vijesh
Curve.ClosestPoint()
to find the parameter of the curve that is closest to the pointCurve.Split()
to the split curve at the parameter found abovehttps://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_ClosestPoint.htm
https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Curve_Split_5.htm
-Kevin
Thank you for the quick reply. It is not giving the segments. Even by doing the dividebylength am getting only the numbers.
c = rg.LineCurve(polylineseg1[0])
d = rg.LineCurve.DivideByLength(c,5,True)
result: [0, 5, 10]
Also, note that the Split curve method is only for planes and breps, I could not find it with points.
Thanks
Vijesh
Ok, since you posted this in the grasshopper category.
split_curve_with_point.gh (11.9 KB)
-Kevin
Thank you very much it worked. I know it is too much to ask, Is it possible to split it with multiple points? Or do I have to call the parameter one by one? I tried with a list of points but not worked.
split_curve_with_points.gh (12.7 KB)
Note that the points input has been changed to List Access
-Kevin
Thank you very much. It did help me.