{"id":13418612,"url":"https://github.com/openscad/openscad","last_synced_at":"2025-05-13T20:03:17.126Z","repository":{"id":1160599,"uuid":"1049088","full_name":"openscad/openscad","owner":"openscad","description":"OpenSCAD - The Programmers Solid 3D CAD Modeller  ","archived":false,"fork":false,"pushed_at":"2025-05-06T15:02:01.000Z","size":78343,"stargazers_count":7808,"open_issues_count":980,"forks_count":1299,"subscribers_count":251,"default_branch":"master","last_synced_at":"2025-05-06T19:52:00.438Z","etag":null,"topics":["3d","3d-graphics","3d-models","3d-printing","c-plus-plus","c-plus-plus-17","cad","dxf-files","linux","macos","opengl","openscad","qt5","qt6","windows"],"latest_commit_sha":null,"homepage":"https://www.openscad.org","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openscad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"openscad","open_collective":"openscad"}},"created_at":"2010-11-03T20:25:33.000Z","updated_at":"2025-05-06T18:09:05.000Z","dependencies_parsed_at":"2023-12-28T00:04:41.949Z","dependency_job_id":"212a1cd3-2924-4432-a63d-e8097e240994","html_url":"https://github.com/openscad/openscad","commit_stats":{"total_commits":8970,"total_committers":252,"mean_commits":"35.595238095238095","dds":0.6519509476031216,"last_synced_commit":"1057a82e9f79d6ccb4693e69d291c41a812a5108"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscad%2Fopenscad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscad%2Fopenscad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscad%2Fopenscad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openscad%2Fopenscad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openscad","download_url":"https://codeload.github.com/openscad/openscad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253520857,"owners_count":21921414,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","3d-graphics","3d-models","3d-printing","c-plus-plus","c-plus-plus-17","cad","dxf-files","linux","macos","opengl","openscad","qt5","qt6","windows"],"created_at":"2024-07-30T22:01:04.481Z","updated_at":"2025-05-13T20:03:17.087Z","avatar_url":"https://github.com/openscad.png","language":"C++","readme":"[![GitHub (master)](https://img.shields.io/github/checks-status/openscad/openscad/master.svg?logo=github\u0026label=build\u0026logoColor=black\u0026colorA=f9d72c\u0026style=plastic)](https://github.com/openscad/openscad/actions)\n[![CircleCI (master)](https://img.shields.io/circleci/project/github/openscad/openscad/master.svg?logo=circleci\u0026logoColor=black\u0026colorA=f9d72c\u0026style=plastic)](https://circleci.com/gh/openscad/openscad/tree/master)\n[![Coverity Scan](https://img.shields.io/coverity/scan/2510.svg?colorA=f9d72c\u0026logoColor=black\u0026style=plastic)](https://scan.coverity.com/projects/2510)\n\n[![Visit our IRC channel](https://kiwiirc.com/buttons/irc.libera.chat/openscad.png)](https://kiwiirc.com/client/irc.libera.chat/#openscad)\n\n# What is OpenSCAD?\n\u003cp\u003e\u003ca href=\"https://opencollective.com/openscad/donate\"\u003e\u003cimg align=\"right\" src=\"https://opencollective.com/openscad/donate/button@2x.png?color=white\" width=\"200\"/\u003e\u003c/a\u003e\n\nOpenSCAD is a software for creating solid 3D CAD objects. It is free software and\navailable for Linux/UNIX, MS Windows and macOS.\u003c/p\u003e\n\nUnlike most free software for creating 3D models (such as the famous\napplication Blender), OpenSCAD focuses on the CAD aspects rather than the \nartistic aspects of 3D modeling. Thus this might be the application you are\nlooking for when you are planning to create 3D models of machine parts but\nprobably not the tool for creating computer-animated movies.\n\nOpenSCAD is not an interactive modeler. Instead it is more like a\n3D-compiler that reads a script file that describes the object and renders\nthe 3D model from this script file (see examples below). This gives you, the\ndesigner, complete control over the modeling process and enables you to easily\nchange any step in the modeling process or make designs that are defined by\nconfigurable parameters.\n\nOpenSCAD provides two main modeling techniques: First there is constructive\nsolid geometry (aka CSG) and second there is extrusion of 2D outlines. As the data\nexchange format for these 2D outlines Autocad DXF files are used. In\naddition to 2D paths for extrusion it is also possible to read design parameters\nfrom DXF files. Besides DXF files OpenSCAD can read and create 3D models in the\nSTL and OFF file formats.\n\n# Contents\n\n- [Getting Started](#getting-started)\n- [Documentation](#documentation)\n    - [Building OpenSCAD](#building-openscad)\n        - [Prerequisites](#prerequisites)\n        - [Getting the source code](#getting-the-source-code)\n        - [Building for macOS](#building-for-macos)\n        - [Building for Linux/BSD](#building-for-linuxbsd)\n        - [Building for Linux/BSD on systems with older or missing dependencies](#building-for-linuxbsd-on-systems-with-older-or-missing-dependencies)\n        - [Building for Windows](#building-for-windows)\n        - [Compilation](#compilation)\n\n# Getting started\n\nYou can download the latest binaries of OpenSCAD at\n\u003chttps://www.openscad.org/downloads.html\u003e. Install binaries as you would any other\nsoftware.\n\nWhen you open OpenSCAD, you'll see three frames within the window. The\nleft frame is where you'll write code to model 3D objects. The right\nframe is where you'll see the 3D rendering of your model.\n\nLet's make a tree! Type the following code into the left frame:\n\n    cylinder(h = 30, r = 8);\n\nThen render the 3D model by hitting F5. Now you can see a cylinder for\nthe trunk in our tree. Now let's add the bushy/leafy part of the tree\nrepresented by a sphere. To do so, we will union a cylinder and a\nsphere.\n\n    union() {\n      cylinder(h = 30, r = 8);\n      sphere(20);\n    }\n\nBut, it's not quite right! The bushy/leafy are around the base of the\ntree. We need to move the sphere up the z-axis.\n\n    union() {\n      cylinder(h = 30, r = 8);\n      translate([0, 0, 40]) sphere(20);\n    }\n\nAnd that's it! You made your first 3D model! There are other primitive\nshapes that you can combine with other set operations (union,\nintersection, difference) and transformations (rotate, scale,\ntranslate) to make complex models! Check out all the other language\nfeatures in the [OpenSCAD\nManual](https://en.wikibooks.org/wiki/OpenSCAD_User_Manual).\n\n# Documentation\n\nHave a look at the OpenSCAD Homepage (https://www.openscad.org/documentation.html) for documentation.\n\n## Building OpenSCAD\n\nTo build OpenSCAD from source, follow the instructions for the\nplatform applicable to you below.\n\n### Prerequisites\n\nTo build OpenSCAD, you need some libraries and tools. The version\nnumbers in brackets specify the versions which have been used for\ndevelopment. Other versions may or may not work as well.\n\nIf you're using a newer version of Ubuntu, you can install these \nlibraries from aptitude. If you're using Mac, or an older Linux/BSD, there \nare build scripts that download and compile the libraries from source. \nFollow the instructions for the platform you're compiling on below.\n\n* A C++ compiler supporting C++17\n* [cmake (3.5 -\u003e)](https://cmake.org/)\n* [Qt (5.12 -\u003e)](https://qt.io/)\n* [QScintilla2 (2.9 -\u003e)](https://riverbankcomputing.com/software/qscintilla/)\n* [CGAL (5.4 -\u003e)](https://www.cgal.org/)\n * [GMP (5.x)](https://gmplib.org/)\n * [MPFR (3.x)](https://www.mpfr.org/)\n* [boost (1.61 -\u003e)](https://www.boost.org/)\n* [OpenCSG (1.4.2 -\u003e)](http://www.opencsg.org/)\n* [GLEW (1.5.4 -\u003e)](http://glew.sourceforge.net/)\n* [Eigen (3.x)](https://eigen.tuxfamily.org/)\n* [glib2 (2.x)](https://developer.gnome.org/glib/)\n* [fontconfig (2.10 -\u003e )](https://fontconfig.org/)\n* [freetype2 (2.4 -\u003e )](https://freetype.org/)\n* [harfbuzz (0.9.19 -\u003e )](https://www.freedesktop.org/wiki/Software/HarfBuzz/)\n* [libzip (0.10.1 -\u003e )](https://libzip.org/)\n* [Bison (2.4 -\u003e )](https://www.gnu.org/software/bison/)\n* [Flex (2.5.35 -\u003e )](http://flex.sourceforge.net/)\n* [pkg-config (0.26 -\u003e )](https://www.freedesktop.org/wiki/Software/pkg-config/)\n* [double-conversion (2.0.1 -\u003e )](https://github.com/google/double-conversion/)\n\nFor the test suite, additional requirements are:\n* Python3 (3.8 -\u003e )\n* [Ghostscript (10.x -\u003e)](https://www.ghostscript.com/index.html)\n\n### Getting the source code\n\nInstall git (https://git-scm.com/) onto your system. Then run a clone:\n\n    git clone https://github.com/openscad/openscad.git\n\nThis will download the latest sources into a directory named `openscad`.\n\nTo pull the various submodules (incl. the [MCAD library](https://github.com/openscad/MCAD)), do the following:\n\n    cd openscad\n    git submodule update --init --recursive\n\n### Building for macOS\n\nPrerequisites:\n\n* Xcode\n* automake, libtool, cmake, pkg-config, wget, meson, python-packaging (we recommend installing these using Homebrew)\n\nInstall Dependencies:\n\nAfter building dependencies using one of the following options, follow the instructions in the *Compilation* section.\n\n1. **From source**\n\n    Run the script that sets up the environment variables:\n\n        source scripts/setenv-macos.sh\n\n    Then run the script to compile all the dependencies:\n\n        ./scripts/macosx-build-dependencies.sh\n\n2. **Homebrew** (assumes [Homebrew](https://brew.sh/) is already installed)\n\n        ./scripts/macosx-build-homebrew.sh\n\n### Building for Linux/BSD\n\nFirst, make sure that you have git installed (often packaged as 'git-core' \nor 'scmgit'). Once you've cloned this git repository, download and install \nthe dependency packages listed above using your system's package \nmanager. A convenience script is provided that can help with this \nprocess on some systems:\n\n    sudo ./scripts/uni-get-dependencies.sh\n\nAfter installing dependencies, check their versions. You can run this \nscript to help you:\n\n    ./scripts/check-dependencies.sh\n\nTake care that you don't have old local copies anywhere (`/usr/local/`). \nIf all dependencies are present and of a high enough version, skip ahead \nto the Compilation instructions. \n\n### Building for Linux/BSD on systems with older or missing dependencies\n\nIf some of your system dependency libraries are missing or old, then you \ncan download and build newer versions into `$HOME/openscad_deps` by \nfollowing this process. First, run the script that sets up the \nenvironment variables. \n\n    source ./scripts/setenv-unibuild.sh\n\nThen run the script to compile all the prerequisite libraries above:\n\n    ./scripts/uni-build-dependencies.sh\n\nNote that huge dependencies like gcc, qt, or glib2 are not included \nhere, only the smaller ones (boost, CGAL, opencsg, etc). After the \nbuild, again check dependencies.\n\n    ./scripts/check-dependencies.sh\n\nAfter that, follow the Compilation instructions below.\n\n### Building on Nix\n\nA [development Nix shell](scripts/nix) is included for local, incremental compilation.\n\n### Building for Windows\n\nOpenSCAD for Windows is usually cross-compiled from Linux. If you wish to\nattempt an MSVC build on Windows, please see this site:\nhttps://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows\n\nTo cross-build, first make sure that you have all necessary dependencies \nof the MXE project ( listed at https://mxe.cc/#requirements ). Don't install\nMXE itself, the scripts below will do that for you under `$HOME/openscad_deps/mxe`\n\nThen get your development tools installed to get GCC. Then after you've \ncloned this git repository, start a new clean bash shell and run the \nscript that sets up the environment variables.\n\n    source ./scripts/setenv-mingw-xbuild.sh 64\n\nThen run the script to download \u0026 compile all the prerequisite libraries above:\n\n    ./scripts/mingw-x-build-dependencies.sh 64\n\nNote that this process can take several hours, and tens of gigabytes of \ndisk space, as it uses the [https://mxe.cc](https://mxe.cc) system to cross-build many\nlibraries. After it is complete, build OpenSCAD and package it to an \ninstaller:\n\n    ./scripts/release-common.sh mingw64\n\nFor a 32-bit Windows cross-build, replace 64 with 32 in the above instructions. \n\n### Building for WebAssembly\n\nWe support building OpenSCAD headless for WebAssembly w/ Emscripten, using a premade Docker image built in [openscad/openscad-wasm](https://github.com/openscad/openscad-wasm) (which also has usage examples)\n\n#### Browser\n\nThe following command creates `build-web/openscad.wasm` \u0026 `build-web/openscad.js`:\n\n```bash\n./scripts/wasm-base-docker-run.sh emcmake cmake -B build-web -DCMAKE_BUILD_TYPE=Debug -DEXPERIMENTAL=1\n./scripts/wasm-base-docker-run.sh cmake --build build-web -j2\n```\n\n[openscad/openscad-playground](https://github.com/openscad/openscad-playground) uses this WASM build to provide a [Web UI](https://ochafik.com/openscad2/) with a subset of features of OpenSCAD.\n\n\u003e [!NOTE]\n\u003e With a debug build (`-DCMAKE_BUILD_TYPE=Debug`), you can set C++ breakpoints in Firefox and in Chrome (the latter [needs an extension](https://developer.chrome.com/docs/devtools/wasm)).\n\n#### Standalone node.js build\n\nThe following command creates `build-node/openscad.js`, which is executable (requires `node`):\n\n```bash\n./scripts/wasm-base-docker-run.sh emcmake cmake -B build-node -DWASM_BUILD_TYPE=node -DCMAKE_BUILD_TYPE=Debug -DEXPERIMENTAL=1\n./scripts/wasm-base-docker-run.sh cmake --build build-node -j2\nbuild-node/openscad.js --help\n```\n\n\u003e [!NOTE]\n\u003e With a debug build (`-DCMAKE_BUILD_TYPE=Debug`), you can set C++ breakpoints in VSCode + Node ([needs an extension](https://code.visualstudio.com/docs/nodejs/nodejs-debugging#_debugging-webassembly)).\n\n### Compilation\n\nFirst, run `cmake -B build -DEXPERIMENTAL=1` to generate a Makefile in the `build` folder.\n\nThen run `cmake --build build`. Finally, on Linux you might run `cmake --install build` as root.\n\nIf you had problems compiling from source, raise a new issue in the\n[issue tracker on the github page](https://github.com/openscad/openscad/issues).\n\nThis site and it's subpages can also be helpful:\nhttps://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_OpenSCAD_from_Sources\n\nOnce built, you can run tests with `ctest` from the `build` directory.\n\nNote: Both `cmake --build` and `ctest` accepts a `-j N` argument for distributing the load over `N` parallel processes.\n\n### Running CI workflows locally\n\n*   Install [circleci-cli](https://circleci.com/docs/2.0/local-cli/) (you'll need an API key)\n\n    *Note*: we also use GitHub Workflows, but only to run tests on Windows (which we cross-build for in the Linux-based CircleCI workflows below). Also, [act](https://github.com/nektos/act) doesn't like our submodule setup anyway.\n\n*   Run the CI jobs\n\n\t```bash\n\t# When \"successful\", these will fail to upload at the very end of the workflow.\n\tcircleci local execute --job  openscad-mxe-64bit\n\tcircleci local execute --job  openscad-mxe-32bit\n\tcircleci local execute --job  openscad-appimage-64bit\n\t```\n\n\t*Note*: openscad-macos can't be built locally.\n\n*   If/when GCC gets randomly killed, give docker more RAM (e.g. 4GB per concurrent image you plan to run)\n\n*   To debug the jobs more interactively, you can go the manual route (inspect .circleci/config.yml to get the actual docker image you need)\n\n\t```bash\n\tdocker run --entrypoint=/bin/bash -it openscad/mxe-x86_64-gui:latest\n\t```\n\n\tThen once you get the console:\n\t\n\t```bash\n\tgit clone https://github.com/%your username%/openscad.git workspace\n\tcd workspace\n\tgit checkout %your branch%\n\tgit submodule init\n\tgit submodule update\n\n\t# Then execute the commands from .circleci/config.yml:\n\t#    export NUMCPU=2\n\t#    ...\n\t#    ./scripts/release-common.sh -snapshot -mingw64 -v \"$OPENSCAD_VERSION\"\n\t```\n","funding_links":["https://github.com/sponsors/openscad","https://opencollective.com/openscad","https://opencollective.com/openscad/donate"],"categories":["C++","\u003ca name=\"cpp\"\u003e\u003c/a\u003eC++","Electronics and Mechanics","Table of Contents","Script-based Design Applications","CAD — Computer-Aided Design"],"sub_categories":["Version Control","CAD","Programmatic \u0026 Script-Based CAD"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenscad%2Fopenscad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenscad%2Fopenscad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenscad%2Fopenscad/lists"}