Path: More ambitious step-over and break optimizations
Extend the work from #3496 to allow the safe optimization of more complex step transitions. - Use the actual safePDC path for short step transitions and breaks, currently up to 2 cutter diameters. This value is chosen to cover basically all typical end step-overs, including those with heavy skew. Extending this much further (up to the break even point for a retract & rapid) will need some careful thinking for multi pass paths. - Coordinate offset tolerances with per-operation tessellation tolerances, to avoid tessellation artifacts messing up paths by causing false retracts. Such retracts can cause entire steps near vertical areas to be falsely skipped, which would cause a major deviation from the target model. By considering per-job tolerances, we allow users to safely save computational resources by computing roughing operations with lower precision, or selectively increase precision for finish passes. - Refine the default tessellation tolerance to GeometryTolerance / 4. This makes sure that the job GeometryTolerance is respected by operation defaults.
This commit is contained in:
@@ -114,9 +114,9 @@ class PathGeometryGenerator:
|
||||
fCnt += 1
|
||||
zeroCOM = zeroCOM.add(FreeCAD.Vector(comF.x, comF.y, 0.0).multiply(areaF))
|
||||
if fCnt == 0:
|
||||
msg = translate('PathSurfaceSupport',
|
||||
msg = translate('PathSurfaceSupport',
|
||||
'Cannot calculate the Center Of Mass.')
|
||||
msg += ' ' + translate('PathSurfaceSupport',
|
||||
msg += ' ' + translate('PathSurfaceSupport',
|
||||
'Using Center of Boundbox instead.') + '\n'
|
||||
FreeCAD.Console.PrintError(msg)
|
||||
bbC = self.shape.BoundBox.Center
|
||||
@@ -910,22 +910,26 @@ class ProcessSelectedFaces:
|
||||
'''_calculateOffsetValue(self.obj, isHole, isVoid) ... internal function.
|
||||
Calculate the offset for the Path.Area() function.'''
|
||||
self.JOB = PathUtils.findParentJob(self.obj)
|
||||
tolrnc = self.JOB.GeometryTolerance.Value
|
||||
# We need to offset by at least our linear tessellation deflection
|
||||
# (default GeometryTolerance / 4) to avoid false retracts at the
|
||||
# boundaries.
|
||||
tolrnc = max(self.JOB.GeometryTolerance.Value / 10.0,
|
||||
self.obj.LinearDeflection.Value)
|
||||
|
||||
if isVoid is False:
|
||||
if isHole is True:
|
||||
offset = -1 * self.obj.InternalFeaturesAdjustment.Value
|
||||
offset += self.radius + (tolrnc / 10.0)
|
||||
offset += self.radius + tolrnc
|
||||
else:
|
||||
offset = -1 * self.obj.BoundaryAdjustment.Value
|
||||
if self.obj.BoundaryEnforcement is True:
|
||||
offset += self.radius + (tolrnc / 10.0)
|
||||
offset += self.radius + tolrnc
|
||||
else:
|
||||
offset -= self.radius + (tolrnc / 10.0)
|
||||
offset -= self.radius + tolrnc
|
||||
offset = 0.0 - offset
|
||||
else:
|
||||
offset = -1 * self.obj.BoundaryAdjustment.Value
|
||||
offset += self.radius + (tolrnc / 10.0)
|
||||
offset += self.radius + tolrnc
|
||||
|
||||
return offset
|
||||
|
||||
|
||||
Reference in New Issue
Block a user