Skip to main content

A python library to make Gridfinity compatible objects with CadQuery.

Project description

Microfinity

PyPI Python License CadQuery

Parametric Gridfinity generator with fractional sizing support.

Create bins in 0.25U increments that fit perfectly on standard Gridfinity baseplates.

Standard Gridfinity (42mm grid)     Microfinity (10.5mm micro-grid)
┌──────────────────────────────┐    ┌──────────────────────────────┐
│                              │    │  ┌──┐┌──┐┌──┐┌──┐           │
│         1U x 1U bin          │    │  │  ││  ││  ││  │  0.25U    │
│         (42 x 42mm)          │    │  └──┘└──┘└──┘└──┘  bins     │
│                              │    │  ┌──┐┌──┐┌─────────┐        │
│                              │    │  │  ││  ││         │  Mixed │
│                              │    │  └──┘└──┘│  0.5U   │  sizes │
│                              │    │  ┌──────┐│   bin   │        │
│                              │    │  │      │└─────────┘        │
│                              │    │  │ 0.5U │                   │
└──────────────────────────────┘    └──┴──────┴───────────────────┘

Features

  • 100% Gridfinity Compatible - Works on any standard baseplate
  • Fractional Sizing - 0.25U (10.5mm) and 0.5U (21mm) increments
  • Automatic Drawer Layouts - Tile baseplates for any drawer size
  • Multi-Piece Support - Connection clips for pieces larger than your build plate
  • Parametric - Magnets, scoops, labels, dividers, and more
  • Multiple Formats - Export to STL, STEP, or SVG

Quick Start

Install:

pip install microfinity

Create your first box:

from microfinity import GridfinityBox

box = GridfinityBox(2, 3, 4, holes=True, scoops=True)
box.save_stl_file()  # -> gf_box_2x3x4_holes_scoops.stl

Or use the CLI:

microfinity box 2 3 4 --magnets --scoops -f stl

Why Fractional Sizes?

Standard Gridfinity bins come in whole-unit sizes (1U = 42mm). But what if your screwdriver is 35mm wide? You'd need a 1U bin with wasted space, or it won't fit at all.

With Microfinity, create a 0.75U bin (31.5mm) or 1.25U bin (52.5mm) - whatever fits your items best:

from microfinity import GridfinityBox

# Perfect fit for narrow items
narrow_bin = GridfinityBox(0.5, 2, 3, micro_divisions=4)

# Slightly wider than 1U
wide_bin = GridfinityBox(1.25, 1, 3, micro_divisions=4)

Fractional bins use smaller "micro-feet" that still index correctly on standard baseplates.

Examples

Boxes

from microfinity import GridfinityBox

# Standard box with all features
box = GridfinityBox(2, 3, 4, holes=True, scoops=True, labels=True)

# Fractional box (quarter-grid)
small_box = GridfinityBox(1.25, 0.5, 3, micro_divisions=4)

# Box with dividers
divided_box = GridfinityBox(4, 2, 3, length_div=3, width_div=1)

Baseplates

from microfinity import GridfinityBaseplate

# Simple baseplate
plate = GridfinityBaseplate(4, 4)

# With corner screws for mounting
mounted = GridfinityBaseplate(6, 4, corner_screws=True)

Drawer Layouts

from microfinity import GridfinityBaseplateLayout

# Automatically tile a drawer larger than your build plate
layout = GridfinityBaseplateLayout(
    drawer_x_mm=450,      # Drawer width
    drawer_y_mm=380,      # Drawer depth
    build_plate_x_mm=220, # Printer bed X
    build_plate_y_mm=220, # Printer bed Y
)

layout.print_summary()    # See the breakdown
layout.export_all("./drawer", file_format="stl")

CLI Commands

# Generate boxes
microfinity box 2 3 4 -f stl                    # Basic 2x3x4 box
microfinity box 2 3 4 --magnets --scoops -f stl # With features
microfinity box 1.25 2 3 -m 4 -f stl            # Fractional (quarter-grid)

# Generate baseplates
microfinity baseplate 4 4 -f stl                # 4x4 baseplate
microfinity baseplate 6 4 --corner-screws -f stl

# Generate drawer layouts
microfinity layout 450 380 --build-plate 220 220 -o ./drawer -f stl

# Convert existing STL to micro-feet
microfinity meshcut input.stl -o output.stl -m 4

# Show help
microfinity --help
microfinity box --help

The Micro-Grid System

Divisions Pitch Increment Example Sizes
1 42.0mm 1U 1, 2, 3, 4...
2 21.0mm 0.5U 0.5, 1, 1.5, 2...
4 10.5mm 0.25U 0.25, 0.5, 0.75, 1, 1.25...

See The Microgrid System for technical details.

Documentation

Example Scripts

See the examples/ directory:

Script Description
basic_box.py Simple box with common features
fractional_bins.py Various fractional sizes
drawer_layout.py Complete drawer layout workflow
custom_baseplate.py Baseplates with edge configurations
batch_export.py Generate families of parts

Requirements

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Acknowledgments

License

MIT License - See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microfinity-2.3.0.tar.gz (277.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

microfinity-2.3.0-py3-none-any.whl (313.2 kB view details)

Uploaded Python 3

File details

Details for the file microfinity-2.3.0.tar.gz.

File metadata

  • Download URL: microfinity-2.3.0.tar.gz
  • Upload date:
  • Size: 277.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for microfinity-2.3.0.tar.gz
Algorithm Hash digest
SHA256 c1310955045bd9115c97c72ae8d9d06f51d4255305155a615929d5ea17d36d13
MD5 8be82d1624a3f8cdd4ca621d5206e636
BLAKE2b-256 370564158e7fc5a1c4999c7287e5abcc5c725682a1e3b351b5e69507e3b48a7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for microfinity-2.3.0.tar.gz:

Publisher: release-please.yml on nullStack65/microfinity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file microfinity-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: microfinity-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 313.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for microfinity-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4042c39d1f424090761398e79523dedfe072a02c670fb63750dfaebf89b84e22
MD5 33d24e735c3a4b88c118fc1e244fcf8b
BLAKE2b-256 eb1162c638802305641549dc6e9babb0069e98f2c4fbdacd997101bd2b5ea30d

See more details on using hashes here.

Provenance

The following attestation bundles were made for microfinity-2.3.0-py3-none-any.whl:

Publisher: release-please.yml on nullStack65/microfinity

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page