From 360f95055ec7db490d5598a7eee3dac65951efb8 Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 9 Dec 2021 10:48:33 -0800 Subject: [PATCH] GCode-based driver improvements: Force laser off, Adjustable precision * Respect "Force laser off during G0" setting also when moving focus (Z axis) * Added settings to configure number of digits used for XYZ as well as S gCodes to allow slimmer gCodes when desired as most machines won't need 6 trailing digits of precision. Less digits gives gCode processor more time to run its main loop. Contributed by @McNugget6750 --- .../drivers/GenericGcodeDriver.java | 77 ++++++++-- .../liblasercut/drivers/Grbl.java | 2 +- ...liblasercut.drivers.GenericGcodeDriver.out | 142 +++++++++--------- ....thomas_oster.liblasercut.drivers.Grbl.out | 2 +- ...homas_oster.liblasercut.drivers.Marlin.out | 142 +++++++++--------- ...ster.liblasercut.drivers.SmoothieBoard.out | 142 +++++++++--------- 6 files changed, 281 insertions(+), 226 deletions(-) diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java b/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java index 85d0b1c0..5cd94101 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/GenericGcodeDriver.java @@ -69,6 +69,9 @@ import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; +import java.text.DecimalFormat; +import java.text.NumberFormat; + /** * This class implements a driver for a generic GRBL GCode Lasercutter. * It should contain all possible options and is inteded to be the superclass @@ -105,6 +108,8 @@ public class GenericGcodeDriver extends LaserCutter { protected static final String SETTING_UPLOAD_METHOD = "Upload method"; protected static final String SETTING_RASTER_PADDING = "Extra padding at ends of raster scanlines (mm)"; protected static final String SETTING_API_KEY = "Api-Key/Password for Octoprint"; + protected static final String SETTING_GCODE_DIGITS = "Decimal places used for XY coordinates"; + protected static final String SETTING_SCODE_DIGITS = "Decimal places used for power (S) value"; protected static final Locale FORMAT_LOCALE = Locale.US; @@ -458,6 +463,15 @@ public LaserProperty getLaserPropertyForRasterPart() return new FloatPowerSpeedFocusProperty(); } + protected String formatDouble(double value, int decimalPlaces) + { + Locale locale = new Locale("en", "US"); + DecimalFormat coordinateFormat = (DecimalFormat)NumberFormat.getNumberInstance(locale); + coordinateFormat.applyPattern("###.##"); + coordinateFormat.setMaximumFractionDigits(decimalPlaces); + return coordinateFormat.format(value); + } + protected void writeVectorGCode(VectorPart vp, double resolution) throws UnsupportedEncodingException, IOException { for (VectorCommand cmd : vp.getCommandList()) { switch (cmd.getType()) { @@ -494,12 +508,17 @@ protected void setSpeed(double speedInPercent) { protected void setPower(double powerInPercent) { nextPower = powerInPercent/100.0*spindleMax; } - + protected void setFocus(PrintStream out, double focus) throws IOException { - if (currentFocus != focus) - { - sendLine("G0 Z%f", focus); - currentFocus = focus; + + if (currentFocus != focus) { + String append = ""; + if (blankLaserDuringRapids) { + append = " S0"; + currentPower = -1; // set to invalid value to force new S-value at next G1 + } + sendLine("G0 Z%s" + append, formatDouble(focus, getGCodeDigits())); + currentFocus = focus; } } @@ -507,14 +526,15 @@ protected void move(PrintStream out, double x, double y, double resolution) thro x = isFlipXaxis() ? getBedWidth() - Util.px2mm(x, resolution) : Util.px2mm(x, resolution); y = isFlipYaxis() ? getBedHeight() - Util.px2mm(y, resolution) : Util.px2mm(y, resolution); currentSpeed = getTravel_speed(); + if (blankLaserDuringRapids) { - currentPower = 0.0; - sendLine("G0 X%f Y%f F%d S0", x, y, (int) (travel_speed)); + currentPower = -1; // set to invalid value to force new S-value at next G1 + sendLine("G0 X%s Y%s F%d S0", formatDouble(x, getGCodeDigits()), formatDouble(y, getGCodeDigits()), (int) (travel_speed)); } else { - sendLine("G0 X%f Y%f F%d", x, y, (int) (travel_speed)); + sendLine("G0 X%s Y%s F%d", formatDouble(x, getGCodeDigits()), formatDouble(y, getGCodeDigits()), (int) (travel_speed)); } } @@ -522,9 +542,10 @@ protected void line(PrintStream out, double x, double y, double resolution) thro x = isFlipXaxis() ? getBedWidth() - Util.px2mm(x, resolution) : Util.px2mm(x, resolution); y = isFlipYaxis() ? getBedHeight() - Util.px2mm(y, resolution) : Util.px2mm(y, resolution); String append = ""; + if (nextPower != currentPower) { - append += String.format(FORMAT_LOCALE, " S%f", nextPower); + append += String.format(FORMAT_LOCALE, " S%s", formatDouble(nextPower, getSCodeDigits())); currentPower = nextPower; } if (nextSpeed != currentSpeed) @@ -532,7 +553,7 @@ protected void line(PrintStream out, double x, double y, double resolution) thro append += String.format(FORMAT_LOCALE, " F%d", (int) (max_speed*nextSpeed/100.0)); currentSpeed = nextSpeed; } - sendLine("G1 X%f Y%f"+append, x, y); + sendLine("G1 X%s Y%s" + append, formatDouble(x, getGCodeDigits()), formatDouble(y, getGCodeDigits())); } private void writeInitializationCode() throws IOException { @@ -1057,6 +1078,30 @@ public void setApiKey(String apiKey) this.apiKey = apiKey; } + private Integer gCodeDigits = 6; + + public Integer getGCodeDigits() + { + if (gCodeDigits == null) gCodeDigits = 6; + return gCodeDigits; + } + public void setGCodeDigits(Integer gCodeDigits) + { + this.gCodeDigits = gCodeDigits; + } + + private Integer sCodeDigits = 0; + + public Integer getSCodeDigits() + { + if (sCodeDigits == null) sCodeDigits = 0; + return sCodeDigits; + } + public void setSCodeDigits(Integer sCodeDigits) + { + this.sCodeDigits = sCodeDigits; + } + private static final String[] SETTINGS_LIST = new String[]{ SETTING_UPLOAD_METHOD, SETTING_BAUDRATE, @@ -1084,7 +1129,9 @@ public void setApiKey(String apiKey) SETTING_FILE_EXPORT_PATH, SETTING_USE_BIDIRECTIONAL_RASTERING, SETTING_RASTER_PADDING, - SETTING_API_KEY + SETTING_API_KEY, + SETTING_GCODE_DIGITS, + SETTING_SCODE_DIGITS }; @Override @@ -1148,6 +1195,10 @@ public Object getProperty(String attribute) { return this.getRasterPadding(); } else if (SETTING_API_KEY.equals(attribute)) { return this.getApiKey(); + } else if (SETTING_GCODE_DIGITS.equals(attribute)) { + return this.getGCodeDigits(); + } else if (SETTING_SCODE_DIGITS.equals(attribute)) { + return this.getSCodeDigits(); } return null; @@ -1209,6 +1260,10 @@ public void setProperty(String attribute, Object value) { this.setRasterPadding(Math.abs((Double)value)); } else if (SETTING_API_KEY.equals(attribute)) { this.setApiKey((String) value); + } else if (SETTING_GCODE_DIGITS.equals(attribute)) { + this.setGCodeDigits((Integer) value); + } else if (SETTING_SCODE_DIGITS.equals(attribute)) { + this.setSCodeDigits((Integer) value); } } diff --git a/src/main/java/de/thomas_oster/liblasercut/drivers/Grbl.java b/src/main/java/de/thomas_oster/liblasercut/drivers/Grbl.java index c175c860..54ac7765 100644 --- a/src/main/java/de/thomas_oster/liblasercut/drivers/Grbl.java +++ b/src/main/java/de/thomas_oster/liblasercut/drivers/Grbl.java @@ -169,7 +169,7 @@ protected void move(PrintStream out, double x, double y, double resolution) thro currentSpeed = getTravel_speed(); if (blankLaserDuringRapids) { - currentPower = 0.0; + currentPower = -1; // set to invalid value to force new S-value at next G1 sendLine("G0 X%f Y%f S0", x, y); } else diff --git a/test-output/de.thomas_oster.liblasercut.drivers.GenericGcodeDriver.out b/test-output/de.thomas_oster.liblasercut.drivers.GenericGcodeDriver.out index 2591ad16..e3fb2bb5 100644 --- a/test-output/de.thomas_oster.liblasercut.drivers.GenericGcodeDriver.out +++ b/test-output/de.thomas_oster.liblasercut.drivers.GenericGcodeDriver.out @@ -1,74 +1,74 @@ G21 G90 -G0 X0.508000 Y0.508000 F3600 -G1 X25.400000 Y50.800000 S1.000000 F1200 -G1 X50.800000 Y0.000000 -G0 X101.600000 Y0.000000 F3600 -G1 X76.200000 Y5.080000 F1200 -G1 X76.149200 Y20.320000 -G1 X76.149200 Y22.860000 -G1 X76.098400 Y25.400000 -G1 X76.149200 Y30.480000 -G1 X76.200000 Y45.720000 -G1 X101.600000 Y50.800000 -G0 X0.000000 Y1.879600 F3600 -G1 X0.660400 Y1.879600 S0.000000 F1200 -G1 X0.762000 Y1.879600 S1.000000 -G1 X0.863600 Y1.879600 -G1 X0.914400 Y1.879600 -G1 X1.066800 Y1.879600 -G1 X1.117600 Y1.879600 -G1 X6.096000 Y1.879600 S0.000000 -G0 X0.000000 Y1.930400 F3600 -G1 X0.660400 Y1.930400 F1200 -G1 X0.812800 Y1.930400 S1.000000 -G1 X0.863600 Y1.930400 -G1 X0.965200 Y1.930400 -G1 X1.066800 Y1.930400 -G1 X1.117600 Y1.930400 -G1 X6.096000 Y1.930400 S0.000000 -G0 X0.000000 Y1.981200 F3600 -G1 X0.660400 Y1.981200 F1200 -G1 X1.117600 Y1.981200 S1.000000 -G1 X6.096000 Y1.981200 S0.000000 -G0 X0.000000 Y2.032000 F3600 -G1 X0.660400 Y2.032000 F1200 -G1 X0.762000 Y2.032000 S1.000000 -G1 X1.117600 Y2.032000 -G1 X6.096000 Y2.032000 S0.000000 -G0 X0.000000 Y2.082800 F3600 -G1 X0.660400 Y2.082800 F1200 -G1 X1.117600 Y2.082800 S1.000000 -G1 X6.096000 Y2.082800 S0.000000 -G0 X0.000000 Y2.133600 F3600 -G1 X0.660400 Y2.133600 F1200 -G1 X0.762000 Y2.133600 S1.000000 -G1 X1.117600 Y2.133600 -G1 X6.096000 Y2.133600 S0.000000 -G0 X0.000000 Y3.911600 F3600 -G1 X2.235200 Y3.911600 F1200 -G1 X2.336800 Y3.911600 S1.000000 -G1 X2.387600 Y3.911600 S0.000000 -G1 X2.540000 Y3.911600 S1.000000 -G1 X7.518400 Y3.911600 S0.000000 -G0 X0.000000 Y3.962400 F3600 -G1 X2.286000 Y3.962400 F1200 -G1 X2.336800 Y3.962400 S1.000000 -G1 X2.438400 Y3.962400 S0.000000 -G1 X2.540000 Y3.962400 S1.000000 -G1 X7.518400 Y3.962400 S0.000000 -G0 X0.000000 Y4.013200 F3600 -G1 X2.133600 Y4.013200 F1200 -G1 X2.184400 Y4.013200 S0.750000 -G1 X2.235200 Y4.013200 S0.000000 -G1 X2.590800 Y4.013200 S0.750000 -G1 X7.569200 Y4.013200 S0.000000 -G0 X0.000000 Y4.064000 F3600 -G1 X2.235200 Y4.064000 F1200 -G1 X2.590800 Y4.064000 S0.500000 -G1 X7.569200 Y4.064000 S0.000000 -G0 X0.000000 Y4.165600 F3600 -G1 X2.133600 Y4.165600 F1200 -G1 X2.235200 Y4.165600 S1.000000 -G1 X7.213600 Y4.165600 S0.000000 +G0 X0.508 Y0.508 F3600 +G1 X25.4 Y50.8 S1 F1200 +G1 X50.8 Y0 +G0 X101.6 Y0 F3600 +G1 X76.2 Y5.08 F1200 +G1 X76.1492 Y20.32 +G1 X76.1492 Y22.86 +G1 X76.0984 Y25.4 +G1 X76.1492 Y30.48 +G1 X76.2 Y45.72 +G1 X101.6 Y50.8 +G0 X0 Y1.8796 F3600 +G1 X0.6604 Y1.8796 S0 F1200 +G1 X0.762 Y1.8796 S1 +G1 X0.8636 Y1.8796 +G1 X0.9144 Y1.8796 +G1 X1.0668 Y1.8796 +G1 X1.1176 Y1.8796 +G1 X6.096 Y1.8796 S0 +G0 X0 Y1.9304 F3600 +G1 X0.6604 Y1.9304 F1200 +G1 X0.8128 Y1.9304 S1 +G1 X0.8636 Y1.9304 +G1 X0.9652 Y1.9304 +G1 X1.0668 Y1.9304 +G1 X1.1176 Y1.9304 +G1 X6.096 Y1.9304 S0 +G0 X0 Y1.9812 F3600 +G1 X0.6604 Y1.9812 F1200 +G1 X1.1176 Y1.9812 S1 +G1 X6.096 Y1.9812 S0 +G0 X0 Y2.032 F3600 +G1 X0.6604 Y2.032 F1200 +G1 X0.762 Y2.032 S1 +G1 X1.1176 Y2.032 +G1 X6.096 Y2.032 S0 +G0 X0 Y2.0828 F3600 +G1 X0.6604 Y2.0828 F1200 +G1 X1.1176 Y2.0828 S1 +G1 X6.096 Y2.0828 S0 +G0 X0 Y2.1336 F3600 +G1 X0.6604 Y2.1336 F1200 +G1 X0.762 Y2.1336 S1 +G1 X1.1176 Y2.1336 +G1 X6.096 Y2.1336 S0 +G0 X0 Y3.9116 F3600 +G1 X2.2352 Y3.9116 F1200 +G1 X2.3368 Y3.9116 S1 +G1 X2.3876 Y3.9116 S0 +G1 X2.54 Y3.9116 S1 +G1 X7.5184 Y3.9116 S0 +G0 X0 Y3.9624 F3600 +G1 X2.286 Y3.9624 F1200 +G1 X2.3368 Y3.9624 S1 +G1 X2.4384 Y3.9624 S0 +G1 X2.54 Y3.9624 S1 +G1 X7.5184 Y3.9624 S0 +G0 X0 Y4.0132 F3600 +G1 X2.1336 Y4.0132 F1200 +G1 X2.1844 Y4.0132 S1 +G1 X2.2352 Y4.0132 S0 +G1 X2.5908 Y4.0132 S1 +G1 X7.5692 Y4.0132 S0 +G0 X0 Y4.064 F3600 +G1 X2.2352 Y4.064 F1200 +G1 X2.5908 Y4.064 S0 +G1 X7.5692 Y4.064 S0 +G0 X0 Y4.1656 F3600 +G1 X2.1336 Y4.1656 F1200 +G1 X2.2352 Y4.1656 S1 +G1 X7.2136 Y4.1656 S0 G0 X0 Y0 diff --git a/test-output/de.thomas_oster.liblasercut.drivers.Grbl.out b/test-output/de.thomas_oster.liblasercut.drivers.Grbl.out index 1ec6c5d0..adf20a44 100644 --- a/test-output/de.thomas_oster.liblasercut.drivers.Grbl.out +++ b/test-output/de.thomas_oster.liblasercut.drivers.Grbl.out @@ -1 +1 @@ -G21 G90 M3 G0X0.508000Y0.508000S0 G1X25.400000Y50.800000S1000.000000F1200 G1X50.800000Y0.000000 G0X101.600000Y0.000000S0 G1X76.200000Y5.080000S1000.000000F1200 G1X76.149200Y20.320000 G1X76.149200Y22.860000 G1X76.098400Y25.400000 G1X76.149200Y30.480000 G1X76.200000Y45.720000 G1X101.600000Y50.800000 G0X0.000000Y1.879600S0 G1X0.660400Y1.879600F1200 G1X0.762000Y1.879600S1000.000000 G1X0.863600Y1.879600 G1X0.914400Y1.879600 G1X1.066800Y1.879600 G1X1.117600Y1.879600 G1X6.096000Y1.879600S0.000000 G0X0.000000Y1.930400S0 G1X0.660400Y1.930400F1200 G1X0.812800Y1.930400S1000.000000 G1X0.863600Y1.930400 G1X0.965200Y1.930400 G1X1.066800Y1.930400 G1X1.117600Y1.930400 G1X6.096000Y1.930400S0.000000 G0X0.000000Y1.981200S0 G1X0.660400Y1.981200F1200 G1X1.117600Y1.981200S1000.000000 G1X6.096000Y1.981200S0.000000 G0X0.000000Y2.032000S0 G1X0.660400Y2.032000F1200 G1X0.762000Y2.032000S1000.000000 G1X1.117600Y2.032000 G1X6.096000Y2.032000S0.000000 G0X0.000000Y2.082800S0 G1X0.660400Y2.082800F1200 G1X1.117600Y2.082800S1000.000000 G1X6.096000Y2.082800S0.000000 G0X0.000000Y2.133600S0 G1X0.660400Y2.133600F1200 G1X0.762000Y2.133600S1000.000000 G1X1.117600Y2.133600 G1X6.096000Y2.133600S0.000000 G0X0.000000Y3.911600S0 G1X2.235200Y3.911600F1200 G1X2.336800Y3.911600S1000.000000 G1X2.387600Y3.911600S0.000000 G1X2.540000Y3.911600S1000.000000 G1X7.518400Y3.911600S0.000000 G0X0.000000Y3.962400S0 G1X2.286000Y3.962400F1200 G1X2.336800Y3.962400S1000.000000 G1X2.438400Y3.962400S0.000000 G1X2.540000Y3.962400S1000.000000 G1X7.518400Y3.962400S0.000000 G0X0.000000Y4.013200S0 G1X2.133600Y4.013200F1200 G1X2.184400Y4.013200S750.000000 G1X2.235200Y4.013200S0.000000 G1X2.590800Y4.013200S750.000000 G1X7.569200Y4.013200S0.000000 G0X0.000000Y4.064000S0 G1X2.235200Y4.064000F1200 G1X2.590800Y4.064000S500.000000 G1X7.569200Y4.064000S0.000000 G0X0.000000Y4.165600S0 G1X2.133600Y4.165600F1200 G1X2.235200Y4.165600S1000.000000 G1X7.213600Y4.165600S0.000000 M5 G0X0Y0 \ No newline at end of file +G21 G90 M3 G0X0.508000Y0.508000S0 G1X25.4Y50.8S1000F1200 G1X50.8Y0 G0X101.600000Y0.000000S0 G1X76.2Y5.08S1000F1200 G1X76.1492Y20.32 G1X76.1492Y22.86 G1X76.0984Y25.4 G1X76.1492Y30.48 G1X76.2Y45.72 G1X101.6Y50.8 G0X0.000000Y1.879600S0 G1X0.6604Y1.8796S0F1200 G1X0.762Y1.8796S1000 G1X0.8636Y1.8796 G1X0.9144Y1.8796 G1X1.0668Y1.8796 G1X1.1176Y1.8796 G1X6.096Y1.8796S0 G0X0.000000Y1.930400S0 G1X0.6604Y1.9304S0F1200 G1X0.8128Y1.9304S1000 G1X0.8636Y1.9304 G1X0.9652Y1.9304 G1X1.0668Y1.9304 G1X1.1176Y1.9304 G1X6.096Y1.9304S0 G0X0.000000Y1.981200S0 G1X0.6604Y1.9812S0F1200 G1X1.1176Y1.9812S1000 G1X6.096Y1.9812S0 G0X0.000000Y2.032000S0 G1X0.6604Y2.032S0F1200 G1X0.762Y2.032S1000 G1X1.1176Y2.032 G1X6.096Y2.032S0 G0X0.000000Y2.082800S0 G1X0.6604Y2.0828S0F1200 G1X1.1176Y2.0828S1000 G1X6.096Y2.0828S0 G0X0.000000Y2.133600S0 G1X0.6604Y2.1336S0F1200 G1X0.762Y2.1336S1000 G1X1.1176Y2.1336 G1X6.096Y2.1336S0 G0X0.000000Y3.911600S0 G1X2.2352Y3.9116S0F1200 G1X2.3368Y3.9116S1000 G1X2.3876Y3.9116S0 G1X2.54Y3.9116S1000 G1X7.5184Y3.9116S0 G0X0.000000Y3.962400S0 G1X2.286Y3.9624S0F1200 G1X2.3368Y3.9624S1000 G1X2.4384Y3.9624S0 G1X2.54Y3.9624S1000 G1X7.5184Y3.9624S0 G0X0.000000Y4.013200S0 G1X2.1336Y4.0132S0F1200 G1X2.1844Y4.0132S750 G1X2.2352Y4.0132S0 G1X2.5908Y4.0132S750 G1X7.5692Y4.0132S0 G0X0.000000Y4.064000S0 G1X2.2352Y4.064S0F1200 G1X2.5908Y4.064S500 G1X7.5692Y4.064S0 G0X0.000000Y4.165600S0 G1X2.1336Y4.1656S0F1200 G1X2.2352Y4.1656S1000 G1X7.2136Y4.1656S0 M5 G0X0Y0 \ No newline at end of file diff --git a/test-output/de.thomas_oster.liblasercut.drivers.Marlin.out b/test-output/de.thomas_oster.liblasercut.drivers.Marlin.out index 15170b35..ef07ee65 100644 --- a/test-output/de.thomas_oster.liblasercut.drivers.Marlin.out +++ b/test-output/de.thomas_oster.liblasercut.drivers.Marlin.out @@ -2,77 +2,77 @@ G21 G90 G28 XY M5 -G0 X0.508000 Y0.508000 F3600 -G1 X25.400000 Y50.800000 S100.000000 F1200 -G1 X50.800000 Y0.000000 -G0 X101.600000 Y0.000000 F3600 -G1 X76.200000 Y5.080000 F1200 -G1 X76.149200 Y20.320000 -G1 X76.149200 Y22.860000 -G1 X76.098400 Y25.400000 -G1 X76.149200 Y30.480000 -G1 X76.200000 Y45.720000 -G1 X101.600000 Y50.800000 -G0 X0.000000 Y1.879600 F3600 -G1 X0.660400 Y1.879600 S0.000000 F1200 -G1 X0.762000 Y1.879600 S100.000000 -G1 X0.863600 Y1.879600 -G1 X0.914400 Y1.879600 -G1 X1.066800 Y1.879600 -G1 X1.117600 Y1.879600 -G1 X6.096000 Y1.879600 S0.000000 -G0 X0.000000 Y1.930400 F3600 -G1 X0.660400 Y1.930400 F1200 -G1 X0.812800 Y1.930400 S100.000000 -G1 X0.863600 Y1.930400 -G1 X0.965200 Y1.930400 -G1 X1.066800 Y1.930400 -G1 X1.117600 Y1.930400 -G1 X6.096000 Y1.930400 S0.000000 -G0 X0.000000 Y1.981200 F3600 -G1 X0.660400 Y1.981200 F1200 -G1 X1.117600 Y1.981200 S100.000000 -G1 X6.096000 Y1.981200 S0.000000 -G0 X0.000000 Y2.032000 F3600 -G1 X0.660400 Y2.032000 F1200 -G1 X0.762000 Y2.032000 S100.000000 -G1 X1.117600 Y2.032000 -G1 X6.096000 Y2.032000 S0.000000 -G0 X0.000000 Y2.082800 F3600 -G1 X0.660400 Y2.082800 F1200 -G1 X1.117600 Y2.082800 S100.000000 -G1 X6.096000 Y2.082800 S0.000000 -G0 X0.000000 Y2.133600 F3600 -G1 X0.660400 Y2.133600 F1200 -G1 X0.762000 Y2.133600 S100.000000 -G1 X1.117600 Y2.133600 -G1 X6.096000 Y2.133600 S0.000000 -G0 X0.000000 Y3.911600 F3600 -G1 X2.235200 Y3.911600 F1200 -G1 X2.336800 Y3.911600 S100.000000 -G1 X2.387600 Y3.911600 S0.000000 -G1 X2.540000 Y3.911600 S100.000000 -G1 X7.518400 Y3.911600 S0.000000 -G0 X0.000000 Y3.962400 F3600 -G1 X2.286000 Y3.962400 F1200 -G1 X2.336800 Y3.962400 S100.000000 -G1 X2.438400 Y3.962400 S0.000000 -G1 X2.540000 Y3.962400 S100.000000 -G1 X7.518400 Y3.962400 S0.000000 -G0 X0.000000 Y4.013200 F3600 -G1 X2.133600 Y4.013200 F1200 -G1 X2.184400 Y4.013200 S75.000000 -G1 X2.235200 Y4.013200 S0.000000 -G1 X2.590800 Y4.013200 S75.000000 -G1 X7.569200 Y4.013200 S0.000000 -G0 X0.000000 Y4.064000 F3600 -G1 X2.235200 Y4.064000 F1200 -G1 X2.590800 Y4.064000 S50.000000 -G1 X7.569200 Y4.064000 S0.000000 -G0 X0.000000 Y4.165600 F3600 -G1 X2.133600 Y4.165600 F1200 -G1 X2.235200 Y4.165600 S100.000000 -G1 X7.213600 Y4.165600 S0.000000 +G0 X0.508 Y0.508 F3600 +G1 X25.4 Y50.8 S100 F1200 +G1 X50.8 Y0 +G0 X101.6 Y0 F3600 +G1 X76.2 Y5.08 F1200 +G1 X76.1492 Y20.32 +G1 X76.1492 Y22.86 +G1 X76.0984 Y25.4 +G1 X76.1492 Y30.48 +G1 X76.2 Y45.72 +G1 X101.6 Y50.8 +G0 X0 Y1.8796 F3600 +G1 X0.6604 Y1.8796 S0 F1200 +G1 X0.762 Y1.8796 S100 +G1 X0.8636 Y1.8796 +G1 X0.9144 Y1.8796 +G1 X1.0668 Y1.8796 +G1 X1.1176 Y1.8796 +G1 X6.096 Y1.8796 S0 +G0 X0 Y1.9304 F3600 +G1 X0.6604 Y1.9304 F1200 +G1 X0.8128 Y1.9304 S100 +G1 X0.8636 Y1.9304 +G1 X0.9652 Y1.9304 +G1 X1.0668 Y1.9304 +G1 X1.1176 Y1.9304 +G1 X6.096 Y1.9304 S0 +G0 X0 Y1.9812 F3600 +G1 X0.6604 Y1.9812 F1200 +G1 X1.1176 Y1.9812 S100 +G1 X6.096 Y1.9812 S0 +G0 X0 Y2.032 F3600 +G1 X0.6604 Y2.032 F1200 +G1 X0.762 Y2.032 S100 +G1 X1.1176 Y2.032 +G1 X6.096 Y2.032 S0 +G0 X0 Y2.0828 F3600 +G1 X0.6604 Y2.0828 F1200 +G1 X1.1176 Y2.0828 S100 +G1 X6.096 Y2.0828 S0 +G0 X0 Y2.1336 F3600 +G1 X0.6604 Y2.1336 F1200 +G1 X0.762 Y2.1336 S100 +G1 X1.1176 Y2.1336 +G1 X6.096 Y2.1336 S0 +G0 X0 Y3.9116 F3600 +G1 X2.2352 Y3.9116 F1200 +G1 X2.3368 Y3.9116 S100 +G1 X2.3876 Y3.9116 S0 +G1 X2.54 Y3.9116 S100 +G1 X7.5184 Y3.9116 S0 +G0 X0 Y3.9624 F3600 +G1 X2.286 Y3.9624 F1200 +G1 X2.3368 Y3.9624 S100 +G1 X2.4384 Y3.9624 S0 +G1 X2.54 Y3.9624 S100 +G1 X7.5184 Y3.9624 S0 +G0 X0 Y4.0132 F3600 +G1 X2.1336 Y4.0132 F1200 +G1 X2.1844 Y4.0132 S75 +G1 X2.2352 Y4.0132 S0 +G1 X2.5908 Y4.0132 S75 +G1 X7.5692 Y4.0132 S0 +G0 X0 Y4.064 F3600 +G1 X2.2352 Y4.064 F1200 +G1 X2.5908 Y4.064 S50 +G1 X7.5692 Y4.064 S0 +G0 X0 Y4.1656 F3600 +G1 X2.1336 Y4.1656 F1200 +G1 X2.2352 Y4.1656 S100 +G1 X7.2136 Y4.1656 S0 G0 X0 Y0 M5 G28 XY diff --git a/test-output/de.thomas_oster.liblasercut.drivers.SmoothieBoard.out b/test-output/de.thomas_oster.liblasercut.drivers.SmoothieBoard.out index 7ebf6994..f2284336 100644 --- a/test-output/de.thomas_oster.liblasercut.drivers.SmoothieBoard.out +++ b/test-output/de.thomas_oster.liblasercut.drivers.SmoothieBoard.out @@ -1,76 +1,76 @@ G21 G90 M3 -G0 X0.508000 Y0.508000 F3600 -G1 X25.400000 Y50.800000 S1.000000 F1200 -G1 X50.800000 Y0.000000 -G0 X101.600000 Y0.000000 F3600 -G1 X76.200000 Y5.080000 F1200 -G1 X76.149200 Y20.320000 -G1 X76.149200 Y22.860000 -G1 X76.098400 Y25.400000 -G1 X76.149200 Y30.480000 -G1 X76.200000 Y45.720000 -G1 X101.600000 Y50.800000 -G0 X0.000000 Y1.879600 F3600 -G1 X0.660400 Y1.879600 S0.000000 F1200 -G1 X0.762000 Y1.879600 S1.000000 -G1 X0.863600 Y1.879600 -G1 X0.914400 Y1.879600 -G1 X1.066800 Y1.879600 -G1 X1.117600 Y1.879600 -G1 X6.096000 Y1.879600 S0.000000 -G0 X0.000000 Y1.930400 F3600 -G1 X0.660400 Y1.930400 F1200 -G1 X0.812800 Y1.930400 S1.000000 -G1 X0.863600 Y1.930400 -G1 X0.965200 Y1.930400 -G1 X1.066800 Y1.930400 -G1 X1.117600 Y1.930400 -G1 X6.096000 Y1.930400 S0.000000 -G0 X0.000000 Y1.981200 F3600 -G1 X0.660400 Y1.981200 F1200 -G1 X1.117600 Y1.981200 S1.000000 -G1 X6.096000 Y1.981200 S0.000000 -G0 X0.000000 Y2.032000 F3600 -G1 X0.660400 Y2.032000 F1200 -G1 X0.762000 Y2.032000 S1.000000 -G1 X1.117600 Y2.032000 -G1 X6.096000 Y2.032000 S0.000000 -G0 X0.000000 Y2.082800 F3600 -G1 X0.660400 Y2.082800 F1200 -G1 X1.117600 Y2.082800 S1.000000 -G1 X6.096000 Y2.082800 S0.000000 -G0 X0.000000 Y2.133600 F3600 -G1 X0.660400 Y2.133600 F1200 -G1 X0.762000 Y2.133600 S1.000000 -G1 X1.117600 Y2.133600 -G1 X6.096000 Y2.133600 S0.000000 -G0 X0.000000 Y3.911600 F3600 -G1 X2.235200 Y3.911600 F1200 -G1 X2.336800 Y3.911600 S1.000000 -G1 X2.387600 Y3.911600 S0.000000 -G1 X2.540000 Y3.911600 S1.000000 -G1 X7.518400 Y3.911600 S0.000000 -G0 X0.000000 Y3.962400 F3600 -G1 X2.286000 Y3.962400 F1200 -G1 X2.336800 Y3.962400 S1.000000 -G1 X2.438400 Y3.962400 S0.000000 -G1 X2.540000 Y3.962400 S1.000000 -G1 X7.518400 Y3.962400 S0.000000 -G0 X0.000000 Y4.013200 F3600 -G1 X2.133600 Y4.013200 F1200 -G1 X2.184400 Y4.013200 S0.750000 -G1 X2.235200 Y4.013200 S0.000000 -G1 X2.590800 Y4.013200 S0.750000 -G1 X7.569200 Y4.013200 S0.000000 -G0 X0.000000 Y4.064000 F3600 -G1 X2.235200 Y4.064000 F1200 -G1 X2.590800 Y4.064000 S0.500000 -G1 X7.569200 Y4.064000 S0.000000 -G0 X0.000000 Y4.165600 F3600 -G1 X2.133600 Y4.165600 F1200 -G1 X2.235200 Y4.165600 S1.000000 -G1 X7.213600 Y4.165600 S0.000000 +G0 X0.508 Y0.508 F3600 +G1 X25.4 Y50.8 S1 F1200 +G1 X50.8 Y0 +G0 X101.6 Y0 F3600 +G1 X76.2 Y5.08 F1200 +G1 X76.1492 Y20.32 +G1 X76.1492 Y22.86 +G1 X76.0984 Y25.4 +G1 X76.1492 Y30.48 +G1 X76.2 Y45.72 +G1 X101.6 Y50.8 +G0 X0 Y1.8796 F3600 +G1 X0.6604 Y1.8796 S0 F1200 +G1 X0.762 Y1.8796 S1 +G1 X0.8636 Y1.8796 +G1 X0.9144 Y1.8796 +G1 X1.0668 Y1.8796 +G1 X1.1176 Y1.8796 +G1 X6.096 Y1.8796 S0 +G0 X0 Y1.9304 F3600 +G1 X0.6604 Y1.9304 F1200 +G1 X0.8128 Y1.9304 S1 +G1 X0.8636 Y1.9304 +G1 X0.9652 Y1.9304 +G1 X1.0668 Y1.9304 +G1 X1.1176 Y1.9304 +G1 X6.096 Y1.9304 S0 +G0 X0 Y1.9812 F3600 +G1 X0.6604 Y1.9812 F1200 +G1 X1.1176 Y1.9812 S1 +G1 X6.096 Y1.9812 S0 +G0 X0 Y2.032 F3600 +G1 X0.6604 Y2.032 F1200 +G1 X0.762 Y2.032 S1 +G1 X1.1176 Y2.032 +G1 X6.096 Y2.032 S0 +G0 X0 Y2.0828 F3600 +G1 X0.6604 Y2.0828 F1200 +G1 X1.1176 Y2.0828 S1 +G1 X6.096 Y2.0828 S0 +G0 X0 Y2.1336 F3600 +G1 X0.6604 Y2.1336 F1200 +G1 X0.762 Y2.1336 S1 +G1 X1.1176 Y2.1336 +G1 X6.096 Y2.1336 S0 +G0 X0 Y3.9116 F3600 +G1 X2.2352 Y3.9116 F1200 +G1 X2.3368 Y3.9116 S1 +G1 X2.3876 Y3.9116 S0 +G1 X2.54 Y3.9116 S1 +G1 X7.5184 Y3.9116 S0 +G0 X0 Y3.9624 F3600 +G1 X2.286 Y3.9624 F1200 +G1 X2.3368 Y3.9624 S1 +G1 X2.4384 Y3.9624 S0 +G1 X2.54 Y3.9624 S1 +G1 X7.5184 Y3.9624 S0 +G0 X0 Y4.0132 F3600 +G1 X2.1336 Y4.0132 F1200 +G1 X2.1844 Y4.0132 S1 +G1 X2.2352 Y4.0132 S0 +G1 X2.5908 Y4.0132 S1 +G1 X7.5692 Y4.0132 S0 +G0 X0 Y4.064 F3600 +G1 X2.2352 Y4.064 F1200 +G1 X2.5908 Y4.064 S0 +G1 X7.5692 Y4.064 S0 +G0 X0 Y4.1656 F3600 +G1 X2.1336 Y4.1656 F1200 +G1 X2.2352 Y4.1656 S1 +G1 X7.2136 Y4.1656 S0 G0 X0 Y0 M5