Trouble with coplanar region unions at varying heights

I copy pasted set of three coplanar rectangles at multiple heights. Region union isn’t working in two set. Looks like a data management issue or is there something else I need to do to make Grasshopper understand to do region union of coplanar rectangles?

COPLANAR REGION UNIONS ATTEMPT.gh (6.8 KB)

1 Like

You have to sort your input curves according to their Z coordinates. Can be done like this:

COPLANAR REGION UNIONS ATTEMPT.gh (18.1 KB)

1 Like

Okay. Thanks! I kept staring and thinking at your script for like 5-6 minutes in order to figure out what exactly was happening. For the first time, I’m trying to figure out the function of replace paths and create set.

“Create set” basically assigns same values to items having similar parameters, yeah?


COPLANAR REGION UNIONS_2020Oct26a.gh (10.2 KB)

1 Like

Create Set M output shows the index of each member.

The important part of the Replace Path component is the input with the new paths 0,1,2 and 3

It’s just one way of doing this. There are other solutions.


COPLANAR REGION UNIONS_2020Oct26bb.gh (9.7 KB)

2 Likes

Interesting alternatives. :+1: :+1: