Discussion:
[OpenSCAD] Customizer Export
fractorr
2018-12-01 04:53:25 UTC
Permalink
I have just started playing around with customizer and really like it. I was
wondering if using customizer if it is possible to say have 3 variables in
customizer each with a slider and generate and export a stl out of ever
possible combination of the variable values?

So if there was 3 possible values in each of the 3 sliders it would generate
and export 27 different stl files?





--
Sent from: http://forum.openscad.org/
MichaelAtOz
2018-12-01 06:25:37 UTC
Permalink
ATM export is a manual process. It also requires a render (F6) which can take
some time, so it unlikely it will be automated in the GUI.

I haven't done it, but you should be able to script via the command line;
see 'Saving Parameters value in JSON file' at
OpenSCAD_User_Manual/WIP#Customizer
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#Customizer>



-----
Admin - email* me if you need anything, or if I've done something stupid...

* click on my MichaelAtOz label, there is a link to email me.

Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.

The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
--
Sent from: http://forum.openscad.org/
Kevin Toppenberg
2018-12-01 13:28:36 UTC
Permalink
Stupid question: What is customizer?

I hear people talk about it. And I know it is related to OpenSCAD. But is
it an online version of OpenSCAD, or a slightly different application?

Thanks
Post by MichaelAtOz
ATM export is a manual process. It also requires a render (F6) which can take
some time, so it unlikely it will be automated in the GUI.
I haven't done it, but you should be able to script via the command line;
see 'Saving Parameters value in JSON file' at
OpenSCAD_User_Manual/WIP#Customizer
<https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/WIP#Customizer>
-----
Admin - email* me if you need anything, or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.
Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.
The TPP is no simple “trade agreement.” Fight it!
http://www.ourfairdeal.org/ time is running out!
--
Sent from: http://forum.openscad.org/
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Michael Frey
2018-12-01 13:33:51 UTC
Permalink
Post by fractorr
So if there was 3 possible values in each of the 3 sliders it would generate
and export 27 different stl files?
I would use a batch file (on Windows) or a shell script (any Unix
plattform).
I had a similar case where I needed 36 STL Files from one SCAD file.
Using Linux, I did the following:
--------
#!/bin/bash
for i in {0..360..10}
do
    tmp="openscad -o leg$i.stl leg.scad -D ang=$i"
    echo $tmp
    eval $tmp
done
--------
It should be obvious that for loops and be nested and multiple variables
can be overwritten using multiple -D options for calling openscad.

Offcourse, you could use any scripting/programming language you like.
The only trick is to generate the variable values by code and applying
them using -D to the design.


With kind regards,

Michael Frey
Trevor Orr
2018-12-01 15:36:52 UTC
Permalink
Excellent, I will give that a try. Right now I use php to generate a
separate scad file for each variation. It works but it's messy, this way
looks much better, generating the variables is not a problem.
Post by Michael Frey
Post by fractorr
So if there was 3 possible values in each of the 3 sliders it would generate
and export 27 different stl files?
I would use a batch file (on Windows) or a shell script (any Unix
plattform).
I had a similar case where I needed 36 STL Files from one SCAD file.
--------
#!/bin/bash
for i in {0..360..10}
do
tmp="openscad -o leg$i.stl leg.scad -D ang=$i"
echo $tmp
eval $tmp
done
--------
It should be obvious that for loops and be nested and multiple variables
can be overwritten using multiple -D options for calling openscad.
Offcourse, you could use any scripting/programming language you like.
The only trick is to generate the variable values by code and applying
them using -D to the design.
With kind regards,
Michael Frey
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Trevor Orr
2018-12-01 16:21:52 UTC
Permalink
This is fantastic, with some small changes to my php file that I was using
to generate a separate scad file I was able to change it to one script file
and pass in the different variable variations and generate all the stl
files. It never ceases to amaze me what can be done with OpenSCAD.
Post by fractorr
Post by fractorr
So if there was 3 possible values in each of the 3 sliders it would
generate
Post by fractorr
and export 27 different stl files?
I would use a batch file (on Windows) or a shell script (any Unix
plattform).
I had a similar case where I needed 36 STL Files from one SCAD file.
--------
#!/bin/bash
for i in {0..360..10}
do
tmp="openscad -o leg$i.stl leg.scad -D ang=$i"
echo $tmp
eval $tmp
done
--------
It should be obvious that for loops and be nested and multiple variables
can be overwritten using multiple -D options for calling openscad.
Offcourse, you could use any scripting/programming language you like.
The only trick is to generate the variable values by code and applying
them using -D to the design.
With kind regards,
Michael Frey
_______________________________________________
OpenSCAD mailing list
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Loading...