Created on: 2025-11-08 ; Revised on: 2025-11-08

Customizable LEGO interface

Scripts for creating LEGO-compatible bricks with customizable top pins and bottom entries.

Available in two formats:

Files are available on:

Usage

Blender (Python)

  1. Open Blender 3D
  2. Open the Scripting workspace
  3. Load create_brick.py
  4. Edit the options at the top of the file
  5. Run the script

OpenSCAD

  1. Open OpenSCAD
  2. Open create_brick.scad
  3. Edit the options at the top of the file
  4. Press F5 to preview or F6 to render
  5. Export as STL for 3D printing

Options

Both scripts use the same variables:

Examples

2x6 brick (top and bottom)

Blender (Python):

pinCount = [2, 6]
entryZ = 8.2

printTopPins = True
printBottomEntries = True

OpenSCAD:

pinCount = [2, 6];
entryZ = 8.2;

printTopPins = true;
printBottomEntries = true;

Top view Bottom view Printing Done

10x10 plate (only top)

Blender (Python):

pinCount = [10, 10]
entryZ = 2

printTopPins = True
printBottomEntries = False

OpenSCAD:

pinCount = [10, 10];
entryZ = 2;

printTopPins = true;
printBottomEntries = false;

Top view Bottom view

Applications

These scripts are particularly useful for: