1OPENSCAD(1) General Commands Manual OPENSCAD(1)
2
3
4
6 openscad - script file based graphical CAD environment
7
9 openscad [options] [file]
10
12 This manual page documents briefly the openscad command.
13
14 openscad is a software for creating solid 3D CAD objects. It focuses on
15 CAD aspects rather than artistic ones.
16
17 OpenSCAD will start as a graphical program unless export options are
18 given (see below). For the usage of the GUI and a description of the
19 OpenSCAD language see the OpenSCAD user manual at https://en.wiki‐
20 books.org/wiki/OpenSCAD_User_Manual. A tutorial can be found at
21 https://en.wikibooks.org/wiki/OpenSCAD_Tutorial.
22
24 -o outputfile
25 Export the given file to outputfile in STL, OFF, AMF, 3MF, DXF,
26 SVG, or PNG format, depending on file extension of outputfile.
27 If this option is given, the GUI will not be started.
28
29 Known extensions: stl, off, amf, 3mf, csg, dxf, svg, png, echo,
30 ast, term, nef3, nefdbg.
31
32 Additional formats, which are mainly used for debugging and
33 testing (but can also be used in automation), are AST (the input
34 file as parsed and serialized again), CSG (an OpenSCAD language
35 representation of the input file with calculations done and mod‐
36 ule calls applied), TERM (the constructive solid geometry ex‐
37 pression passed to OpenCSG). If outputfile is null, no output
38 file will be written, but the file will still be evaluated and
39 all echo commands will be written to the standard error output.
40 (The rendering process will still take place if the --render op‐
41 tion is given.)
42
43 --export-format
44 Overrides format of exported scad file when using option -o, arg
45 can be any of its supported file extensions.
46
47 -q Quiet mode (don't print anything except errors)
48
49 -d file.deps
50 If the -d option is given, all files accessed while exporting
51 are written to the given deps file in the syntax of a Makefile.
52
53 -m make_command
54 If a nonexisting file is accessed during OpenSCAD's operation,
55 it will try to invoke make_command missing_file to create the
56 missing file, and then read it again.
57
58 -D var=val
59 This option can be used to assign constant values to OpenSCAD
60 variables. The variable's value is an expression, so if this
61 mechanism is used to assign strings, care has to be taken that
62 the shell does not consume quotation marks. More than one -D
63 option can be given.
64
65 -p Customizer parameter file.
66
67 -p Customizer parameter set.
68
69 -v Print version.
70
71 --render
72 If exporting an image, render the model fully. (Default is pre‐
73 view)
74
75 --preview[=throwntogether]
76 If exporting an image, use an OpenCSG preview (optionally in
77 throwntogether mode for quicker rendering).
78
79 --animate[=N]
80 Export N animated frames as PNG images.
81
82 --view[=axes|crosshairs|edges|scales|wireframe]
83 View options
84
85 --csglimit=limit
86 If exporting an image as an OpenCSG preview, stop rendering af‐
87 ter encountering limit elements to avoid runaway resource usage.
88
89 --camera=transx,transy,transz,rotx,roty,rotz,distance
90 If exporting an image, use a Gimbal camera with the given param‐
91 eters. Rot is rotation around the x, y, and z axis, trans is
92 the distance to move the object in the x, y, and z directions,
93 and distance is the distance between the camera and the center
94 of the object.
95
96 --camera=eyex,eyey,eyez,centerx,centery,centerz
97 If exporting an image, use a Vector camera with the given param‐
98 eters. The first three are for the Eye position, while the next
99 three are for the Center (or target) that the camera will look
100 at. The 'up' vector is not currently supported.
101
102 --viewall
103 If exporting an image, adjust camera distance to fit the whole
104 design in the frame
105
106 --autocenter
107 If exporting an image, center the design in the frame
108
109 --imgsize=width,height
110 If exporting an image, specify the pixel width and height
111
112 --projection=[o|ortho|p|perspective]
113 If exporting an image, specify whether to use orthographic or
114 perspective projection
115
116 --colorscheme=scheme
117 If exporting an image, use the specified color scheme for the
118 rendering. scheme can be any of Cornfield, Sunset, Metallic,
119 Starnight, BeforeDawn, Nature or DeepOcean Solarized, Tomorrow,
120 Tomorrow 2, Tomorrow Night, Monotone.
121
122 --hardwarnings
123 Stop on the first warning
124
125 --check-parameters=[true|false]
126 Configure the parameter check for user modules and functions
127
128 --check-parameter-ranges=[true|false]
129 Configure the parameter range check for builtin modules
130
131 --info Show which versions of libraries were used to compile the pro‐
132 gram, and which OpenGL details are discovered.
133
135 Render example001.scad into the .stl format (raw triangle data):
136
137 openscad -o example001.stl examples/example001.scad
138
139 Compile a 2d image using a camera rotated 25 degrees in x and 35 in z,
140 distance 500, with orthographic projection:
141
142 openscad -o o.png o.scad --camera=0,0,0,25,0,35,500 --projection=ortho
143
144 Set the 'mode' variable in example017 so that it will render only the
145 parts of the shape. Export to a .dxf file.
146
147 openscad -o example017.dxf -D'mode="parts"' examples/example017.scad
148
149
151 OpenSCAD was written by Claire 'Clifford' Wolf, Marius Kintel, and oth‐
152 ers.
153
154 This manual page was written by chrysn <chrysn@fsfe.org>, for the De‐
155 bian project (and may be used by others). Updated by the OpenSCAD team.
156
157
158
159 2021.01 OPENSCAD(1)