S0 in greyscale engrave with >0 minimum power

I’ve got a minimum and maximum power set for greyscale engrave in a particular job, yet some of the generated gcode shows a spindle speed of 0. Here’s an excerpt from a horizontal line.


G1X0.5S40.175
G1X0.5S0
G1X0.5S40.068
G1X0.49S40.606
G1X1S40.068
G1X0.5S67.433
G1X0.5S0
G1X0.99S40.068
G1X1S0
G1X0.5S47.609
G1X0.5S60.645
G1X0.49S45.67
G1X0.5S42.33
G1X0.5S49.979
G1X0.5S40.068
G1X0.5S52.35
G1X0.49S54.935
G1X0.5S67.002
G1X0.5S46.424
G1X0.5S40.606
G1X0.5S67.433
G1X0.49S0
G1X0.5S67.433
G1X0.5S40.068
G1X0.5S67.433
G1X0.5S40.068
G1X0.49S64.093
G1X0.5S46.855
G1X0.5S57.198

Those S0 speeds should not be there in the middle of a line, and they’re throwing off the engraving.

The cut specifics are:

Spd 25/mms
Max 6.75 (grbl power range is 0-999)
Min 4.0
Line interval 0.498
DPI 51
Mode Greyscale

Thanks

I think the rasterizer skips white pixels, even when doing grayscale. I’ve just changed that.

Cool. It’s probably okay to skip them if the minimum power is 0 though.

I’ve made it respect transparency. If you want skips, make an image with transparent portions.

Nice solution, Oz.