r/ClaudeAI • u/EnoughImagination702 • 2d ago
Built with Claude I vibe coded a full parametric CAD program (Onshape-style, free and offline) — sketches, fillets, assemblies, drawings, ~1000 tests
FreeShape is a desktop parametric CAD app, like Onshape or Fusion but free, offline and open source. The video shows a phone stand from scratch: sketch the profile, extrude, drag a fillet past its limit (it goes purple), then change one angle and the whole part rebuilds.
I've been building it with Claude (Claude Code) for about 2 months. My part was deciding what it should do and testing it hard: I keep Onshape open next to it, do the same thing in both, and screenshot what's different ("in Onshape clicking a feature highlights its faces orange, FreeShape uses a different colour", "this fillet works in Onshape but not here"). Claude writes the code, and I check the result in the app.
What it does now: constrained sketches, extrude, revolve, sweep and loft, fillets and chamfers, holes and real threads, patterns, surfaces, assemblies with mates, 2D drawings with DXF/PDF export, sheet metal with flat patterns, variables and configurations, version history, and STEP/STL export. It's Python with Qt, on top of OpenCascade, the same geometry kernel FreeCAD uses.
What I learned vibe coding something this big:
- Ask for tests for everything. It has about 1000 automated tests now, and they catch a lot when a new feature breaks an old one.
- Do a proper QA pass now and then. I had Claude review the whole codebase like a QA engineer. It found real bugs I'd never have spotted by clicking around, like a save that could leave an empty file if something went wrong part-way, and fillets silently moving to the wrong edge after an upstream change.
- CAD is mostly edge cases. The hard part isn't the buttons; it's things like "what happens to this fillet when the edge it was on disappears?" and the geometry kernel refusing a shape that Onshape's handles fine.
- Compare against the thing you're copying. Side-by-side screenshots of Onshape and FreeShape were the fastest way to get behaviour right.
GitHub (GPL v3, Windows/Mac/Linux installers): github.com/richiewillmott/FreeShape
Happy to answer questions about the build. And if you use CAD, tell me what's missing or feels wrong.
•
u/ClaudeAI-mod-bot Wilson, lead ClaudeAI modbot 1d ago
TL;DR of the discussion generated automatically after 30 comments.
The community is overwhelmingly impressed with OP's vibe-coded CAD program, FreeShape. Everyone loves that it's a free, offline, and open-source alternative to the cloud-based Fusion 360 and the notoriously clunky FreeCAD.
The real lesson from this thread, according to both OP and the comments, is the power of testing. The consensus is that the ~1000 automated tests are the "secret sauce" that makes a project like this actually stable and usable, rather than just a cool demo that breaks if you look at it funny.
Other key points:
3
u/Mirar 1d ago
Cool. I'll try this. It would be nice if it gets an mcp/command line that can hook into the running CAD so I can chat with claude to do things.
(I recently for instance made a horn for directing an ultrasonic distance meter using LLM and openscad.)
3
u/Cactus_Thorn_Pub 1d ago
Cool as fuck; thank you.
2
u/FireSilicon_ 1d ago
Nice, fusion with their cloud BS is annoying and freecad has horrible UI, this looks like a good alternative.
2
u/hwooareyou 1d ago
How does this compare to Solidcraft?
2
u/Specific_Anxiety_520 1d ago
Is it open source ? This would help me so much
1
u/ianreboot 1d ago
The empty-file save is worth fixing as a shape rather than a test: write to a temp file beside the target and rename it over, so a crash part way through leaves the previous file intact. Watch the mode when you do it, since a rename installs the temp file's permissions and the original's go away with the old inode. That removes a class of bug your tests would otherwise have to keep catching, which matters more when the tests came from the same model that wrote the save.
1
u/booshack 1d ago
Did you also ahem take inspiration from onshapes file /assembly/reference handling? That's really it's killer feature imo
2
u/Aware-Common-7368 2d ago
i saw the lag
1
u/Yasai101 1d ago
nice..
1
u/Adventurous_Tip5876 1d ago
Very nice! I'll check it out
1
u/Janitorus 1d ago
Love seeing this, doing the same with a few tools instead of using established software because all of those have a few serious downsides I don't like.
Welcome to the new world. The productivity and speed increases are insane.
I'm also having Claude to run subagents and do a full audit of code and design that way, then report back. Telling them to talk to each other and ask for permission to run heavy stress- or timetests one at a time while I sleep. Then wake up to a properly tested tool that just works.
0
u/PM-ME-CRYPTO-ASSETS 1d ago
Whats the point of using Claude to build a tool to create 3D models when you can just use Claude to create 3D models?
0
u/[deleted] 2d ago
[removed] — view removed comment