Merge pull request #25398 from tarman3/migrateRampDressups
CAM: _migrateRampDressups - fix #25391
This commit is contained in:
@@ -400,7 +400,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))
|
||||
@@ -475,7 +477,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]))
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user