Skip to content

Delete face: a Shift-click takes the whole wall (Discussion #1797) - #2051

Merged
henmedia merged 1 commit into
henmedia:mainfrom
mlugo-apx:delete-face-wall
Nov 24, 2026
Merged

henmedia merged 1 commit into
henmedia:mainfrom
mlugo-apx:delete-face-wall

Conversation

@mlugo-apx

Copy link
Copy Markdown
Contributor

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

  • In Delete face, a Shift-click takes the face and every face reached from it across edges where the surface turns by 44° or less, so the many small faces of a round wall that Simplify mesh and Make exact leave come in one click, tiny ones included. A second Shift-click on a wall that is all picked takes it out again. A plain click is unchanged.
  • It stops at a sharp rim (90° into the top and bottom), at the sides of an octagonal hole (45°) and at a 45° chamfer or a 90° countersink on the rim; a hole cut evenly into 9 faces or more (40°) comes whole. Where a fillet leads on, the wall goes on with it, which is why the plain click stays one face, as you said.
  • The help text of Delete face in every language and step 2 of "Deleting faces" in guide chapter 6 (16 languages) say so; changelog entry and a What's new card (en, de).

How it is built

  • lib/cadFaceWall.ts (new): cadFaceWall walks from the clicked face across neighbours whose turn is WALL_EDGE_ANGLE (44) or less, in the shape of thinFacesWith; toggledFaces is the toggle for one face or a wall, so both clicks take the same path.
  • cadFaceList (lib/cadDeleteFaces.ts) gives each face bends, one per neighbour: two flat faces by their normals, otherwise with orientedFaceNormal at 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.
  • WorkplaneViewport passes event.shiftKey with the picked face, as the edge tool does for its single edge; toggleDeleteFace takes 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 typecheck
  • npm test (6,854 tests in 718 files) and npm run test:e2e (1,870 in 221)
  • npm run build and npm run export
  • cadFaceWall.test.ts: the walk, the limit itself and just above it, a fillet running on, the toggle. In cadDeleteFaces.e2e.ts on 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.
  • In the editor (dev build, Chrome, on 9be0b8c4e), with the STL from the discussion (Wanda Bigcat.stl, imported and made exact through MCP: 1,282 flat faces): a plain click on the wall of the left slit takes 1 face, again none; Shift takes 127, again none, again 127; Shift on a lens adds its 215 (342), again takes them out (127); Delete fills the slit ("127 faces deleted", 1,282 to 1,155 faces), and one undo brings it back.
  • Mutation check, on 9be0b8c4e: measuring only at the middle of an edge fails the slope test; a limit of 45 fails the octagon test, a limit of 39 the 9-sided one; walking without the bends, < 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.
  • Cost, in Node on 2062c6c, two sets of three runs against one of main: Delete face reads the faces of a 400 mm text "The quick brown fox jumps over the lazy dog, 0123456789 &?!" (53 pieces, 946 faces) in 355-377 ms against 172-181 ms, and a plate with 40 x 40 drilled holes (1,606 faces) in 352-366 ms against 334-335 ms. It is paid when Delete face opens and again when Delete runs, which reads the faces once more to check the pick; MCP list_faces, delete_faces and 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

  • Changes in your code: none outside Delete face. onCadFacePick gets a second argument; MCP list_faces and delete_faces answer as before (bends is not in their output), only later by the cost above, so no MCP or SKILL.md change.
  • Storage, import, export, grouping or undo/redo: not touched; the delete is the same one commit as before.
  • turn repeats the angle the worker's edgeAngle takes, 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.
  • On the part from the discussion, the right slit needs two Shift-clicks (its corners turn by 91° and 159°), and Delete refuses it and the lens openings even with every face picked: that is the delete itself, not the pick.
  • An 82° countersink (inch screws) turns 41° into its bore, so it comes along with the bore's wall.
  • Shift needs a keyboard, so on a touch screen the faces are still picked one by one.
  • In the edge tool Shift does the opposite, one edge instead of the chain, as a plain click there already takes the chain; here a plain click is one face, so Shift widens.

🤖 Generated with Claude Code

…1797)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@henmedia
henmedia merged commit c15c5cb into henmedia:main Nov 24, 2026
11 checks passed
@henmedia

Copy link
Copy Markdown
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.

@henmedia

Copy link
Copy Markdown
Owner

@mlugo-apx out in 1.173.0. Thank you!

@mlugo-apx
mlugo-apx deleted the delete-face-wall branch November 24, 2026 23:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants