Agentic parametric 3D models with validated STL and STEP exports
  • Python 61.1%
  • Nix 37.1%
  • Makefile 1.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Daniel Havlíček c2256fc840
Some checks failed
CI / test (push) Has been cancelled
feat: add Nix flake for FreeCAD and freecad-mcp integration
2026-08-28 10:00:44 +02:00
.forgejo/workflows feat: scaffold agentic 3d modeling workspace 2026-08-12 18:47:41 +02:00
docs/superpowers feat: scaffold agentic 3d modeling workspace 2026-08-12 18:47:41 +02:00
models Set T-joint rib diameter to 21.5 mm 2026-08-13 08:04:26 +02:00
src/modelgen Add printable T-joint model 2026-08-12 18:55:51 +02:00
tests Set T-joint rib diameter to 21.5 mm 2026-08-13 08:04:26 +02:00
.gitignore feat: add Nix flake for FreeCAD and freecad-mcp integration 2026-08-28 10:00:44 +02:00
AGENTS.md feat: scaffold agentic 3d modeling workspace 2026-08-12 18:47:41 +02:00
flake.lock feat: add Nix flake for FreeCAD and freecad-mcp integration 2026-08-28 10:00:44 +02:00
flake.nix feat: add Nix flake for FreeCAD and freecad-mcp integration 2026-08-28 10:00:44 +02:00
Makefile Add printable T-joint model 2026-08-12 18:55:51 +02:00
pyproject.toml feat: scaffold agentic 3d modeling workspace 2026-08-12 18:47:41 +02:00
README.md feat: add Nix flake for FreeCAD and freecad-mcp integration 2026-08-28 10:00:44 +02:00
uv.lock feat: scaffold agentic 3d modeling workspace 2026-08-12 18:47:41 +02:00

Agentic 3D Models

Parametric CAD models designed and generated by agents using Python and build123d. All dimensions are millimetres.

Quick start

Install uv, then:

uv sync
uv run modelgen generate mounting_plate --output-dir outputs/mounting_plate
uv run modelgen validate outputs/mounting_plate/mounting_plate.stl
uv run modelgen generate t_joint --output-dir outputs/t_joint
uv run modelgen validate outputs/t_joint/t_joint.stl
orca-slicer --info outputs/t_joint/t_joint.stl
uv run pytest

The generated STL is suitable for slicing. The STEP file is retained for CAD editing. Generated files are ignored by Git; the Python source is authoritative.

Agent workflow

  1. Convert the request into explicit dimensions, tolerances, material, and print orientation.
  2. Add or modify a model module under models/ with a build_model() function.
  3. Add geometry assertions under tests/.
  4. Generate and validate STL/STEP artifacts.
  5. Inspect the STL in a slicer before manufacturing.

Models should be solid, deterministic, watertight, and designed with realistic clearances and minimum feature sizes for the target printer.

The OrcaSlicer --info check is part of the artifact workflow: it confirms the STL is a single manifold object before it is sent to a slicer or printer.

FreeCAD & MCP Integration (Nix)

This repository includes a flake.nix providing FreeCAD and freecad-mcp.

Running FreeCAD and MCP Server

  1. Enter the Nix dev shell (automatically installs and links the FreeCADMCP addon):

    nix develop
    
  2. Launch FreeCAD with MCP Addon:

    freecad
    # Or run directly via Nix:
    nix run .#freecad
    

    In FreeCAD, switch to the "MCP Addon" workbench and start the RPC server (or enable "Auto-Start Server" in FreeCAD MCP menu).

  3. Run the MCP server:

    nix run .#freecad-mcp
    # Or inside `nix develop`:
    freecad-mcp
    

MCP Client Configuration

To allow MCP clients (such as Antigravity, Claude Desktop, etc.) to control FreeCAD:

{
  "mcpServers": {
    "freecad": {
      "command": "nix",
      "args": ["run", "/home/daniel/Repositories/3dprint#freecad-mcp"]
    }
  }
}