protected void BuildXParameter(double x) { if (!OmitDuplicateXY || !MathUtil.EpsilonEqual(currentPos.x, x, MoveEpsilon)) { Builder.AppendF("X", x + PositionShift.x); } }
// actually emit travel move gcode protected virtual void emit_travel(Vector3d toPos, double feedRate, string comment) { double write_x = toPos.x + PositionShift.x; double write_y = toPos.y + PositionShift.y; Builder.BeginGLine(TravelGCode, comment). AppendF("X", write_x).AppendF("Y", write_y); if (OmitDuplicateZ == false || MathUtil.EpsilonEqual(currentPos.z, toPos.z, MoveEpsilon) == false) { Builder.AppendF("Z", toPos.z); } if (OmitDuplicateF == false || MathUtil.EpsilonEqual(currentFeed, feedRate, MoveEpsilon) == false) { Builder.AppendF("F", feedRate); } currentPos = toPos; currentFeed = feedRate; }