How to get curve segment which a point is on

Hello friends,

I’m trying to get the curve segment which a point is on:


Get the segment point is on.3dm (131.1 KB)
Get the segment point is on.gh (4.2 KB)

I couldn’t find a component that outputs a curve or a list of curves and a value that indicates if the point is on it like “Point in curve” does, “Point in curve” could tell me the point is on the curve but not on which segment it is on…

Many Thanks in advance :slight_smile:

Roy.

Possible solution

Get the segment point is on jk.gh (7.3 KB)

Fennec addon have a component Points on Curves.
Use graft to get a tree of points following the list of curves.

pt on crv.gh (13.7 KB)

1 Like

Thank you very much,

I’ve tried a similar solution with “offset curve” instead of the “0 width” rectangle you made, but from some reason while using corner type “Sharp” the offset didn’t produce a closed result.

Thank you very much as well and for your plugin as well, I might use it if I’ll need to get a more advanced solution than the one above :pray:

Here a solution that doesn’t need offsetting or linear boxes:

Great, Thanks… That’s even better :slight_smile:

I ended up using @anon39580149 solution as I needed multiple points on fewer curves.

Thank you both! :pray:

I am trying to get a complete flattened list of points (which are on the rectangle curve) and a complete flattened list of the corresponding curves that the each point is on without a slider so it won’t be controlled manually.

pt on crv 2.gh (9.8 KB)

Meanwhile having a hard time dealing with the data branching…

Use the same index list to separate curves and points

pt on crv 2___.gh (12.8 KB)

Thanks for your help @anon39580149 It’s much appreciated.

I’m trying to get the data like this:

So I could later use each point and its corresponding curve segment.


pt on crv 2_re.gh (9.9 KB)

You can use this

pt on crv 2___.gh (12.4 KB)

@HS_Kim Thank you very much, It’s the most straight forward solution and it works (:

@anon39580149 Thank you so much as well for all your help :pray: