Repository navigation
Conversation
|
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 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. |
|
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 |
|
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. |
307f8f7 to
83d8fc0
Compare
|
@bherbruck Rebased onto
The description's screenshots will follow; the Mac running the app was locked during this run. |
|
@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): |
|
@jyviko @bherbruck A gentle nudge on this one. Since the split it has no kernel changes (no |
83d8fc0 to
e1afebe
Compare
|
Rebased onto |
e1afebe to
182af02
Compare
|
@bherbruck @jyviko This PR is now marked ready for review. It still changes no It conflicted with
clippy,
|
|
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 |
d4c5a75 to
8a17ccf
Compare
|
GitHub reported a conflict with A 13th commit fixes 3 things the rebase showed:
|
|
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. |
…iew, whole flows at 1280 x 720 on main eefdca4
8a17ccf to
f8f2f01
Compare
|
GitHub reported a conflict with
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).
Of the 23 failures:
The branch merges clean with |
|
The Targets row shows "Select" in every run. The test's lookup misses it. 4f3d40239e fixes the test harness in |
…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.
…; a Join takes its sketch's face body (tangency-labs#2464)
…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.
…er the edit starts (tangency-labs#2464)
… 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.
4f3d402 to
440c1e2
Compare
|
GitHub reported a conflict with One file conflicted: Checked on 440c1e2:
None of the 7 failures is in a file this PR changes:
|
|
@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. |
|
Closing: I no longer need this change. The branch stays if anyone wants to pick it up. |
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
targetsused 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:mainnow runs on SMLib (#11351), and the truck fix no longer applies. This PR has no kernel changes.What changes
ui_kit::selection_fieldandui_kit::list_row, with no new widget. The row is not shown for a New Body. The listed bodies are sent as the extrude'stargets, so showing or hiding bodies later never changes the model.solid.extrudewould change on its own, less hidden bodies and meshes, with one difference for a face outside the active component:solid.extrudereaches 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.extrudegiven that face joins that body;active_scope, exposed to the window asscope_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, assolid.extrudeadds it (Top-level cut and join should reach bodies in sub-components #5679);main.main. A Join whose Targets row was emptied stays on Targets.main'sright_click_tests::a_typed_value_is_taken_by_the_right_click_okandtargets::a_right_click_on_a_join_with_an_emptied_targets_row_stays_on_targetscover it.*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.timeline.redefinere-ran the constructor with the session's visibility, soshown_scopenarrowed the feature to the bodies shown at edit time, while a replay cuts every body. Nowredefineruns that trial with nothing hidden (only the trial's copy; the user's visibility is untouched), so an edit and a replay agree.join_start_body(s, JoinStart::Sketch(sketch), component)). A Join sketched off any body reads "All bodies of the component" and stays that way.face/facesrather thansketch) no longer leavesactive_sketchset while the extrude runs, as Revolve already does. Before, with the timeline rolled back before a body's removal,shown_scopealso left out bodies removed later.operation: autonow probes the giventargets(elseparticipants), the same bodies the evaluator applies them to:*means every body only when it is the whole list, as in the evaluator.solid.extrudeitself is otherwise unchanged: visibility never changes what a command does. The window decides the default and stores the result.targetswas already insolid.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
maineefdca4.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.
The Model tab, with the pointer on Extrude:
Extrude on Slot's profile, Operation set to Cut, Distance −4 mm. Targets
starts with the 3 shown bodies, one row each:
The Targets field's × clears the list. Targets turns active and asks for a
pick, and OK is off:
A and C picked in the view. They light up while Targets is active, and the
row lists them:
After OK: the slot is cut into A and C. B is whole:
Edit Extrude shows the stored targets, A and C:
At this height the window's Options and Advanced sit below the fold. Its
body scrolls to them, and the footer stays put:
Steps
solid.boxA, B and C: 30 × 30 × 10 at x = 0, 40 and 80, each a new body.sketch.createSlot on XY at offset 10.sketch.rectangle.two_pointfrom (5, 10) to (105, 20).
sketch.finish.Tests
extrude_edit_tests.rs,mod targets, 21 tests, adapted to the UI-kit form):[Plate]and after OK Plate (2) is still a separate 8,000 mm³ body;*keeps*and reads "All bodies";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_pickednow expects the Targets input in the dialog's inputs.cmd/extrude_convention_tests.rs,mod targets, 7 tests):autoprobes 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_bodyfor a face and for a sketch, in the component given and from the top level;scope_bodies; a cut from a face (faceandfaces) before a removal keeps the removed body.Without the change:
dialogs.rsanddialogs_dense.rsas onmain(only theTARGETSname 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_ispasses there: it guards that editing does not add targets, whichmainnever does;scope_bodies,the_default_is_what_the_command_takesfails at the STEP-assembly case (left: "new");auto_operation_inas onmain,auto_operation_probes_only_the_named_targetsfails. 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_list_holds_the_visible_bodies_or_the_face_bodyfails;advance()not skipping Targets:a_to_object_pick_moves_on_to_from_objectfails (left: Some("Profiles"),right: Some("From Object"));default_targetswithout its face / sketch-face branch for a Join:the_list_holds_the_visible_bodies_or_the_face_bodyfails attargets == ["Plate"];editing_keeps_a_feature_without_targets_as_it_isfails;auto_operation_intaking*anywhere in the list:auto_operation_probes_only_the_named_targetsfails (left: Some("cut"),right: Some("join"));an_edit_that_empties_its_targets_is_refusedfails;right_clicknot skipping Targets:main'sright_click_tests::a_typed_value_is_taken_by_the_right_click_okfails ("OK did not finish: None"). It passes onmain3a6fcb7;default_targetstaking another component's face body:the_default_is_what_the_command_takesfails at "a face of another component's body, from an empty component" (left: "join",right: "new").Checks
cargo xtask cion this branch (macOS, Rust 1.99, on upstream/main eefdca4, 2026-11-14) stops at clippy onmain'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:-D warningswith 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:
tests/KNOWN_FAILING_TESTS.mainat eefdca4 too: the GPU thin-lens oracle,boolean_props::cylinder_resting_on_a_box_edge_is_scale_invariantandstep_export_bytes::step_export_keeps_its_bytes_and_reads_back.mainat eefdca4: 3agent_chattests,stand_up_offerand the UI scenariomirror_body_keeps_fillets.The engine test
targets::a_join_without_targets_takes_every_body_it_meets_and_targets_keep_the_restkeeps the copy shown, sincemainleaves 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 withmainat d20e582.session.body_visible), the same as the engine'sshown_scope, so that display-only override never reaches the stored targets. A test covers it.mainnow leaves hidden bodies alone in the command too (the SMLib merge brought in "engine: an extrude Join, Cut or Intersect leaves hidden bodies alone (Extrude Join/Cut changes hidden bodies too, and the dialog can't pick its target bodies #2464)"). A Join, Cut or Intersect with no bodies named now stores the shown bodies as its participants. The Targets row's defaults list those same bodies, so the window and the command agree. The engine test that hid a body to show the old behaviour now keeps it shown, so it still checks that named targets keep the copy apart.join_start_body, onface_body_reached_in).mainand this branch meet, each kept side by side:crates/engine/src/cmd/mod.rsandcrates/engine/src/lib.rs:main's new re-exports (LinkProblem,LinkState, and thepub(crate) uselines) beside this PR'sJoinStart,join_start_body, andscope_bodies.crates/ui-egui/src/dialogs.rs:main'sstarted_from_sketchfield (Extrude: started from an open sketch, its profiles can be picked even when the sketch is already used (#14128) #14648, for EXTRUDE: extruding from within an active sketch edit produces a thin extrude instead of a solid profile #14128) andautofield (Construct: Plane, Axis and Point buttons that choose the method from what you pick (#11340) #11341, for Construct: Plane, Axis and Point buttons that choose the method from what you pick #11340) besidetargets_follow.crates/engine/src/cmd/features.rs:main'sfixedfor an extrude from a face (Extrude and revolve from a face take fixed: true, as the converted-mesh refusal offers (#6612) #13377) beside this PR'ss.active_sketch = Noneafter the face's sketch is made.crates/doc/src/eval.rs: an extrude to an object keepsmain'sunchanged(st, warning)after the join. This PR's default-targets condition still decides the extra body.extrude_edit_tests.rs:main's double-click tests (Add the feature of double-clicking a part with the left mouse button to quickly edit sketch and feature dimensions. #10989) and this PR'smod targets, in that order.solidcraft_ui_text::format(Shared UI crates: ui-text, the message catalogs' machinery as a shared crate #13316).Session::world_state()andsolidcraft_engine::auto_operationnow returnResult. The tests in the first commit unwrap them.Not done here
Related
main1df5414 (merge-tree, 2026-11-13):extrude_edit_tests.rs, wheremod targetssits.crates/engine/src/lib.rsorcrates/engine/src/cmd/mod.rs.dialogs.rscode and already conflict withmain.Summary by CodeRabbit