discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Sharing: how to render on command line

JD
Jerry Davis
Wed, Apr 29, 2015 3:09 PM

To keep working in openscad and rendering at the same time is easy, with a
little bit of openscad command line know how.

Here is my render script: (runs on linux and os x)
Sorry windows people, I have no windows computer to write a script for you.
But I am sure something could be whipped up there.

#!/usr/bin/env bash

if [ -z $1 ]; then
echo "usage: render <file>.scad"
exit 1
fi

of=${1%scad}stl    # substitute <inputfile>.scad with <inputfile>.stl

echo openscad -o $of $1
openscad -o $of $1


Jerry

--
Extra Ham Operator: K7AZJ
Registered Linux User: 275424
Raspberry Pi and Arduino developer

The most exciting phrase to hear in science - the one that heralds new
discoveries - is not "Eureka!" but "That's funny...".
- Isaac. Asimov

I
*f you give someone a program, you will frustrate them for a day; if you
teach them how to program, you will frustrate them for a lifetime. *-
Anonymous

If writing good code requires very little comments, then writing really
excellent code requires no comments at all!
- Ken Thompson

To keep working in openscad and rendering at the same time is easy, with a little bit of openscad command line know how. Here is my render script: (runs on linux and os x) Sorry windows people, I have no windows computer to write a script for you. But I am sure something could be whipped up there. #!/usr/bin/env bash if [ -z $1 ]; then echo "usage: render <file>.scad" exit 1 fi of=${1%scad}stl # substitute <inputfile>.scad with <inputfile>.stl echo openscad -o $of $1 openscad -o $of $1 ------------ Jerry -- Extra Ham Operator: K7AZJ Registered Linux User: 275424 Raspberry Pi and Arduino developer *The most exciting phrase to hear in science - the one that heralds new discoveries - is not "Eureka!" but "That's funny...".*- Isaac. Asimov *I* *f you give someone a program, you will frustrate them for a day; if you teach them how to program, you will frustrate them for a lifetime. *- Anonymous *If writing good code requires very little comments, then writing really excellent code requires no comments at all!*- Ken Thompson
M
MichaelAtOz
Tue, May 5, 2015 11:36 PM

What would be handy for this approach, would be the ability to initiate a
script from the OpenSCAD GUI.
Say F7, with the script command line in preferences with a substitute
parameter of the scad filename.

Would need to make sure you saved changes of course.


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. This work is published globally via the internet. :) 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/

View this message in context: http://forum.openscad.org/Sharing-how-to-render-on-command-line-tp12515p12588.html
Sent from the OpenSCAD mailing list archive at Nabble.com.

What would be handy for this approach, would be the ability to initiate a script from the OpenSCAD GUI. Say F7, with the script command line in preferences with a substitute parameter of the scad filename. Would need to make sure you saved changes of course. ----- 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. This work is published globally via the internet. :) 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/ -- View this message in context: http://forum.openscad.org/Sharing-how-to-render-on-command-line-tp12515p12588.html Sent from the OpenSCAD mailing list archive at Nabble.com.