How to inter-divide curves each other

unhandled

(Kumar_Larka) #1

here is the example

how to use grasshopper to inter-divide them?


#2

Check this out…

ShatterMultiple_re.gh (14.9 KB)


(Laurent Delrieu) #3

There is also a component for that in this plugin


#4

Another way.

GHdiscourse_shatter-crv.gh (10.0 KB)


#5

@laurent_delrieu
Good to know, thanks…:smile:


(David S. Mavrov) #6

The Shatter component is pain in the ass. It is very difficult to make it work in some more complex cases. I can’t understand why you can’t simply intersect the split at the points of their intersections.


(Kumar_Larka) #7

yes! i have used the mutiple curve to get the intersect points but i get bunch of points.

by contrast with using plugin, I learn more from your solution

thx a lot! can’t appreciate more.


(Kumar_Larka) #8

this is a very efficient way!

thanks a lot!


(Kumar_Larka) #9

thanks for you works.

so glad i can learn a lot

can’t appreciate more


(Yafimski) #10

Hi HS_Kim,

I was trying for a while and kept getting stuck on the attached image, trying to basically take these 3 squares, explode all the lines, and then split any segment that had a point through it. So in total there should be 12 segments at the end of the script. I tried various methods, but nothing gave me the exact result, I came close but not quite.

squarestosplit

I tried your script and it worked after I added the removal of duplicate lines (using Kangaroo), as you can see from the second image.

I was wondering if you could explain a bit how the data is being processed in your script, for example why do you need to Sort List or why some components need to be grafted.

I thought Shatter could easily solve my issue, but I played around with it for an hour and nothing worked. If anyone has a suggestion for a simpler script to achieve my goal I would appreciate it.

Thanks.


#11

Take a look at the attachment…

SplitCurves_re.gh (10.7 KB)


(David S. Mavrov) #12

Here is something universal

SMC.gh (12.6 KB)

Btw done with the help of @HS_Kim


(Yafimski) #13

Thank you! The logic of filtering for curves that are co-incident was very insightful.

Works as shown.