From fab3ee70ddf29cbaa701881abaea0ddd63f21fc4 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Wed, 19 Jun 2024 23:37:01 +1000 Subject: [PATCH] Fix bug where 2D angles weren't correctly parsed in OffsetObjectPlacements recipe --- src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py | 8 ++++---- src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py b/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py index ab6b4c151d..8582aea6e5 100644 --- a/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py +++ b/src/ifcpatch/ifcpatch/recipes/OffsetObjectPlacements.py @@ -86,12 +86,12 @@ class Patcher: self.ax = ax self.ay = ay self.az = az - if self.ay is not None: - self.angle_type = "3D" - elif self.ay is not None: + if self.ax is None: + self.angle_type = None + elif self.ay is None: self.angle_type = "2D" else: - self.angle_type = None + self.angle_type = "3D" def patch(self): absolute_placements = [] diff --git a/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py b/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py index 759948315a..33624ef169 100644 --- a/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py +++ b/src/ifcpatch/ifcpatch/recipes/SetWorldCoordinateSystem.py @@ -18,7 +18,6 @@ import math import numpy as np -import ifcopenshell class Patcher: