How to separate rectangular surfaces from a bunch of surfaces?

Tolerance plays an important role here. I have noticed that some not perfect rectangles were omitted. Lowering the precision makes them selected too.
image

Doesn’t that only work for surfaces that are parallel to either the XZ or YZ planes? Surfaces that are diagonal to those planes will have a thicker bounding box.

Can you please post a GH file without the LunchBox ‘Flatness Check’? Or is that essential?

it works also for rotated rectangles:


Forum-CullingRectangles PS.gh (17.4 KB)
It is the first solution that came to my mind, other would be measuring the distance from area centre to each edge - for rectangle all 4 values must be the same (this way you can eliminate other polygons).

2 Likes

I see, thank you. Using the ‘P’ (BoundingBox orientation plane) input to BBox addresses the concern I mentioned. Very nice.

By the way, you didn’t internalize your geometry on this post. The method is good so for the benefit of all, how about posting it again with geometry? Thanks again, nice work.

done it, enjoy
Forum-CullingRectangles PS.gh (43.6 KB)

1 Like