From 771d35cc180ae59c5a18ed1b72975b38de382a6e Mon Sep 17 00:00:00 2001 From: David Kaufman Date: Sun, 7 Sep 2025 10:55:24 -0400 Subject: [PATCH] [CAM] re-enable adaptive profile mode --- src/Mod/CAM/Path/Op/Adaptive.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/Mod/CAM/Path/Op/Adaptive.py b/src/Mod/CAM/Path/Op/Adaptive.py index 3694faef7b..4060673928 100644 --- a/src/Mod/CAM/Path/Op/Adaptive.py +++ b/src/Mod/CAM/Path/Op/Adaptive.py @@ -545,8 +545,10 @@ def Execute(op, obj): # NOTE: Reminder that stock is formatted differently than inside/outside! stockPaths = {d: convertTo2d(op.stockPathArray[d]) for d in op.stockPathArray} - outsideOpType = area.AdaptiveOperationType.ClearingOutside - insideOpType = area.AdaptiveOperationType.ClearingInside + outsideClearing = area.AdaptiveOperationType.ClearingOutside + insideClearing = area.AdaptiveOperationType.ClearingInside + outsideProfiling = area.AdaptiveOperationType.ProfilingOutside + insideProfiling = area.AdaptiveOperationType.ProfilingInside # List every REGION separately- we can then calculate a toolpath based # on the region. One or more stepdowns may use that same toolpath by @@ -563,7 +565,9 @@ def Execute(op, obj): for rdict in op.outsidePathArray: regionOps.append( { - "opType": outsideOpType, + "opType": ( + outsideClearing if obj.OperationType == "Clearing" else outsideProfiling + ), "path2d": convertTo2d(rdict["edges"]), "id": rdict["id"], "children": rdict["children"], @@ -578,7 +582,9 @@ def Execute(op, obj): for rdict in op.insidePathArray: regionOps.append( { - "opType": insideOpType, + "opType": ( + insideClearing if obj.OperationType == "Clearing" else insideProfiling + ), "path2d": convertTo2d(rdict["edges"]), "id": rdict["id"], "children": rdict["children"], @@ -599,7 +605,9 @@ def Execute(op, obj): outsideInputStateObject = { "tool": op.tool.Diameter.Value, "tolerance": obj.Tolerance, - "geometry": [k["path2d"] for k in regionOps if k["opType"] == outsideOpType], + "geometry": [ + k["path2d"] for k in regionOps if k["opType"] in [outsideClearing, outsideProfiling] + ], "stockGeometry": stockPaths, "stepover": obj.StepOver, "effectiveHelixDiameter": helixDiameter, @@ -616,7 +624,9 @@ def Execute(op, obj): insideInputStateObject = { "tool": op.tool.Diameter.Value, "tolerance": obj.Tolerance, - "geometry": [k["path2d"] for k in regionOps if k["opType"] == insideOpType], + "geometry": [ + k["path2d"] for k in regionOps if k["opType"] in [insideClearing, insideProfiling] + ], "stockGeometry": stockPaths, "stepover": obj.StepOver, "effectiveHelixDiameter": helixDiameter,