Skip to content

Delete Face: Edit Feature in a moved component rebuilds instead of saying "no face of <body>" (#17120) - #17132

Merged
bherbruck merged 2 commits into
tangency-labs:mainfrom
thocsmith:fix-17120
Nov 17, 2026
Merged

bherbruck merged 2 commits into
tangency-labs:mainfrom
thocsmith:fix-17120

Conversation

@thocsmith

@thocsmith thocsmith commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Edit Feature on a Delete Face feature in a moved component now rebuilds, instead of failing with "Delete Face: no face of Block at FacePick(...)".

Fixes #17120

Problem

A Delete Face feature keeps its face picks in its component's own frame. The Edit Feature dialog shows them, and sends them back, as world points, where the component is placed. For timeline.redefine, the engine maps a command's world picks into the frame of the body under them only for the parameters that table() in crates/engine/src/frames.rs lists. face.delete had no entry there. So after the component was moved, an unchanged Delete Face looked for the world point in the part's own frame, found no face, and the dialog stayed open with the error.

A new Delete Face in a moved component already built: with no table entry, a new feature is taken into the active component's frame as a whole.

Change

  • crates/engine/src/frames.rs: face.delete shares the entry of solid.offset_face and solid.shell: faces are picks, body is a body name.
  • crates/engine/src/frames_tests.rs: new test a_delete_face_in_a_moved_part_redefines_from_world_picks. It runs the issue's script, then redefines Unhole with the world pick [13, 50, 5]. It checks that the rebuild has no errors and that the hole stays filled.

Not in this PR: the issue also says Delete Face's dialog fills its Faces list from the nearest face on any body (for_feature in crates/ui-egui/src/dialogs.rs). That only goes wrong when a component is placed more than once, like #15903. The open PR #16984 changes the same code for Offset Faces and Replace Face, so Delete Face can follow it there or after it.

Validation

  • The new test failed before the fix with the issue's message: Delete Face: no face of Block at FacePick(Vec3 { x: 13.0, y: 50.0, z: 5.0 }). It passes now.
  • The frames:: tests, the Delete Face tests and the other face tests in solidcraft-engine pass (142 tests). hole_face_tests::a_hole_wider_than_the_part_says_it_removes_all_of_it fails the same way on main without this change.
  • Rebased onto main at add215f on 2026-11-15 (Thread: apply one feature to every selected cylindrical face #13325's Thread change edited the next line of the same table; both entries are kept).
  • cargo xtask ci on 2026-11-15, after the rebase: format, assets, icons, licences, lists, skills, layers and clippy -D warnings pass. In the test step, the only failures are tests in tests/KNOWN_FAILING_TESTS, plus some that fail on this machine for unrelated reasons: two GPU path-tracer tests, two Agent chat card tests and the preferences_search scenario (a Preferences search result not shown in time under load; the same tests failed this way on earlier runs here), and SMLib build failures in four fuzz regression designs of the naming corpus. None of those designs uses Delete Face or a moved component. The steps after the tests pass when run alone: ui-containers, mesh-decisions, layers, wasm (30 crates), engine doc tests and web-offline-test.

No screenshots: the change is in what the engine does with a command's parameters. The dialog looks the same; it now closes instead of showing the error.

Changes a default: no

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Face deletion and feature redefinition now work correctly when selecting a face on a moved component. The same world-space selection can be used for both operations, without causing model errors or changing the block’s resulting volume.

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Walkthrough

The face.delete command now maps face picks and body names through the frame parameter table. A regression test covers deleting and redefining a face in a moved component with a world-space pick.

Changes: Delete Face frame mapping

Layer / File(s) Summary
Map Delete Face picks and verify redefine
crates/engine/src/frames.rs, crates/engine/src/frames_tests.rs
The parameter table maps faces as picks and body as a body name for face.delete. A regression test checks deletion and redefinition in a moved component and verifies the restored volume.

Estimated code review effort: 2 (Simple) | ~10 minutes

Severity of issue fixed: Medium

Merge Risk: Minimal · previous review 4f1a3

Confirming an unchanged Delete Face feature in a moved component should now rebuild instead of failing with a "no face of Block" error. The change is small and covered by a regression test, so merge risk is minimal.

Architecture risk: Low · up to 4f1a3

The change affects 1 system.

Changed systems: crates

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — crates (service) was modified; 2 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in crates/engine/src/frames.rs: face.delete now uses the same mapping rules as solid.offset_face and solid.shell, mapping faces as picks and body as a body name.
  • observed — Modified behavior in crates/engine/src/frames_tests.rs: Added a test that deletes the cylindrical face of a drilled block in a moved component using a world-space face pick, then redefines the deletion with that same pick. Both operations are asserted to succeed without model errors and restore the block’s original volume.
Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the actual fix: Edit Feature on a moved Delete Face feature now rebuilds instead of showing the "no face of " error. It matches the frames.rs table entry for face.delete and the …
Description check Passed The description follows the template well. It explains the problem and the resulting behavior in plain words, links issue #17120, and states the change in frames.rs and frames_tests.rs. It includes th…
Linked Issues check Passed Issue #17120 has one direct link and no active parent context. Its coding requirement is that an unchanged Delete Face feature in a moved component rebuilds and keeps the hole deleted, instead of fail…
Out of Scope Changes check Passed The PR changes one table entry in crates/engine/src/frames.rs (face.delete mapped like solid.offset_face and solid.shell) and adds one regression test in crates/engine/src/frames_tests.rs. Both connec…
Existing Defaults Unchanged Passed The check fails only when the PR changes a UX default: a default setting or preference, the usual behavior of a command or tool, the UI's default layout or behavior, or a shortcut. It passes when the …
Full details: Title check

Explanation

The title names the actual fix: Edit Feature on a moved Delete Face feature now rebuilds instead of showing the "no face of <body>" error. It matches the frames.rs table entry for face.delete and the regression test. The title is long (102 characters), but it is specific and on topic.

Full details: Description check

Explanation

The description follows the template well. It explains the problem and the resulting behavior in plain words, links issue #17120, and states the change in frames.rs and frames_tests.rs. It includes the required 'Changes a default: no' line and gives detailed validation results, including before and after failure evidence. It explains why no screenshots are included, which the template allows for changes with no observable visual difference. Minor gaps: the 'Change' section does not say who the feature is for, and the template's 'Test change' line is not needed because no existing test was altered. The description also cites internal test-run details that a reader may not need.

Full details: Linked Issues check

Explanation

Issue #17120 has one direct link and no active parent context. Its coding requirement is that an unchanged Delete Face feature in a moved component rebuilds and keeps the hole deleted, instead of failing with "no face of Block at FacePick(...)". At head, crates/engine/src/frames.rs lists "face.delete" in the same arm as "solid.offset_face" and "solid.shell" with [("faces", Picks), ("body", Body)], which is the fix sketch's table entry. This maps the world picks sent by Edit Feature into the body frame, so the reported lookup can succeed. The regression test a_delete_face_in_a_moved_part_redefines_from_world_picks is described in the PR as failing before the change with the issue's message and passing after it. I could not read that test body in the visible evidence, so this relies on the PR description and summary. The fix sketch also asks for a dialog change in for_feature (crates/ui-egui/src/dialogs.rs) so the Faces list does not pick the nearest face on any body. The PR defers this with a stated reason: it only matters when a component is placed more than once (#15903), and the reported reproduction uses one placement. That deferral leaves a stated sub-item open. It does not affect the reported expected behavior.

Full details: Out of Scope Changes check

Explanation

The PR changes one table entry in crates/engine/src/frames.rs (face.delete mapped like solid.offset_face and solid.shell) and adds one regression test in crates/engine/src/frames_tests.rs. Both connect directly to issue #17120. The PR description states that the dialog change is excluded and gives the reason. No unrelated code change is described in the summary. The base-to-head text diff could not be read, so the one-line claim is taken from the summary and the head file contents.

Full details: Existing Defaults Unchanged

Explanation

The check fails only when the PR changes a UX default: a default setting or preference, the usual behavior of a command or tool, the UI's default layout or behavior, or a shortcut. It passes when the change is purely additive. It also says that a changed kernel or geometry result, including a case that now builds or is now refused, is not a changed default. The PR changes two files (verified with git diff --name-status): - crates/engine/src/frames.rs: one line in table() now includes face.delete with the existing solid.offset_face/solid.shell entry, so faces map as picks and body as a body name. The diff shows no other change in that file. - crates/engine/src/frames_tests.rs: one new regression test. The effect is that an unchanged Delete Face Edit Feature in a moved component rebuilds instead of failing with "no face of Block". This is a geometry/command-result change in the engine. It is not a change to a setting, preference, shortcut, layout, or UI default. The UI dialog is unchanged (the PR description says it "looks the same"; the dialog's nearest-face selection is explicitly out of scope). The description's Changes a default: no is consistent with the code diff, so no contradiction exists. Result: no UX default is changed. The change is in the category the check excludes.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 5af8cbe and 4f1a32f.

Files selected for processing: 2

  • crates/engine/src/frames.rs
  • crates/engine/src/frames_tests.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@thocsmith

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thocsmith
thocsmith marked this pull request as ready for review November 16, 2026 23:12
@bherbruck bherbruck added ready to merge reviewed, every ask addressed; merge once CI is green approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) labels Nov 16, 2026
@bherbruck
bherbruck enabled auto-merge November 16, 2026 23:25
@bherbruck
bherbruck added this pull request to the merge queue Nov 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 16, 2026
@bherbruck
bherbruck added this pull request to the merge queue Nov 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 17, 2026
@bherbruck bherbruck removed the ready to merge reviewed, every ask addressed; merge once CI is green label Nov 17, 2026
@bherbruck

Copy link
Copy Markdown
Collaborator

I've taken this out of the merge queue: merged with current main, it fails solidcraft-ui-egui::home::tests::library_cache_identity_tracks_replacements_with_preserved_mtime (it isn't on the known-failing list), and that failed the batches behind it (run). Please merge main and fix that; then it can go back in.

thocsmith and others added 2 commits November 17, 2026 00:17
…d picks (tangency-labs#17120)

Edit Feature sends a Delete Face's face picks as world points, where the
component is placed. timeline.redefine maps picks into the frame of the
body under them only for the commands in frames::table(), and face.delete
had no entry, so after a move the unchanged feature failed with "no face
of <body>". face.delete now shares Offset Faces' entry: faces are picks,
body is a body name.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@thocsmith

Copy link
Copy Markdown
Contributor Author

Rebased onto main, which now has #18334's fix for library_cache_identity_tracks_replacements_with_preserved_mtime. That test was not touched by this PR, whose diff is still only crates/engine/src/frames.rs and its test file. The test passes on the rebased branch. It can go back in the queue whenever suits.

@bherbruck bherbruck added the ready to merge reviewed, every ask addressed; merge once CI is green label Nov 17, 2026
@bherbruck
bherbruck added this pull request to the merge queue Nov 17, 2026
Merged via the queue into tangency-labs:main with commit a74fad2 Nov 17, 2026
64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) ready to merge reviewed, every ask addressed; merge once CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete Face: Edit Feature in a moved component is refused with "no face of <body> at …"

2 participants