Units
MachineBlocks Base Unit
The MachineBlocks Base Unit (mbu) defines the fundamental proportions of all bricks and components in the library. By default, 1 mbu = 1.6 mm, ensuring LEGO®-compatible scaling. In most cases, this value does not need to be changed — it is set internally and applied automatically.
Most geometric parameters — such as wall thickness, stud diameter, and other part dimensions — are expressed as multiples of the base unit. Brick dimensions, however, are specified in grid units, which are themselves derived from the mbu value. By default, the grid unit is defined as 5×5×2 mbu, representing one 1×1 plate.
Only a few fine-tuning parameters (such as certain offsets or tolerances) are specified directly in millimeters.
- 5 mbu in both the X and Y directions, and
- 2 mbu in height.
Grid Unit
The MachineBlocks system is based on a 1×1 plate grid. All brick dimensions are defined as multiples of this grid unit, similar to how LEGO® elements are measured. The grid unit itself is derived from the base unit (mbu) and, by default, equals 5×5×2 mbu — representing the proportions of a single plate.
This consistent, modular grid ensures that all parts align precisely when combined in larger assemblies, allowing for seamless stacking and interlocking between plates, bricks, and Technic components.
When defining a part, you specify its size using the size parameter in the following format:
machineblock(
size = [width, depth, height]
);- Width (X-axis, red): number of studs along the X direction
- Depth (Y-axis, green): number of studs along the Y direction
- Height (Z-axis, blue): number of plates (3 plates = 1 brick height)
Real World Unit (mm)
Adjustment parameters in MachineBlocks are specified directly in millimeters (mm) and are not affected by scaling. This ensures that small calibration corrections remain consistent, regardless of the overall brick size or scale factor.
Because 3D printers are rarely perfectly accurate, printed parts may differ slightly from their modeled dimensions. These discrepancies can result from factors such as material shrinkage, nozzle diameter variations, or layer height inaccuracies.
By using adjustment parameters — such as baseHeightAdjustment and baseSideAdjustment — you can fine-tune the brick’s final printed dimensions to achieve a better fit and more reliable assembly.