possible to use interactive params examples to generate multiple models with openjscad CLI?
In the examples directory you have files that have interactive parameters like the gear: https://github.com/jscad/OpenJSCAD.org/blob/master/examples/gear.jscad Can that same file be run with the CLI somehow so I can generate multiple stl files like: openjscad gear.jscad -paramaters numberTeeth=[5,10] -output_folder gears_folder
where that would generate STLs with the number of teeth set to 5 and 10?
@jtoy right now, only a single output per CLI call is possible but
- multiple outputs has been discussed previously : https://github.com/jscad/OpenJSCAD.org/issues/282
- parameters can be provided like this : https://github.com/jscad/OpenJSCAD.org/blob/master/src/cli/cli.test.js#L45
- for V2.0 multiple outputs for CLI is 100% going to be in there
I have to write a script to do this for my project now, so I can try to write my own version now and submit it as a patch. @kaosat-dev do you have any idea on when v2 will be released?
@jtoy that would be great ! Even if it is nothing fancy, an addition like this would be good, and I have a ton of other things to work on. We can help out if needed ! :) For V2 : hard to give a precise date, but I am hoping somewhere around end of January 2018 at best
@kaosat-dev here is a script I wrote to generate multiple versions from interactive param examples: https://github.com/jtoy/cad_model_experiments/blob/master/multijscad.js I can add as a pull request if you think helpful.
@jtoy I will take a look at the script tomorrow thanks !
@kaosat-dev I just updated the code to be a little simpler: https://github.com/jtoy/cad_model_experiments Should I submit a pull request to add this?
@jtoy I like it. Why the interest in the gears? FYI, there's a website that generates gears which is based on JSCAD; http://www.knowhave.com/gear/worm.php
I just have one comment about the design (not the code). It does have an interactive parameter for 'resolution'. Designs need to be high definition when generating smooth curves.
@z3dev Great, I will submit a pull request. I just use gears as an example as I pulled it from the OpenJSCAD examples: https://github.com/jscad/OpenJSCAD.org/blob/master/examples/gear.jscad I am generating many other types of objects.
@z3dev @kaosat-dev here is the pull request: https://github.com/jscad/OpenJSCAD.org/pull/338
@jtoy please open a new issue against V2 if you still want this functionality. And of course, you are welcome to submit a pull request. :)