Split multi curves

unhandled

(David S. Mavrov) #1

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)


#2

Like this?

Split Multi Curves_re.gh (92.9 KB)


(David S. Mavrov) #3

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


(David S. Mavrov) #4

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)


(David S. Mavrov) #5

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.


#6

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…


(David S. Mavrov) #7

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.


(David S. Mavrov) #8

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)


#9

Split Multi Curves_reV3.gh (190.4 KB)


(David S. Mavrov) #10

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.


(David S. Mavrov) #11

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.


#12

Split Multi Curves_reV4.gh (190.0 KB)


(David S. Mavrov) #13

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


#14

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


(David S. Mavrov) #15

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.


#16

Show me some image.


(David S. Mavrov) #17

This is from your solution.

This is from mine


(David S. Mavrov) #18

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


(David S. Mavrov) #19

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.


#20

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)