mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-29 11:46:33 +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:
|
) -> None:
|
||||||
"""Assign connection geometry to a boundary using the existing API."""
|
"""Assign connection geometry to a boundary using the existing API."""
|
||||||
location = face_matrix[:3, 3]
|
location = face_matrix[:3, 3]
|
||||||
axis = face_matrix[:3, 0]
|
axis = face_matrix[:3, 2]
|
||||||
ref_direction = face_matrix[:3, 2]
|
ref_direction = face_matrix[:3, 0]
|
||||||
|
|
||||||
outer_boundary = [list(coord) for coord in polygon.exterior.coords[:-1]]
|
outer_boundary = [list(coord) for coord in polygon.exterior.coords[:-1]]
|
||||||
inner_boundaries = [list(interior.coords[:-1]) for interior in polygon.interiors]
|
inner_boundaries = [list(interior.coords[:-1]) for interior in polygon.interiors]
|
||||||
|
|||||||
Reference in New Issue
Block a user