OpenSCAD - The Programmers Solid 3D CAD Modeller (fork with Delaunay triangulation and bend operator)
 
 
 
 
 
 
Go to file
Torsten Paul 7d863d2bf2 Updates to build on MSYS2. 2014-12-20 23:09:03 +01:00
color-schemes Swap colors so the bright red is only used for language keywords. 2014-12-20 17:30:37 +01:00
contrib Enable Un/Comment selection in the Text menu 2014-11-15 18:02:15 +01:00
doc Update translation file generator scripts. 2014-12-04 23:20:25 +01:00
examples Add version output to text examples and fix viewport orientation. 2014-08-03 18:38:21 +02:00
fonts #803 Don't install OS X specific file on other platforms 2014-12-11 17:32:26 -05:00
fonts-osx #803 Don't install OS X specific file on other platforms 2014-12-11 17:32:26 -05:00
icons Added png of document icon 2014-12-17 15:52:51 -05:00
images Add "ViewAll" and remove "Crosshair" icon from toolbar. 2014-09-18 23:14:12 +02:00
libraries Updated MCAD 2014-03-07 00:15:53 -05:00
locale Finish french translation 2014-12-14 10:21:08 -05:00
patches Updated OpenCSG build to correctly set the install name 2014-09-30 15:27:24 -04:00
qxs Cleaned up qnfa file so it is more taylored to openscad 2010-04-11 10:01:37 +01:00
releases sync 2014-11-24 21:57:36 -05:00
scripts Fix download urls for freetype and ragel; bump freetype to 2.5.4. 2014-12-11 19:42:35 +01:00
src Allow reading the keyword lists from the color scheme files. 2014-12-20 17:27:18 +01:00
test-code Removed old code made redundant by tests 2010-10-31 12:54:23 +01:00
testdata #1065 The text module is no longer experimental 2014-12-17 12:56:52 -05:00
tests #1065 Added new expected test result 2014-12-17 13:13:27 -05:00
xcode Added color-schemes folder 2014-11-05 18:25:55 +04:00
.gitignore Remove obsolete LOCALE_PREFIX and update documentation. 2014-11-13 00:39:17 +01:00
.gitmodules Make MCAD submodule relative to openscad toplevel. 2012-02-18 18:37:53 +01:00
.travis.yml Use dev@openscad.org for notification emails 2014-11-10 15:19:21 -05:00
Arrowhead-Right-32.png toolbar set 2014-09-14 20:38:20 +02:00
COPYING Fixed FSF address 2012-10-07 19:52:43 +02:00
Document-New-128.png toolbar set 2014-09-14 20:38:20 +02:00
Info.plist Mac fix: Only use NSLog when GUI launched 2014-05-17 14:28:22 -04:00
Open-128.png toolbar set 2014-09-14 20:38:20 +02:00
OpenSCAD.sdef Experimental Apple Event hack; you can now do 'tell application "OpenSCAD" to reload' 2010-02-02 01:01:38 +00:00
README.md Add qscintilla2 to dependency list. 2014-09-05 19:58:31 +02:00
RELEASE_NOTES Release preparations 2014-03-06 00:29:08 -05:00
Save-128.png toolbar set 2014-09-14 20:38:20 +02:00
appcast-snapshots.xml.in Require minimum Mac OS X 10.7 2014-04-21 12:44:26 -04:00
appcast.xml.in Require minimum Mac OS X 10.7 2014-04-21 12:44:26 -04:00
axes.png toolbar set 2014-09-14 20:38:20 +02:00
back.png toolbar set 2014-09-14 20:38:20 +02:00
bison.pri Put back some stuff necessary for building on non-MSVC platforms for now 2013-08-19 23:27:30 -04:00
boost.pri Updates to build on MSYS2. 2014-12-20 23:09:03 +01:00
cgal.pri Updates to build on MSYS2. 2014-12-20 23:09:03 +01:00
common.pri Fix library references and translation scripts on MacOS. 2014-10-19 01:25:23 +02:00
down.png toolbar set 2014-09-14 20:38:20 +02:00
dsa_pub.pem Added support for signing binaries 2013-02-11 21:44:48 -05:00
eigen.pri Remove eigen2 detection, eigen3 is required. 2014-12-20 21:38:52 +01:00
flex.pri Modified parse to allow overloading of variables in local blocks. Also did some minor cleanups while at it. Test cases missing 2013-04-26 18:32:19 -04:00
fontconfig.pri Add libraries to qmake config. 2014-02-02 18:00:44 -05:00
freetype.pri Use OPENSCAD_LIBRARY include path only if it actually exists. 2014-08-26 21:24:02 +02:00
front.png toolbar set 2014-09-14 20:38:20 +02:00
gettext.pri Fix library references and translation scripts on MacOS. 2014-10-19 01:25:23 +02:00
glew.pri Updates to build on MSYS2. 2014-12-20 23:09:03 +01:00
glib-2.0.pri bugfix: use 470 to read qmake variable 2014-04-24 22:46:36 -04:00
grid.png toolbar set 2014-09-14 20:38:20 +02:00
harfbuzz.pri Use OPENSCAD_LIBRARY include path only if it actually exists. 2014-08-26 21:24:02 +02:00
mingw-cross-env.pri Move -DNOGDI to main project file. 2014-12-20 21:46:30 +01:00
mjau.gdb First version of automatic updates for Mac 2013-02-05 00:36:25 -05:00
opencsg.pri Some more build system cleaning 2011-12-15 05:17:04 +01:00
openscad.appdata.xml AppData: Do not have 2 default screenshots 2013-12-24 02:37:43 +01:00
openscad.png toolbar set 2014-09-14 20:38:20 +02:00
openscad.pro Updates to build on MSYS2. 2014-12-20 23:09:03 +01:00
openscad.pro.user toolbar set 2014-09-14 20:38:20 +02:00
openscad.qrc Add "ViewAll" and remove "Crosshair" icon from toolbar. 2014-09-18 23:14:12 +02:00
openscad_win32.rc Copyright updates 2011-01-21 02:21:09 +01:00
qscintilla2.prf Handle both Qt4 and Qt5 and add fallback in case of missing qscintilla2.prf. 2014-10-17 19:32:15 +02:00
right.png toolbar set 2014-09-14 20:38:20 +02:00
scintilla.pri Handle both Qt4 and Qt5 and add fallback in case of missing qscintilla2.prf. 2014-10-17 19:32:15 +02:00
setenv_mac-gcc.sh gcc and clang profiles 2013-06-20 00:13:43 -04:00
setenv_mac-homebrew.sh Experimental homebrew dependency build 2014-01-04 18:14:14 -05:00
setenv_mac-qt4.sh Quick and dirty fixup 2014-06-07 17:43:52 +02:00
setenv_mac-qt5.sh Unset QMAKESPEC to avoid old Qt4 env to bleed over 2014-05-12 16:03:47 -04:00
sparkle.pri Move software update menu handling to AutoUpdater. This should fix #714 2014-11-10 15:01:34 -05:00
up.png toolbar set 2014-09-14 20:38:20 +02:00
valgrind.supp Killed some memory leaks 2011-11-27 05:20:18 +01:00
version.pri Catch win32-mingw used when building on MSYS2. 2014-12-20 21:39:32 +01:00
win.pri In this commit i'll change just the Qt project, c and header files to get OpenSCAD 2013-07-28 13:42:35 +02:00
winconsole.pri add wrapper code from nop head, mod build scripts 2013-01-21 14:25:14 +01:00

README.md

Travis CI Coverity Status

What is OpenSCAD?

Flattr this git repo

OpenSCAD is a software for creating solid 3D CAD objects. It is free software and available for Linux/UNIX, MS Windows and Mac OS X.

Unlike most free software for creating 3D models (such as the famous application Blender) it does not focus on the artistic aspects of 3D modeling but instead on the CAD aspects. Thus it might be the application you are looking for when you are planning to create 3D models of machine parts but pretty sure is not what you are looking for when you are more interested in creating computer-animated movies.

OpenSCAD is not an interactive modeler. Instead it is something like a 3D-compiler that reads in a script file that describes the object and renders the 3D model from this script file (see examples below). This gives you (the designer) full control over the modeling process and enables you to easily change any step in the modeling process or make designs that are defined by configurable parameters.

OpenSCAD provides two main modeling techniques: First there is constructive solid geometry (aka CSG) and second there is extrusion of 2D outlines. As data exchange format format for this 2D outlines Autocad DXF files are used. In addition to 2D paths for extrusion it is also possible to read design parameters from DXF files. Besides DXF files OpenSCAD can read and create 3D models in the STL and OFF file formats.

Getting started

You can download the latest binaries of OpenSCAD at http://www.openscad.org. Install binaries as you would any other software.

When you open OpenSCAD, you'll see three frames within the window. The left frame is where you'll write code to model 3D objects. The right frame is where you'll see the 3D rendering of your model.

Let's make a tree! Type the following code into the left frame:

cylinder(h = 30, r = 8);

Then render the 3D model by hitting F5. Now you can see a cylinder for the trunk in our tree. Now let's add the bushy/leafy part of the tree represented by a sphere. To do so, we will union a cylinder and a sphere.

union() {
  cylinder(h = 30, r = 8);
  sphere(20);
}

But, it's not quite right! The bushy/leafy are around the base of the tree. We need to move the sphere up the z-axis.

union() {
  cylinder(h = 30, r = 8);
  translate([0, 0, 40]) sphere(20);
}

And that's it! You made your first 3D model! There are other primitive shapes that you can combine with other set operations (union, intersection, difference) and transformations (rotate, scale, translate) to make complex models! Check out all the other language features in the OpenSCAD Manual.

Documentation

Have a look at the OpenSCAD Homepage (http://openscad.org/) for documentation.

Building OpenSCAD

To build OpenSCAD from source, follow the instructions for the platform applicable to you below.

Prerequisites

To build OpenSCAD, you need some libraries and tools. The version numbers in brackets specify the versions which have been used for development. Other versions may or may not work as well.

If you're using a newer version of Ubuntu, you can install these libraries from aptitude. If you're using Mac, or an older Linux/BSD, there are build scripts that download and compile the libraries from source. Follow the instructions for the platform you're compiling on below.

Getting the source code

Install git (http://git-scm.com/) onto your system. Then run a clone:

git clone git://github.com/openscad/openscad.git

This will download the latest sources into a directory named 'openscad'.

To pull the MCAD library (http://reprap.org/wiki/MCAD), do the following:

cd openscad
git submodule update --init

Building for Mac OS X

Prerequisites:

  • XCode, including XCode command-line tools (install from XCode Preferences).

Prerequisites that can be installed through MacPorts/homebrew:

Then after you've cloned this git repository, run the script that sets up the environment variables.

source setenv_mac-qt5.sh

Then run the script to compile all the prerequisite libraries above:

./scripts/macosx-build-dependencies.sh

You can also install the prerequisites using MacPorts. Unfortunately, brew doesn't yet support CGAL and OpenCSG.

After that, follow the Compilation instructions below.

Building for Linux/BSD

First, make sure that you have git installed (often packaged as 'git-core' or 'scmgit'). Once you've cloned this git repository, download and install the dependency packages listed above using your system's package manager. A convenience script is provided that can help with this process on some systems:

sudo ./scripts/uni-get-dependencies.sh

After installing dependencies, check their versions. You can run this script to help you:

./scripts/check-dependencies.sh

Take care that you don't have old local copies anywhere (/usr/local/). If all dependencies are present and of a high enough version, skip ahead to the Compilation instructions.

Building for Linux/BSD on systems with older or missing dependencies

If some of your system dependency libraries are missing or old, then you can download and build newer versions into $HOME/openscad_deps by following this process. First, run the script that sets up the environment variables.

source ./scripts/setenv-unibuild.sh

Then run the script to compile all the prerequisite libraries above:

./scripts/uni-build-dependencies.sh

Note that huge dependencies like gcc, qt, or glib2 are not included here, only the smaller ones (boost, CGAL, opencsg, etc). After the build, again check dependencies.

./scripts/check-dependencies.sh

After that, follow the Compilation instructions below.

Building for Windows

OpenSCAD for Windows is usually cross-compiled from Linux. If you wish to attempt an MSVC build on Windows, please see this site: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows

To cross-build, first make sure that you have development tools installed to get GCC. Then after you've cloned this git repository, start a new clean bash shell and run the script that sets up the environment variables.

source ./scripts/setenv-mingw-xbuild.sh 32

Then run the script to download & compile all the prerequisite libraries above:

./scripts/mingw-x-build-dependencies.sh 32

Note that this process can take several hours, as it uses the http://mxe.cc system to cross-build many libraries. After it is complete, build OpenSCAD and package it to an installer:

./scripts/release-common.sh mingw32

If you wish you can only build the openscad.exe binary:

cd mingw32
qmake .. CONFIG+=mingw-cross-env
make

For a 64-bit Windows cross-build, replace 32 with 64 in the above instructions.

Compilation

First, run 'qmake' from Qt4 to generate a Makefile. On some systems you need to run 'qmake4', 'qmake-qt4' or something alike to run the qt4 version of the tool.

Then run make. Finally you might run 'make install' as root or simply copy the 'openscad' binary (OpenSCAD.app on Mac OS X) to the bin directory of your choice.

If you had problems compiling from source, raise a new issue in the issue tracker on the github page.

This site and it's subpages can also be helpful: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_OpenSCAD_from_Sources