Thank you very much!
Les
On Dec 19, 2014, at 9:42 AM, Torsten Paul Torsten.Paul@gmx.de wrote:
On 12/19/2014 04:30 PM, Les Hall wrote:
Torsten, where in the docs is the command line info? or do i try —help or
something? I’d really like to do this the command line way.
A (very short) explanation is there:
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment#Constants
Another simple example:
mode = 0;
module part1() {
cube(20, center = true);
}
module part2() {
cylinder(r = 5, h = 21, center = true);
}
module assembly() {
difference() {
part1();
part2();
}
}
if (mode == 1) {
part1();
} else if (mode == 2) {
part2();
} else {
assembly();
}
Create a batch file (or shell script, or processing sketch, ...):
openscad -Dmode=0 -o all.stl params.scad
openscad -Dmode=1 -o part1.stl params.scad
openscad -Dmode=2 -o part2.stl params.scad
ciao,
Torsten.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Okay, it's not a bounty attempt, but here is a Python script that will
execute a batch series of OpenSCAD command lines driven from a .csv file.
You can use it to generate a set of images, a set of .STLs or whatever
formats are now or future supported.
The .CSV would would like this:
for an OpenSCAD file like this:
on Debian, the command
would generate (and optionally execute if the -x was missing,) a series of
command lines like this:
Notes:
openscad_batch.py
------------------------CUT BELOW HERE -----------------------------------
-----------------------------CUT ABOVE
HERE-------------------------------------
openscad_batch.py http://forum.openscad.org/file/n10696/openscad_batch.py
Cheers,
--tim
--
View this message in context: http://forum.openscad.org/100-Bounty-for-easy-feature-tp10618p10696.html
Sent from the OpenSCAD mailing list archive at Nabble.com.