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

- use
`Curve.ClosestPoint()`

to find the parameter of the curve that is closest to the point - Then use
`Curve.Split()`

to the split curve at the parameter found above

-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)

- Inputs:
- 1 curve
- 1 point

- Outputs
- boolean value indicating success of function
- 2 curves (original curve split by point)

-Kevin

1 Like

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

-Kevin

1 Like

Thank you very much. It did help me.