Arch: fix BaseMirror property

The code checked for the existance of the property and not if it's value was true. As a result, the structure base was always mirrored, even if the property was set to false. This commit fixes the issue.
This commit is contained in:
alafr
2022-03-04 18:39:51 +01:00
parent ee8193322c
commit d5ed23a62c

View File

@@ -887,7 +887,7 @@ class _Structure(ArchComponent.Component):
pl.rotate(FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(0, 0, 1), -obj.BaseRotation)
if hasattr(obj, "BaseOffsetX") and hasattr(obj, "BaseOffsetY"):
pl.translate(FreeCAD.Vector(obj.BaseOffsetX, obj.BaseOffsetY, 0))
if hasattr(obj, "BaseMirror"):
if hasattr(obj, "BaseMirror") and obj.BaseMirror:
pl.rotate(FreeCAD.Vector(0, 0, 0), FreeCAD.Vector(0, 1, 0), 180)
baseface.Placement = DraftGeomUtils.get_placement_perpendicular_to_wire(extrusion).multiply(pl)
else: