summaryrefslogtreecommitdiff
path: root/src/openscad.cc
diff options
context:
space:
mode:
authorchrysn <chrysn@fsfe.org>2013-06-24 16:41:50 (GMT)
committerchrysn <chrysn@fsfe.org>2013-06-25 11:41:48 (GMT)
commit7d53e564aaa522fdb16cb92831741354ab18dee7 (patch)
treee336324418e7723300625f9ef6eb1d3d2fc1cab6 /src/openscad.cc
parent84857ac157d3097be4ca32378cbd0855e4577b90 (diff)
use openscad as a replacement for dumptest and echotest
the echotest and dumptest still contain hacks to keep the delta to the original unit tests minimal; possibly, some of these changes will make it into the openscad program, at which time they can go away from there.
Diffstat (limited to 'src/openscad.cc')
-rw-r--r--src/openscad.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/openscad.cc b/src/openscad.cc
index bcde5e2..2619914 100644
--- a/src/openscad.cc
+++ b/src/openscad.cc
@@ -313,6 +313,7 @@ int main(int argc, char **argv)
const char *dxf_output_file = NULL;
const char *csg_output_file = NULL;
const char *png_output_file = NULL;
+ bool null_output = false;
QString suffix = QFileInfo(output_file).suffix().toLower();
if (suffix == "stl") stl_output_file = output_file;
@@ -320,6 +321,7 @@ int main(int argc, char **argv)
else if (suffix == "dxf") dxf_output_file = output_file;
else if (suffix == "csg") csg_output_file = output_file;
else if (suffix == "png") png_output_file = output_file;
+ else if (strcmp(output_file, "null") == 0) null_output = true;
else {
fprintf(stderr, "Unknown suffix for output file %s\n", output_file);
exit(1);
@@ -383,8 +385,8 @@ int main(int argc, char **argv)
}
else {
#ifdef ENABLE_CGAL
- if (png_output_file && !vm.count("render")) {
- // OpenCSG png -> don't necessarily need CGALMesh evaluation
+ if ((null_output || png_output_file) && !vm.count("render")) {
+ // null output or OpenCSG png -> don't necessarily need CGALMesh evaluation
} else {
root_N = cgalevaluator.evaluateCGALMesh(*tree.root());
}
contact: Jan Huwald // Impressum