mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-29 00:03:17 +00:00
7017d5400d
set_space_representation_from_polygon was localising the footprint and clipping planes by subtracting only the object origin. For spaces with a rotated ObjectPlacement (e.g. Space 5710 in the test IFC) the footprint was not rotated into the space's local coordinate system, so the regenerated mesh was rotated by the placement angle and appeared at the wrong world location. Now the polygon and planes are transformed with the full inverse of the object's placement matrix, and the plane normals are also rotated. The local mesh is therefore aligned with the object's local axes and appears in the correct world position when the placement is applied. Added regression tests for Space 5710 (rotated placement) and Space 2363 (identity placement) using the real HouseWithGarage_AC22_IFC2X3.ifc fixture. Generated with the assistance of an AI coding tool.