From d88b201d5f03f519e17f1b5559008cdd66343df8 Mon Sep 17 00:00:00 2001 From: CyrilWaechter Date: Thu, 30 Jul 2026 20:55:55 +0200 Subject: [PATCH] Fix axis/ref_direction swap in connection geometry The a2p placement matrix stores col[0]=X (edge direction) and col[2]=Z (face normal), but assign_connection_geometry expects axis=Z (normal) and ref_direction=X (edge). Generated with the assistance of an AI coding tool. --- src/ifcopenshell-python/ifcopenshell/util/boundary.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/util/boundary.py b/src/ifcopenshell-python/ifcopenshell/util/boundary.py index 8344c1fcb9..0f29bd1fc5 100644 --- a/src/ifcopenshell-python/ifcopenshell/util/boundary.py +++ b/src/ifcopenshell-python/ifcopenshell/util/boundary.py @@ -352,8 +352,8 @@ def _assign_connection_geometry( ) -> None: """Assign connection geometry to a boundary using the existing API.""" location = face_matrix[:3, 3] - axis = face_matrix[:3, 0] - ref_direction = face_matrix[:3, 2] + axis = face_matrix[:3, 2] + ref_direction = face_matrix[:3, 0] outer_boundary = [list(coord) for coord in polygon.exterior.coords[:-1]] inner_boundaries = [list(interior.coords[:-1]) for interior in polygon.interiors]