# Collect N point-sequences into separate branches - How?

Ok, so

• I have a bunch of curves with sequences of points on them (pictured)
• Nearby points have exactly 1 mm distance between them (in World |X+| direction)
• I want all points on a curve with max 1 mm distance to form separate point sequences.
• All point sequences from one curve into one Branch per curve.
• Can this be done with std GH components (I did it with a script, but would prefer std components in this case)

The end goal is to feed the point sequences into Interpolate Curves which in turn feeds Pipe components., and so on.

// Rolf

Sounds like you could use`Contour`component.

I donâ€™t think I understand how I should use it for this task. Can you explain how you meant?

// Rolf

Do you mean that you want to change the points of 1mm apart in the direction of world X axis so that the distance between points is less than 1mm?

No. I want to collect - into a list/sequence - points that are 1 mm apart (Edit: all points are originally 1 mm apart, but in the gaps the points are removed). So, when distance is bigger than 1 mm, a new list/sequence should start. So on the same curve there can be multiple point lists/sequences (with 1 mm distance between the points).

The 1mm distance is only a criteria for which points should go together to form polyline, or interpolate curve.

Greater distance than 1 mm means that thereâ€™s a gap between the point-sequences (= interpolate curves).

The second picture above shows the desired end result - curve segments which are feed into Pipes. (maybe the resolution was too low, but the first picture shows points on the curve, while the second picture shows the resulting Pipes which I want).

// Rolf

Iâ€™m not sure if this will help you, but can you use `Polyline` to group points by their distances?

GrouppingPoints By Distance along Curve_re.gh (11.3 KB)

1 Like

Yess, @HS_Kim, the marked bit does what I want (culling segments). Why didnâ€™t i think of that?

I had focused too much on the points, but of course the â€śinvertedâ€ť logic of â€śclose pointsâ€ť is â€śtoo long segmentsâ€ť

Thanks, the rest was already in place, so your filter does what I was missing (I had made a script for this part, which I can drop now).

Again, many thanks HS_Kim, youâ€™re amazing!

// Rolf

The result may look a bit funny, but it is what I want :

// Rolf

1 Like