Repository navigation
Delete face: a Shift-click takes the whole wall (Discussion #1797) - #2051
Merged
Merged
Conversation
…1797) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
@mlugo-apx merged, thank you. Shift-click in Delete face now takes a hole's whole wall in one go, as asked in Discussion #1797. I tried it in the editor on a plate with a 20-sided hole: a plain click takes one face, Shift takes all 20, and Delete closes the hole. |
Owner
|
@mlugo-apx out in 1.173.0. Thank you! |
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.
For Discussion #1797, as you asked there: a plain click in Delete face stays as it is, and a click with Shift as the modifier key takes the whole wall.
Summary
How it is built
lib/cadFaceWall.ts(new):cadFaceWallwalks from the clicked face across neighbours whose turn isWALL_EDGE_ANGLE(44) or less, in the shape ofthinFacesWith;toggledFacesis the toggle for one face or a wall, so both clicks take the same path.cadFaceList(lib/cadDeleteFaces.ts) gives each facebends, one per neighbour: two flat faces by their normals, otherwise withorientedFaceNormalat three points along each shared edge, as the turn can change along an edge (a bore through a slope). Only over or under the limit matters to the wall, so it stops at the first turn past it. It walks the edges of the face with fewer, and fetches each face's edges once, so a plate's top is not walked for every hole. A memory fault still reaches the worker; any other failure counts as a sharp edge.WorkplaneViewportpassesevent.shiftKeywith the picked face, as the edge tool does for its single edge;toggleDeleteFacetakes it. The surface texture's face pick shares the prop and ignores the new argument.Testing
On 2062c6c, on main at 252bf95. The editor test and the mutation check ran on 9be0b8c4e, the same change before the rebase onto 252bf95.
npm run typechecknpm test(6,854 tests in 718 files) andnpm run test:e2e(1,870 in 221)npm run buildandnpm run exportcadFaceWall.test.ts: the walk, the limit itself and just above it, a fillet running on, the toggle. IncadDeleteFaces.e2e.tson the real kernel: the turn at a box, a bore, a fillet, a chamfer and a curved face meeting a flat one on two edges; a turn that cannot be measured counts as sharp and a memory fault comes through; a bore's wall; a filleted top; a hole of 20 uneven facets made exact taken and filled; a 9-sided hole whole and an octagonal one a side at a time, each turned three ways (the kernel gives an octagon's sides 44.9999° to 45.0001° depending on how it is turned, which is why the limit is 44 and not 45); a chamfered rim kept out of the bore's wall; a bore through a 60° slope with the cylinder's seam in four places.<for<=, the centre normals instead of the edge's, any edge of the face instead of the shared ones, swallowing the memory fault, 0 instead of 180 for a turn that cannot be measured, and a toggle that only adds each fail a test. Leaving out the early stop changes only the time; 0 instead of 180 for a pair whose shared edge is not found passes, as neighbours come from the same edge hashes, so that cannot happen.list_faces,delete_facesand the face measure pay it too. The turns could be measured only on the first Shift-click if you would rather keep those as they were.Notes
onCadFacePickgets a second argument; MCPlist_facesanddelete_facesanswer as before (bendsis not in their output), only later by the cost above, so no MCP or SKILL.md change.turnrepeats the angle the worker'sedgeAngletakes, which is private to the worker and measures at one point of the edge's mesh; I left the worker alone. That one gives an edge it cannot measure an angle of 0 and marks it not manifold, so the edge tool leaves it out; this one counts it as sharp, as a wall should rather stop there.🤖 Generated with Claude Code