Skip to content

Documentation

Willem Romijn edited this page Mar 18, 2025 · 4 revisions

Overview

The Gridfinity Block library provides a parametric OpenSCAD model for creating custom storage bins that integrate seamlessly with the Gridfinity system. This library defines a solid block that can be customized using built-in subtraction functions to carve out specific shapes, holes, or compartments.

TODO: format lists

1. Installation

TODO: write something about versions and settings for optimal performance Before using this library, ensure you have OpenSCAD installed. Then, download the library files from the GitHub repository.

To use the library in OpenSCAD, include it in your script:

use <openscad-gridfinity-block/gridfinity_block.scad>;

(Optional) Define a high-resolution rendering:

$fn = 128; // Higher values result in smoother curves

2. Creating a Basic Gridfinity Block

To generate a basic Gridfinity-compatible bin, use the gridfinity_block() function:

gridfinity_block([width, depth, height], stacking_lip, center);

Parameters: • [width, depth, height] → Defines the size of the bin in Gridfinity units: • width = Number of 42mm-wide units. • depth = Number of 42mm-deep units. • height = Number of “U” units in height (7mm each). • stacking_lip (default: false) → Adds a lip for secure stacking. • center (default: false) → Determines the position of the OpenSCAD origin ([0,0,0]): • false → Origin is at the bottom-left corner of the top surface inside the walls. • true → Origin is at the center of the top surface.

Example:

gridfinity_block([2, 3, 6], stacking_lip = true, center = false);

This creates a 2x3 bin, 6U high, with a stacking lip. The origin is at the bottom-left corner of the top surface inside the walls.

gridfinity_block([2, 3, 6], stacking_lip = true, center = true);

This creates the same bin, but the origin is centered on the top surface.

TODO: describe $vars

3. Adding Internal Features

Once the block is created, you can carve out internal features using built-in functions.

3.1 Creating Square Holes

TODO: add center parameter To create a rectangular cutout within the bin, use:

gb_square_hole(position, size, depth);

Parameters: • position: [x, y] coordinates in Gridfinity units. • size: [width, length] dimensions. • depth: Vertical depth of the cut.

Example:

gridfinity_block([2, 2, 6], stacking_lip = true) {
    gb_square_hole([10, 10], [30, 30], depth = 15);
}

Creates a 30x30mm square hole at position (10,10), cutting 15mm deep.

TODO: describe $vars and coordinates

3.2 Creating Round Holes

For circular cutouts, use:

gb_round_hole(position, diameter, depth);

Parameters: • position: [x, y] center of the hole. • diameter: Width of the hole. • depth: Vertical depth.

Example:

gridfinity_block([2, 2, 6], stacking_lip = true) {
    gb_round_hole([15, 15], 10, depth = 10);
}

Creates a 10mm diameter hole at (15,15), 10mm deep.

TODO: describe $vars and coordinates

3.3 Custom Subtractions

To manually remove material using OpenSCAD’s difference() operation:

gridfinity_block([2, 2, 6]) {
    translate([10, 10, -5]) cube([20, 20, 10]);
}

This subtracts a 20x20x10mm cube positioned at (10,10, -5).

4. Advanced shapes

TODO: write this part

5. Examples

Image Example Description
Bathroom drawer bin This is what I created the library for. Multiple round cutouts for storing bottles in a bathroom cabinet drawer.
Tray for a fountain pen Demo for a simple custom bin.
Bin with scoop and label There are dozens of better libraries for this, but I wanted to see if I could make a standard bin from the block.