Skip to content

Commit

Permalink
Path: Fix Face Region boundary shape usage
Browse files Browse the repository at this point in the history
This commit removes automatic edge extension for `Face Region` boundary shape.  It applies the `Clear Edges` toggle for `Face Region`.  It applies `Exclude Raised Areas` correctly.  The problem of collision paths for `Clear Edges` with `Exclude Raised Areas` for certain use cases remains and is not fixed with this commit.
  • Loading branch information
Russ4262 committed Sep 24, 2021
1 parent 7ec38a5 commit fcd8b85
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Mod/Path/PathScripts/PathMillFace.py
Expand Up @@ -194,16 +194,20 @@ def areaOpShapes(self, obj):
elif obj.BoundaryShape == 'Face Region':
baseShape = oneBase[0].Shape
psZMin = planeshape.BoundBox.ZMin
ofstShape = PathUtils.getOffsetArea(planeshape,
self.tool.Diameter * 1.1,
plane=planeshape)
ofst = 0.0
if obj.ClearEdges:
ofst = self.tool.Diameter * 0.51
ofstShape = PathUtils.getOffsetArea(planeshape, ofst, plane=planeshape)
ofstShape.translate(FreeCAD.Vector(0.0, 0.0, psZMin - ofstShape.BoundBox.ZMin))

# Calculate custom depth params for removal shape envelope, with start and final depth buffers
custDepthparams = self._customDepthParams(obj, obj.StartDepth.Value + 0.2, obj.FinalDepth.Value - 0.1) # only an envelope
ofstShapeEnv = PathUtils.getEnvelope(partshape=ofstShape, depthparams=custDepthparams)
env = ofstShapeEnv.cut(baseShape)
env.translate(FreeCAD.Vector(0.0, 0.0, -0.000001)) # lower removal shape into buffer zone
if obj.ExcludeRaisedAreas:
env = ofstShapeEnv.cut(baseShape)
env.translate(FreeCAD.Vector(0.0, 0.0, -0.00001)) # lower removal shape into buffer zone
else:
env = ofstShapeEnv

if holeShape:
PathLog.debug("Processing holes and face ...")
Expand Down

0 comments on commit fcd8b85

Please sign in to comment.