Repository navigation
feat(mechanism): hinge and closure follow the design's parameters (#446) - #460
Merged
Merged
Conversation
"Make the box 10 mm taller" took hinge and closure back and built them again (20 requests, 1.37 M input tokens in the real run of 2026-11-15). - A hinge whose line PartBuddy finds follows how the two bodies' boxes move with the design's free length parameters (measured with each nudged by 1 mm in a rolled-back batch): across the gap and in height, e.g. `width + 0.5 * hinge_gap` and `0.5 * box_height + 0.5 * lid_height`. - from/to/hinge_from/hinge_to take length expressions; hinge and closure follow them, the other kinds place by their value and say they stay. - `followSteps` (shared/mechanisms.ts) writes bases as expressions and draws each profile on the principal plane at an offset (sketch.create's own origin takes numbers only in SolidCraft 0.42.0). - The joint is kept on the round faces of pin and bore with joint.create, so it follows both; the closure keeps it again on the lid's remade bore. - The closure follows the expressions it was given, else the nearest side of the lid's box, and only together with a hinge that follows. Tests: test/mechanismFollow.test.ts; tools/audit/cases/box-446-follow against SolidCraft 0.42.0: after both halves grow 5 mm the bodies share no volume, the joint's axis is at 25 mm, the lid shuts to 177 degrees and the print check is clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gain after a change (#446) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #446 (token use). In the real run of 2026-11-15 "Make the box 10 mm taller" took 20 requests and 1.37 M input tokens: hinge and closure stayed at the old height, so the model took them back and built them again.
What changes
partbuddy_mechanismhinge: a line PartBuddy finds follows how the two bodies' boxes move with the design's free length parameters (each nudged by 1 mm in a rolled-back batch), across the gap and in height, e.g.width + 0.5 * hinge_gap,0.5 * box_height + 0.5 * lid_height. Along the line it keeps length and place.from/to/hinge_from/hinge_totake length expressions; hinge and closure follow them, the other kinds place by their value and say they stay.followSteps(shared/mechanisms.ts) writes cylinder/box bases as expressions and draws each profile on the principal plane at an offset; checked withsolidcraft-cli 0.42.0headless:sketch.create's own origin takes numbers only, offset and sketch points take expressions and follow,solid.chamferedges take numbers only (they are re-found),joint.as_builtat a point stays behind.joint.createon the round faces of pin and bore, so it follows both (kept on one side only, it dragged the lid); the closure keeps it again on the lid's remade bore.set_parameter,parameters.change) PartBuddy runs hinges that follow through their range again and sets their limits.Measured (token-probe,
PROBE_REAL=1, Claude Code, box prompt from #446): change turn 4 requests, 227 k input (before 20 / 1.37 M), print check clean; the 4th request is waiting for the running print check. Build 6+2+3+14 requests.Tests:
test/mechanismFollow.test.ts(expression inputs, plane conversion, derived expressions, re-read hinge, limits again);tools/audit/cases/box-446-follow.case.tsagainst SolidCraft 0.42.0: after both halves grow 5 mm no shared volume, joint axis at 25 mm, shuts to 177°, print check clean; mechanik/box-446/hinge-standard/bloecke-expression audit cases green; eslint, typecheck, unit tests (exceptsupervisor.test.ts, which fails on main too).🤖 Generated with Claude Code