From 80bc4cdb1b6e91fe2f62757b7fb50addf374879c Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 9 Feb 2022 12:17:07 +1100 Subject: [PATCH] Fix #2028. OffsetObjectPlacements can now rotate then move, or vice versa. Warning: new default! Thanks hvn74! --- src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py b/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py index e4dc9e0adb..c399a3f574 100644 --- a/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py +++ b/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py @@ -1,4 +1,3 @@ - # IfcPatch - IFC patching utiliy # Copyright (C) 2020, 2021 Dion Moult # @@ -58,7 +57,13 @@ class Patcher: continue rotation_matrix = self.z_rotation_matrix(math.radians(angle)) - relative_placement.Location.Coordinates = self.multiply_by_matrix(offset_location, rotation_matrix) + + if len(self.args) == 5: + # Move then rotate, if you want + relative_placement.Location.Coordinates = self.multiply_by_matrix(offset_location, rotation_matrix) + else: + # Rotate then move, like Solibri + pass if placement.RelativePlacement.Axis: z_axis = placement.RelativePlacement.Axis.DirectionRatios