From 6ec8cce498d58510c30d51c058335243dee3f7f8 Mon Sep 17 00:00:00 2001 From: CyrilWaechter Date: Mon, 3 Aug 2026 11:07:19 +0200 Subject: [PATCH] Align vertical bounding plane strategy contract with caller get_vertical_bounding_planes always returns EXTRUDE_CLIP; the EXTRUDE_CLIP-vs-BREP decision belongs to the calling layer. Generated with the assistance of an AI coding tool. --- src/ifcopenshell-python/ifcopenshell/util/space.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/space.py b/src/ifcopenshell-python/ifcopenshell/util/space.py index 198a981763..7253ecde32 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/space.py +++ b/src/ifcopenshell-python/ifcopenshell/util/space.py @@ -284,9 +284,11 @@ def get_vertical_bounding_planes( :param base_z: Base elevation of the space in SI. :param direction: "UP" for top (ceiling/roof) or "DOWN" for bottom (floor/slab). :param start_z: Elevation to cast rays from in SI (the RL cut level). - :return: (strategy, planes). Strategy is "EXTRUDE_CLIP" when hits were - found, otherwise "BREP". Planes are (point, normal) tuples in SI; the - normal points toward the removed side (half-space convention). + :return: (strategy, planes). Strategy is always "EXTRUDE_CLIP"; an empty + planes list means open top (direction="UP") or void below + (direction="DOWN"). The strategy decision between extrusion and B-rep + happens in the calling layer. Planes are (point, normal) tuples in SI; + the normal points toward the removed side (half-space convention). """ ray_dir = np.array([0.0, 0.0, 1.0]) if direction == "UP" else np.array([0.0, 0.0, -1.0]) origin_z = start_z if start_z is not None else base_z + 0.001