Get Started
How to 3D print your first LEGO compatible brick using the MachineBlocks SCAD library.
Generate 4x2 Brick Model
Let's start with printing a classic 4x2 LEGO brick. Open the following code snipped with the MachineBlocks Online Editor by pressing the yellow button below.
//Import MachineBlocks block() module
use <machineblocks/lib/block.scad>;
//Generate a classic 4x2 Brick
block(
baseLayers = 3,
grid = [4, 2],
knobSize = 5.0, //Reduce this value if the knobs do not fit into a LEGO brick or only with great difficulty
sideAdjustment = -0.1,
heightAdjustment = 0.0 //Reduce this value if the base of the brick is too high
);
Render and Export
Before we can export the model as STL file we need to fully render the scene. At the bottom left of the screen
- Press Full Render
- Press Export STL
Import into Slicer
Now that we have the STL file, we can import the model into the Slicer software of our choice. We have tested different configurations on multiple printers, and the following settings work well:
-
Nozzle Diameter
0.4 mmThe models are designed to be printed with a 0.4 mm nozzle. Depending on the precision of the printer, you may need to adjust some parameters to achieve the desired clamp force of the bricks. -
Filament
PETG or PLAWe have tested the models with both PETG and PLA filament. PETG is slightly more flexible and durable, so the bricks hold up better, especially after prolonged use. -
Layer Height
0.2 mmThe models are optimized for a layer height of 0.2 mm. Depending on the precision of the printer, you may need to adjust the height of the brick using the heightAdjustment parameter to get as close as possible to the height of an original LEGO brick. -
Supports
NoneFor most models, no supports are required at all. If a model requires support structures, these are usually already included in the model itself. However, for very few models, such as the Raspberry Pi lid, the supports must be activated in the slicer. -
Infill
0%It is recommended to print all models without infill to avoid undesirable stiffness of the bricks. Both PLA and PETG are significantly harder than the plastic used by LEGO. The printed bricks must therefore achieve their flexibility through thin walls and small cavities. -
Bed Temperature
~70° CelsiusThe bricks have a very small contact surface with the printing plate. A high bed temperature, especially for the first layer, is therefore highly recommended to prevent the brick from detaching during printing. However, the exact temperature setting depends on the printer and filament used. -
Nozzle Temperature
Use max temperatureIt is recommended to use the highest possible nozzle temperature specified by the filament manufacturer so that the extruded filament is very fluid. Otherwise, it can easily happen that the already applied filament tears off during the printing process. A high nozzle temperature can also improve the adhesion of the first layer. However, the exact temperature setting depends on the printer and the filament used. -
First Layer Printing Speed
50%It can be helpful to reduce the print speed of the first layer by 50% to improve the print quality of the first layer. -
First Layer Acceleration
50%It can be helpful to reduce the acceleration by 50% during printing the first layer to prevent rapid movements of the extruder from tearing off or shifting parts of the first layer.
Printing
As with most prints, the first layer is crucial for success.
The columns inside the stone in particular can easily peel off if the first layer has not been printed cleanly.
It is important that the printing plate is clean and the nozzle is free of debris.
A good first layer looks like this:
For a relatively long time, the columns inside the brick are only connected to the printing plate via a very small area.
This can be seen very clearly in the following picture. You can also see filament residue on the edge of the brick, which was caused by an unclean nozzle.
A critical moment is when the columns are connected to the brick via thin helper lines. These helper lines are used for stability and as a base for the top slab.
Et voilà, the stone is finished. Not the best result, because the printing was interrupted so often for the photos, the quality is only mediocre.
Even if the print didn't turn out perfectly, the brick fits very well on the LEGO plate, and the accuracy of fit compared to original LEGO bricks is also very good.
Happy Printing :)