Added preambles option to fromShapes to prevent Path.Area from emmitting a preamble before every block of movement.
This commit is contained in:
@@ -2940,19 +2940,21 @@ void Area::toPath(Toolpath &path, const std::list<TopoDS_Shape> &shapes,
|
||||
PARAM_REF(PARAM_FARG,AREA_PARAMS_ARC_PLANE),
|
||||
PARAM_FIELDS(PARAM_FARG,AREA_PARAMS_SORT));
|
||||
|
||||
// absolute mode
|
||||
addGCode(path,"G90");
|
||||
if(abs_center)
|
||||
addGCode(path,"G90.1"); // absolute center for arc move
|
||||
|
||||
short currentArcPlane = arc_plane;
|
||||
if(arc_plane==ArcPlaneZX)
|
||||
addGCode(path,"G18");
|
||||
else if(arc_plane==ArcPlaneYZ)
|
||||
addGCode(path,"G19");
|
||||
else {
|
||||
currentArcPlane=ArcPlaneXY;
|
||||
addGCode(path,"G17");
|
||||
if (preamble) {
|
||||
// absolute mode
|
||||
addGCode(path,"G90");
|
||||
if(abs_center)
|
||||
addGCode(path,"G90.1"); // absolute center for arc move
|
||||
|
||||
if(arc_plane==ArcPlaneZX)
|
||||
addGCode(path,"G18");
|
||||
else if(arc_plane==ArcPlaneYZ)
|
||||
addGCode(path,"G19");
|
||||
else {
|
||||
currentArcPlane=ArcPlaneXY;
|
||||
addGCode(path,"G17");
|
||||
}
|
||||
}
|
||||
|
||||
AxisGetter getter;
|
||||
|
||||
@@ -234,6 +234,7 @@
|
||||
((double,feedrate_v,FeedRateVertical,0.0, "Vertical only (step down) move feed rate", App::PropertyFloat)) \
|
||||
((bool,verbose,Verbose,true, "If true, each motion GCode will contain full coordinate and feedrate")) \
|
||||
((bool,abs_center,AbsoluteArcCenter,false, "Use absolute arc center mode (G90.1)")) \
|
||||
((bool,preamble,EmitPreamble,true,"Emit preambles")) \
|
||||
AREA_PARAMS_DEFLECTION
|
||||
|
||||
/** Group of all Area configuration parameters except CArea's*/
|
||||
|
||||
@@ -215,6 +215,8 @@ class ObjectOp(PathOp.ObjectOp):
|
||||
pathParams['resume_height'] = obj.StepDown.Value
|
||||
pathParams['retraction'] = obj.ClearanceHeight.Value
|
||||
pathParams['return_end'] = True
|
||||
# Note that emmitting preambles between moves breaks some dressups and prevents path optimization on some controllers
|
||||
pathParams['preamble'] = False
|
||||
|
||||
if self.endVector is not None:
|
||||
pathParams['start'] = self.endVector
|
||||
|
||||
Reference in New Issue
Block a user