Skip to content

Commit

Permalink
Path.Area: rename Clearance parameter to ResumeHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
realthunder authored and wwmayer committed May 13, 2017
1 parent a1e8bb1 commit 2d23673
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
14 changes: 7 additions & 7 deletions src/Mod/Path/App/Area.cpp
Expand Up @@ -2570,7 +2570,7 @@ typedef void (gp_Pnt::*AxisSetter)(Standard_Real);
static void addG0(bool verbose, Toolpath &path,
gp_Pnt last, const gp_Pnt &next,
AxisGetter getter, AxisSetter setter,
double retraction, double clearance,
double retraction, double resume_height,
double f, double &last_f)
{
if(!getter || retraction-(last.*getter)() < Precision::Confusion()) {
Expand All @@ -2584,12 +2584,12 @@ static void addG0(bool verbose, Toolpath &path,
pt = next;
(pt.*setter)(retraction);
addGCode(verbose,path,last,pt,"G0");
if(clearance>Precision::Confusion() &&
clearance+(next.*getter)() < retraction)
if(resume_height>Precision::Confusion() &&
resume_height+(next.*getter)() < retraction)
{
last = pt;
pt = next;
(pt.*setter)((next.*getter)()+clearance);
(pt.*setter)((next.*getter)()+resume_height);
addGCode(verbose,path,last,pt,"G0");
addG1(verbose,path,pt,next,f,last_f);
}else
Expand Down Expand Up @@ -2679,7 +2679,7 @@ void Area::toPath(Toolpath &path, const std::list<TopoDS_Shape> &shapes,
threshold = fabs(threshold);
if(threshold < Precision::Confusion())
threshold = Precision::Confusion();
clearance = fabs(clearance);
resume_height = fabs(resume_height);

AxisGetter getter = &gp_Pnt::Z;
AxisSetter setter = &gp_Pnt::SetZ;
Expand Down Expand Up @@ -2719,8 +2719,8 @@ void Area::toPath(Toolpath &path, const std::list<TopoDS_Shape> &shapes,
(pTmp.*setter)(0.0);
(plastTmp.*setter)(0.0);

if(first||pTmp.SquareDistance(plastTmp)>threshold)
addG0(verbose,path,plast,p,getter,setter,retraction,clearance,vf,cur_f);
if(first||pTmp.SquareDistance(plastTmp)>threshold)
addG0(verbose,path,plast,p,getter,setter,retraction,resume_height,vf,cur_f);
else
addG1(verbose,path,plast,p,vf,cur_f);
plast = p;
Expand Down
4 changes: 2 additions & 2 deletions src/Mod/Path/App/AreaParams.h
Expand Up @@ -219,9 +219,9 @@
((double, retraction, Retraction, 0.0,"Tool retraction absolute coordinate along retraction axis",\
App::PropertyLength))\
((enum, retract_axis, RetractAxis, 2,"Tool retraction axis",(X)(Y)(Z)))\
((double, clearance, Clearance, 0.0,\
((double, resume_height, ResumeHeight, 0.0,\
"When return from last retraction, this gives the pause height relative to the Z\n"\
"value of the next move",App::PropertyLength))\
"value of the next move.", App::PropertyLength))\
((double,segmentation,Segmentation,0.0,\
"Break long curves into segments of this length. One use case is for PCB autolevel,\n"\
"so that more correction points can be inserted",App::PropertyLength)) \
Expand Down

0 comments on commit 2d23673

Please sign in to comment.