Joining the points that intersect with the line

Hi all,

I have a bunch of lines, which have a random set of points on them in a single data list. So, whenever I interpolate them I get the diagonal lines as well.

I wanted to know is there a way to figure out if a particular point is on that line so that I get different data sets according to each line and can interpolate them without the diagonals.

I hope I could convey my problem.

Kind Regards,
Kedar

joiningDotsThatLieOnTheLine.gh (17.9 KB)


joiningDotsThatLieOnTheLine_re.gh (19.1 KB)

1 Like

Culling duplicate points is optional (there are ~800 duplicates out of ~1300 points).

joiningDotsThatLieOnTheLine_2019Dec30a.gh (21.5 KB)

1 Like

Thank you so much Kim, this is what I was looking. If you dont mind me asking, can you please tell me why the distance is set to smaller than 0.01?

Kind Regards,
Kedar

Thank you so much Joseph, yes sorry I forgot to remove null and duplicate points. I have never used the Dot Product component, what does it do?

Kind Regards,
Kedar

The value 0f 0.01 is only a tolerance for this case.
Perhaps 0.001 will work as well.

Ohh alright, I get it now. So any small number would do the job.

Thank you once again Kim.

In this case, the model compares two vectors and culls curve segments that are pointing the opposite direction, indicated by having a negative vs. positive dot product (DProd) value, compared to world Unit Y vector.

Thank you for the link, Joseph. Ohh that’s a very interesting approach. I will try to learn more in detail about this.

Thank you for all the help :slight_smile:

Hi Kim,

Sorry to bother you again but when I connect the End Points components to the new poly-lines, I don’t get the exact end points. Some points are in between or randomly arranged.

Any idea what might be the reason for this?

Kind Regards,
Kedar

endPointsActingWeird.gh (17.9 KB)


endPointsActingWeird_re.gh (23.4 KB)

1 Like

Thank you so much Kim, you are a savior. I was trying to do it by adjusting seam per curve but it was taking a lot of time.

Thank you so much :slight_smile: