Skip to content

Extrude: the Targets row lists the bodies a Join, Cut or Intersect changes (#2464) - #2465

Closed
kaievns wants to merge 14 commits into
tangency-labs:mainfrom
kaievns:extrude-targets
Closed

kaievns wants to merge 14 commits into
tangency-labs:mainfrom
kaievns:extrude-targets

Conversation

@kaievns

@kaievns kaievns commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #2464.

Changes a default: no
The row shows the bodies the operation already changes. The operation changes the same bodies as before.

An extrude's Join, Cut or Intersect without targets used to change every body of the active component it met, shown or hidden: a hidden copy of a body was joined in and disappeared from the browser. Main now leaves hidden bodies alone in the command itself (develop's "an extrude Join, Cut or Intersect leaves hidden bodies alone (#2464)", merged with #11351), but the Extrude window still has no way to see or pick the bodies it changes. This PR adds that: the Extrude window says which bodies it changes and lets you change that.

This PR used to carry a second change, found on the same design: walls joined flush round a part failing with boolean Union: the operation failed: no result. That kernel half moved to #4059 (issue #4058). Both are closed: main now runs on SMLib (#11351), and the truck fix no longer applies. This PR has no kernel changes.

What changes

  • Targets, under Operation. A UI-kit selection field ("N selected", or Select when empty, without the catalog's "↖ " prefix, like the other selection fields) picks bodies into the list, with one list row per body; the row's × takes that body out. This is the same pattern Sketch Modify uses for its picked items, built from ui_kit::selection_field and ui_kit::list_row, with no new widget. The row is not shown for a New Body. The listed bodies are sent as the extrude's targets, so showing or hiding bodies later never changes the model.
  • What the list starts with: the bodies solid.extrude would change on its own, less hidden bodies and meshes, with one difference for a face outside the active component:
    • a Join from a body's face, or from a sketch on one: that body. It counts when it lies in the active component or a component inside it, moved or turned, as solid.extrude reaches it (Top-level cut and join should reach bodies in sub-components #5679). A face of a body outside the active component adds none. solid.extrude given that face joins that body;
    • a Cut or Intersect where the active component has no body of its own: every body (the command takes part in every one then, EXTRUDE: operation fails when cutting through multiple components #1234);
    • otherwise: the bodies the active component works on (active_scope, exposed to the window as scope_bodies). Those are the component's own bodies, or, for a component with none, the bodies of the components inside it that sit where it is (an opened STEP assembly's parts). A Join lists those parts only when one component holds them all (a part kept in a component), so a free sketch in an assembly does not join several parts into one lump. A Cut or Intersect from a face or sketch on a body in a component inside the active one also lists that body, as solid.extrude adds it (Top-level cut and join should reach bodies in sub-components #5679);
    • while an extrude is edited, the list is worked out in the extrude's own component, which the edit runs in.
  • Automatic operation decides from that list. If the operation it lands on would list nothing (an empty component, only hidden bodies, parts in several components), it makes a new body, as the command does. So a new part's first extrude, an extrude from a face of a body outside the active component, and one with only hidden bodies around all make a new body. None of them is refused.
  • The list follows what is shown (hide or show a body while the window is open) until you edit it: removing a row, picking bodies with Targets active, or clearing the field.
  • Picks move on as before. A pick into a single input still moves on to the next empty input, skipping Targets: with To Object and From Object on, a pick into To Object makes From Object active, as on main.
  • Right-click confirm ("Right-click confirms dialog inputs" in Preferences) goes on to the next empty input. It skips Targets when the dialog applies without it: for a New Body, whose row is hidden, or an edit kept without targets. With no input left, it runs OK, as on main. A Join whose Targets row was emptied stays on Targets. main's right_click_tests::a_typed_value_is_taken_by_the_right_click_ok and targets::a_right_click_on_a_join_with_an_emptied_targets_row_stays_on_targets cover it.
  • An empty list for a new Join, Cut or Intersect is refused with "Pick the bodies to change, or choose New Body", and so is an edit that empties a feature's stored targets.
  • Editing shows the stored targets. A stored * is kept as it is and the field says "All bodies", since the evaluator reads * as every body in the design. Rule: the row shows what OK will save.
    • A Cut or Intersect saved without targets reads "All bodies of the component". An unchanged OK keeps it that way, and it keeps cutting hidden bodies too. Before this, timeline.redefine re-ran the constructor with the session's visibility, so shown_scope narrowed the feature to the bodies shown at edit time, while a replay cuts every body. Now redefine runs that trial with nothing hidden (only the trial's copy; the user's visibility is untouched), so an edit and a replay agree.
    • A Join saved without targets whose sketch lies on a body's face lists that body. OK re-runs the Join constructor, which saves the face body as its target. The lookup runs in the feature's own component, wherever the edit starts (join_start_body(s, JoinStart::Sketch(sketch), component)). A Join sketched off any body reads "All bodies of the component" and stays that way.
    • A New Body edited into a Join, Cut or Intersect lists the shown bodies it changes in its own component, and follows what is shown until you edit the list, as a new extrude does. It sends them explicitly, and an empty list is refused.
    • Clearing a feature's stored targets shows the Select prompt, and OK is refused.
  • A cut from a face (face / faces rather than sketch) no longer leaves active_sketch set while the extrude runs, as Revolve already does. Before, with the timeline rolled back before a body's removal, shown_scope also left out bodies removed later.
  • Engine: operation: auto now probes the given targets (else participants), the same bodies the evaluator applies them to: * means every body only when it is the whole list, as in the evaluator. solid.extrude itself is otherwise unchanged: visibility never changes what a command does. The window decides the default and stores the result. targets was already in solid.extrude's typed contract and JSON schema (953fd7d); the schema tests pass unchanged.

New messages: ui.targets, "All bodies of the component", and "Pick the bodies to change, or choose New Body", in en, ja, zh, de and ko; "All bodies" in en, ja and zh (docs/localization.md). The other catalogs fall back to English. The user guide (docs/book/src/guide/features.md) describes the row in three short paragraphs: what the list starts with, how it follows visibility, and editing.

The row uses the UI kit (#2016): the kit's selection field and list rows, in the dense Extrude form (dialogs_dense.rs).

Screenshots

The whole flow at a 1280 × 720 window, uncropped. A Retina display draws it at
2560 × 1440 pixels. The build is this head, f8f2f01fc, on main eefdca4.

Test design: 3 separate bodies, A, B and C, each 30 × 30 × 10 mm, in a row
10 mm apart. A sketch on their tops, Slot, holds one rectangle across all 3.

  1. The Model tab, with the pointer on Extrude:

    Model tab with the Extrude button under the pointer and its tooltip

  2. Extrude on Slot's profile, Operation set to Cut, Distance −4 mm. Targets
    starts with the 3 shown bodies, one row each:

    Extrude window with Operation Cut and the Targets row listing A, B and C

  3. The Targets field's × clears the list. Targets turns active and asks for a
    pick, and OK is off:

    Extrude window with an empty Targets row waiting for a pick

  4. A and C picked in the view. They light up while Targets is active, and the
    row lists them:

    Extrude window with Targets A and C picked, A and C lit in the view

  5. After OK: the slot is cut into A and C. B is whole:

    After OK, A and C have the slot and B is untouched

  6. Edit Extrude shows the stored targets, A and C:

    Edit Extrude with Targets A and C

  7. At this height the window's Options and Advanced sit below the fold. Its
    body scrolls to them, and the footer stays put:

    Edit Extrude scrolled down to Options and Advanced

Steps
  1. solid.box A, B and C: 30 × 30 × 10 at x = 0, 40 and 80, each a new body.
  2. sketch.create Slot on XY at offset 10. sketch.rectangle.two_point
    from (5, 10) to (105, 20). sketch.finish.
  3. Choose Model > Extrude. Pick the profile on A's top.
  4. Set Operation to Cut and Distance to −4 mm.
  5. Click the Targets field's ×. Pick A, then C, in the view.
  6. Click OK. Double-click Extrude1 in History.

Tests

  • UI (extrude_edit_tests.rs, mod targets, 21 tests, adapted to the UI-kit form):
    • the reported case: with the copy hidden, the join goes into the plate alone, and showing the copy again changes nothing;
    • from a sketch on the hidden plate's face, the shown copy is the target;
    • the list holds the visible bodies, and the chip reads "2 selected"; with both bodies shown and the sketch on Plate's face, the list is [Plate] and after OK Plate (2) is still a separate 8,000 mm³ body;
    • with a New Body and To Object and From Object on, a pick into To Object makes From Object the active input;
    • it follows visibility until a body is taken out by hand;
    • the row sits under Operation, with one list row per body before Options; it is absent for a New Body; an emptied list is refused;
    • from the design, a part kept in a component is listed, while a new component's first extrude makes a new body;
    • the default is what the command takes, read once the window's operation check is in: two components at the design give a new body, as do another component's face picked from an empty component and hidden bodies only; a component holding one part (an opened STEP assembly) lists that part; a Cut from an empty component takes every shown body;
    • bodies picked in the viewport are sent, and Edit shows and keeps them;
    • editing a feature made without targets keeps it without, and the field reads "All bodies of the component"; one stored with * keeps * and reads "All bodies";
    • a preselected face stays the profile, and a preselected body is the target;
    • an unchanged edit keeps a Cut or Intersect without targets on hidden bodies, with the session's visibility unchanged;
    • an unchanged edit keeps a hidden target. The editor shows the hidden source body (Restore Browser and source-body context during Extrude editing (#5573) #5576) without changing what is stored;
    • a New Body edited into a Cut lists the shown bodies, and a hand-edited list stays as edited;
    • a Join without targets on a face lists and saves its face body, also when the edit starts in another component;
    • an emptied Targets row shows Select and OK is refused;
    • from the top level, a Join and a Cut from a sketch on a turned sub-component's top, and a Join from its face, list that part. OK changes the part in its own frame, with or without a top-level body;
    • a New Body edited into a Cut or a Join while an empty sibling is active lists its own component's bodies, and OK stores them;
    • a right-click on a Join with an emptied Targets row moves to Targets and stays there, with no OK.
  • Engine cmd/edit_tests.rs: redefining_a_cut_saved_without_targets_keeps_cutting_hidden_bodies.
  • preselect_tests::used_profile_of_the_last_sketch_is_not_pre_picked now expects the Targets input in the dialog's inputs.
  • Engine (cmd/extrude_convention_tests.rs, mod targets, 7 tests): auto probes only the named targets (targets win over participants; ["*"] is every body, ["*", "Plate"] is Plate only); a join without targets takes the hidden copy and named targets keep it, saved and reopened; an extrude to a reference body joins only its targets; join_start_body for a face and for a sketch, in the component given and from the top level; scope_bodies; a cut from a face (face and faces) before a removal keeps the removed body.

Without the change:

  • with dialogs.rs and dialogs_dense.rs as on main (only the TARGETS name added so the tests build), the Targets UI tests and the preselect test fail (counted before the rebase; the tests added since are covered below). editing_keeps_a_feature_without_targets_as_it_is passes there: it guards that editing does not add targets, which main never does;
  • with the window limited to the active component's own bodies, ignoring scope_bodies, the_default_is_what_the_command_takes fails at the STEP-assembly case (left: "new");
  • with auto_operation_in as on main, auto_operation_probes_only_the_named_targets fails. The other engine tests describe what the command already does (two of them) or test the two new functions.

Each review fix, put back on this branch one at a time:

  • the chip showing the raw "↖ 2 selected": the_list_holds_the_visible_bodies_or_the_face_body fails;
  • advance() not skipping Targets: a_to_object_pick_moves_on_to_from_object fails (left: Some("Profiles"), right: Some("From Object"));
  • default_targets without its face / sketch-face branch for a Join: the_list_holds_the_visible_bodies_or_the_face_body fails at targets == ["Plate"];
  • one label for both empty cases: editing_keeps_a_feature_without_targets_as_it_is fails;
  • auto_operation_in taking * anywhere in the list: auto_operation_probes_only_the_named_targets fails (left: Some("cut"), right: Some("join"));
  • an edit that empties stored targets accepted: an_edit_that_empties_its_targets_is_refused fails;
  • right_click not skipping Targets: main's right_click_tests::a_typed_value_is_taken_by_the_right_click_ok fails ("OK did not finish: None"). It passes on main 3a6fcb7;
  • default_targets taking another component's face body: the_default_is_what_the_command_takes fails at "a face of another component's body, from an empty component" (left: "join", right: "new").

Checks

cargo xtask ci on this branch (macOS, Rust 1.99, on upstream/main eefdca4, 2026-11-14) stops at clippy on main's own code: crates/engine/src/cmd/file.rs:1123, vec_init_then_push, from #5092's KiCad import, macOS only. This PR doesn't touch that file. The steps before it pass: fmt, assets, icons, licences, lists, skills, layers, the shared crates, ui-containers and mesh-decisions. The rest, run on this head by hand:

  • clippy -D warnings with that one lint allowed: passes.
  • cargo xtask wasm: passes.
  • cargo xtask test, 112 binaries and the doc tests: 16,267 passed, 23 failed, 73 ignored.
  • cargo xtask web-offline-test: passes.

None of the 23 failures comes from this PR:

  • 15 are in tests/KNOWN_FAILING_TESTS.
  • 3 fail alone on main at eefdca4 too: the GPU thin-lens oracle, boolean_props::cylinder_resting_on_a_box_edge_is_scale_invariant and step_export_bytes::step_export_keeps_its_bytes_and_reads_back.
  • 5 fail in the full run and pass alone on this branch and on main at eefdca4: 3 agent_chat tests, stand_up_offer and the UI scenario mirror_body_keeps_fillets.

The engine test targets::a_join_without_targets_takes_every_body_it_meets_and_targets_keep_the_rest keeps the copy shown, since main leaves hidden bodies out of a Join without targets (see Integration status).

Each fix in the editing commits has a test that failed before it. The redefine, New Body edit, face Join, other-component and face-cut tests were each checked against the code without the fix.

Integration status

13 commits on upstream/main eefdca4 (2026-11-14), with no merge of main: the PR's 12, and 1 for the defaults' reach (#5679), edit defaults, and the right-click rule. It also merges clean with main at d20e582.

Not done here

Related

Summary by CodeRabbit

  • New Features
    • Extrusions now offer a Targets list for choosing which bodies Join, Cut, or Intersect operations affect. Suggested targets reflect the operation, component, and body visibility; you can edit the list, and your choices are saved.
    • Automatic operation selection considers the targets, choosing New Body when none are available. The guide now explains target selection and how older extrusions without saved targets behave.
    • Added translations for extrude target prompts and labels in several languages.
  • Bug Fixes
    • Extruding to an object no longer adds that object when explicit targets specify a different body.
    • Redefining an extrusion without saved targets preserves its target behavior and visibility state.

@kaievns kaievns changed the title Extrude: Targets input, and Join/Cut/Intersect default to the visible bodies (#2464) Extrude: Targets list the bodies it changes, and walls joined flush round a part glue exactly (#2464) Oct 19, 2026
@kaievns
kaievns marked this pull request as ready for review October 20, 2026 00:21
@jyviko

jyviko commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

To @kaievns and the coding agent working with them (a note from @jyviko, maintainer):

Thank you for this fix, and for the care that went into it! We really appreciate it.

Many of the open geometry fixes, this one included, work around how truck handles booleans and related geometry. Before more of them go in, we want to step back and evaluate that as a whole. So please pause new geometry fixes aimed at truck (vendor/truck-* and kernel workarounds for its booleans) until we've done that. Adding more right now would likely be wasted effort. This PR stays open, and we'll come back to it once the evaluation is done.

If you'd like to keep working on geometry in the meantime, please consider contributing to tangency-labs/solidcore, our own B-rep kernel. Work outside the kernel isn't affected.

Thanks again, and please tell your person about this note.

@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks for working on this. The UI freeze is over and the new ribbon and shell have landed, so GitHub now shows a conflict with main. Could you rebase onto the latest main and push with --force-with-lease? Please rebase rather than merge main in. I'll look at it again once it's clean.

@jyviko
jyviko marked this pull request as draft October 21, 2026 03:13
@jyviko

jyviko commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

Thank you for this work! We're evaluating a new geometry kernel (solidcore), so kernel pull requests are on hold for now and I've set this one to draft: see #3992.

Nothing is lost: your branch, commits and review history stay exactly as they are. The case you fixed here goes into the new kernel's regression suite, so it stays fixed whatever kernel we end up on. And if you'd like to keep going on this kind of problem, we'd love your help in solidcore, starting with porting this case over as a test.

@kaievns kaievns changed the title Extrude: Targets list the bodies it changes, and walls joined flush round a part glue exactly (#2464) Extrude: the Targets row lists the bodies a Join, Cut or Intersect changes (#2464) Oct 21, 2026
@kaievns

kaievns commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@bherbruck Rebased onto main e949009 as one commit (no merge of main), pushed with --force-with-lease. Two changes since you looked:

The description's screenshots will follow; the Mac running the app was locked during this run.

@kaievns

kaievns commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@jyviko Since your note, this PR no longer touches the kernel. I split the kernel half out into #4059 (draft, for #4058), which waits for the evaluation in #3992. What's left here is the Extrude window's Targets row (#2464): ui-egui, the engine's auto_operation and the catalogs, with no crates/kernel files. Could kernel-paused come off and the draft be lifted?

@kaievns

kaievns commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

@jyviko @bherbruck A gentle nudge on this one. Since the split it has no kernel changes (no crates/kernel files; the kernel half is the draft #4059). It's the Extrude window's Targets row for #2464. Could kernel-paused come off and the draft be lifted, so it can be reviewed with the rest of the UI work?

@kaievns

kaievns commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto main 5d92ad1 as one commit (no merge of main), pushed with --force-with-lease; GitHub had flagged a conflict in features.rs with #5176's default_extrude_profiles, which now sits beside this PR's join_face_body / scope_bodies. Still no crates/kernel files. Engine extrude/targets tests (105), the UI extrude and dialog tests (391), clippy, lists and ui-containers pass.

@kaievns
kaievns marked this pull request as ready for review October 25, 2026 22:37
@kaievns

kaievns commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

@bherbruck @jyviko This PR is now marked ready for review. It still changes no crates/kernel files. The kernel half stays parked as the draft #4059 under #3992. Could the kernel-paused label come off this one?

It conflicted with main again, so I rebased it onto 62d55c3. It is one commit (182af023), with no merge of main, pushed with --force-with-lease. The changes since the last review:

  • Conflicts: the message catalogs (sorted with cargo xtask lists --fix) and the engine exports, which sit beside main's extend_arc_preview, extend_preview and standard_view. In dialogs.rs, main's new press_pull field sits beside targets_follow, and main's start-latch reset (Extruding from an object produces incorrect results. #467) runs after the Targets probe, on the probed params.
  • One test updated: extrude_auto_to_object_tests::face_off_the_profile_plane_turns_the_extent_to_that_face (from Extrude: picking a face, vertex or parallel plane off the profile switches the extent to To Object #2855) checked d.active == 1 for the To Object input. With the Targets input before it, To Object is at index 2, and active already follows it, since it is set to the To Object input's position. The test now checks the active input by its label.

clippy, lists and ui-containers are clean, and these pass:

  • the engine's extrude and targets tests (114);
  • the UI's extrude, dialog and preselect tests (582).

@froglemonade2

Copy link
Copy Markdown
Contributor

A suggestion on the default, from the automatic Join / New Body / Cut work in #6903 (#6901):

This type of "target selector" should be a setting, off by default. Picking the bodies an operation changes in every feature, versus "visible = in scope", is the main difference between Onshape and Fusion here, and in my opinion the selector is way more annoying to use than the "visible = in scope" method Fusion uses.

#6903 takes the visible-scope route: an automatic Join, Cut or New Body never touches a hidden body (the window stores the shown bodies as the feature's targets when some are hidden), so hiding a body is how you keep it out. With the Targets row behind a setting, both workflows stay available and the default is the low-friction one.

@kaievns

kaievns commented Nov 12, 2026

Copy link
Copy Markdown
Contributor Author

GitHub reported a conflict with main, so I rebased onto 1df5414 (no merge of main). The PR's 12 commits keep both sides of each conflict: re-exports, Dialog fields, the To Object join, fixed on an extrude from a face (#13377), and test files. The Targets count text now calls solidcraft_ui_text::format (#13316).

A 13th commit fixes 3 things the rebase showed:

cargo xtask ci: fmt, clippy, the wasm check, and the repo checks pass. Tests, 107 binaries: 15,760 passed, 21 failed, 72 ignored. 15 failures are in KNOWN_FAILING_TESTS. 3 fail alone on main too: the GPU thin-lens oracle, a kernel boolean property test, and the STEP export bytes test. The other 3 fail in the full run and pass alone on this branch and on main. The test step failed, so ci stopped before web-offline-test. This PR touches no web app or service-worker code.

@bherbruck

Copy link
Copy Markdown
Collaborator

Thanks for the rebase. Since this adds a Targets row to the existing Extrude window, could you update the pictures in the description for the current head? Please show the whole flow at 1280x720, uncropped: the ribbon tab and button that open Extrude, the window with the Targets row, picking bodies, and the result after OK. Please also show the window at that small size so I can check the row doesn't overflow or jumble. The current picture is from an old build and shows only the window.

kaievns added a commit to kaievns/solidcraft that referenced this pull request Nov 14, 2026
@kaievns

kaievns commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

GitHub reported a conflict with main, so I rebased onto eefdca4 (no merge of main). The 13 commits keep both sides of each conflict:

Nothing else changed.

The pictures in the description are new, from this head: the whole flow at a 1280 × 720 window, uncropped. They show the Model tab and Extrude, the window with the Targets row, clearing the row and picking 2 bodies in the view, and the result after OK. Edit Extrude then shows the stored targets. The Targets row and its list rows fit, with nothing cut or overlapping. At this height the window's Options and Advanced sit below the fold; its body scrolls to them and the footer stays put (shot 7).

cargo xtask ci stops at clippy on main's own code: crates/engine/src/cmd/file.rs:1123, vec_init_then_push. It comes from #5092's KiCad import and fires on macOS only. This PR doesn't touch that file. The steps before it pass: fmt, assets, icons, licences, lists, skills, layers, the shared crates, ui-containers and mesh-decisions. I ran the rest on this head by hand:

  • clippy -D warnings with that one lint allowed: passes;
  • the wasm check (cargo xtask wasm): passes;
  • cargo xtask test, 112 binaries and the doc tests: 16,267 passed, 23 failed, 73 ignored;
  • cargo xtask web-offline-test: passes.

Of the 23 failures:

  • 15 are in tests/KNOWN_FAILING_TESTS.
  • 3 fail alone on main at eefdca4 too: the GPU thin-lens oracle, a kernel boolean property test, and the STEP export bytes test.
  • 5 fail in the full run and pass alone on this branch and on main at eefdca4: 3 in agent_chat, 1 in stand_up_offer, and mirror_body_keeps_fillets in the UI scenarios.

mirror_body_keeps_fillets failed the same way in the full runs of #12868, #2465, #8719 and #12870: "step 13: bodies: got 1, want 2". It passes alone, and in a run of the whole scenarios binary on main.

The branch merges clean with main at d20e582.

@kaievns

kaievns commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

an_edit_that_empties_its_targets_is_refused is flaky on f8f2f01fc4. It fails 8
of 10 runs under cargo test. Run alone, as nextest runs it, it fails 6 of 10.

The Targets row shows "Select" in every run. The test's lookup misses it.
widget_near("Select", "Targets") anchors on the first widget that reads
"Targets". Two click targets read it: the row's label and its selection field.
The field takes its row's label as its accessible name. Their order follows
egui's accessibility node map. The Browser and History panels get new widget ids
in each process. That reorders the map. When the field comes first, it anchors
on itself. The x > anchor filter then drops it.

4f3d40239e fixes the test harness in scenario.rs. Product code is unchanged.
widget_near now skips a near widget that is itself showing the text. A new
unit test checks both node orders. After the fix, 20 of 20 runs pass. The
ui-egui lib passes: 5583 passed, 0 failed, plain and with
SOLIDCRAFT_TEST_ROUTED=1.

…anges (tangency-labs#2464)

Without `targets` an extrude's Join, Cut or Intersect changes every body of
the active component it meets, hidden ones too. The Extrude window now has
a Targets selection field under Operation, with a row per listed body. A
new extrude lists the bodies the command would change on its own, less
hidden bodies and meshes, follows what is shown until edited, and sends
the list as `targets`. Automatic operation probes that list, and with
nothing listed makes a new body. Editing shows the stored targets; a
feature made without targets stays without them, and a stored `*` reads
"All bodies".

`operation: auto` honours `targets` (else `participants`); `*` alone is
every body, as the evaluator reads it.

Fixes tangency-labs#2464.
…default targets

Upstream tangency-labs#6424 adds the body a Join extrude runs to as an extra participant
whatever its targets. With local tangency-labs#2464 targets, a Join whose targets name
another body than the one its sketch lies on was chosen, and joins only
those: an extrude up to a reference body leaves the reference alone. With
no targets, or only the sketch's face body (what solid.extrude and the
Targets row store by default), the body it runs to still joins.
Dialog::items, which drives the viewport, browser and timeline highlight,
held every input, so a Join's default Targets (the face's body) lit the
whole body behind the profile and the dialog's picks read [Profile, Body].
Upstream's tangency-labs#6724 test expects only the clicked region. The Targets bodies
now count as picks only while Targets is the active input, where clicking
bodies adds or removes them.
… Targets for a New Body

Upstream tangency-labs#6901 decides New Body against Join off the window thread. With the
Targets row (tangency-labs#2464) shown for the Join, the row goes away when the check
settles on New Body, so the OK the test clicked where it was a frame earlier
had moved.
…own bodies it changes (tangency-labs#2464)

The Targets row follows what is shown, as for a new extrude, and OK sends
the list; before, it read All bodies of the component and the edit stored
the shown bodies without listing them.
…angency-labs#2464)

Making the face's sketch left it active, so with the timeline rolled back
the bodies later features remove counted as hidden and were left out of
the stored targets. Revolve already let go of it.
… come from its own component (tangency-labs#2464)

The window's Join default kept a picked face's body when it was in the
active component's scope. That dropped a body in a moved or turned
component inside it, which solid.extrude reaches (tangency-labs#5679). One engine
function now names the body a Join takes without targets:
join_start_body, on face_body_reached_in. It replaces join_face_body and
join_sketch_face_body. A face's body counts when it lies in the
extrude's component or one inside it. A face of a body outside that
component adds none. A Cut or Intersect lists that body too, and Auto
probes it, as cut_scope adds it.

An edit worked its defaults out in the active component, but it runs in
the feature's own component. From an empty sibling, a New Body edited
into a Cut listed every body in the design. The defaults now come from
the edited feature's component.

A right-click skipped Targets even where a Join needed it, and ran an OK
that was refused. It skips Targets only while the dialog applies
without it.

Tests: extrude_edit_tests targets
a_turned_sub_components_body_is_reached_from_the_top_level,
a_new_body_edited_from_an_empty_sibling_lists_its_own_components_bodies
and a_right_click_on_a_join_with_an_emptied_targets_row_stays_on_targets;
extrude_convention_tests targets join_start_body_is_the_face_or_sketch_face_body
and join_start_body_is_looked_up_in_the_component_given. The guide says
where the defaults come from.
…er it (tangency-labs#2464)

an_edit_that_empties_its_targets_is_refused failed at its
widget_near("Select", "Targets") check in 6 to 8 runs of 10. The
Targets row showed "Select" in every run. The lookup missed it.

widget_near anchored on the first widget reading "Targets". Two click
targets read it: the row's label and its selection field. The field
takes its row's label as its accessible name, with "Select" as its
value. Their order is the order of egui's accessibility node map. The
Browser and History panels get different widget ids in each process,
which reorders that map. With the field first, the field anchored on
itself, and the filter for widgets right of the anchor dropped it.

widget_near_in now anchors on a `near` widget that is not itself
showing `text`, so the lookup holds in either node order.

Before: 8 of 10 runs failed under cargo test, 7 of 10 with
--test-threads=1, 6 of 10 with the test alone. After: 0 of 20 under
cargo test.

Tests: scenario publication_tests
row_lookup_anchors_on_the_label_not_a_field_named_after_its_row_in_either_node_order.
ui-egui lib with raytrace-cpu: 5583 passed, 0 failed, 22 ignored, plain
and with SOLIDCRAFT_TEST_ROUTED=1.
@kaievns

kaievns commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

GitHub reported a conflict with main, so I rebased onto c0fb2cb (no merge of main).

One file conflicted: crates/ui-egui/src/extrude_edit_tests.rs. #16550's surface extrude arrow test and this PR's mod targets both append to its end. Both stay. The other 13 commits apply unchanged.

Checked on 440c1e2:

  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings, and cargo xtask layers, lists, skills, mesh-decisions and ui-containers pass.
  • Engine and doc libraries: 5538 passed, 6 failed.
  • ui-egui tests: 5908 passed, 1 failed, with and without SOLIDCRAFT_TEST_ROUTED.

None of the 7 failures is in a file this PR changes:

  • 5 are listed in tests/KNOWN_FAILING_TESTS.
  • imported_surface_refusals_are_atomic_and_validate_identity_before_source_access and gpu::tests::blur_full_egui_composition fail only in the full parallel run. Each passes 3 of 3 runs alone, on main and on this branch. The first names its temp file from the process ID and SystemTime::now(). On macOS that clock ticks in microseconds, so 2 parallel fixtures can share a file.

@bherbruck

Copy link
Copy Markdown
Collaborator

@Nathan-Dane could you review this one when you get a chance? It adds to the existing UI, so it needs your eye before it can merge.

@kaievns

kaievns commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing: I no longer need this change. The branch stays if anyone wants to pick it up.

@kaievns kaievns closed this Nov 15, 2026
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)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extrude Join/Cut changes hidden bodies too, and the dialog can't pick its target bodies

5 participants