Fix #2028. OffsetObjectPlacements can now rotate then move, or vice versa. Warning: new default! Thanks hvn74!

This commit is contained in:
Dion Moult
2022-02-09 12:17:07 +11:00
parent dd7a47ab99
commit 80bc4cdb1b
@@ -1,4 +1,3 @@
# IfcPatch - IFC patching utiliy
# Copyright (C) 2020, 2021 Dion Moult <dion@thinkmoult.com>
#
@@ -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