From 61642d2ba3cdf9085d4a2a3024a07ae5c247387b Mon Sep 17 00:00:00 2001 From: Richard Brice <37087370+RickBrice@users.noreply.github.com> Date: Tue, 7 Jul 2026 11:59:47 -0700 Subject: [PATCH] Fixes computation of fallback position for linear placement. PlacementRelTo was improperly ignored --- .../ifcopenshell/api/alignment/update_fallback_position.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py index ad69bcf401..431d19fc86 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py +++ b/src/ifcopenshell-python/ifcopenshell/api/alignment/update_fallback_position.py @@ -16,8 +16,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with IfcOpenShell. If not, see . -import numpy as np - import ifcopenshell import ifcopenshell.util.placement from ifcopenshell import entity_instance @@ -36,7 +34,7 @@ def update_fallback_position(file: ifcopenshell.file, lp: entity_instance): if not lp.CartesianPosition: lp.CartesianPosition = file.createIfcAxis2Placement3D(Location=file.createIfcCartesianPoint((0.0, 0.0, 0.0))) - p = np.array(ifcopenshell.util.placement.get_axis2placement(lp.RelativePlacement)) + p = ifcopenshell.util.placement.get_local_placement(lp) x = float(p[0, 3]) y = float(p[1, 3])