Repository navigation
fix(viewer): pin a face whose plane is shared, or refuse to write it - #5
Merged
Merged
Conversation
Fusing gussets onto a bracket's base splits the base's top into three
coplanar faces. The viewer named the picked face by its plane alone:
`inPlane("XY", thickness)`. That matched all three, so `extrudeFace`
refused it, and Apply wrote a line that did nothing.
On every face preview the worker now counts what the plane matches. If
the plane is shared, it looks for a `.containsPoint` pin: the face's
centre first, then a point inside its largest triangle. It keeps a pin
only if the kernel confirms it matches the picked face and no other.
The preview runs with that same finder, and the host writes it. If no
pin isolates the face, Apply stays disabled and the op bar gives the
reason. Apply also stays disabled until the worker has answered.
The serve host's face-op validator rebuilt the target from a whitelist
and dropped the new field. It keeps `pin` now, and has tests.
Bumps extension and mcp-server to 1.29.2. v1.29.1 is already tagged on
a branch that was never merged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Master released 1.29.2 (a docs-only change) while this branch was open, and that collided with this branch's own 1.29.2. The coplanar-face fix now ships as 1.29.3. The CHANGELOG keeps master's 1.29.2 and 1.29.1 entries unchanged, and the plugin description comes from master (it lists 3MF). The merge also brings in website/. The Vercel check failed because the project's Root Directory "website" did not exist on this branch. Co-Authored-By: Claude Opus 5.5 <[email protected]>
While this branch was open, master released 1.29.3 (#6, the stale skill path). The coplanar-face fix now ships as 1.29.4. Master's 1.29.3 entry is kept unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
5 tasks done
This branch was successfully deployed
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.
Problem
If you fuse gussets onto a bracket's base, the base's top splits into three faces in the same plane. When you picked one and pressed Extrude, the viewer wrote
extrudeFace(bracket, (f) => f.inPlane("XY", thickness), 3). That selector matched all three faces, soextrudeFacerefused it ("the selector matched 3 faces, but it must match exactly one") and Apply did nothing.Fix
packages/core/src/face-target.ts): on every face preview, the worker counts the faces the plane selector matches. If there is more than one, it tries a.containsPointpin: first the face's centre, then a point inside its largest triangle. That second point covers faces whose centre falls outside them, such as an L-shape or a face with a hole. A pin is kept only if the kernel confirms it matches the picked face and nothing else. The preview runs with that same selector, so preview and file cannot disagree.synthesizeFaceSelectorwrites the pin. The coordinate along the face's normal uses the same expression asinPlane, so it follows that parameter.parseFaceOpbuilds the target from a whitelist and was droppingpin, so the ambiguous line got written anyway. It now keepspinand has tests.Result on the repro bracket:
Testing
pnpm lintis clean.pnpm testpasses (1192 tests).faceInteriorPoint.pnpm serve) with an equivalent gusseted L-bracket.website/isn't in the repo.Notes
-thickness / 2, and the existing "read as half a parameter" warning flags it.v1.29.1tag already exists on a merge that isn't in master.🤖 Generated with Claude Code