Test3dexport


Test 3d file format export, by exporting 3d format, creating temporary '.scad' file that import()s the generated 3d file, then re-exporting to PNG, and comparing against the cgalpngtest expected file. The set of tests is somewhat small to begin with, but can be grown by editing CMakeLists.txt

The new tests are named for the 3dformat then 'png'. The first two are 

           stlpngtests
           offpngtests

Each 3d format must have import() functionality for these tests to work. 

In order to output 'monochrome' tests to deal with the fact that 3d formats like STL have no 'back face'/'front face', there was Major refactoring of entire color subsystem, with 'color schemes' inside colormap.cc / colormap.h and centralization of colorization when calling renderers. 

This is not quite as clean a design as i would like but i think it is cleaner than it was before. (Less hard-coding of RGB inside .cc code... and easier to move to a custom color-scheme system in the future )

New cmdnline option --colorscheme, New tests to test colorscheme option

New colorscheme for black-background previewing (Starnight) (there are a lot of websites / etc where people use openscad with black-on-white text in the editor, this should help them. some people find black-on-white to be hard for their eyes to see)

New colorscheme to make 'backface' same color as 'front face' (Monochrome)

Export test is a new .py file based on @t-paul 's design of csgtest. 

Known Bugs:

Not 100% backwards compatible. For example, Throwntogether doesnt have the magenta on backwards faces... some work needs to be done to fix that. 

Starnight scheme hides the 'x y z' letters on the axes. 

------------
Major issue


the threshold of 10% in the ImageMagick Compare test is causing all the tests to pass, even though we are comparing an image with Green backfaces to an image with Gold backfaces, even without feeding --monochrome to the openscad binary. So either the Imagemagick is 'too loose', or the colorscheme refactoring was totally unnecessary. I'm a bit confused how this happened.