diff --git a/src/Mod/CAM/Path/Op/Area.py b/src/Mod/CAM/Path/Op/Area.py index 4e9f40e974..bd5cc5d193 100644 --- a/src/Mod/CAM/Path/Op/Area.py +++ b/src/Mod/CAM/Path/Op/Area.py @@ -131,18 +131,29 @@ class ObjectOp(PathOp.ObjectOp): if prop in ["AreaParams", "PathParams", "removalshape"]: obj.setEditorMode(prop, 2) - if prop == "Base" and len(obj.Base) == 1: - (base, sub) = obj.Base[0] + if hasattr(obj, "Side") and prop == "Base" and len(obj.Base) == 1: + (base, subNames) = obj.Base[0] bb = base.Shape.BoundBox # parent boundbox - subobj = base.Shape.getElement(sub[0]) - fbb = subobj.BoundBox # feature boundbox - if hasattr(obj, "Side"): + if "Face" in subNames[0]: + face = base.Shape.getElement(subNames[0]) + fbb = face.BoundBox # face boundbox if bb.XLength == fbb.XLength and bb.YLength == fbb.YLength: obj.Side = "Outside" else: obj.Side = "Inside" + elif "Edge" in subNames[0]: + edges = [ + base.Shape.getElement(sub).copy() for sub in subNames if sub.startswith("Edge") + ] + wire = Part.Wire(Part.__sortEdges__(edges)) + wbb = wire.BoundBox # wire boundbox + if not wire.isClosed() or (bb.XLength == wbb.XLength and bb.YLength == wbb.YLength): + obj.Side = "Outside" + else: + obj.Side = "Inside" + self.areaOpOnChanged(obj, prop) def opOnDocumentRestored(self, obj):