FreeCAD Sketcher by Hand vs Claude AI: Sketch and Pad Your First Part
▶ Watch on YouTube & subscribe to The Stack Underflow
In FreeCAD’s Part Design, a part starts as a flat sketch, and a Pad pushes it out into a solid. A sketch is only trustworthy when it is fully constrained: every length and direction is pinned, so a stray drag can’t bend it. This lesson draws a wall hook that way by hand, then asks Claude for the same and checks both.
The one-line version: the numbers can match while the sketch is still loose. Open the sketch and check it says Fully constrained.
Last verified in our lab: 29 October 2026 (FreeCAD 1.1.4; freecad-mcp 0.1.28; Claude Code 2.1.308 with Claude Sonnet 5.5; Linux in Docker). Setup is lesson 1.
The words first
- Plane: the flat surface you draw on. XY lies flat, XZ stands up facing you, YZ is sideways.
- Constraint: a rule on the sketch, such as a size, “level”, “upright” or “these two points join”.
- Degrees of freedom: how many ways the sketch can still move. Fully constrained means 0.
- Pad: FreeCAD’s word for extrude: push the sketch out by a length.
By hand (FreeCAD 1.1.4)
The part: a flipped J, 25 deep, 60 tall, lip 10 high, all 5 thick, padded 20. Work it out first: 425 mm² of flat area x 20 = 8,500 mm³.
- File, New Document. Workbench list: Part Design. New Body.
- New Sketch, pick XZ-plane in Select attachment, OK.
- Polyline: click the origin, then each corner roughly in place: right, up, left, down, left, up, left, and back to the first point. 1.1.4’s Polyline has no typed lengths.
- Press D (Dimension), click a line, click beside it, type the size, Enter. Six sizes: the bottom 25, the lip’s outer side 10, the lip’s top 5, the lip’s inner side 5, the back plate’s height 60 (from its top corner to the origin), the back plate’s top 5. The arm’s top line gets none (25 - 5 - 5 = 15). Sketch Edit says Fully constrained.
- Close. Click the sketch in the Model tree, Pad, Length 20, OK. Key 0 for the isometric view.
Check it yourself
View, Panels, Python Console. Click the pad in the tree and type:
Gui.Selection.getSelection()[0].Shape.Volume
b = Gui.Selection.getSelection()[0].Shape.BoundBox; round(b.ZMin, 3), round(b.ZMax, 3)
You should get 8500.0 and (0.0, 60.0), with the lip on the right. Ours: 8,500.0 mm³, 25 x 20 x 60, X 0 to 25, Y -20 to 0, Z 0 to 60; 23 constraints (joins, level and upright rules, one corner kept on an axis, six sizes), fully constrained.
Then with Claude
In a new, empty document:
In FreeCAD, sketch this outline on the XZ plane, starting at 0,0: right 25, up 10, left 5, down 5, left 15, up 55, left 5, then back to the start. Extrude it 20 mm.
Then: “Measure it, and list the steps in its model tree.”
- Run 1: one
execute_codecall (Python inside FreeCAD): a Part Design body, a sketch attached to the body’s XZ plane, eight lines, eight “coincident” constraints only, a pad of 20. Same volume, size, place and steps as ours. Its reply said: “The sketch is closed but has no dimensional constraints, only coincident points.” It offered to add them. - Run 2 (a fresh session): the same.
- Replay with no AI: run 1’s logged calls in a fresh FreeCAD gave 8,500 mm³ and the same eight constraints.
- Opened in FreeCAD: Claude’s sketch says Under-constrained, 16 degrees of freedom. One drag and the back plate leans over (Ctrl+Z undoes it).
Compared with SolidCraft: in the SolidCraft course, almost the same message built the hook upside down (the plug’s XZ sketch had its “up” along -Z, so the outline hung from 0 down to -60). In FreeCAD, Claude’s hook stands the right way up.
So: ask Claude for the sizes, then open the sketch and check it says Fully constrained.
The course
- Previous: Lesson 1: connect Claude to FreeCAD
- Next: Lesson 3: spreadsheet parameters
- The lab for this lesson: freecad-course-lab/out/l2
- The same hook in SolidCraft: SolidCraft course, lesson 2
Sources
- The lab: scripts, logs, the logged tool calls and the replay behind every number here
Change notes
- 16 Nov 2026: first published, from the lesson’s lab results of 29 Oct 2026.
Not affiliated with or endorsed by the FreeCAD project, the freecad-mcp project 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.