don't generate gcode if op isn't valid. Don't plunge to start height if safe and clearance height are the same.
This commit is contained in:
@@ -3217,6 +3217,9 @@ void Area::toPath(Toolpath &path, const std::list<TopoDS_Shape> &shapes,
|
||||
wires = sortWires(shapes,_pstart!=0,&pstart,pend,&stepdown_hint,
|
||||
PARAM_REF(PARAM_FARG,AREA_PARAMS_ARC_PLANE),
|
||||
PARAM_FIELDS(PARAM_FARG,AREA_PARAMS_SORT));
|
||||
|
||||
if (wires.size() == 0)
|
||||
return;
|
||||
|
||||
short currentArcPlane = arc_plane;
|
||||
if (preamble) {
|
||||
@@ -3269,17 +3272,14 @@ void Area::toPath(Toolpath &path, const std::list<TopoDS_Shape> &shapes,
|
||||
p = pstart;
|
||||
|
||||
// rapid horizontal move to start point
|
||||
if(fabs((p.*getter)()-retraction) > Precision::Confusion()) {
|
||||
// check if last is equal to current, if it is change last so the initial G0 is still emitted
|
||||
gp_Pnt tmpPlast = plast;
|
||||
(tmpPlast.*setter)((p.*getter)());
|
||||
if(_pstart && p.IsEqual(tmpPlast, Precision::Confusion())){
|
||||
plast.SetCoord(10.0, 10.0, 10.0);
|
||||
(plast.*setter)(retraction);
|
||||
}
|
||||
(p.*setter)(retraction);
|
||||
addGCode(false,path,plast,p,"G0");
|
||||
gp_Pnt tmpPlast = plast;
|
||||
(tmpPlast.*setter)((p.*getter)());
|
||||
if(_pstart && p.IsEqual(tmpPlast, Precision::Confusion())){
|
||||
plast.SetCoord(10.0, 10.0, 10.0);
|
||||
(plast.*setter)(retraction);
|
||||
}
|
||||
(p.*setter)(retraction);
|
||||
addGCode(false,path,plast,p,"G0");
|
||||
|
||||
|
||||
plast = p;
|
||||
|
||||
Reference in New Issue
Block a user