Added 3MF export/import test
This commit is contained in:
parent
eaae63dd9c
commit
2f7f645528
2 changed files with 3 additions and 2 deletions
|
|
@ -1620,6 +1620,7 @@ list(APPEND TRIVIAL_IMPORT_EXPORT_3D_FILES
|
|||
add_cmdline_test(monotonepngtest EXE ${OPENSCAD_BINPATH} ARGS --colorscheme=Monotone --render -o SUFFIX png FILES ${TRIVIAL_IMPORT_EXPORT_2D_FILES} ${TRIVIAL_IMPORT_EXPORT_3D_FILES})
|
||||
add_cmdline_test(stlpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=STL EXPECTEDDIR monotonepngtest SUFFIX png FILES ${TRIVIAL_IMPORT_EXPORT_3D_FILES})
|
||||
add_cmdline_test(offpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=OFF EXPECTEDDIR monotonepngtest SUFFIX png FILES ${TRIVIAL_IMPORT_EXPORT_3D_FILES})
|
||||
add_cmdline_test(3mfpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=3MF --enable=3mf-import --enable=3mf-export EXPECTEDDIR monotonepngtest SUFFIX png FILES ${TRIVIAL_IMPORT_EXPORT_3D_FILES})
|
||||
add_cmdline_test(dxfpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=DXF --render=cgal EXPECTEDDIR monotonepngtest SUFFIX png FILES ${TRIVIAL_IMPORT_EXPORT_2D_FILES})
|
||||
add_cmdline_test(svgpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=SVG --enable=svg-import --render=cgal EXPECTEDDIR monotonepngtest SUFFIX png FILES ${TRIVIAL_IMPORT_EXPORT_2D_FILES})
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
#
|
||||
#
|
||||
# step 1. If the input file is _not_ an .scad file, create a temporary .scad file importing the input file.
|
||||
# step 2. Run OpenSCAD on the .scad file, output an export format (csg, stl, off, dxf, svg, amf)
|
||||
# step 2. Run OpenSCAD on the .scad file, output an export format (csg, stl, off, dxf, svg, amf, 3mf)
|
||||
# step 3. If the export format is _not_ .csg, create a temporary new .scad file importing the exported file
|
||||
# step 4. Run OpenSCAD on the .csg or .scad file, export to the given .png file
|
||||
# step 5. (done in CTest) - compare the generated .png file to expected output
|
||||
|
|
@ -50,7 +50,7 @@ def createImport(inputfile, scadfile):
|
|||
#
|
||||
# Parse arguments
|
||||
#
|
||||
formats = ['csg', 'stl','off', 'amf', 'dxf', 'svg']
|
||||
formats = ['csg', 'stl','off', 'amf', '3mf', 'dxf', 'svg']
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--openscad', required=True, help='Specify OpenSCAD executable')
|
||||
parser.add_argument('--format', required=True, choices=[item for sublist in [(f,f.upper()) for f in formats] for item in sublist], help='Specify 3d export format')
|
||||
|
|
|
|||
Loading…
Reference in a new issue