Thingiverse
OpenSCAD .csv driven batch exporter by tdeagan
by Thingiverse
Last crawled date: 3 years ago
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.
It uses OpenSCAD's -D capability to populate variables on the command line. Since OpenSCAD determines the output format from the extension of the output filename, that is driven from the .csv as well.
The .CSV would would like this:
FILE,ARGS,able, baker, charlie
"test1.png","--render --projection=o",10,20,30
"test2.stl",,20,30,40
"test3.stl",,30,40,50
for an OpenSCAD file like this:
able = 10;
baker= 10;
charlie = 10;
cube([able,baker,charlie]);
on Debian, the command
python3 openscad_batch.py -x params.csv test.scad
would generate (and optionally execute if the -x was missing,) a series of command lines like this:
openscad --render --projection=o -D "baker=20" -D "able=10" -D "charlie=30" -o test1.png test.scad
openscad -D "baker=30" -D "able=20" -D "charlie=40" -o test2.stl test.scad
openscad -D "baker=40" -D "able=30" -D "charlie=50" -o test3.stl test.scad
Notes:
it's Python 3 (sorry, but I've moved on. 3 is the future.)
it needs a recent version of OpenSCAD to be able to do things like render (see OpenSCAD docs for a list of which command line switches each version of OpenSCAD supports.
call it with -h to get instructions (you can also read them in the source below
I've tested on Windows 8.1 and Debian 64 bit
Here's the help it generates:
usage: openscad_batch.py [-h] [-x] CSV OPENSCAD_FILE
Run OpenSCAD repeatedly with parameters driven from a .csv file.
---------- USAGE NOTES ----------------
* First _row_ of .csv contains paramter names (i.e. OpenSCAD constants)
NOTE: do not enclose parameter names in quotes.
* First _column_ of first _row_ must be named FILE.
* First _column_ of subsequent rows must contain output
file name for that row's values and be in double
quotes (e.g. "cube1.stl")
* Second _column_ of first _row_ must be named ARGS
* Second _column_ of subsequent rows must contain
OpenSCAD cmd line args for that file output or
be empty
(e.g. ,"--render", for a .png output or ,, for
a line with no args)
* String values in subsequent rows must be enclosed in double quotes.
* OpenSCAD executable must be in the PATH
positional arguments:
CSV location of .csv file containing params
OPENSCAD_FILE name of OpenSCAD file (without args)
optional arguments:
-h, --help show this help message and exit
-x Don't execute command line (just send output to console)
EXAMPLE COMMANDS:
c:python34python openscad_batch.py params.csv cubeout.scad
python openscad_batch.py -x params.csv cubeout.scad
(linux)
python3 openscad_batch.py params.csv cubeout.scad
EXAMPLE .CSV FILE:
FILE,ARGS,able,baker,charlie
"cube1.png","--render",10,20,30
"cube2.stl",,20,30,40
"cube3.stl",,30,40,50
works with .scad file:
able = 10;
baker= 10;
charlie = 10;
cube([able,baker,charlie]);
It uses OpenSCAD's -D capability to populate variables on the command line. Since OpenSCAD determines the output format from the extension of the output filename, that is driven from the .csv as well.
The .CSV would would like this:
FILE,ARGS,able, baker, charlie
"test1.png","--render --projection=o",10,20,30
"test2.stl",,20,30,40
"test3.stl",,30,40,50
for an OpenSCAD file like this:
able = 10;
baker= 10;
charlie = 10;
cube([able,baker,charlie]);
on Debian, the command
python3 openscad_batch.py -x params.csv test.scad
would generate (and optionally execute if the -x was missing,) a series of command lines like this:
openscad --render --projection=o -D "baker=20" -D "able=10" -D "charlie=30" -o test1.png test.scad
openscad -D "baker=30" -D "able=20" -D "charlie=40" -o test2.stl test.scad
openscad -D "baker=40" -D "able=30" -D "charlie=50" -o test3.stl test.scad
Notes:
it's Python 3 (sorry, but I've moved on. 3 is the future.)
it needs a recent version of OpenSCAD to be able to do things like render (see OpenSCAD docs for a list of which command line switches each version of OpenSCAD supports.
call it with -h to get instructions (you can also read them in the source below
I've tested on Windows 8.1 and Debian 64 bit
Here's the help it generates:
usage: openscad_batch.py [-h] [-x] CSV OPENSCAD_FILE
Run OpenSCAD repeatedly with parameters driven from a .csv file.
---------- USAGE NOTES ----------------
* First _row_ of .csv contains paramter names (i.e. OpenSCAD constants)
NOTE: do not enclose parameter names in quotes.
* First _column_ of first _row_ must be named FILE.
* First _column_ of subsequent rows must contain output
file name for that row's values and be in double
quotes (e.g. "cube1.stl")
* Second _column_ of first _row_ must be named ARGS
* Second _column_ of subsequent rows must contain
OpenSCAD cmd line args for that file output or
be empty
(e.g. ,"--render", for a .png output or ,, for
a line with no args)
* String values in subsequent rows must be enclosed in double quotes.
* OpenSCAD executable must be in the PATH
positional arguments:
CSV location of .csv file containing params
OPENSCAD_FILE name of OpenSCAD file (without args)
optional arguments:
-h, --help show this help message and exit
-x Don't execute command line (just send output to console)
EXAMPLE COMMANDS:
c:python34python openscad_batch.py params.csv cubeout.scad
python openscad_batch.py -x params.csv cubeout.scad
(linux)
python3 openscad_batch.py params.csv cubeout.scad
EXAMPLE .CSV FILE:
FILE,ARGS,able,baker,charlie
"cube1.png","--render",10,20,30
"cube2.stl",,20,30,40
"cube3.stl",,30,40,50
works with .scad file:
able = 10;
baker= 10;
charlie = 10;
cube([able,baker,charlie]);
Similar models
thingiverse
free
OpenSCAD multi part render script by RedWagon
... must end in .stl or .dxf.
call render_scad.sh file.scad
output files are always placed in the same directory the scad file is in
thingiverse
free
OpenSCAD - bulk export from JSON/CSV to STL/PNG by OutwardB
...,0,0,0 -p "' + $jsonpath + '" -p "' + $_.name + '" "' + $scadpath + '"'
thingiverse
free
STL to OpenSCAD python converter by rcsivertsen
...l to openscad python converter by rcsivertsen
thingiverse
updated for python3.
how to use:http://www.thingiverse.com/thing:64709
thingiverse
free
Box-o-tron by zignig
...ard slot and tab and "cupcake" style bolt able t joins.
included gpl.txt licence. need to create command line interface
thingiverse
free
Simple Name Sign by Fryns
...zer usage.
if you need more than 4 lines of names please refer to the openscad file in "any name sign" (thing:269405)
thingiverse
free
Digitize from Photo by benzol
...for openscad. (this is mainly due to the issue of "dots" vs. "comma"). so you can copy and paste much easier.
thingiverse
free
Hex Shank Bit Holder - Parametric by Fitzterra
...the same goes for height andfoot.
on github: https://github.com/fitzterra/3dp/tree/master/things/tools/hex_shank_drill_bit_holder
3ddd
$1
столик Baker
... r o a d c o l l e c t i o n
s t r a t f o r d l o w t a b l e
w 42" d 42" h 19¼"
w 107cm d 107cm h 49cm
thingiverse
free
Ikari Warriors Dust Washer by PL1
...w .stl file into your slicer program
check the top layer path after slicing to be sure the fine lines aren't missing.
scott
thingiverse
free
Nets of Polyhedra by kitwallace
...ts will need to be glued or taped.
i'd be very interested to hear from anyone who uses these files to laser cut eg cardboard.
Tdeagan
thingiverse
free
PTT Switch Case by tdeagan
...ptt switch case by tdeagan
thingiverse
this is a hand-mounted case for a ham radio ptt swtich.
thingiverse
free
Novation Launchpad Pro 45 degree stand by tdeagan
...novation launchpad pro 45 degree stand by tdeagan
thingiverse
this is a 45 degree stand for the novation launchpad pro.
thingiverse
free
ARPIE Case Stand by tdeagan
...m/products/hotchk155/arpie-midi-arpeggiator-kit/) in its acrylic case (https://www.tindie.com/products/hotchk155/case-for-arpie/)
thingiverse
free
Xiegu G90 Speaker Redirector by tdeagan
...or for the xiegu g90. it was designed to be held in place by the g90-h1 bracket, but tape would also work.
print needs supports.
thingiverse
free
NEMA 23 Stepper Motor Mount by tdeagan
...s designed to place the stepper motor on the outside of the mount (screw coupler would be over the two 1/4" mounting holes.)
thingiverse
free
Blister Pack Pill Box by tdeagan
...ingle blister pack pill. i also added a detent lock on the sliding lid to keep it shut and radius'd the corners for comfort.
thingiverse
free
Printrbot Plus E3D Extruder mount by tdeagan
...o that the extruder sits at a level appropriate for the e3d, but still allows mounting to the printrbot plus x-carriage assembly.
thingiverse
free
Panel Mount for 4.3" LCD screen (Raspberry PI) by tdeagan
...e rear of a panel. useful for embedded raspberry pi projects. primitive openscad file included. holes are sized for 6-32 screws.
thingiverse
free
7" Touchscreen Stand by tdeagan
...d more permanently with a drop of hot melt glue or other adhesive. design constructed in fusion 360 and printed on a prusa mk2.
thingiverse
free
Kaoss Pad Kaossilator Stand by tdeagan
... these wonderful devices.
print 2 legs and 3 leg_join for a single unit stand. print two stand_join to link two stands together.
Csv
thingiverse
free
Freelancer "CSV" by HotSliceOfJesus
...me freelancer the "csv" favored by the junkers and hogosha. not normally a playable ship unless playing a moddeld game.
thingiverse
free
Toy for boys - Cannon - OpenScad CSV by stollew
...
but attack forces needs bigger size.
this is effect of playing with code (included)
if you want to make changes, see code
enjoy!
thingiverse
free
Drawers multilock - OpenScad CSV by stollew
...ful for somebody
code will be included in next release of template shapes_text due to not published yet changes in modules
enjoy!
thingiverse
free
OpenSCAD - bulk export from JSON/CSV to STL/PNG by OutwardB
...,0,0,0 -p "' + $jsonpath + '" -p "' + $_.name + '" "' + $scadpath + '"'
thingiverse
free
Quick release chain/gate latch -OpenScad CSV by stollew
...thick, dim.50x50mm, but for home use with low force pla printout should be ok.
if you want to make some changes, read code
enjoy!
thingiverse
free
Toys for boys - Castle gate + stone walls - OpenScad CSV by stollew
...mes thingiverse limit), so i put a replacement. if you want to print bars or make a changes
read template codes (included)
enjoy!
thingiverse
free
Toys for girls - bracelet or ring - customizable OpenScad CSV by stollew
...les.
if you want to make own design download and read the code(included).
code contains changed, not published yet modules
enjoy!
thingiverse
free
Toys for boys- Castle / lighthouse tower with stairs - OpenScad CSV by stollew
....
change parameters to get what you want
safety first - lighthouse tower top with balustrade and separate lighthouse added
enjoy!
thingiverse
free
Temperature recorder box with SD card by Geekolo
...electronic to measure temperatures and log them in a csv file on an sd card. the freecad file allow...
Batch
3ddd
$1
Interior Objects Batch-4
...ch-4
3ddd
interior objects batch-4/original design by me, all models are not collapse to editable poly. thank you and god speed!
3d_export
$30
echo bad batch helmet model
... helmet model
3dexport
this is echo bad batch helmet model which i`ve in arma3 imported. its an obj stl and fbx files in archive
3d_export
$19
Vibrating Screen Machine for Concrete Batching Plant
...r concrete batching plant
3dexport
file : 3ds max 2016 export : fbx obj stl render : corona dimensions 1231.9 x 250 x h 396.1 cm
3ddd
free
Interior Object - 05
...interior object - 05 3ddd interior object batch 05 i make originally the design of these vases...
3d_export
$5
pneumatic trolley
...model is designed for a real concept, an experimental batch has been produced and is already used in the...
3d_export
$96
welding tooling drawing of forklift outer portal frame in large enterprises
...materials, large, medium and small materials. medium and small batch ...
3d_export
$110
f-86 canarias sta maria class frigate
...oliver hazard perry-class frigates.<br>built in two batches, the second batch units (f-85 and 86) received some improvements, such as...
3d_export
$105
roks seoul ffg-821 daegu class frigate
...frigate, and has otherwise been referred to an incheon-class batch ii, or ffg-ii. eight daegu-class ships are planned, with...
3d_export
$20
automatic bottled beverage production line
...box, the lack of instructions in the box, no batch number on the surface of the box, and box...
3d_export
$20
M8 Scott HMC
...the t17e1 hmc were all satisfactory, and the first batch was ordered in april. official designation was howitzer motor...
Driven
turbosquid
$50
CHAIN DRIVEN CONVEYOR
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
3d_export
free
driven shaft of the lump crusher
...driven shaft of the lump crusher
3dexport
3d_export
$27
n95 full servo driven mask printer
...n95 full servo driven mask printer
3dexport
n95 full servo driven mask printer
turbosquid
$16
(Project) Food packing helper machine with holding clamp and press table driven by an actuator
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
3d_export
$47
the fifth generation of one driven two new mask machine
...ing, lamination, pressing, ear band tapping, ultrasonic, etc. the structure of the model is detailed, including model parameters.
3d_export
$15
industrial belt-driven air cooler
...leaning up necessary, just drop your models into the scene and start rendering/texturing. no special plugin needed to open scene.
3d_export
free
golf cart
...golf cart 3dexport golf cart for golfers to be driven in...
3d_export
$10
design and assembly of pulley
...pulley 3d model which is used for drive and driven ...
archive3d
free
Windmill 3D Model
...windmill 3d model archive3d wind turbine wind-driven powerplant wind-electric set windmill n181208 - 3d model (*.gsm+*.3ds)...
3d_export
$30
Compressed Air Engine 3D Model
...motor flywheel shaft camshaft piston valve block engineering compressed-air driven compressed air engine 3d model zenmunster 92451...
Openscad
thingiverse
free
OpenSCAD sphere
...openscad sphere
thingiverse
basic project for openscad.
thingiverse
free
Openscad Football by KySyth
...openscad football by kysyth
thingiverse
openscad not tested
thingiverse
free
Openscad Apple by KySyth
...openscad apple by kysyth
thingiverse
openscad apple = not tested
thingiverse
free
Plugs with openscad by benengel
...plugs with openscad by benengel
thingiverse
plugs with openscad and fontawesome
thingiverse
free
Openscad spirals by mafmuf
...openscad spirals by mafmuf
thingiverse
just fooling around with openscad.
thingiverse
free
Practice on OpenScad by ajensen906
...practice on openscad by ajensen906
thingiverse
a very crude practice on openscad
thingiverse
free
Batteries in OpenSCAD by roman_hegglin
...batteries in openscad by roman_hegglin
thingiverse
common batteries as modules for openscad.
thingiverse
free
OpenScad Propeller by KySyth
...se
trying to make a propeller with openscad = not tested
this is some of the results
added the openscad file but still need work
thingiverse
free
Openscad Cloud by Twanne
...openscad cloud by twanne
thingiverse
openscad cloud.
size can be adjusted
thingiverse
free
Geomag for OpenScad by vicnet
...geomag for openscad by vicnet
thingiverse
openscad file to design geomag things.
Exporter
turbosquid
$1
export
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
3d_export
$30
Pulley export
...pulley export
3dexport
pulley export design render 3d modelling
turbosquid
$6
Italy Export
... free 3d model italy export for download as max, fbx, and obj on turbosquid: 3d models for games, architecture, videos. (1648374)
3ddd
$1
Lam Export - 1945.2B
...lam export - 1945.2b
3ddd
lam export
lam export - 1945/2bподвесной светильник на 2 лампыl 100 cm x h 85-125 cm2 x e27 60 watt
3ddd
$1
Lam Export - 4501
...lam export - 4501
3ddd
lam export
lam export - 4501/6люстра на 6 лампØ 85 cm x h 68 cm6 x e14 40 watt
3ddd
$1
Mirandola export banquette
... банкетка
mirandola export, collection poltrone e relax 2, art.174.
www.mirandolaexport.it
в архиве файл для 3da max 2010
turbosquid
$49
International export truck
...onal export truck sude for download as 3ds, max, fbx, and dae on turbosquid: 3d models for games, architecture, videos. (1437171)
turbosquid
$15
Chandelier IDL Export
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
turbosquid
$10
Mexican Export Boxes
... available on turbo squid, the world's leading provider of digital 3d models for visualization, films, television, and games.
3ddd
$1
Lam Export - 1895 3s
...lam export - 1895 3s
3ddd
lam export
оправа: сусальное золото