Interpretive guidance for generating OpenSCAD code for Gridfinity desktop/drawer organizers. Provides pattern selection frameworks, dimensional constraints, and stacking system integration specific to the Gridfinity ecosystem. Use when generating OpenSCAD files for Gridfinity bins, baseplates, or accessories.
/plugin marketplace add racurry/neat-little-package/plugin install spirograph@neat-little-packageThis skill inherits all available tools. When active, it can use any tool Claude has access to.
common_items/baseplate.mdcommon_items/basic_bin.mdcommon_items/divider_bin.mdcommon_items/lite_bin.mdGenerates OpenSCAD code for desktop and drawer storage items compatible with Gridfinity (42mm grid, 7mm height units).
Official specifications:
Pattern references (read as needed):
Grid constraint: All bins align to 42mm × 42mm grid. This affects:
Baseplate socket system: Bins don't sit flat on surface. They:
Stacking system: Bins can stack on top of each other:
Critical parameter relationships:
// Core Gridfinity dimensions (NEVER change these)
grid_size = 42; // Base grid unit
bin_size = 41.5; // Actual bin dimension (0.5mm tolerance)
height_unit = 7; // Vertical unit
corner_radius = 3.75; // Filleted corners
stacking_lip = 4.4; // Optional lip height
// User parameters
grid_x = 2; // Grid units wide (2 = 84mm)
grid_y = 3; // Grid units deep (3 = 126mm)
height_u = 4; // Height units (4u = 28mm)
// Calculated dimensions
bin_width = bin_size * grid_x; // 83mm (not 84mm!)
bin_depth = bin_size * grid_y; // 124.5mm (not 126mm!)
bin_height = height_unit * height_u; // 28mm
Why this matters: User requests "2×3×4 bin" but must understand that means 83mm × 124.5mm × 28mm actual size, not 84mm × 126mm × 28mm.
Gridfinity and OpenGrid share 84mm alignment:
Design implication: When creating combo systems, use 84mm as common denominator for alignment across both standards.
Use this decision tree to select pattern:
| User wants to store | Primary pattern | Alternative | Read module |
|---|---|---|---|
| Generic desktop organization | Basic Bin | Divided Bin (if categories) | basic_bin.md |
| Sorted small parts (resistors, screws) | Divider Bin | Multiple basic bins | divider_bin.md |
| Maximum drawer space efficiency | Basic Bin (exact drawer dimensions) | Lite Bin (vase mode) | basic_bin.md, lite_bin.md |
| Rapid printing / minimal filament | Lite Bin | Basic Bin (if strength needed) | lite_bin.md |
| Custom baseplate for drawer/desk | Baseplate | N/A | baseplate.md |
Ask these questions:
Default: When unclear, use Basic Bin - most versatile, user can refine.
Always declare these parameters at top of file:
// Grid dimensions (what user specifies)
grid_x = 2; // Grid units wide (1 unit = 42mm)
grid_y = 3; // Grid units deep
height_u = 4; // Height units (1u = 7mm)
// Gridfinity constants (NEVER change)
grid_size = 42; // Standard grid spacing
bin_size = 41.5; // Actual bin size (0.5mm tolerance)
height_unit = 7; // Height increment
corner_radius = 3.75; // Fillet radius
// Structural parameters (print quality)
wall_thickness = 2.0; // 1.6-2.4mm typical for bins
base_thickness = 2.0; // First layer above base profile
// Optional features
include_stacking_lip = true; // Add 4.4mm lip for stacking
include_magnets = false; // Add magnet holes (6mm × 2mm)
include_label = false; // Add label recess
Why this order: User dimensions first (grid units), then ecosystem constants, then structural parameters, then optional features.
Every bin needs proper base profile. Standard integration:
module gridfinity_base_profile() {
// Z-shaped profile that locks into baseplate
// See ./common_items/basic_bin.md for complete module
// First ~5mm of bin height is dedicated to base
}
union() {
// Base profile (required)
gridfinity_base_profile();
// Bin body above base
translate([0, 0, 5]) // Start above base profile
bin_body();
// Optional stacking lip at top
if (include_stacking_lip) {
translate([0, 0, bin_height])
stacking_lip();
}
}
Common mistake: Ignoring base profile and creating flat-bottom bin. Won't lock into baseplate.
When user says "I need a bin for X":
Estimate grid dimensions for their items:
Calculate actual bin dimensions:
actual_width = bin_size * grid_x; // 41.5mm per unit
actual_depth = bin_size * grid_y;
actual_height = height_unit * height_u;
Calculate usable interior:
interior_width = actual_width - wall_thickness*2;
interior_depth = actual_depth - wall_thickness*2;
interior_height = actual_height - base_thickness; // Minus base profile
// First height unit loses ~5mm to base profile
// So 4u (28mm) bin has ~23mm usable height
Inform user of actual dimensions:
Critical understanding: First height unit is partially consumed by base profile.
// Height budget for 1u (7mm) bin:
// - ~5mm: Base profile (socket engagement)
// - ~2mm: Usable interior height
// Result: 1u bins are VERY shallow, rarely practical
// Recommended minimum: 3u (21mm)
// - ~5mm: Base profile
// - ~2mm: Base thickness above profile
// - ~14mm: Usable interior
// Result: Enough space for most small items
Guidance: Suggest minimum 3u for functional bins, unless user specifically needs shallow compartments.
Read the module file, don't reinvent. Each pattern has complete module in ./common_items/:
// DON'T write basic_bin() from scratch
// DO read ./common_items/basic_bin.md and use/adapt the module
// Option 1: Include external file
include <modules/gridfinity_modules.scad>
basic_bin(grid_x=2, grid_y=3, height_u=4);
// Option 2: Paste module directly (user preference)
[paste module from basic_bin.md]
basic_bin(grid_x=2, grid_y=3, height_u=4);
When to adapt vs use as-is:
Only add features if:
Available features:
// Four corners of each grid unit
translate([corner_offset, corner_offset, -0.1])
cylinder(d=6, h=2.1, $fn=30);
Placement: At corners of each 42mm grid square, 8mm from edges.
// At top of bin, mirrors base profile inverted
translate([0, 0, bin_height])
stacking_lip(); // See basic_bin.md for module
Critical: Lip must match base profile geometry for proper stacking.
// Front face, typically 45° overhang (no supports)
translate([bin_width/2, 0, bin_height - 8])
rotate([45, 0, 0])
cube([bin_width*0.6, 10, 10], center=true);
Design consideration: Also serves as finger grip for lifting bin.
// M3 screw holes at corners
translate([corner_offset, corner_offset, -0.1])
cylinder(d=3.2, h=base_thickness+0.2, $fn=20);
Use case: Non-magnetic surfaces or extra-strong anchoring.
Problem: User requests "2×2 bin", code uses 84mm × 84mm dimensions, bin doesn't fit baseplate socket.
Why it fails: Grid spacing is 42mm, but bin size must be 41.5mm to allow 0.5mm tolerance for fit.
Better approach:
// DON'T:
bin_width = 42 * grid_x; // Results in too-tight fit
// DO:
bin_width = 41.5 * grid_x; // Proper tolerance
Problem: User wants 1u (7mm) bin for small parts, code generates bin, but interior is < 2mm tall and useless.
Why it fails: ~5mm of first height unit is consumed by base socket profile.
Better approach:
// When user requests 1u bin:
echo("WARNING: 1u bins have only ~2mm usable interior.");
echo("Recommend minimum 3u (21mm) for functional storage.");
// Suggest alternative
height_u = 3; // Override to practical minimum
Problem: Code creates bin with flat bottom, looks correct in preview, but won't lock into baseplate.
Why it fails: Gridfinity requires specific Z-shaped base profile for socket engagement.
Better approach:
// DON'T: Start with flat cube
cube([bin_width, bin_depth, bin_height]);
// DO: Use proper base module
gridfinity_base_profile(); // Required locking geometry
translate([0, 0, 5])
bin_walls(); // Bin body above base
Problem: User wants stackable bins, code adds simple rim at top, but bins don't stack properly.
Why it fails: Stacking lip must be inverted mirror of base profile for proper engagement.
Better approach:
// DON'T: Add simple cylinder rim
translate([0, 0, bin_height])
cylinder(r=40, h=4.4); // Wrong geometry
// DO: Use proper stacking lip module
translate([0, 0, bin_height])
stacking_lip(); // Mirrors base profile inverted
Problem: Module has magic numbers scattered throughout instead of grid-based calculations.
Why it fails: User can't easily adjust to different sizes; violates Gridfinity modularity principle.
Better approach:
// DON'T:
cube([83, 124.5, 28]); // What grid size is this?
// DO:
cube([
bin_size * grid_x,
bin_size * grid_y,
height_unit * height_u
]);
Before delivering OpenSCAD code:
Required elements:
Dimensional accuracy:
Pattern compliance:
Code quality:
$fn specified for cylinders/curves (e.g., $fn=40)User communication:
Pattern modules are organized as:
./common_items/
├── basic_bin.md - Standard Gridfinity bin (most common)
├── baseplate.md - Grid baseplate with sockets
├── divider_bin.md - Bin with internal compartments
└── lite_bin.md - Thin-wall vase mode variant
Workflow:
84mm alignment enables combining systems:
// 2×2 Gridfinity baseplate (84mm × 84mm)
gridfinity_baseplate(grid_x=2, grid_y=2);
// Same width as 3-slot OpenGrid item (3 × 28mm = 84mm)
// Can mount side-by-side on shared 84mm width surface
Use case: Desktop organization (Gridfinity bins) with wall-mounted tool storage (OpenGrid) sharing common width alignment for visual coherence.
Design consideration: When creating hybrid workspace, use 84mm width increments for alignment across both systems.
Gridfinity Ecosystem:
Related skills:
Official resources: