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.
21
23 -o outputfile
24 Export the given file to outputfile in STL, OFF, AMF, 3MF, DXF,
25 SVG, or PNG format, depending on file extension of outputfile.
26 If this option is given, the GUI will not be started.
27
28 Additional formats, which are mainly used for debugging and
29 testing (but can also be used in automation), are AST (the input
30 file as parsed and serialized again), CSG (an OpenSCAD language
31 representation of the input file with calculations done and mod‐
32 ule calls applied), TERM (the constructive solid geometry
33 expression passed to OpenCSG). If outputfile is null, no output
34 file will be written, but the file will still be evaluated and
35 all echo commands will be written to the standard error output.
36 (The rendering process will still take place if the --render
37 option is given.)
38
39 -q Quiet mode (don't print anything except errors)
40
41 -d file.deps
42 If the -d option is given, all files accessed while exporting
43 are written to the given deps file in the syntax of a Makefile.
44
45 -m make_command
46 If a nonexisting file is accessed during OpenSCAD's operation,
47 it will try to invoke make_command missing_file to create the
48 missing file, and then read it again.
49
50 -D var=val
51 This option can be used to assign constant values to OpenSCAD
52 variables. The variable's value is an expression, so if this
53 mechanism is used to assign strings, care has to be taken that
54 the shell does not consume quotation marks. More than one -D
55 option can be given.
56
57 --render
58 If exporting an image, render the model fully. (Default is pre‐
59 view)
60
61 --preview[=throwntogether]
62 If exporting an image, use an OpenCSG preview (optionally in
63 throwntogether mode for quicker rendering).
64
65 --view[=axes|crosshairs|edges|scales|wireframe]
66 View options
67
68 --csglimit=limit
69 If exporting an image as an OpenCSG preview, stop rendering
70 after encountering limit elements to avoid runaway resource
71 usage.
72
73 --camera=transx,transy,transz,rotx,roty,rotz,distance
74 If exporting an image, use a Gimbal camera with the given param‐
75 eters. Rot is rotation around the x, y, and z axis, trans is
76 the distance to move the object in the x, y, and z directions,
77 and distance is the distance between the camera and the center
78 of the object.
79
80 --camera=eyex,eyey,eyez,centerx,centery,centerz
81 If exporting an image, use a Vector camera with the given param‐
82 eters. The first three are for the Eye position, while the next
83 three are for the Center (or target) that the camera will look
84 at. The 'up' vector is not currently supported.
85
86 --viewall
87 If exporting an image, adjust camera distance to fit the whole
88 design in the frame
89
90 --autocenter
91 If exporting an image, center the design in the frame
92
93 --imgsize=width,height
94 If exporting an image, specify the pixel width and height
95
96 --projection=[o|ortho|p|perspective]
97 If exporting an image, specify whether to use orthographic or
98 perspective projection
99
100 --colorscheme=scheme
101 If exporting an image, use the specified color scheme for the
102 rendering. scheme can be any of Cornfield, Sunset, Metallic,
103 Starnight, BeforeDawn, Nature or DeepOcean.
104
105 -v, --hardwarnings
106 Stop on the first warning
107
108 --check-parameters=[true|false]
109 Configure the parameter check for user modules and functions
110
111 --check-parameter-ranges=[true|false]
112 Configure the parameter range check for builtin modules
113
114 --info Show which versions of libraries were used to compile the pro‐
115 gram, and which OpenGL details are discovered.
116
118 Render example001.scad into the .stl format (raw triangle data):
119
120 openscad -o example001.stl examples/example001.scad
121
122 Compile a 2d image using a camera rotated 25 degrees in x and 35 in z,
123 distance 500, with orthographic projection:
124
125 openscad -o o.png o.scad --camera=0,0,0,25,0,35,500 --projection=ortho
126
127 Set the 'mode' variable in example017 so that it will render only the
128 parts of the shape. Export to a .dxf file.
129
130 openscad -o example017.dxf -D'mode="parts"' examples/example017.scad
131
132
134 OpenSCAD was written by Clifford Wolf, Marius Kintel, and others.
135
136 This manual page was written by chrysn <chrysn@fsfe.org>, for the
137 Debian project (and may be used by others). Updated by the OpenSCAD
138 team.
139
140
141
142 2019.05 OPENSCAD(1)