Region Union and non-coplanar surfaces

I have a flattened list of surfaces, some of wich are coplanar, but not all coplanar surfaces intersect. I need to union these into separate regions. Unfortunately the component needs to know in wich plane it unions. Has anyone got an idea how to put coplanar surfaces into branches?

You can try formatting a textual description for each of those surface planes. If you pick the right kind of formatting you should end up with a list of text where identical values mean the associated surfaces all belong to the same plane.

If all your surfaces are oriented orthogonally (as your picture seems to imply) this formatting will be somewhat easier. You’d need to figure out whether the absolute x or y values of the plane normals are bigger, then combine that with the appropriate coordinate from the plane origin.

For example if the plane normal points (mostly) in the positive y direction and the plane origin is at (4.04, 8.08, 3.03), your text format for that plane might look like "Y/8.08". Any other surface which also has a normal pointing in Y and an origin at the y=8.08 value is co-planar.

Does that make sense?

Using a bunch of rectangles which only belong to 4 distinct planes, here’s how to combine them into different branches of a single datatree: (27.9 KB)


Thanks a lot @DavidRutten, that is exactly what i needed, helpful as always.

Have a good one!

Hey Guys,
I’ am trying to solve a similar problem. This solution fails if you simply rotate the input surfaces by 45deg. Perhaps we need some more tolerances

Best, (28.4 KB)

Use a better algorithm. (26.9 KB)

1 Like

I hear ya! That is cool!