Getting the intersecting shapes

Hello

I try to solve this simple problem for nearly a month and cannot find easy solution.

Im trying to extract all the shapes created by intersecting all the lines from any group of curves, create new shapes (eventually do a contour - also fails) and make them separate polygons.


getting subpolygons.gh (18.9 KB)

image
In yellow, what i get,
In cyan/green what i want (for every red line intersection).

I cant use the intersection tools as they are slow and i need at least 3 of them which creates a real mess. I tried other variations but none seem to work :roll_eyes:

Thanks in advance for any hints.

This uses the Geometric Region component from Heteroptera.

getting subpolygons-b.gh (10.8 KB)

Any polygons you don’t want, you can cull using distance of their centroids from the origin.

1 Like

You can also do this with standard components:

Essentially create a surface larger than your shape, split that surface with your rectangles, and get rid of the inner and outer surfaces you don’t want by removing the two largest area surfaces.

getting subpolygons MBH.gh (21.3 KB)

1 Like

Thanks very much Ethan!

Time to exploe Heteroptera (which i already had installed!)

Got it where i wanted it

I’ve found that the Geometric Region of Heteroptera doesn’t always give good results when curves are involved, but works well for lines, as in this case. Otherwise, I’d use Split Surface as you did.

1 Like

Im testing Split surface but ‘periods of 100%cpu’ happen much more…

but damn it works well (graphic ouput wise - which is the kind of effect i was looking for…)

If your goal is to get offset curves and nurbs curve cells inside of them, then you could also use Clipper plugin.


That is exactly it (new component to play with!)… Thanks HS_Kim!

OK, see? i knew there was a simple way… or 20…

Now going to try to make a checkerboard out of that. New challenge.

But i see a new type of solution and testing for intersection. okaaay. New puzzle!