Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Just yesterday I used Claude to great effect in FreeCAD to model a church tower. The tower has a square base and an octagonal top, but connecting the two by creating a loft using the GUI in FreeCAD results in a wrong and ugly abomination.

Claude understood the problem and produced elegant Python code that worked perfectly the first time.

So I continued and described the other features of the tower to Claude, who coded them.

It's sometimes difficult to properly describe what you want in English, and Claude does a lot of thinking, and sometimes goes deep into a wrong direction of which it won't come out easily; but in the end the result is almost perfect.



I've been struggling to get Claude or Gemini to make a project enclosure. I've got it down to a decent set of requirements and have been trying FreeCAD Python output, OpenSCAD, and Build123d. Most attempts fail to generate output (after several minutes of thinking and getting a good way there). When attempts don't fail they get aspects wrong. At this point I think my workflow needs to be breaking up the request into a series of functions for each feature then iterating on the overall model.


I'm not sure what went wrong exactly, but a common issue people run into with lofts is caused by the fact that FreeCAD tries to match vertices to vertices. If you use the split edge tool on your square to create 8 edges out of the existing 4 (maintaining the same square shape), it should loft smoothly to the octagon.

If the loft appears twisted it only means you need to change the order in which you created the geometry. FC in addition to matching vertex to vertex will also match them in the order they were created. This allows you to purposely create twisted shapes, but sometimes can happen inadvertently also.


Here's a photo of the church tower in question:

https://img.over-blog-kiwi.com/1/40/25/08/20170227/ob_76f390...

You can see that the square base is connected to the octagonal tower using alternating trapezoids and triangles; FreeCAD doesn't seem capable of doing that using the GUI (but I'm no expert and would love to be proved wrong).


This is what the other person was trying to describe: https://imgur.com/a/J9lQBNK

I chose 1mm for my corner chamfer on the base, but you could make it any dimension including something imperceptible.


Aah thank you!!!

Yes that would have worked, I will try that next time. The last image is more or less what the Python code produced, but being able to do it in the GUI would be nice.


Maybe Claude thought you wanted to model this church in Chesterfield?

Chesterfield's Crooked Spire in Chesterfield | Atlas Obscura https://share.google/ABVhVgtzQ8KxnO27L


Can you describe how you hooked Claude up to freecad?

I've messed around with freecad a bit (I'm still a beginner) and was just saying today I'd like to play around with trying to use llm's for 3d modelling.

EDIT: I found this mcp[0] after searching, was it that? The docs mention Claude desktop, but I assume it works fine with Claude code too, right?

[0] https://github.com/neka-nat/freecad-mcp


Hey, I'm the OP. I originally started with FreeCAD. There's not much to "hook up" to Claude. It can natively write for FreeCAD. You don't need to use the FreeCAD editor and can point to an external, local file with an import. At that point there's not much more than pointing your LLM to that file. You'll need to tell the FreeCAD desktop app to update on changes.

Eventually I moved to JSCAD for the application mentioned in my blog post because I realized I wanted a more complex UI (which meant a web app) than what FreeCAD provided natively. If you're looking for something simple with some var statements though, FreeCAD might be enough.

In my experience, the MCP isn't really needed. Claude at least already can write the code pretty well. The problems are more with getting it to understand the output, which the blog post covers.


Sorry what format of local file can it work with?

I can see it working with scad, and then having that generate some things. I'd imagine it'd struggle with an STL file. I don't know much about the format of FCStd files but I'd find that surprising if it worked fine. Obviously three.js code and everything it could be alright with.

It might be my lack of knowledge, because I've mostly just used Freecad to create and edit things and then just exported to STL (which doesn't feel like the thing Claude would be good at modifying)


I didn't hook up anything to anything, I copied-and-pasted the Python output of Claude to the Python console of FreeCAD. Run, check, delete, repeat.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: