LaserWeb / deprecated-LaserWeb3

Open Source Laser Cutter / Engraver software. Supports gcode, svg, dxf, stl, png, jpg, bmp
265 stars 68 forks source link

Remove unnedded G1 commands #228

Closed james-lan closed 7 years ago

james-lan commented 7 years ago

As there are some serial issues, this optimization removes any G1 commands that are not necessary from the laserraster.js output, via keeping track of the last command.

It probably won't help a huge amount, but that's 2 bytes on almost every line of the raster output, which should help some.

ghost commented 7 years ago

Does this take firmwares into accounts where G1 = laser full on?

We have it in LW4 as an option that you can tick : "Burn White" which makes white moves G1 S0 moves. But in LW3 just replacing as is, could have impact on machines where G1 = laser full on (for example smoothie, if S hasnt been specified, may default to 80% power)

Some things are done the way they are, because over the year of development it was done the way they are because there was a reason...

On Tue, Jan 31, 2017 at 8:02 PM, james-lan notifications@github.com wrote:

As there are some serial issues, this optimization removes any G1 commands that are not necessary from the laserraster.js output, via keeping track of the last command.

It probably won't help a huge amount, but that's 2 bytes on almost every line of the raster output, which should help some.

You can view, comment on, or merge this pull request online at:

https://github.com/LaserWeb/LaserWeb3/pull/228 Commit Summary

  • Optimization: Remove unneccessary G1 commands
  • Merge pull request #1 from james-lan/Extra-G1-Removal

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LaserWeb/LaserWeb3/pull/228, or mute the thread https://github.com/notifications/unsubscribe-auth/AHVr27AS99ygvr6sgQRJSccZVXwE24nBks5rX3c4gaJpZM4Ly93n .

cprezzi commented 7 years ago

This breaks smoothieware buffer streaming! For smoothie, we concatenate multiple G0/G1 commands in one line of up to 64 bytes without \n between the commands (because smoothie can separate commands by the Gx).