How to construct a Lego brick
Before designing a fully customizable Lego brick, we will first construct a brick of fixed size and make it customizable afterwards.
We will design three components by extrusion of the following 2D sketches:
- Base: A rectangular frame with struts (purple).
- Cap: A rectangular top plate that closes the base structure (cyan).
- Knobs: The knobs of a Lego brick placed on top of the cap (green).

Next, we will use the sketches to create a 3D model of a Lego brick.
Finally, we will compile everything into a proper library.