FreeCAD + Claude AI for Beginners: Design a 3D Print, Then Check It
Автор: The Stack Underflow
Загружено: 2026-10-22
Просмотров: 714
Описание:
Connect Claude AI to FreeCAD with the FreeCAD MCP server, design a cable clip for 3D printing, check Claude's "done" against FreeCAD's own numbers, and rerun the saved macro with no AI.
Watch the series in order: • SolidCraft and FreeCAD with Claude AI: Tut...
Tested with FreeCAD 1.1.4, freecad-mcp 0.1.27 and Claude Code 2.1.303 (21 Oct 2026). FreeCAD and the addon are free; Claude Code needs a paid Claude plan (Pro, Max, Team, Enterprise) or a Console (API) account: the free claude.ai plan does not include it.
What the lab showed (3 logged Claude Code sessions, claude-sonnet-5-5):
• Claude built the clip with every size in a FreeCAD spreadsheet: 12.4 x 20 x 12.4 mm, 2095.31 mm3 (about 2.1 cm3), channel 6.4 mm, slot 5 mm, one valid solid, closed mesh.
• We typed a plain 8 into the cable cell (no unit) ourselves. FreeCAD kept the old 6 mm clip and still reported it valid; only the sheet showed errors. Claude's check read FreeCAD's "Unit mismatch in plus operation", set the cell to 8 mm itself, and said so: 14.4 x 20 x 14.4 mm, 2712.52 mm3.
• Only 1 of 3 sessions put units in its cells, so only there could a plain 8 go wrong.
• The slot did not follow the cable: it is its own 5 mm cell, now 3 mm narrower than an 8 mm cable. Claude flagged it in 3 of 3 sessions and left it (the snap at 8 mm is untested).
• The size and volume Claude quoted matched FreeCAD's in 6 of 6 checks. The saved macro, re-run with no AI in a fresh FreeCAD, matched at 8 mm and back at 6 mm in 3 of 3 sessions.
• Agent cost: $1.58 for the 3 sessions ($2.29 with the pilot), at API prices.
Setup on Windows (from the project's docs; my runs are Linux in Docker, so these steps are not tested by me):
1. Install FreeCAD 1.1.4.
2. Install uv (docs.astral.sh/uv: the PowerShell one-liner, or winget install --id=astral-sh.uv -e).
3. Install Claude Code (PowerShell: irm https://claude.ai/install.ps1 | iex), then claude --version.
4. Download freecad-mcp v0.1.27 (github.com/neka-nat/freecad-mcp, tag v0.1.27). Copy ONLY the folder addon/FreeCADMCP into FreeCAD's Mod folder (FreeCAD 1.1 on Windows: %APPDATA%\FreeCAD\v1-1\Mod), so Mod\FreeCADMCP\InitGui.py exists.
5. Restart FreeCAD, pick the MCP Addon workbench, press Start RPC Server (every time you open FreeCAD, or turn on Auto-Start). The docs' check: the status bar shows 127.0.0.1:9875.
6. Make a project folder, open a terminal in it, run: claude mcp add freecad -- uvx [email protected] --only-text-feedback
7. Check: claude mcp list says Connected. Then type claude and ask: What documents are open in FreeCAD right now?
8. New Claude Code starts in auto mode (a checker approves tool calls). Press Shift+Tab until it says Manual, so it asks before each tool. execute_code runs any Python with your permissions: read the code first, never pick "don't ask again" for it. The addon refuses requests sent by web pages, but any program on your computer can use it while it runs.
Known errors from the docs: a Windows client that can't start the server (EFTYPE / uv_spawn): the docs' workaround for the installed freecad-mcp.exe is "cmd", "/c", "freecad-mcp"; "Connected" missing: run claude mcp add in the folder where you start claude (it is saved for that folder only).
The 5 messages I sent (verbatim, never naming a tool or a unit hint) are in the lab: out/runs/S1/m1-prompt.txt to m5-prompt.txt.
How to run the macro yourself: in FreeCAD 1.1.4, Macro, Macros, pick clip.FCMacro, press Execute.
The lab (every message, every JSON-RPC line, the snapshots, the macro and STL Claude wrote, the tests): https://github.com/thestackunderflow/...
On screen: FreeCAD 1.1.4 renders and screens from the lab (the orange cable is our own cylinder), and lab files (one JSON line spaced out for display; clip.FCMacro lines 5-6).
Next: FreeCAD vs SolidCraft in Claude Code (the same missing unit, a louder failure): • SolidCraft vs FreeCAD in Claude Code: Same...
SolidCraft for Beginners (an app with the AI built in): • SolidCraft for Beginners: Design Your Firs...
Docs: https://github.com/neka-nat/freecad-mcp (v0.1.27) · https://code.claude.com/docs/en/mcp · https://code.claude.com/docs/en/permi...
Current version always at thestackunderflow.com. Checked October 2026.
Newsletter: https://thestackunderflow.substack.com
CHAPTERS
0:00 My cable doesn't fit: the 6 mm clip, the 8 mm cable
0:23 What the FreeCAD MCP server does (the kitchen and the hatch)
0:54 Install the FreeCAD MCP addon and connect Claude Code
2:42 Design a cable clip with Claude
3:21 Check it with FreeCAD's numbers
4:10 Change the size in FreeCAD's spreadsheet (8 is not 8 mm)
5:41 Export the STL and save a FreeCAD macro
6:46 Recap: 4 rules
Diagrams and animation are original; the part images are FreeCAD's own renders. Not affiliated with or endorsed by the FreeCAD project, neka-nat/freecad-mcp or Anthropic. FreeCAD and the MCP server change often; details can differ in later versions.
#FreeCAD #Claude #3DPrinting
Narration: AI-generated voice
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: