Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Start Code

A µcad program consists of one or multiple files.

Additional files can be added by the mod statement or by adding library paths of external modules with command line options.

Currently1, every µcad program starts with the original input file that was given at running microcad.

The top level code within this file is where microcad starts processing top to bottom.

test

// 1. Start code begins here.
use std::geo2d::*;

// 2. This is a module definition. It defines 'RADIUS' but doesn't generate any geometry.
mod my_inner {
    pub const RADIUS = 10mm;
}

// 3. Start code continues here.
Circle(radius = my_inner::RADIUS);

  1. In future µcad will get a package management and will have projects and toml files.