FreeCAD Export STL for 3D Printing: Check the Mesh with Claude AI
▶ Watch on YouTube & subscribe to The Stack Underflow
A Part Design body is a recipe: Sketch, Pad, Hole, Fillet, each step building on the last. When you export, FreeCAD exports whatever you selected. Select the Body (or the last row) and you get the finished part. Select a step halfway through, like the Pad, and you get the part as it was at that step, with later features missing. The file can still be perfectly closed. Closed is not the same as right: compare the volume.
The one-line version: export the Body, import the STL back, and check its volume. About 14,849 is the part; 15,000 means the holes are missing.
Last verified in our lab: 31 October 2026 (FreeCAD 1.1.4; freecad-mcp 0.1.28; Claude Code 2.1.308 with Claude Sonnet 5.5; PrusaSlicer 2.9.2, stock Original Prusa MK4S 0.4 nozzle, 0.20mm SPEED, Prusament PLA; Linux in Docker). The hook comes from lessons 2-4.
The words first
- STL: a file of flat triangles that describe the part’s surface. It’s what slicers read.
- Mesh: a surface made of triangles. A curved hole becomes a ring of flat sides.
- Closed (solid) mesh: the triangles enclose a volume with no gaps.
- Maximum mesh deviation: how far the triangles may stray from the true curve. Smaller means finer triangles.
By hand (FreeCAD 1.1.4)
-
File, Open: lesson 4’s hook. Click the last row (Fillet); the volume line
Gui.Selection.getSelection()[0].Shape.Volumegives 14848.58… -
Click the Body (or the last row). File, Export. Files of type: STL Mesh (*.stl *.ast). Name:
hook.stl. Save. -
Workbench list: Mesh. File, Import:
hook.stl. Click the new row: Mesh Info, Number of facets (272 here; yours may differ). -
Meshes, Analyze, Evaluate and repair mesh. All above tests together: Analyze (only Analyze, not Repair). Every test row should say “No …”.
-
Meshes, Analyze, Check solid mesh: “The mesh ‘hook’ is a solid.”
-
Click the mesh row and type (note:
Mesh, notShape):Gui.Selection.getSelection()[0].Mesh.VolumeAbout 14,849: the part. 15,000 means the holes are missing.
-
Finer triangles: Edit, Preferences, Import-Export, Mesh Formats, Maximum mesh deviation (the page shows once the Mesh workbench has been opened). Default 0.10 mm.
What we measured in FreeCAD
| Export | Triangles | Volume | Holes |
|---|---|---|---|
| The Body, default deviation | 272 | 14,849 mm³ | yes; each 4 mm hole is 26 flat sides, 3.97 mm across the flats |
| The Pad (a step halfway) | 28 | 15,000 mm³ | missing, and Check solid mesh still says “a solid” |
Maximum mesh deviation, coarse to fine in one session: 0.1 and 0.08 gave 272 triangles; 0.06 to 0.02 gave 1,172 (126 sides per hole); 0.01 gave 2,100 (229 sides, 4.00 mm). A coarser number afterwards kept the finer mesh in that session.
The slicer’s estimates
PrusaSlicer 2.9.2, its stock MK4S settings, supports off. These are estimates: we didn’t print it.
| Orientation | Time | Plastic | Layers / note |
|---|---|---|---|
| Standing (as modelled, 60 tall) | 35 min 56 s | 9.09 g | 300 layers |
| On its side (rotate X 90, 30 tall) | 21 min 55 s | 9.19 g | 150 layers |
| On its back | 29 min 16 s | 9.40 g | ”Detected print stability issues” warning |
| The Pad’s file, standing | 35 min 53 s | 9.08 g | the slicer can’t tell the holes are missing |
Then with Claude
Lesson 4’s hook open, a fresh session each run. Without (1 run):
In FreeCAD, the open document is my wall hook. Export it as an STL file for 3D printing, saved as hook-claude.stl in my home folder.
With the sentence (1 run), the same plus:
Then check that STL in FreeCAD's Mesh workbench: it must be closed, one solid, with no errors, and tell me its triangle count and volume.
Then, in both: “Should I print it standing up as it is, or lying on its side? Answer in two sentences.” The scoring was written down before the first run.
- With the sentence: exported the Body (byte for byte the same file as ours), loaded the saved file back with FreeCAD’s mesh tools and reported 272 triangles and 14,849.0 mm³: true.
- Without: exported the same file; said it checked the shape before export but not the mesh itself.
- Both answered “lying on its side” and gave a strength reason. That part is Claude’s claim; we didn’t print or test it. The slicer estimates about 14 minutes less on its side.
- Replay with no AI: the logged calls in a fresh FreeCAD wrote the same file.
The course
- Previous: Lesson 4: holes and fillets
- Next: Lesson 6: edit a model with Claude without breaking it
- The lab for this lesson: freecad-course-lab/out/l5
- The same idea in SolidCraft: SolidCraft course, lesson 5
Sources
- PrusaSlicer 2.9.2 with its own MK4S presets, copied unchanged: every time and weight above
- The lab: the pre-written scoring, scripts, logs, slicer outputs and replays
Change notes
- 16 Nov 2026: first published, from the lesson’s lab results of 31 Oct 2026.
Not affiliated with or endorsed by the FreeCAD project, the freecad-mcp project, Prusa Research or Anthropic. Found a mistake? Tell us in the video’s comments and we’ll correct this page.
Found this useful? The deep version lives on YouTube — new breakdowns of how AI dev tools actually work, weekly.
Subscribe on YouTube →Prefer email? Get the free newsletter: one failure, traced step by step, about once a week.