Some fixes related to milling heights and depths.
Fix for large "Step Down". Correctly handling a part that was moved down the Z axis. Handle "Finish Depth".
This commit is contained in:
@@ -2998,18 +2998,10 @@ void Area::toPath(Toolpath &path, const std::list<TopoDS_Shape> &shapes,
|
||||
threshold = Precision::Confusion();
|
||||
threshold *= threshold;
|
||||
|
||||
resume_height = fabs(resume_height);
|
||||
if(resume_height < Precision::Confusion())
|
||||
resume_height = stepdown_hint;
|
||||
|
||||
retraction = fabs(retraction);
|
||||
if(retraction < Precision::Confusion())
|
||||
retraction = (pstart.*getter)()+resume_height;
|
||||
|
||||
// in case the user didn't specify feed start, sortWire() will choose one
|
||||
// based on the bound. We'll further adjust that according to resume height
|
||||
if(!_pstart || pstart.SquareDistance(*_pstart)>Precision::SquareConfusion())
|
||||
(pstart.*setter)((pstart.*getter)()+resume_height);
|
||||
(pstart.*setter)(resume_height);
|
||||
|
||||
gp_Pnt plast,p;
|
||||
// initial vertial rapid pull up to retraction (or start Z height if higher)
|
||||
|
||||
@@ -197,7 +197,7 @@ class ObjectOp(PathOp.ObjectOp):
|
||||
pathParams['feedrate'] = self.horizFeed
|
||||
pathParams['feedrate_v'] = self.vertFeed
|
||||
pathParams['verbose'] = True
|
||||
pathParams['resume_height'] = obj.StepDown.Value
|
||||
pathParams['resume_height'] = obj.SafeHeight.Value
|
||||
pathParams['retraction'] = obj.ClearanceHeight.Value
|
||||
pathParams['return_end'] = True
|
||||
# Note that emitting preambles between moves breaks some dressups and prevents path optimization on some controllers
|
||||
@@ -237,12 +237,13 @@ class ObjectOp(PathOp.ObjectOp):
|
||||
PathLog.track()
|
||||
self.endVector = None
|
||||
|
||||
finish_step = obj.FinishDepth.Value if hasattr(obj, "FinishDepth") else 0.0
|
||||
self.depthparams = PathUtils.depth_params(
|
||||
clearance_height=obj.ClearanceHeight.Value,
|
||||
safe_height=obj.SafeHeight.Value,
|
||||
start_depth=obj.StartDepth.Value,
|
||||
step_down=obj.StepDown.Value,
|
||||
z_finish_step=0.0,
|
||||
z_finish_step=finish_step,
|
||||
final_depth=obj.FinalDepth.Value,
|
||||
user_depths=None)
|
||||
|
||||
|
||||
@@ -816,7 +816,7 @@ class depth_params:
|
||||
raise ValueError('z_finish_step must be less than step_down')
|
||||
|
||||
self.__clearance_height = clearance_height
|
||||
self.__safe_height = math.fabs(safe_height)
|
||||
self.__safe_height = safe_height
|
||||
self.__start_depth = start_depth
|
||||
self.__step_down = math.fabs(step_down)
|
||||
self.__z_finish_step = math.fabs(z_finish_step)
|
||||
|
||||
Reference in New Issue
Block a user