diff options
author | Marius Kintel <marius@kintel.net> | 2014-02-04 03:53:54 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2014-02-04 03:53:54 (GMT) |
commit | c4e41d76e1c320c252c27dc1ba916188de08e23c (patch) | |
tree | a67b937e55e73ef63345916f2bf177d65fcbde40 | |
parent | 887754e2ff47f13d78c6fc1d10ac6697e0eb9662 (diff) |
Added --csglimit parameter
-rw-r--r-- | RELEASE_NOTES | 1 | ||||
-rw-r--r-- | src/openscad.cc | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 0aa6ec0..e2a00a0 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -12,6 +12,7 @@ o FIXME: Experimental concat() Program Features: o Added --info parameter to the cmd-line for system/library info o Added --enable parameter to enable experimental features +o Added --csglimit parameter to change CSG rendering limit o Added Reset View in GUI o Added Feature tab in Preferences diff --git a/src/openscad.cc b/src/openscad.cc index 0fa9f92..5c21fa9 100644 --- a/src/openscad.cc +++ b/src/openscad.cc @@ -113,6 +113,7 @@ static void help(const char *progname) "%2% --camera=eyex,y,z,centerx,y,z ] \\\n" "%2%[ --imgsize=width,height ] [ --projection=(o)rtho|(p)ersp] \\\n" "%2%[ --render | --preview[=throwntogether] ] \\\n" + "%2%[ --csglimit=num ] \\\n" "%2%[ --enable=<feature> ] \\\n" "%2%filename\n", progname % (const char *)tabstr); @@ -581,6 +582,7 @@ int main(int argc, char **argv) ("info", "print information about the building process") ("render", "if exporting a png image, do a full CGAL render") ("preview", po::value<string>(), "if exporting a png image, do an OpenCSG(default) or ThrownTogether preview") + ("csglimit", po::value<unsigned int>(), "if exporting a png image, stop rendering at the given number of CSG elements") ("camera", po::value<string>(), "parameters for camera when exporting png") ("imgsize", po::value<string>(), "=width,height for exporting png") ("projection", po::value<string>(), "(o)rtho or (p)erspective when exporting png") @@ -622,6 +624,10 @@ int main(int argc, char **argv) if (vm["preview"].as<string>() == "throwntogether") renderer = Render::THROWNTOGETHER; + if (vm.count("csglimit")) { + RenderSettings::inst()->openCSGTermLimit = vm["csglimit"].as<unsigned int>(); + } + if (vm.count("o")) { // FIXME: Allow for multiple output files? if (output_file) help(argv[0]); |