Brick Sizing
Plates
Plates are the thinnest standard building elements in the MachineBlocks system. By definition, a plate is 1 plate high, so the third value in the size parameter (the height) is always set to 1.
To create a 3×3 plate, you can use the following code:
Example
use <../machineblocks/lib/block.scad>;
include <../machineblocks/config/config.scad>;
machineblock(
size = [3, 3, 1]
);
Bricks
Bricks are the standard building elements in the MachineBlocks system. A brick is three plates high, which means the third value in the size parameter (height) must always be set to 3.
For example, to create a 4×2 brick, use the following code:
Example
use <../machineblocks/lib/block.scad>;
include <../machineblocks/config/config.scad>;
machineblock(
size = [4, 2, 3]
);
Fractional Sizes
You can use fractional numbers in the size parameter to create partial or non-standard brick dimensions. This is useful when designing custom parts, adapters, or elements that must fit between standard grid units.
When fractional sizes are used, MachineBlocks automatically adjusts the geometry to maintain structural consistency. In some cases, cutouts or open walls may appear where studs would normally intersect the boundary — this is intentional and helps maintain realistic brick proportions.
For example, to create a 3.5×2.5 partial brick with 1.75 plates height, use the following code:
Example
use <../machineblocks/lib/block.scad>;
include <../machineblocks/config/config.scad>;
machineblock(
size = [3.5, 2.5, 1.75]
);
Liftarms
Liftarms are specialized Technic-style beams used for structural connections. They differ from standard bricks in both shape and proportions. A liftarm is about 7.4mm height, but because the height in MachineBlocks is measured in plate units, the height value for a liftarm is 2.3125 plates (7.4 / 3.2 = 2.3125). The start and end is both cropped by 3mm which is equivalent to 0.0375 plates in horizontal direction.
The following example creates a 6×1 Technic liftarm with pin holes along the X-axis and rounded edges:
Example
use <../machineblocks/lib/block.scad>;
include <../machineblocks/config/config.scad>;
machineblock(
size = [6, 1, 2.3125],
crop = [0.0375, 0], // Crop each side by 3mm (3 / 8 = 0.0375) in x-direction
baseCutoutType = "none", // No cutout
baseRoundingRadius = [0, 1.15625, 0], // Radius is half of the height, rounding around y-axis
studs = false, // No studs
holeX = true, // Pin holes along x-axis
holeXGridOffsetZ = 2.3125, // Set center of holes
holeXShift = false // Holes aren't shifted in x-direction
);
Scaling
Bricks can be scaled easily by specifying the scale parameter in the machineblock() call. This parameter uniformly resizes the model while maintaining its proportions.
When scaling a brick, all parameters that are based on the MachineBlocks Base Unit (mbu) and Grid Unit (grid) are multiplied by the given scale factor. Parameters defined in millimeters (mm) are not affected by scaling, ensuring that fine-tuning dimensions and tolerances remain accurate.
If scale = 1, the resulting bricks are LEGO®-compatible. Changing the scale to any other value (for example, 0.5 or 2.0) produces bricks that are no longer physically compatible with LEGO, but they will remain compatible with other MachineBlocks parts created using the same scale.
Example
use <../machineblocks/lib/block.scad>;
include <../machineblocks/config/config.scad>;
machineblock(
size = [4, 2, 3],
scale = 2.0
);
Size Adjustment
3D printers are rarely perfectly dimensionally accurate, which means that even correctly modeled parts may print slightly oversized or undersized. To compensate for such tolerances, the baseHeightAdjustment and baseSideAdjustment parameters let you fine-tune the final dimensions of a brick after all normal size calculations are done.
Both parameters are specified in millimeters (mm), and therefore are not affected by the scale parameter. These adjustments are meant purely for printer calibration, not for resizing or designing differently proportioned parts.
Example
use <../machineblocks/lib/block.scad>;
include <../machineblocks/config/config.scad>;
machineblock(
size = [4, 2, 3],
baseHeightAdjustment = -0.1,
baseSideAdjustment = -0.1
);- baseHeightAdjustment = -0.1 subtracts 0.1 mm from the total brick height.
- baseSideAdjustment = -0.1 subtracts 0.1 mm from each side, slightly shrinking the brick’s footprint.