FreeCAD Polar Pattern Spacing Wrong? Extent vs Spacing Mode
▶ Watch on YouTube & subscribe to The Stack Underflow
Six hooks round a coat-stand post, 360 degrees, sit 60 apart. We set 4 hooks and typed 4 x 60 = 240 in the Length box. They came out 80 apart, the fourth points into the wall, and FreeCAD gave no error.
FreeCAD’s own description of the pattern’s Angle: “The total angle of the pattern, measured from the first to the last instance. This is only used when the Mode is set to ‘Extent’.” So 4 hooks have 3 gaps: 240 / 3 = 80. A full 360 counts the closing gap (like a clock: 12 numbers, 12 gaps), so 360 / 6 = 60.
The one-line version: switch the pattern to Spacing mode and bind the gap to a name, so a new hook count keeps the gap.
Last verified in our lab: 17 November 2026 (FreeCAD 1.1.4; freecad-mcp 0.1.28; Claude Code 2.1.308 with Claude Sonnet 5.5; Linux in Docker).
The words first
- PolarPattern: repeats a feature round an axis (Part Design workbench).
- Extent mode: you give the total angle from the first copy to the last.
- Spacing mode: you give the step between neighbouring copies.
- Gaps vs copies: an open arc of 4 hooks has 3 gaps; a full circle of 6 hooks has 6.
By hand (FreeCAD 1.1.4)
Start file (6 hooks, 360, sizes in Params): stand-ring.FCStd
- Params (spreadsheet): hooks 6, hook_gap 60 (degrees). The pattern’s Occurrences reads
Params.hooks. - The trap (watch, do not copy): hooks 4, Recompute, Length 240, OK. Measure two neighbouring hooks’ edges: 80.00 degrees.
- With less than a full turn, Extent needs first to last: 3 gaps x 60 = 180. That works, but every new count needs a new sum.
- Better: double-click PolarPattern, Mode: Spacing. A Spacing box replaces Length (it starts at 120, so you see 3 hooks: the 4th sits on the 1st).
- Click in Spacing, type
=, and in the Expression Editor typeParams.hook_gap(Result 60.00 degrees). Return, OK, OK. - Measure: 60.00 degrees. Change hooks and Recompute: the gap stays.
What we measured
| Setup | Hook angles (by code) | Measure |
|---|---|---|
| Extent, typed 240, 4 hooks | 0, 80, 160, 240 | 80.00 degrees; no dialog, no message |
| Spacing = Params.hook_gap, 4 hooks | 0, 60, 120, 180 | 60.00 degrees |
| The saved fix, 3 hooks | 0, 60, 120 | 60.00 degrees |
| The saved fix, 6 hooks | the full ring | - |
A file still in Extent with 180 typed puts 3 hooks 90 apart. “By code” is a script that reads the saved file. We printed nothing.
Then with Claude
Claude Code, freecad-mcp only, given the trap file; one run each, not a general result (amounts are Claude Code’s /cost):
- Not asked to check ($0.11): it found the cause (a fixed 240, so 80 apart). Instead of Spacing it kept Extent and set the pattern’s Angle to
Params.hook_gap * (Params.hooks - 1): at 4 hooks 60 x 3 = 180, a different route to the same rule. It said the hooks are now 60 apart, but it only printed that total at 3, 4 and 5 hooks; it never measured the hooks. Our check by code: 0, 60, 120, 180. - Asked to check the angle between neighbouring hooks ($0.08): the same cause and the same formula, then it measured each hook’s direction from the finished shape: 0, 60, 120, 180 at 4 hooks. Ours agree at 4 and at 3.
Both fixes, our proof: 0, 60, 120 at 3 hooks; the full ring at 6.
Your turn, no AI
Open the start file and set hooks to 3 in Extent mode. What Length keeps the hooks 60 apart? Then switch to Spacing mode with Params.hook_gap and measure.
The course
- Hooks in a row: lesson 9, linear pattern
- Sizes in a spreadsheet: lesson 3
- Start of the course: Lesson 1: connect Claude to FreeCAD
- The lab for this lesson: freecad-course-lab/out/fc12
Sources
- The lab: scripts, logs, tests and every measurement above
Change notes
- 20 Nov 2026: first published, from the lesson’s lab results of 17 Nov 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.