mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-05 23:41:44 +00:00
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.
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user