Region Union

Hi, I am using Grasshopper Region Union Component to get the envelope contour of a list of overlapping rectangles, it works but when reaching a high number of rectangles, it doesn’t work anymore.
Any idea about what’s going on or did I miss something with Region union Syntax?


Union 01.3dm (5.4 MB)
Union 01.gh (191.3 KB)

OUCH :exclamation: Grasshopper has hung when opening your file. :cry:

Also, could there be a bug?

I couldn’t open it either and gave up - then opened it with solver turned off, disconnected all curves from the region union, created simple quads from the curves, joined the mesh, and attempted mesh shadow - it took 35 seconds and produced nothing - however it should?
:thinking:

I did that too and disabled all four RUnion components to examine the curves.

This is one of 710:

This is all 710: (connected to just one of the four RUnion components)

Ridiculous :exclamation: :exclamation: :exclamation:

When I enabled that one RUnion it took 18.5 seconds to complete, resulting in one ‘Polyline Curve’.

:man_facepalming:

1 Like

You could use clipper to do the job
Here clipper from NGon plugin (BT set to 1)


As there are many holes you must choose the first item of the list
union clipper.gh (77.8 KB)

Polyline form clipper is even faster surely because I changed the tolerance to 0.1

Union 01.gh (189.3 KB)

1 Like

Thanks a lot to all of you for your prompt replies.

About grasshopper hung when opening the file it’s just because grasshopper have to compute four union canevas and the last one have 3619 rectangles.

Solver takes a lot of time; I didn’t measure but several minutes at least even if we only keep the one with 3619 rectangles.

At the end we have the union curve for the three first canevas but no result for the last one (3619 rectangles)

Clipper from NGon plugin (BT set to 1) does perfectly the job, thanks a lot

I tried both solutions suggested by Laurent as I already said both work perfectly but one of the two Union tips is fuzzy as shown here after.
The desired clean tip is the one with Rhino Command “CurveBoolean”, but another bug with Rhino Command “CurveBoolean” is that the result seam good but it’s made of two open polylines instead of one closed and overlapping as shown hereafter.



Test.gh (90.8 KB)
Test.3dm (2.3 MB)

Change the option of filling
Unselect EvenOdd


A better way is perhaps to split the list in 2.

Both methods work, in the meantime I also added the NGon “Boolean” component without unselecting “EvenOdd” on both components and it works also.

I prefer the first one you suggested: Unselect “EvenOdd”, it’s more elegant.

Thanks a lot Laurent.

Try Clipper2 Union