From e723a4f0ba9ace5882ce870aab429d85a2990772 Mon Sep 17 00:00:00 2001 From: tarman3 Date: Mon, 17 Nov 2025 18:59:25 +0200 Subject: [PATCH 1/2] CAM: _migrateRampDressups - fix #25391 --- src/Mod/CAM/Path/Dressup/Gui/RampEntry.py | 6 ++++-- src/Mod/CAM/Path/Tool/Controller.py | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Mod/CAM/Path/Dressup/Gui/RampEntry.py b/src/Mod/CAM/Path/Dressup/Gui/RampEntry.py index 47def949bf..d2415f5da0 100644 --- a/src/Mod/CAM/Path/Dressup/Gui/RampEntry.py +++ b/src/Mod/CAM/Path/Dressup/Gui/RampEntry.py @@ -407,7 +407,9 @@ class ObjectDressup: covered = True i = i + 1 if len(rampedges) == 0: - Path.Log.warn("No suitable edges for ramping, plunge will remain as such") + Path.Log.warning( + "No suitable edges for ramping, plunge will remain as such" + ) outedges.append(edge) else: # Path.Log.debug("Doing ramp to edges: {}".format(rampedges)) @@ -482,7 +484,7 @@ class ObjectDressup: rampedges.append(candidate) j = j + 1 if not loopFound: - Path.Log.warn("No suitable helix found, leaving as a plunge") + Path.Log.warning("No suitable helix found, leaving as a plunge") outedges.append(edge) else: outedges.extend(self.createHelix(rampedges, edge.start_point[2])) diff --git a/src/Mod/CAM/Path/Tool/Controller.py b/src/Mod/CAM/Path/Tool/Controller.py index ec62888287..286e3dbe47 100644 --- a/src/Mod/CAM/Path/Tool/Controller.py +++ b/src/Mod/CAM/Path/Tool/Controller.py @@ -29,6 +29,7 @@ import FreeCAD import Path from Path.Tool.toolbit import ToolBit import Path.Base.Generator.toolchange as toolchange +import Path.Dressup.Utils as PathDressup if False: @@ -91,7 +92,7 @@ def _migrateRampDressups(tc): else "HorizFeed" ) - if op.Base.ToolController == tc: + if PathDressup.baseOp(op).ToolController == tc: ramps.add(ramp) if rampFeedRate == "Horizontal Feed Rate": feed = "HorizFeed" @@ -130,7 +131,7 @@ def _migrateRampDressups(tc): # Loop over ramps and assign each one the appropriate TC for _, ramp, feed in job_ramp_feeds: - ramp.Base.ToolController = feed_to_tc[feed] + PathDressup.baseOp(ramp).ToolController = feed_to_tc[feed] class ToolController: From a5df8c1895d8f1812d02b9bbec4175362b46bde9 Mon Sep 17 00:00:00 2001 From: tarman3 Date: Tue, 18 Nov 2025 20:46:34 +0200 Subject: [PATCH 2/2] CAM: Remove dependency Path.Main.Job from Path.Dressup.Utils --- src/Mod/CAM/Path/Dressup/Utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mod/CAM/Path/Dressup/Utils.py b/src/Mod/CAM/Path/Dressup/Utils.py index b22fddfe2c..adea344d47 100644 --- a/src/Mod/CAM/Path/Dressup/Utils.py +++ b/src/Mod/CAM/Path/Dressup/Utils.py @@ -22,7 +22,6 @@ # *************************************************************************** import FreeCAD -import Path.Main.Job as PathJob def selection(): @@ -31,7 +30,7 @@ def selection(): import FreeCADGui sel = FreeCADGui.Selection.getSelectionEx() - if len(sel) == 1 and sel[0].Object.isDerivedFrom("Path::Feature") and PathJob.Instances(): + if len(sel) == 1 and sel[0].Object.isDerivedFrom("Path::Feature"): return sel[0].Object return None