OpenSCAD - The Programmers Solid 3D CAD Modeller (fork with Delaunay triangulation and bend operator)
 
 
 
 
 
 
Go to file
Jason Lewis 4c658e6bdb updated modified date in header 2012-07-06 16:38:36 +10:00
contrib updated modified date in header 2012-07-06 16:38:36 +10:00
doc Minor Mac vs. Linux difference 2012-06-04 07:46:19 +02:00
examples Added better example023 with test output. 2012-02-18 21:22:31 -05:00
icons Added Linux desktop icon and .desktop file from chrysn 2012-01-05 00:00:29 +01:00
libraries Updated MCAD 2012-02-18 13:47:17 +01:00
patches Updated patch to reflect recent changes in build system 2012-01-14 01:18:09 +01:00
qxs Cleaned up qnfa file so it is more taylored to openscad 2010-04-11 10:01:37 +01:00
scripts Merge branch 'linbuilder' of git@github.com:openscad/openscad into linbuilder 2012-07-04 08:04:16 +02:00
src Add link to Wikibooks manual for 'not 2-manifold' error on export. 2012-07-01 17:07:39 +02:00
test-code Copyright updates 2011-01-21 02:21:09 +01:00
testdata Search for libraries from a list of paths. Preparations for issue #125 2012-06-24 16:29:28 +02:00
tests Fixed normalization bug: node limit wasn't checked properly and some cases triggered exponential expansion of nodes during normalization. Fixes #127 2012-07-01 02:08:45 +02:00
.gitignore Added /openscad to .gitignore 2012-04-24 01:14:33 +02:00
.gitmodules Make MCAD submodule relative to openscad toplevel. 2012-02-18 18:37:53 +01:00
COPYING Clifford Wolf: 2010-02-01 09:34:18 +00:00
Info.plist Experimental Apple Event hack; you can now do 'tell application "OpenSCAD" to reload' 2010-02-02 01:01:38 +00: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 ubuntu package list for aptitude. Add pointer to wikibooks site 2012-07-04 06:56:17 +02:00
RELEASE_NOTES sync 2012-04-22 19:35:23 -04:00
bison.pri changes to enable building on NetBSD 2012-01-03 18:21:28 +01:00
boost.pri Merge branch 'master' into boost_filesystem 2012-01-04 23:07:32 +01:00
cgal.pri Some more build system cleaning 2011-12-15 05:17:04 +01:00
common.pri Some more build system cleaning 2011-12-15 05:17:04 +01:00
eigen2.pri find eigen2 when compiling on gnu hurd os 2012-01-11 02:32:08 +01:00
flex.pri changes to enable building on NetBSD 2012-01-03 18:21:28 +01:00
glew.pri add documentation to workaround GLEWDIR bug 2012-05-29 02:29:29 +02:00
mingw-cross-env.pri generalized MACOSX_DEPLOY_DIR into the platform-independent OPENSCAD_LIBRARIES 2011-12-15 04:59:15 +01:00
mjau.gdb moved location 2011-08-02 01:44:14 +02:00
opencsg.pri Some more build system cleaning 2011-12-15 05:17:04 +01:00
openscad.pro more reliable way of ensuring GLU is linked on new DSO linux systems. 2012-06-03 16:16:40 +02:00
openscad.pro.user Replaced static paths with $$PWD and $QTDIR 2012-02-15 08:42:53 -05:00
openscad.qrc Moved progress display to status bar. Disabled by default but can be enabled in .pro file with CONFIG += progresswidget. Please test and enable as default if it looks good on all platforms. 2010-02-10 15:13:12 +00:00
openscad_win32.rc Copyright updates 2011-01-21 02:21:09 +01:00
setenv_mjau.sh copy&paste error 2012-02-03 03:21:05 +01:00
valgrind.supp Killed some memory leaks 2011-11-27 05:20:18 +01:00
version.pri Added OPENSCAD_COMMIT define to show which git commit a binary actually is built from in the about box. Pass -c to release_common.sh to turn this on. Please use this for development builds, see publish-macosx.sh for how development vs. release is handled 2012-01-14 17:37:34 +01:00
win32.pri fix qmake under mingw-cross-compile 2011-12-16 21:03:10 -06:00

README.md

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, there are build scripts that download and compile the libraries from source. Follow the instructions for the platform you're compiling on below.

Building for Mac OS X

First, make sure that you have XCode installed to get GCC. Then after you've cloned this git repository, run the script that sets up the environment variables.

source setenv_mjau.sh

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

./scripts/macosx-build-dependencies.sh

We currently don't use MacPorts or brew to install the prerequisite libraries because CGAL doesn't exist on brew and opencsg doesn't exist on ports. And more importantly, there are some patches to GMP in the compilation process.

After that, follow the Compilation instructions below.

Building for newer Ubunutu

sudo apt-get install libqt4-dev libqt4-opengl-dev libxmu-dev cmake
libglew1.5-dev bison flex libeigen2-dev git-core libboost-all-dev
libXi-dev libcgal-dev libglut3-dev libopencsg-dev libopencsg1

Check your library versions against the list above. After that, follow the Compilation instructions below.

Building for older Linux or without root access

First, make sure that you have compiler tools (build-essential on ubuntu). Then after you've cloned this git repository, run the script that sets up the environment variables.

source ./scripts/setenv-linbuild.sh

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

./scripts/linux-build-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, please see this site: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows

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.

The four subsections of this site can also be helpful: http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_OpenSCAD_from_Sources