diff --git a/src/Mod/Path/PathScripts/PathAreaOp.py b/src/Mod/Path/PathScripts/PathAreaOp.py index 026a8e487f..3c9284cc1e 100644 --- a/src/Mod/Path/PathScripts/PathAreaOp.py +++ b/src/Mod/Path/PathScripts/PathAreaOp.py @@ -88,6 +88,10 @@ class ObjectOp(PathOp.ObjectOp): obj.addProperty("Part::PropertyPartShape", "removalshape", "Path") obj.setEditorMode('removalshape', 2) # hide + obj.addProperty("App::PropertyBool", "SplitArcs", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property", "Split Arcs into discrete segments")) + + # obj.Proxy = self + self.initAreaOp(obj) def initAreaOp(self, obj): @@ -140,6 +144,8 @@ class ObjectOp(PathOp.ObjectOp): for prop in ['AreaParams', 'PathParams', 'removalshape']: if hasattr(obj, prop): obj.setEditorMode(prop, 2) + if not hasattr(obj, 'SplitArcs'): + obj.addProperty("App::PropertyBool", "SplitArcs", "Path", QtCore.QT_TRANSLATE_NOOP("App::Property", "Split Arcs into discrete segments")) self.areaOpOnDocumentRestored(obj) diff --git a/src/Mod/Path/PathScripts/PathPocketBase.py b/src/Mod/Path/PathScripts/PathPocketBase.py index 453ff667b4..9563470a25 100644 --- a/src/Mod/Path/PathScripts/PathPocketBase.py +++ b/src/Mod/Path/PathScripts/PathPocketBase.py @@ -109,6 +109,11 @@ class ObjectPocket(PathAreaOp.ObjectOp): Pattern = ['ZigZag', 'Offset', 'Spiral', 'ZigZagOffset', 'Line', 'Grid', 'Triangle'] params['PocketMode'] = Pattern.index(obj.OffsetPattern) + 1 + + if obj.SplitArcs: + params['Explode'] = True + params['FitArcs'] = False + return params def areaOpPathParams(self, obj, isHole): diff --git a/src/Mod/Path/PathScripts/PathProfile.py b/src/Mod/Path/PathScripts/PathProfile.py index 76f6840a86..554345e239 100644 --- a/src/Mod/Path/PathScripts/PathProfile.py +++ b/src/Mod/Path/PathScripts/PathProfile.py @@ -331,6 +331,10 @@ class ObjectProfile(PathAreaOp.ObjectOp): if obj.JoinType == "Miter": params["MiterLimit"] = obj.MiterLimit + if obj.SplitArcs: + params['Explode'] = True + params['FitArcs'] = False + return params def areaOpPathParams(self, obj, isHole):