FreeCAD Holes and Fillets with Claude AI: Screw Holes That Stay Centred

October 31, 2026 · FreeCAD + Claude Course (part 4)

▶ Watch on YouTube & subscribe to The Stack Underflow

A hole placed “10 mm from the side” stays 10 mm from the side, even after the part gets wider. To keep a hole in the middle, place it by a rule: half the width. This lesson places two screw holes by rules from the spreadsheet names, rounds one edge, then widens the part and checks where the holes ended up.

The one-line version: place holes with expressions like Spreadsheet.width / 2, fillet last, and check the hole sketch after a change.

Last verified in our lab: 30 October 2026 (FreeCAD 1.1.4; freecad-mcp 0.1.28; Claude Code 2.1.308 with Claude Sonnet 5.5; Linux in Docker). The hook comes from lessons 2 and 3 (build it there and save it first).

The words first

  • Hole feature: FreeCAD’s Hole tool cuts holes at the centres of circles (or points) in a sketch.
  • Through all: the hole goes right through the part.
  • Fillet: a rounded edge, set by its radius.
  • Topological naming problem: when a part changes, FreeCAD’s internal edge names (like Edge10) can change, and a fillet can lose its edge. FreeCAD 1.x keeps a history-based name beside it; FreeCAD’s notes say the problem is not completely solved, so test your own part.

By hand (FreeCAD 1.1.4)

  1. File, Open: lesson 3’s hook (40 deep). The volume line on the Pad: 10000.0.

  2. Double-click the Spreadsheet. Row 6: hole_d, 4 mm, alias hole_d. Row 7: hole_spacing, 30 mm (centre to centre), alias hole_spacing.

  3. Back to the hook, Part Design. Press 6 (the left view, which is the back of the hook), click the back face, click Create sketch.

  4. G, C (circle tool): click low on the plate, type 4, Enter; the same higher up. The circles only mark the centres; in 1.1 a sketch point works too.

  5. Click a circle’s centre, press L (distance across) or I (distance up), type = and the rule, Enter, Enter, Enter:

    DistanceRule
    lower, acrossSpreadsheet.width / 2
    lower, up(Spreadsheet.plate_height - Spreadsheet.hole_spacing) / 2
    upper, acrossSpreadsheet.width / 2
    upper, up(Spreadsheet.plate_height + Spreadsheet.hole_spacing) / 2

    Fully constrained. Close.

  6. Select the sketch, click Hole. Diameter: = Spreadsheet.hole_d. Depth type: Through all. OK.

  7. Press 0. Click the lip’s top outer edge, click Fillet, Radius 2, OK.

Check it yourself

Work it out first: 10,000 minus two holes (125.66) minus the fillet’s corner (17.17). Python console (View, Panels), click the Fillet in the tree:

Gui.Selection.getSelection()[0].Shape.Volume

You should get 9857.168…. Then Windows, Tile, set width to 30 mm. Volume: 14848.58… Double-click the hole sketch: it reads 15 across.

The same holes typed as a plain 10 sit 10 and 20 from the sides after the change. The fillet stayed on the lip at 30 wide, at 30 wide and 8 mm thick, and back again.

Beginner traps (FreeCAD wiki): a hole that goes the wrong way or does nothing: tick Switch direction, or sketch on the face. “Fillet not possible”: the radius is too big for the faces next to the edge; try smaller. Fillet last: features after it can rename edges.

Then with Claude

Lesson 3’s hook open, a fresh session each run. With the sentence (2 runs):

Put the hole size and spacing in the spreadsheet as hole_d and hole_spacing, and write the holes' size and position from the names. In FreeCAD, the open document is my wall hook. Add two screw holes through its back plate, 4 mm across and 30 mm apart centre to centre, centred on the plate's back face (the side against the wall). Then round the top outer edge of the lip with a 2 mm fillet.

Without (1 run): the same without the first sentence. Then, in every run: “Make the hook 30 wide instead of 20.” The scoring was written down before the first run.

  • With the sentence (2 runs): two names, a sketch on the body’s YZ plane, every hole size from names, a Pocket through all (not the Hole tool), the fillet. 9,857.17; 30 wide by one cell: holes 15 / 15.
  • Without (1 run): plain numbers, right first build. At “30 wide” it changed the width and tied the holes to it in the same step (“they would have stayed 10 mm from the edge and ended up off-centre”): 15 / 15, but not by one cell.
  • Replays with no AI: the logged calls in a fresh FreeCAD gave the same numbers.

The course

Sources

  • FreeCAD wiki: the beginner traps above; FreeCAD’s notes: the topological naming problem is not completely solved
  • The lab: the pre-written scoring, scripts, logs and replays behind every number here

Change notes

  • 16 Nov 2026: first published, from the lesson’s lab results of 30 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.