CAM: Fix case when CAM operation Safe height, Start depth, and Final depth are the same value. (#27258)
Co-authored-by: Daniel Khodabakhsh <d@niel.khodabakh.sh>
This commit is contained in:
committed by
GitHub
parent
30ea676367
commit
1c90c1ec44
@@ -383,8 +383,13 @@ def getEnvelope(partshape, subshape=None, depthparams=None):
|
||||
newPlace = FreeCAD.Placement(Vector(0, 0, zShift), sec.Placement.Rotation)
|
||||
sec.Placement = newPlace
|
||||
|
||||
# Extrude the section to top of Boundbox or desired height
|
||||
envelopeshape = sec.extrude(Vector(0, 0, eLength))
|
||||
if Path.Geom.isRoughly(eLength, 0):
|
||||
# For 2D operations (e.g. laser cutting) use the section directly without extrusion
|
||||
envelopeshape = sec
|
||||
else:
|
||||
# Extrude the section to top of Boundbox or desired height
|
||||
envelopeshape = sec.extrude(Vector(0, 0, eLength))
|
||||
|
||||
if Path.Log.getLevel(Path.Log.thisModule()) == Path.Log.Level.DEBUG:
|
||||
removalshape = FreeCAD.ActiveDocument.addObject("Part::Feature", "Envelope")
|
||||
removalshape.Shape = envelopeshape
|
||||
|
||||
Reference in New Issue
Block a user