Split multi curves

I am trying to split multi curves, which are in separate branches, with their points of intersection and then cull them if they are outside of certain closed lines. If I use graft then my data is no longer separated.

Here is the geometry.
Split Multi Curves.gh (89.7 KB)

Like this?

Split Multi Curves_re.gh (92.9 KB)

1 Like

With a bit of tweeking to remove the null items and to merge the trees at the end… Yes!

Can you suggest any way to sort my initial geometry? Lets say I have a bunch of curves as initial geometry. They can be either in 3D or 2D. What I need is a way to sort the geometry in polygons. They can be 3,4,5,6, etc. sided.

Here is an example geometry:
Sort Curves.gh (19.8 KB)

Also, I’ve just noticed. The perpendicular lines do not cross each other in the solution you gave me. I need to split all the lines, so I have the little squares also.

I don’t understand what you are going to do, anyway check this.

Split Multi Curves_reV2.gh (187.5 KB)

The results are not the same input curves, anyway…

1 Like

I need to keep the tree structure. The big problem is how to take all of the branches, intersect the curves and keep the tree structure. It proves very difficult task. But I need to keep the tree structure because later I will project some of the geometry onto coresponding planes and if I don’t keep the tree structure there is no way of doing this.

Technically this but without the extra points you can notice. There are some extra points here and there which split the lines more than necessary.

Split Multi Curves_reV3.gh (182.6 KB)

Split Multi Curves_reV3.gh (190.4 KB)

1 Like

Now there are missing lines. Why is this so crazy difficult? I am trying a bunch of options in parallel to you.
Also now the different pranches intersect with each other and some bellong to the wrong group at the end.

If you open the last def I have uploaded, I almost have what I need. But just almoust. For some reason there are some extra points here and there and I can’t find a way to get rid of them.

Split Multi Curves_reV4.gh (190.0 KB)

1 Like

There are still some extra points. Look at each branch individually.

Are you sure they are on the curves in each branch?

1 Like

Yes. If you exqamine the individual branches you will see that there are some extra points.

Open the definition I have uploaded. The only problem with it is that there are some extra points that I don’t know how to remove. Baybe it will be easier to fix this.

Show me some image.

1 Like

This is from your solution.

This is from mine

I just can’t find any way to get rid out of these points. The shatter component creates them.

I really can’t understand what is the problem of taking a bunch of lines and split them at their intersections. And keep your data neat and clean.

Check this as well.
And those extra points comes from other branches since I used Point in Curves., I guess…Split Multi Curves_reV5.gh (99.6 KB)

1 Like