[OpenSCAD] Sharing: how to render on command line

Jerry Davis jdawgaz at gmail.com
Wed Apr 29 11:09:49 EDT 2015

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

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

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


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

*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. *-

*If writing good code requires very little comments, then writing really
excellent code requires no comments at all!*- Ken Thompson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscad.org/pipermail/discuss_lists.openscad.org/attachments/20150429/aeab2c55/attachment-0002.html>

More information about the Discuss mailing list