SolidCraft Sketch Constraints: Why Your Part Moves When You Resize
▶ Watch on YouTube & subscribe to The Stack Underflow
I changed plate_height from 60 to 80. The top went up only 15, the bottom went 5 down, and nothing warned me. The sketch was not tied to the origin, so SolidCraft was free to grow it both ways. One Coincident rule pins it.
The one-line version: before you resize, open the sketch and make the counter say “fully constrained”, with a corner on the origin.
Last verified in our lab: 16 November 2026 (SolidCraft 0.28.0; Claude Code 2.1.311 with Claude Sonnet 5.5; Linux in Docker).
The words first
- Degrees of freedom: the ways a drawing can still move. The counter at the top left of the sketch shows how many are left.
- Fully constrained: nothing left to move; a size change can only go where you told it.
- Coincident: a rule that makes two points sit on the same spot, here a corner and the origin.
The fix, written out
- Double-click Sketch1 and read the counter, top left: “2 degrees of freedom” means the drawing can still move two ways (here: nothing ties it to the origin).
- Coincident: hold the click on the corner and pick it from the list, then hold Ctrl, hold-click the same spot and pick the origin, Point 1. (When the corner already sits on the origin, a plain second click picks the same point and Coincident refuses it.)
- The counter says fully constrained. Now
plate_height80 grows straight up.
What we measured
Measure, plus a script that reads the saved model (“by code”):
| Sketch | plate_height | Bottom | Top | Screw hole below the top |
|---|---|---|---|---|
| Not pinned | 60 to 80 | -5.00 | 75.00 (Measure 75.00) | 10 instead of 15 (it still cuts) |
| Not pinned (by code) | 100 | -10.00 | - | 5.0 |
| Pinned | 80 | 0.00 | 80.00 (Measure 80.00) | 15.0 |
| Pinned | 100 | 0.00 | 100.00 (Measure 100.00) | 15.0 |
The unpinned result was the same on two fresh copies. Pinned, dragging a corner moves nothing. Volumes with the 4.5 mm hole: 8,420.49 / 10,420.49 / 12,420.49 mm³ at 60 / 80 / 100.
Then with Claude
Claude Code 2.1.311 with Claude Sonnet 5.5, SolidCraft’s MCP server only, given the unpinned hook; one run each, not a score:
- Run 1, “set plate_height to 80” ($0.06): it changed one size and said the design recomputed with no errors. Our check by code: still 2 degrees of freedom, bottom -5.00, top 75.00, hole 10.0 below the top.
- Run 2, plus “make the sketch fully constrained first, with a corner on the origin, and tell me the degrees of freedom before and after” ($0.18): it read 2, added one Coincident at the origin, read 0, then set 80. Our check: bottom 0.00, top 80.00, hole 15.0 below the top. But it said the hole “didn’t move”; by code its centre went from 45 to 65 up, with the top, as drawn.
“Recomputed with no errors” is not the same as “grew the way you meant”.
Your turn, no AI
Draw a rectangle away from the origin, 40 wide, 30 tall. What does the counter say? Pin its bottom-left corner to the origin and change the width to 60: which side moves, and where does it end? The answers are in the video’s pinned comment.
- Start file: hook-unpinned.sc
The course
- Previous: Lesson 9: patterns, space copies evenly
- Next: Lesson 11: driven dimensions
- Start of the course: Lesson 1: connect Claude to SolidCraft
- The lab for this lesson: solidcraft-course-lab/out/sc10
Sources
- The lab: scripts, logs, tests and every measurement above
Change notes
- 20 Nov 2026: first published, from the lesson’s lab results of 16 Nov 2026.
Not affiliated with or endorsed by SolidCraft (Tangency Labs) 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.