openscad/openscad — pull request #622 by donbright (2014-01-31 01:40:49+00:00)
Title: Test3dexport

this will add some ability to do testing of 3d export to the test suite. the strategy is as Marius described earlier,...

Like so. Consider we want to test example001.scad

During the test run:

Step 1: output the 3d STL file as 'example001.scad.stl'

Step 2: create a temporary new scad file, "import( example001.scad.stl );"

Step 3: run openscad on the new scad file and output to PNG

Step 4. Compare the new PNG to the 'expected' PNG just like in a normal test

Now. to generate the expected test PNG? We just generate it like we would any other PNG.

Currently it only uses some of the examples as tests and only does STL/OFF. We can add more as time goes on and the import/export ability improves.