Units and conventions
Millimetres everywhere
ModuleCAD’s world unit is the millimetre (ADR-0003). Stores, files, quotes, the cut plan, labels and the AI compiler work in mm.
The display unit (mm, cm, m or inches — default cm) is presentation only: conversion happens exclusively at the interface boundary. Nothing is ever converted inside a store, and no fixed unit label is ever written in the interface.
| Where | Unit |
|---|---|
| Editor fields | The chosen display unit |
| Parametric expressions | Always mm, with a decimal point |
Files (ModuleCADFile) |
mm (since schema v3) |
| Quote, cut list | mm and m² |
| Labels | Always mm |
Entering lengths
The length parser accepts a decimal comma or point, inch fractions (3/4, 1 1/2, 1-1/2) and a
unit suffix that always wins (18mm, 2 m, 3/4"). Inches are shown as fractions down to 1/16.
Axes
Y up, as in three.js:
| Axis | Positive / negative | Dimension |
|---|---|---|
| X | Right / Left | Width |
| Y | Top / Bottom | Height |
| Z | Front / Back | Depth |
The floor plane is y = 0. The front of a piece of furniture points towards +Z.
Faces
The six faces of a rectangular part are identified as +x, -x, +y, -y, +z and -z — the
face pointing in the positive or negative direction of each local axis. This is the vocabulary of
snap, mates, per-face finishes and face debugging.
| Id | Name in the interface |
|---|---|
+x |
Right |
-x |
Left |
+y |
Top |
-y |
Bottom |
+z |
Front |
-z |
Back |
A face’s edges are indexed from 0 to 3, counter-clockwise as seen from outside.
Euler XYZ rotation
A single convention across the whole system: R = Rx · Ry · Rz applied to a column vector (Rz
first, then Ry, then Rx), the same as three.js’s Euler('XYZ'). It is implemented once in
@modulecad/math (rotateByEuler, inverseRotateByEuler, rotationMatrix) and used by snap, the
mate solver, bounding boxes and the properties panel’s world ↔ local conversion. It must never be
reimplemented locally.
In files, rotation is stored in radians; in the interface and in rotation expressions, in degrees.
Position
A part’s position is the centre of its box. A 15 mm sheet resting on the floor has y = 7.5.
Default dimensions
| Item | Value |
|---|---|
| New sheet | 400 × 15 × 600 mm |
| New environment | 4000 × 3000 × 2600 mm |
| Default raw sheet | 2750 × 1850 × 15 mm |
| Snap distance | 30 mm |
| Initial extrusion depth | 20 mm |