r/ClaudeAI • • 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.

28 Upvotes

35 comments sorted by

•

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:

  • Wen AI? The most popular request is for direct AI integration, allowing users to control the running CAD program with prompts via MCP or a command line. A community member has already started working on this.
  • How's it compare to SolidCraft? They're different beasts. FreeShape is more of an Onshape clone with 2D drawings ready to go. SolidCraft has built-in MCP and a browser version but is still developing its 2D drawing capabilities. They also use different geometry kernels, which might mean they handle weird shapes differently.
  • Onshape is still king of file management. Users noted that Onshape's seamless assembly and reference handling is a killer feature that FreeShape is still chasing.

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.)

1

u/EnoughImagination702 1d ago

Thanks, hope it works well for you. I like the idea of hooking Claude into the running CAD, so I'll have a look at it. The ultrasonic horn sounds cool, did it work?

1

u/Mirar 1d ago

Sort of. Still getting stray echoes so not perfectly. One of the silly home automation projects, measuring level of water (+ another sensor for temperature) when running a bath (usually for the kids). Because with Claude I can just come up with silly ideas and execute them effortlessly like that. :)

(I got complaints, so I a bit more manually modified the horn into a blowfish decoration. It's on the ceiling, needs to be 90° from the surface.)

2

u/EnoughImagination702 1d ago

Haha, a blowfish on the ceiling is brilliant, and a great way to deal with complaints. Hope you get the stray echoes sorted!

1

u/sawingonafiddle 1d ago

Do you have Claude driving the program currently?

1

u/EnoughImagination702 1d ago

Not built in yet. Claude can write Python scripts that FreeShape runs, but there's no MCP to drive the running program. It's something I'd like to look at.

1

u/sawingonafiddle 1d ago

Check it out and also you could point Claude at the Solidcore repo to see how it is doing it. I imagine it would help a lot with getting on parity with onshaoe if you can have it script the tests. Granted the mouse interaction is a key part of that. Also, What geometry kernel are you using?

1

u/EnoughImagination702 1d ago

Good idea, I'll have a look. Scripted tests could help a lot with Onshape parity, though you're right that the mouse side needs testing too. The kernel is OpenCascade, the same one FreeCAD uses.

2

u/pardeike 1d ago

I just started making it available to agents using my gabs project (very successful within RimWorld and other applications that want to be remote controlled):

https://github.com/richiewillmott/FreeShape/issues/62

3

u/Cactus_Thorn_Pub 1d ago

Cool as fuck; thank you.

1

u/EnoughImagination702 1d ago

Haha thank you, enjoy!

2

u/FireSilicon_ 1d ago

Nice, fusion with their cloud BS is annoying and freecad has horrible UI, this looks like a good alternative.

1

u/EnoughImagination702 1d ago

Thanks! Those two things are pretty much why I made it. I'm pretty happy with how the UI's turned out, so I hope you like it.

2

u/hwooareyou 1d ago

How does this compare to Solidcraft?

2

u/EnoughImagination702 1d ago

I haven't used SolidCraft, only read its docs. It has MCP and a browser version, which FreeShape doesn't have. FreeShape is more Onshape-like and already has 2D drawings, which SolidCraft is still working on. Both are free, so try both and see which suits you.

1

u/Potential-Double-975 1d ago

Looks like they use different geometry kernels - SolidCraft uses SMLib while FreeShape uses OpenCascade. I'm not very familiar with SMLib but it looks like OpenCascade may be more mature. I assume this might manifest in certain edge-case geometries causing an issue in one tool but maybe not the other.

2

u/Specific_Anxiety_520 1d ago

Is it open source ? This would help me so much

1

u/EnoughImagination702 1d ago

Yes, it's free and open source under GPL-3.0

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/EnoughImagination702 1d ago

Thanks, good shout. Saves already write to a temp file and rename it over, but I don't think they keep the original permissions, so I'll fix that.

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

1

u/EnoughImagination702 1d ago

Haha, partly! Parts stay linked into assemblies and there's version history, but it's still separate files. It re-finds references like faces and edges by position and shape, which handles most edits, but Onshape is definitely better after big changes. What do you like most about theirs?

1

u/booshack 1d ago

No folders, cross referencing parts across projects, nothing ever breaking.

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

4

u/EnoughImagination702 2d ago

Honestly the tests are the only reason it's still standing. Early on I'd fix one thing and quietly break two others, and not find out until later. Now it tells me straight away.