Mirroring should now support IfcBoundingBox

This commit is contained in:
Robin Quint
2025-11-01 11:19:42 +01:00
committed by Ryan Schultz
parent dcb22acd3c
commit 84902d9130
3 changed files with 6 additions and 6 deletions
@@ -731,9 +731,6 @@ class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
tool.Geometry,
obj=obj,
representation=ifcopenshell.util.representation.get_representation(element, active_context),
should_reload=False,
is_global=False,
should_sync_changes_first=False,
)
def invert_general_object(self, element):
-3
View File
@@ -1722,9 +1722,6 @@ class Model(bonsai.core.tool.Model):
tool.Geometry,
obj=obj,
representation=active_repr,
should_reload=True,
is_global=False,
should_sync_changes_first=False,
)
@classmethod
@@ -1039,6 +1039,12 @@ class ShapeBuilder:
new_indices.reverse()
new_inner_indices.append(new_indices)
face.InnerCoordIndices = new_inner_indices
elif c.is_a("IfcBoundingBox"):
old_corner = c.Corner.Coordinates
new_corner_2d = self.mirror_2d_point([old_corner[0], old_corner[1]], mirror_axes, mirror_point)
x_correction = c.XDim if mirror_axes[0] > 0.0 else 0.0
y_correction = c.YDim if mirror_axes[1] > 0.0 else 0.0
c.Corner.Coordinates = [float(new_corner_2d[0] - x_correction), float(new_corner_2d[1]) - y_correction, old_corner[2]]
elif c.is_a("IfcGeometricSet"):
self.mirror(c.Elements, mirror_axes, mirror_point)
else: