3dpBurner-Image2Gcode icon indicating copy to clipboard operation
3dpBurner-Image2Gcode copied to clipboard

Feature Request: Option to combine moves with no change

Open Zaaphod opened this issue 4 years ago • 1 comments

The output Gcode file would be much smaller if you only output the coordinates where something changes, either direction or power.
here's an example from a random place in a file of a 10inch design at 0.01 inch resolution. X9.92S93 X9.91S91 X9.9 X9.89 X9.88 X9.87 X9.86 X9.85 X9.84 X9.83 X9.82 X9.81 X9.8 X9.79 X9.78 X9.77 X9.76 X9.75 X9.74 X9.73 X9.72 X9.71 X9.7 X9.69 X9.68 X9.67 X9.66 X9.65 X9.64 X9.63 X9.62 X9.61 X9.6 X9.59 X9.58 X9.57 X9.56 X9.55 X9.54 X9.53 X9.52 X9.51 X9.5 X9.49 X9.48 X9.47 X9.46 X9.45 X9.44 X9.43 X9.42 X9.41 X9.4 X9.39 X9.38 X9.37 X9.36 X9.35 X9.34 X9.33 X9.32 X9.31 X9.3 X9.29 X9.28 X9.27 X9.26 X9.25 X9.24 X9.23 X9.22 X9.21 X9.2 X9.19 X9.18 X9.17 X9.16 X9.15 X9.14 X9.13 X9.12 X9.11 X9.1 X9.09 X9.08 X9.07 X9.06 X9.05 X9.04 X9.03 X9.02 X9.01 X9 X8.99 X8.98 X8.97 X8.96 X8.95 X8.94 X8.93 X8.92 X8.91 X8.9 X8.89 X8.88 X8.87 X8.86 X8.85 X8.84 X8.83 X8.82 X8.81 X8.8 X8.79 X8.78 X8.77 X8.76 X8.75 X8.74 X8.73 X8.72 X8.71 X8.7 X8.69 X8.68 X8.67 X8.66 X8.65 X8.64 X8.63 X8.62 X8.61 X8.6 X8.59 X8.58 X8.57 X8.56 X8.55 X8.54 X8.53 X8.52 X8.51 X8.5 X8.49 X8.48 X8.47 X8.46 X8.45 X8.44 X8.43 X8.42 X8.41 X8.4 X8.39 X8.38 X8.37 X8.36 X8.35 X8.34 X8.33 X8.32 X8.31 X8.3 X8.29 X8.28 X8.27 X8.26 X8.25 X8.24 X8.23 X8.22 X8.21 X8.2 X8.19 X8.18 X8.17 X8.16 X8.15S90 X8.14S91 X8.13S108

Omit all the X values where only X changes, because if it's on a straight line, none of that is needed at all. The following code is equivalent but much more efficient X9.92S93 X9.91S91 X8.16 ;Just put the last one before the change X8.15S90 X8.14S91 X8.13S108

what happens is that all these X values that are on a straight line end up throttling the controller with a whole stream of data that it can't keep up with and the files are unnecessarily huge. So only output changes in direction or changes in power level, and the end of the change. For files that are black and white, this can make a huge difference. there are sections of some programs that have thousands of coordinates all lying in a straight line at the power level that can all be eliminated.

Zaaphod avatar Jun 21 '20 19:06 Zaaphod

Actually all you need is the last one.. just keep replacing the last line until either the direction or power level changes. X9.92S93 X8.16S91 ;Last coordinate before power change X8.15S90 X8.14S91 X8.13S108

Zaaphod avatar Jun 21 '20 20:06 Zaaphod