diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 079a263f5e..042bb84d71 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -2940,19 +2940,21 @@ void Area::toPath(Toolpath &path, const std::list &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; diff --git a/src/Mod/Path/App/AreaParams.h b/src/Mod/Path/App/AreaParams.h index 67106ae460..70f57b5b7e 100644 --- a/src/Mod/Path/App/AreaParams.h +++ b/src/Mod/Path/App/AreaParams.h @@ -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*/ diff --git a/src/Mod/Path/PathScripts/PathAreaOp.py b/src/Mod/Path/PathScripts/PathAreaOp.py index 226da5a373..55d344363b 100644 --- a/src/Mod/Path/PathScripts/PathAreaOp.py +++ b/src/Mod/Path/PathScripts/PathAreaOp.py @@ -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