Skip to content

Optimized rastering

Compare
Choose a tag to compare
@dren-dk dren-dk released this 11 Jul 18:51
· 26 commits to master since this release

This release brings great strides in rastering performance, especially for very large, sparse rasters.

  • Switched to a proper fixed-point dithering implementation from the twelve monkeys image library.
  • Implemented more detailed SVG output, where CSS classes are used to indicate different kinds of paths, see the embedded stylesheet in the output SVG for details:
    • move: green, thin
    • cut: black, thick
    • engraving with the laser on: dark blue, thick
    • engraving with the laser off: red, half-thick
    • engraving acceleration: yellow, half-thick
  • Implemented two new rastering modes, selectable via the photonsaw-raster-optimization style parameter:
    • none: The old rastering mode, each line of a raster is scanned at the raster-speed from the first pixel to the last.
    • fast: Sufficiently long blank spaces in each line is traversed at max speed in stead of the raster-speed.
    • fastest: Lines are split into sections which allow distant parts of the image to be rastered individually.

Benchmarks for some different SVGs:

SVG NONE FAST FASTEST
frandsen.svg, low-res 337 s 318 s 302 s
frandsen.svg, high-res 1060 s 995 s 901 s
flemming,svg, high-res 3191 s 2566 s 2005 s
flemming,svg, low-res 1000 s 808 s 707 s

The larger the raster and the more sparse it is, the more advantage there is to the optimization.
See the tool paths in the optimization-data.zip