Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Rustfahrtagentur/microcad

Repository files navigation

µcad

THIS REPOSITORY HAS MOVED TO CODEBERG!


Status Crates.io Documentation Codecov 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-cli which can be installed from crates.io by using cargo.

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).

Hello World 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

test

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-cli

Command line usage

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

microcad eval ./examples/lego_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

Test List

There is a list of all tests included in this documentation.

💚 Funded by

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

Logo of the Prototype Fund         Logo of the Open Knowledge Foundation Germany    Logo of the German Federal Ministry of Research, Technology and Space

Packages

No packages published

Contributors 2

  •  
  •  

Languages