Merge pull request #23724 from davidgilkaufman/adaptive_reenable_profile

[CAM] regression fix: re-enable adaptive profile mode
This commit is contained in:
sliptonic
2025-09-17 16:41:51 -05:00
committed by GitHub

View File

@@ -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,