Overview
Describe a part in plain words and have Claude Code in Claude Desktop write a FreeCAD Python script whose named parameters you can change later to regenerate the model.
Problem or Objective
More in Research and Analysis
AI Agents and Models
Tools and Integrations
- Tools
- FreeCAD · Claude Code · Git
- Prerequisites
- Claude Code in the desktop app is available on Pro, Max, Ultra, Team and Enterprise plans; FreeCAD runs on Windows, macOS and Linux.
How It Works
Install Claude Desktop on a paid plan and a CAD program that can run Python scripts; FreeCAD is one way to build this, since it is a free parametric modeller with a Python API. Then open Claude Code in an empty project folder. Write a short specification: what the part does, overall dimensions, wall thickness, hole sizes and positions, fillets, material and how it will be made (3D printing, CNC). Ask Claude Code to write a Python script for FreeCAD with every dimension as a named parameter at the top, building the part from sketches and features rather than a single fixed mesh, and exporting STEP and STL files. Read the script before running it, then run it from FreeCAD's Python console or macro tools. Inspect the model, measure it in FreeCAD, and ask Claude Code for changes by naming the parameter or feature to adjust. Keep the script in Git so each design change is a readable diff.
Implementation Workflow
Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.
- Choose the agentSet up Claude Desktop.
- Connect the toolsConnect the tools this workflow relies on: FreeCAD, Claude Code, Git.
- Check the prerequisitesClaude Code in the desktop app is available on Pro, Max, Ultra, Team and Enterprise plans; FreeCAD runs on Windows, macOS and Linux.
- Gather your detailsCollect what the prompt asks for: FreeCAD version you run, What the part is and does, Dimensions that must be adjustable, Folder for exported files, How the part will be made.
- Run the starter promptPaste the starter prompt below into Claude Desktop and adapt it to your case.
- Check against the documentationCompare what you get with the documentation at claude.com before you rely on it.
Practical Starter Prompt: Write a parametric FreeCAD script
Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].
Write a Python script for FreeCAD [FreeCAD version you run] that models this part: [What the part is and does]. Put every dimension at the top as a named parameter in millimetres, including [Dimensions that must be adjustable]. Build it from sketches and features so I can change parameters and regenerate it. Export STEP and STL files to [Folder for exported files]. The part will be made by [How the part will be made], so flag any feature that process cannot make. Do not run the script; show it to me for review first and wait for my approval before changing any file outside this folder.Read and approve each script before running it in FreeCAD, measure critical dimensions in the model, and have a qualified person review any part that carries load or affects safety.
Expected Results and Benefits
This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.
This is a suggested workflow, not a reported outcome. The Claude download page says Claude Code runs in the desktop app and lets you review local code changes. FreeCAD's README describes a parametric modeller in which designs change through parameters in the model history, with a Python API and scripting documentation. No cited page tests the quality of models written this way.
Limitations and Considerations
A model that looks right can still have wrong dimensions or weak walls; measure every critical dimension in FreeCAD and print or machine a cheap test piece first. Anything load-bearing, safety-related or regulated needs review by a qualified engineer, not only by the model. FreeCAD's Python API changes between versions, so tell Claude Code which version you run and check scripts after upgrades. Scripts run with your user's permissions, so read them before running. If you want to attach sketches or reference photos, check that your Claude plan accepts images. Results depend on your setup and were not independently reproduced by Top 200 Repos.
GitHub Repositories
Suggested Implementation Component
A repository that could serve as a building block. It is not part of the cited account and is not evidence that the workflow was run.
Sources
- Download Claude | Claude by Anthropic (opens in a new tab)
Project documentation · claude.com · Undated · Source checked 26 Nov 2026, 17:27 UTC
What this source supports
- Claude Code runs directly in the desktop app.
- Claude Code and Claude Cowork are available on Pro, Max, Ultra, Team, and Enterprise.
- FreeCAD/FreeCAD README (opens in a new tab)
Project documentation · github.com · Undated · Source checked 26 Nov 2026, 23:34 UTC
What this source supports
- Parametric modeling lets you modify a design by changing parameters in its model history.
- The FreeCAD wiki contains documentation on general usage and Python scripting.