mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-03 13:28:19 +00:00
Mirroring should now support IfcBoundingBox
This commit is contained in:
committed by
Ryan Schultz
parent
dcb22acd3c
commit
84902d9130
@@ -731,9 +731,6 @@ class TrueMirrorElements(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
tool.Geometry,
|
tool.Geometry,
|
||||||
obj=obj,
|
obj=obj,
|
||||||
representation=ifcopenshell.util.representation.get_representation(element, active_context),
|
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):
|
def invert_general_object(self, element):
|
||||||
|
|||||||
@@ -1722,9 +1722,6 @@ class Model(bonsai.core.tool.Model):
|
|||||||
tool.Geometry,
|
tool.Geometry,
|
||||||
obj=obj,
|
obj=obj,
|
||||||
representation=active_repr,
|
representation=active_repr,
|
||||||
should_reload=True,
|
|
||||||
is_global=False,
|
|
||||||
should_sync_changes_first=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
@@ -1039,6 +1039,12 @@ class ShapeBuilder:
|
|||||||
new_indices.reverse()
|
new_indices.reverse()
|
||||||
new_inner_indices.append(new_indices)
|
new_inner_indices.append(new_indices)
|
||||||
face.InnerCoordIndices = new_inner_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"):
|
elif c.is_a("IfcGeometricSet"):
|
||||||
self.mirror(c.Elements, mirror_axes, mirror_point)
|
self.mirror(c.Elements, mirror_axes, mirror_point)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user