305engineering / Inkscape

Extensions for Inkscape
134 stars 98 forks source link

Output optimalisation #15

Open JBSchueler opened 7 years ago

JBSchueler commented 7 years ago

I noticed that every move instruction has a speed argument which is always the same. e.g.:

; Generated with:
; "Raster 2 Laser Gcode generator"
; by 305 Engineering
;
;
;
G28; home all axes
G21; Set units to millimeters
G90; Use absolute coordinates
G92; Coordinate Offset
G00 X0.0 Y0.0
M03
G01 X0.1 Y0.0 F288
M05
G00 X0.4 Y0.0
M03
G01 X0.6 Y0.0 F288
M05
G00 X0.8 Y0.0
M03
G01 X0.9 Y0.0 F288
M05
G00 X1.1 Y0.0
M03
G01 X1.1 Y0.0 F288
M05
...

If the speed is always the same it can be set once at the beginning

e.g.

; Generated with:
; "Raster 2 Laser Gcode generator"
; by 305 Engineering
;
;
;
G28; home all axes
G21; Set units to millimeters
G90; Use absolute coordinates
G92; Coordinate Offset
G00 F288
G01 F288
G00 X0.0 Y0.0
M03
G01 X0.1 Y0.0
M05
G00 X0.4 Y0.0
M03
G01 X0.6 Y0.0
M05
G00 X0.8 Y0.0
M03
G01 X0.9 Y0.0
M05
G00 X1.1 Y0.0
M03
G01 X1.1 Y0.0
M05
...

Not only saves this disk space (uhm..., who cares nowerdays ), it saves also a lot of unneeded serial communication and processing on the GBRL interpreter.

JBSchueler commented 7 years ago

The option to set the spindle speed for G00 is not needed. We only want to control G01 (when the laser is on!). G00 is already been set in the configurations of the GRBL.