Modern programming language for CAD
  • Rust 97.6%
  • WGSL 0.9%
  • Slint 0.7%
  • Typst 0.3%
  • Shell 0.2%
  • Other 0.3%
Find a file
2025-11-21 15:12:38 +01:00
.vscode resolve: ignore symbols marked as deleted in search and resolve 2025-10-10 12:59:06 +02:00
assets md-test: move assets 2025-10-31 12:43:50 +01:00
books version bump v0.2.14 2025-11-21 15:12:38 +01:00
builtin builtin: fix missing description in proc-macros 2025-11-21 12:01:36 +01:00
core Increase circle minimum segments to 8 2025-11-19 13:27:11 +01:00
editors/vscode VSCode REAMDE 2025-11-04 15:56:10 +01:00
examples HoleTest 2025-11-20 19:48:14 +01:00
export Remove theme from microcad_core 2025-11-14 11:39:46 +01:00
images add stickers 2025-11-06 12:18:40 +01:00
import eval: rename Array::new() -> from_values() and add new() without items 2025-10-11 18:19:45 +02:00
lang SymbolInfo: small fix 2025-11-20 12:06:57 +01:00
lib/std std::to_string 2025-11-20 19:49:02 +01:00
scripts script: fix publishing order and add viewer 2025-11-21 14:25:44 +01:00
tests books: add version number to test lists (fix issue #290) 2025-11-19 14:22:33 +01:00
tools cli: embed lib folder instead of lib/std to match default search paths 2025-11-21 15:10:51 +01:00
.gitignore add node_modules to .gitignore 2025-11-21 11:47:50 +01:00
.gitmodules Git remove submodules 2024-12-18 00:44:33 +01:00
.woodpecker.yaml cli: add rustfmt 2025-10-24 13:40:26 +02:00
about.hbs cargo about 2024-08-11 14:03:33 +02:00
about.toml BIG: fix all copyright in all *.rs, *.pest and *.toml files 2025-05-08 12:06:50 +02:00
Cargo.toml version bump v0.2.14 2025-11-21 15:12:38 +01:00
CONTRIBUTE.md doc: replace github links with codeberg links 2025-10-27 13:07:38 +01:00
lego_brick.json lang: add Link 2025-08-09 12:30:31 +02:00
LICENSE Change license to AGPL 2024-09-07 00:16:34 +02:00
logs lang: fix density units 2025-07-13 13:11:54 +02:00
microcad.code-workspace first mdbook tutorial 2025-09-04 13:16:48 +02:00
package-lock.json doc array operations 2025-09-04 11:58:07 +02:00
README.md Clean up examples 2025-11-20 18:06:12 +01:00
rustfmt.toml Update copyright 2025-11-14 11:43:41 +01:00
test.µcad cli: embed lib folder instead of lib/std to match default search paths 2025-11-21 15:10:51 +01:00
Tutorial changes.md book: fix center -> align 2025-09-04 15:38:46 +02:00

µcad

CI Crates.io Dependency status

µcad Logo

µcad (pronounced microcad) is a description language for modeling parameterizable geometric objects. Simple basic shapes can be composed to create complex geometries which then can be rendered into STL or SVG files for 3D printing or CNC milling.

Note: This project is in an early stage of development and is not yet feature complete. Feel free to contribute by opening issues or pull requests.

Content

Quick Start

µcad is programmed in Rust which easily can be installed on several operating systems. You can try it out with an example by using the command line tool microcad which can be installed from crates.io by using the following command line:

cargo install microcad

Note: Currently µcad has no binary install packages so the only ways to install it are with cargo install or from the source code (see section Contribute).

First Example

The following µcad source code defines a part called csg_cube, which has a body of a cube with rounded corners and three cylinders as holes:

csg_cube

use std::math::*;
use std::ops::*;
use std::geo3d::*;

part CsgCube(size: Length) {
    body = Sphere(r = size / 1.5) & Cube(size);
    holes = Cylinder(h = size, d = size / 1.5).orient([X,Y,Z]);
    body - holes;
}

CsgCube(50mm);

Installation

First, install Ninja Build which is needed to compile the manifold geometry library. For example, Debian based Linux distributions use the following line:

sudo apt install ninja-build

To install the latest release of µcad via cargo, type:

cargo install microcad

Command line usage

After installing, you can run a basic example by typing:

microcad eval ./examples/bricks/brick.µcad

This will evaluate the input file and will output the model tree. The evaluate command will not export the output geometry.

To generate an STL model file use the export command with an additional output file name:

microcad export ./examples/lego_brick.µcad

The file lego_brick.µcad generate a file calledlego_brick.stl which can be displayed e.g. with MeshLab.

The resulting STL model looks like this:

Parametric Lego Brick

Documentation

💚 Funded by

Thanks to the Prototype Fund and the Federal Ministry of Research, Technology and Space for funding this project in 2025.

https://prototypefund.de/en/ https://okfn.de/en/ https://www.bmbf.de/EN/