microcad 0.4.0

µcad Command Line Interface
microcad-0.4.0 is not a library.

microcad

Crates.io Documentation

This crate provides a command line interface for µcad language.

Note: This project is in an early stage of development and is not yet feature complete!

Quick Start

To process a µcad file and export its geometry into an STL, use the following command:

microcad export ./examples/bricks/brick

This will export the 3D geometry description in ./examples/bricks/brick.µcad as a brick.stl file.

Installation

First, install CMake and Ninja which are needed to compile the manifold geometry library.

Debian based Linux distributions

Use the following line to install Ninja and CMake:

sudo apt install ninja-build cmake

Pre-built debian packages which are attached to our release logs:

MacOS

If you are on using MacOS, you have to install cmake and ninja using brew:

brew install cmake ninja

Install µcad via cargo

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

cargo install microcad

Run

Start the microcad CLI by typing microcad into your console.

microcad

This will give you an overview of the available functionality:

µcad Command Line Interface

Usage: microcad [OPTIONS] <COMMAND>

Commands:
  parse        Parse a µcad file
  resolve      Parse and resolve a µcad file
  eval         Parse and evaluate a µcad file
  export       Parse and evaluate and export a µcad file
  create       Create a new source file with µcad extension
  watch        Watch a µcad file
  install      Install µcad standard library
  completions  Print shell completions
  help         Print this message or the help of the given subcommand(s)

Options:
  -T, --time                  Display processing time
  -C, --config <CONFIG_PATH>  Load config from file
  -v...                       Verbosity level (use -v, -vv, or -vvv)
  -h, --help                  Print help
  -V, --version               Print version

You're now ready to use µcad!

Command line usage

To generate an STL model file, use the export command (with an optional output file name):

microcad export ./examples/bricks/brick

This will export the geometry into a brick.stl file.

Generate documentation

You can generate documentation with microcad doc for source files.

Generate mdbook for built-in library

microcad doc -g mdbook __builtin --output books/builtin

Generate mdbook for µcad standard library

microcad doc -g mdbook 'crates/std/lib/std/mod.µcad' --no-std --output books/std`

Resources

❤️ Support the project

This crate is part of the microcad project.

If you like this project, you can help us spend more time on it by donating: