• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

.circleci/H09-Feb-2021-266264

.github/workflows/H09-Feb-2021-303279

cgal/H09-Feb-2021-2,1361,881

cmake/Modules/H09-Feb-2021-690594

color-schemes/H03-May-2022-500474

contrib/H03-May-2022-556390

doc/H03-May-2022-193173

examples/H03-May-2022-43,96943,484

features/H03-May-2022-764651

fonts/H09-Feb-2021-253181

fonts-osx/H09-Feb-2021-2,1501,967

icons/H03-May-2022-5545

images/H03-May-2022-

libraries/MCAD/H09-Feb-2021-

locale/H09-Feb-2021-24,90019,286

patches/H09-Feb-2021-2,4252,198

releases/H09-Feb-2021-477422

scripts/H09-Feb-2021-8,4186,547

snap/H09-Feb-2021-177168

sounds/H03-May-2022-

src/H03-May-2022-87,96865,889

templates/H09-Feb-2021-3024

test-code/H09-Feb-2021-404319

testdata/H09-Feb-2021-88,78986,340

tests/H03-May-2022-41,15739,560

winconsole/H09-Feb-2021-232153

xcode/H09-Feb-2021-601572

.clang-formatH A D09-Feb-2021550 2321

.clang-tidyH A D09-Feb-202194 43

.gitignoreH A D09-Feb-20211.1 KiB7877

.gitmodulesH A D09-Feb-202196 43

.travis.ymlH A D09-Feb-202110.2 KiB147139

.uncrustify.cfgH A D09-Feb-20212 KiB10993

CMakeSettings.jsonH A D09-Feb-20212.1 KiB5656

COPYINGH A D09-Feb-202118 KiB349287

Info.plistH A D09-Feb-20212.8 KiB119118

Info.plist.inH A D09-Feb-20212.6 KiB109108

OpenSCAD.sdefH A D09-Feb-2021378 98

README.mdH A D09-Feb-202111 KiB271189

RELEASE_NOTES.mdH A D09-Feb-202121.5 KiB492434

appcast-snapshots.xml.inH A D09-Feb-2021943 2120

appcast.xml.inH A D09-Feb-2021927 2120

bison.priH A D09-Feb-2021467 1110

c++std.priH A D09-Feb-20211.2 KiB4439

common.priH A D09-Feb-20211.1 KiB3431

csgopnode.hH A D09-Feb-2021431 1815

defaults.priH A D09-Feb-202119 21

dsa_pub.pemH A D09-Feb-2021654 1312

flex.priH A D09-Feb-2021432 1110

info.priH A D09-Feb-2021896 3935

lgtm.ymlH A D09-Feb-2021857 3534

mingw-cross-env.priH A D09-Feb-2021275 97

opengl.priH A D09-Feb-2021693 2522

openscad.appdata.xml.inH A D09-Feb-20213.1 KiB5049

openscad.proH A D03-May-202223.4 KiB772702

openscad.qrcH A D09-Feb-20214.2 KiB112111

openscad_win32.rcH A D09-Feb-2021923 4236

org.openscad.OpenSCAD.xmlH A D09-Feb-20212.4 KiB6160

qt.priH A D09-Feb-2021129 86

setenv_mac.shH A D09-Feb-2021366 138

valgrind.suppH A D09-Feb-20211 KiB5346

version.priH A D09-Feb-20212.5 KiB7869

win.priH A D09-Feb-2021838 2621

README.md

1[![Travis (master)](https://img.shields.io/travis/openscad/openscad/master.svg?logo=travis&logoColor=black&colorA=f9d72c&style=plastic)](https://travis-ci.org/openscad/openscad/)
2[![AppVeyor (master)](https://img.shields.io/appveyor/ci/kintel/openscad/master.svg?logo=appveyor&logoColor=black&colorA=f9d72c&style=plastic)](https://ci.appveyor.com/project/kintel/openscad)
3[![CircleCI (master)](https://img.shields.io/circleci/project/github/openscad/openscad/master.svg?logo=circleci&logoColor=black&colorA=f9d72c&style=plastic)](https://circleci.com/gh/openscad/openscad/tree/master)
4[![Coverity Scan](https://img.shields.io/coverity/scan/2510.svg?colorA=f9d72c&logoColor=black&style=plastic)](https://scan.coverity.com/projects/2510)
5
6
7[![Visit our IRC channel](https://kiwiirc.com/buttons/irc.freenode.net/openscad.png)](https://kiwiirc.com/client/irc.freenode.net/#openscad)
8
9# What is OpenSCAD?
10[![Flattr this git repo](https://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=openscad&url=http://openscad.org&title=OpenSCAD&language=&tags=github&category=software)
11
12OpenSCAD is a software for creating solid 3D CAD objects. It is free software
13and available for Linux/UNIX, MS Windows and Mac OS X.
14
15Unlike most free software for creating 3D models (such as the famous
16application Blender), OpenSCAD focuses on the CAD aspects rather than the
17artistic aspects of 3D modeling. Thus this might be the application you are
18looking for when you are planning to create 3D models of machine parts but
19probably not the tool for creating computer-animated movies.
20
21OpenSCAD is not an interactive modeler. Instead it is more like a
223D-compiler that reads a script file that describes the object and renders
23the 3D model from this script file (see examples below). This gives you, the
24designer, complete control over the modeling process and enables you to easily
25change any step in the modeling process or make designs that are defined by
26configurable parameters.
27
28OpenSCAD provides two main modeling techniques: First there is constructive
29solid geometry (aka CSG) and second there is extrusion of 2D outlines. As the data
30exchange format for these 2D outlines Autocad DXF files are used. In
31addition to 2D paths for extrusion it is also possible to read design parameters
32from DXF files. Besides DXF files OpenSCAD can read and create 3D models in the
33STL and OFF file formats.
34
35# Contents
36
37- [Getting Started](#getting-started)
38- [Documentation](#documentation)
39    - [Building OpenSCAD](#building-openscad)
40        - [Prerequisites](#prerequisites)
41        - [Getting the source code](#getting-the-source-code)
42        - [Building for Mac OS X](#building-for-mac-os-x)
43        - [Building for Linux/BSD](#building-for-linuxbsd)
44        - [Building for Linux/BSD on systems with older or missing dependencies](#building-for-linuxbsd-on-systems-with-older-or-missing-dependencies)
45        - [Building for Windows](#building-for-windows)
46        - [Compilation](#compilation)
47
48# Getting started
49
50You can download the latest binaries of OpenSCAD at
51<https://www.openscad.org/downloads.html>. Install binaries as you would any other
52software.
53
54When you open OpenSCAD, you'll see three frames within the window. The
55left frame is where you'll write code to model 3D objects. The right
56frame is where you'll see the 3D rendering of your model.
57
58Let's make a tree! Type the following code into the left frame:
59
60    cylinder(h = 30, r = 8);
61
62Then render the 3D model by hitting F5. Now you can see a cylinder for
63the trunk in our tree. Now let's add the bushy/leafy part of the tree
64represented by a sphere. To do so, we will union a cylinder and a
65sphere.
66
67    union() {
68      cylinder(h = 30, r = 8);
69      sphere(20);
70    }
71
72But, it's not quite right! The bushy/leafy are around the base of the
73tree. We need to move the sphere up the z-axis.
74
75    union() {
76      cylinder(h = 30, r = 8);
77      translate([0, 0, 40]) sphere(20);
78    }
79
80And that's it! You made your first 3D model! There are other primitive
81shapes that you can combine with other set operations (union,
82intersection, difference) and transformations (rotate, scale,
83translate) to make complex models! Check out all the other language
84features in the [OpenSCAD
85Manual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual).
86
87# Documentation
88
89Have a look at the OpenSCAD Homepage (https://www.openscad.org/documentation.html) for documentation.
90
91## Building OpenSCAD
92
93To build OpenSCAD from source, follow the instructions for the
94platform applicable to you below.
95
96### Prerequisites
97
98To build OpenSCAD, you need some libraries and tools. The version
99numbers in brackets specify the versions which have been used for
100development. Other versions may or may not work as well.
101
102If you're using a newer version of Ubuntu, you can install these
103libraries from aptitude. If you're using Mac, or an older Linux/BSD, there
104are build scripts that download and compile the libraries from source.
105Follow the instructions for the platform you're compiling on below.
106
107* A C++ compiler supporting C++14
108* [Qt (5.4 ->)](https://qt.io/)
109* [QScintilla2 (2.9 ->)](https://riverbankcomputing.com/software/qscintilla/)
110* [CGAL (4.9 ->)](https://www.cgal.org/)
111 * [GMP (5.x)](https://gmplib.org/)
112 * [MPFR (3.x)](https://www.mpfr.org/)
113* [cmake (2.8 ->, required by CGAL and the test framework)](https://cmake.org/)
114* [boost (1.55 ->)](https://www.boost.org/)
115* [OpenCSG (1.3.2 ->)](http://www.opencsg.org/)
116* [GLEW (1.5.4 ->)](http://glew.sourceforge.net/)
117* [Eigen (3.x)](https://eigen.tuxfamily.org/)
118* [glib2 (2.x)](https://developer.gnome.org/glib/)
119* [fontconfig (2.10 -> )](https://fontconfig.org/)
120* [freetype2 (2.4 -> )](https://freetype.org/)
121* [harfbuzz (0.9.19 -> )](https://www.freedesktop.org/wiki/Software/HarfBuzz/)
122* [libzip (0.10.1 -> )](https://libzip.org/)
123* [Bison (2.4 -> )](https://www.gnu.org/software/bison/)
124* [Flex (2.5.35 -> )](http://flex.sourceforge.net/)
125* [pkg-config (0.26 -> )](https://www.freedesktop.org/wiki/Software/pkg-config/)
126* [double-conversion (2.0.1 -> )](https://github.com/google/double-conversion/)
127
128### Getting the source code
129
130Install git (https://git-scm.com/) onto your system. Then run a clone:
131
132    git clone git://github.com/openscad/openscad.git
133
134This will download the latest sources into a directory named `openscad`.
135
136To pull the MCAD library (https://github.com/openscad/MCAD), do the following:
137
138    cd openscad
139    git submodule update --init
140
141### Building for Mac OS X
142
143Prerequisites:
144
145* Xcode
146* curl
147* cmake
148* pkgconfig
149* autoconf automake libtool (for HIDAPI / InputDevice support)
150
151Install Dependencies:
152
153After building dependencies using one of the following three options, follow the instructions in the *Compilation* section.
154
1551. **From source**
156
157    Run the script that sets up the environment variables:
158
159        source setenv_mac.sh
160
161    Then run the script to compile all the dependencies:
162
163        ./scripts/macosx-build-dependencies.sh
164
1651. **Homebrew** (assumes [Homebrew](https://brew.sh/) is already installed)
166
167        ./scripts/macosx-build-homebrew.sh
168
1691. **MacPorts** (assumes [MacPorts](https://www.macports.org/) is already installed)
170
171    For the adventurous, it might be possible to build OpenSCAD using _MacPorts_. The main challenge is that MacPorts have partially broken libraries, but that tends to change from time to time.
172
173    NB! MacPorts currently doesn't support Qt5 very well, so using Qt4
174    is the only working option at the moment. However, MacPorts' Qt4
175    has a broken `moc` command, causing OpenSCAD compilation to
176    break. This may be fixed in MacPorts by the time you read this.
177```
178        sudo port install opencsg qscintilla boost cgal pkgconfig eigen3 harfbuzz fontconfig
179```
180
181
182### Building for Linux/BSD
183
184First, make sure that you have git installed (often packaged as 'git-core'
185or 'scmgit'). Once you've cloned this git repository, download and install
186the dependency packages listed above using your system's package
187manager. A convenience script is provided that can help with this
188process on some systems:
189
190    sudo ./scripts/uni-get-dependencies.sh
191
192After installing dependencies, check their versions. You can run this
193script to help you:
194
195    ./scripts/check-dependencies.sh
196
197Take care that you don't have old local copies anywhere (`/usr/local/`).
198If all dependencies are present and of a high enough version, skip ahead
199to the Compilation instructions.
200
201### Building for Linux/BSD on systems with older or missing dependencies
202
203If some of your system dependency libraries are missing or old, then you
204can download and build newer versions into `$HOME/openscad_deps` by
205following this process. First, run the script that sets up the
206environment variables.
207
208    source ./scripts/setenv-unibuild.sh
209
210Then run the script to compile all the prerequisite libraries above:
211
212    ./scripts/uni-build-dependencies.sh
213
214Note that huge dependencies like gcc, qt, or glib2 are not included
215here, only the smaller ones (boost, CGAL, opencsg, etc). After the
216build, again check dependencies.
217
218    ./scripts/check-dependencies.sh
219
220After that, follow the Compilation instructions below.
221
222### Building for Windows
223
224OpenSCAD for Windows is usually cross-compiled from Linux. If you wish to
225attempt an MSVC build on Windows, please see this site:
226https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows
227
228To cross-build, first make sure that you have all necessary dependencies
229of the MXE project ( listed at https://mxe.cc/#requirements ). Don't install
230MXE itself, the scripts below will do that for you under `$HOME/openscad_deps/mxe`
231
232Then get your development tools installed to get GCC. Then after you've
233cloned this git repository, start a new clean bash shell and run the
234script that sets up the environment variables.
235
236    source ./scripts/setenv-mingw-xbuild.sh 64
237
238Then run the script to download & compile all the prerequisite libraries above:
239
240    ./scripts/mingw-x-build-dependencies.sh 64
241
242Note that this process can take several hours, and tens of gigabytes of
243disk space, as it uses the [https://mxe.cc](https://mxe.cc) system to cross-build many
244libraries. After it is complete, build OpenSCAD and package it to an
245installer:
246
247    ./scripts/release-common.sh mingw64
248
249If you wish you can only build the `openscad.exe` binary:
250
251    cd mingw64
252    qmake ../openscad.pro CONFIG+=mingw-cross-env
253    make
254
255For a 32-bit Windows cross-build, replace 64 with 32 in the above instructions.
256
257### Compilation
258
259First, run `qmake openscad.pro` from Qt to generate a Makefile.
260
261On some systems, depending on which version(s) of Qt you have installed, you may need to specify which version you want to use, e.g. by running `qmake4`, `qmake-qt4`, `qmake -qt=qt5`, or something alike.
262
263Then run `make`. Finally you might run `make install` as root or simply copy the
264'openscad' binary (`OpenSCAD.app` on Mac OS X) to the bin directory of your choice.
265
266If you had problems compiling from source, raise a new issue in the
267[issue tracker on the github page](https://github.com/openscad/openscad/issues).
268
269This site and it's subpages can also be helpful:
270https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_OpenSCAD_from_Sources
271