1
0
Fork
You've already forked microcad
0
forked from microcad/microcad
Modern programming language for CAD
  • Rust 97.2%
  • WGSL 0.9%
  • Slint 0.7%
  • TypeScript 0.3%
  • Typst 0.3%
  • Other 0.6%
Michael Winkelmann a0b6a4c70d Version bump
2025年11月26日 17:10:24 +01:00
.vscode lsp: handle viewer 2025年11月26日 00:10:47 +01:00
assets md-test: move assets 2025年10月31日 12:43:50 +01:00
books Version bump 2025年11月26日 17:10:24 +01:00
builtin More READMEs 2025年11月26日 17:00:25 +01:00
core More READMEs 2025年11月26日 17:00:25 +01:00
editors More READMEs 2025年11月26日 17:00:25 +01:00
examples More READMEs 2025年11月26日 17:00:25 +01:00
export More READMEs 2025年11月26日 17:00:25 +01:00
images add stickers 2025年11月06日 12:18:40 +01:00
import More READMEs 2025年11月26日 17:00:25 +01:00
lang More READMEs 2025年11月26日 17:00:25 +01:00
scripts lsp: handle viewer 2025年11月26日 00:10:47 +01:00
std More READMEs 2025年11月26日 17:00:25 +01:00
tests More READMEs 2025年11月26日 17:00:25 +01:00
tools Revert "Improve Lighting" 2025年11月26日 17:02:46 +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 2025年11月26日 17:10:24 +01:00
CONTRIBUTE.md More doc 2025年11月26日 17:00:25 +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
microcad.code-workspace lsp: handle viewer 2025年11月26日 00:10:47 +01:00
package-lock.json vscode: packaging review 2025年11月26日 00:08:19 +01:00
README.md Fix README.md 2025年11月26日 17:00:24 +01:00
rust-toolchain.toml rust-toolchain: Add copyright 2025年11月26日 17:00:25 +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
watch_lsp.sh plugin: add start lsp 2025年11月26日 00:08:18 +01: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/bricks/brick.μcad

The file brick.μcad generate a file calledbrick.stl which can be displayed e.g. with MeshLab.

The resulting STL mesh looks like this:

Parametric Bricks

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/