by bambax · 8mo ago · 0 comments
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.
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.
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).
I chose 1mm for my corner chamfer on the base, but you could make it any dimension including something imperceptible.
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.
Chesterfield's Crooked Spire in Chesterfield | Atlas Obscura https://share.google/ABVhVgtzQ8KxnO27L
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?
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.
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)