Repository navigation
Drawings WE3-WE5: commands report where each object sits on a sheet, and select and delete views, dimensions and balloons (#4894) - #11047
Merged
bherbruck merged 4 commits intoNov 3, 2026
Conversation
CamWight
marked this pull request as ready for review
November 2, 2026 08:09
This was referenced Nov 2, 2026
WE3) The sheet scene now says where its border and each view sit on paper: the box round what each draws, and a view's boundary, so one that can't be drawn can still be picked. It is worked out once per assembly, beside the scene rather than in it, so no writer sees it and the page needn't inspect each view. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on (tangency-labs#4894 WE4) select.set takes {type: drawing, drawing, object} for the drawing open. It adds no undo step and changes nothing saved, and a selected object leaves the selection when an undo takes it or its drawing closes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cy-labs#4894 WE5) selection.delete now works with a drawing open: a view goes with its dimensions and balloons as one undo step, and one with views projected from it is refused, naming them, unless they are selected too or contents: delete takes them. A sheet's delete and this one share the record's one removal rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y order (tangency-labs#4894 WE3, WE5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CamWight
force-pushed
the
bounds-selection-delete-4894
branch
from
November 3, 2026 05:52
e15ebb9 to
73f3523
Compare
This was referenced Nov 3, 2026
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.
Until now a drawing's sheet didn't say where its border and views sit on the paper, and its views, dimensions and balloons couldn't be selected or deleted. With this PR the sheet reports a box round each of them, so a click on the drawing page can tell what it hit;
select.setselects one of them in the open drawing; and Delete removes it, a view together with its dimensions and balloons in one undo step. Nothing new shows on screen yet: the drawing page that will use these is @Nathan-Dane's.Part of #4894 (WE3-WE5), into
drawings: a sheet's objects: where they sit, selecting them and deleting them.Changes a default: no
What it does
The sheet scene now says where its border and each view sit on paper: the box
round what each draws, and a view's boundary, so one that can't be drawn can
still be picked. It is worked out once per assembly, beside the scene rather
than in it, so no writer sees it and the page needn't inspect each view.
select.settakes{type: drawing, drawing, object}for the drawing open. It adds noundo step and changes nothing saved, and a selected object leaves the selection
when an undo takes it or its drawing closes.
selection.deletenow works with a drawing open: a view goes with its dimensionsand balloons as one undo step, and one with views projected from it is refused,
naming them, unless they are selected too or
contents: deletetakes them. A sheet'sdelete and this one share the record's one removal rule. A delete in a drawing is a
step of the drawing, so undo in the drawing brings it back; that rule was a separate
commit on the stack (
5afb8db2a) and is folded in here.crates/geom/: this addsSeg2::boundsinprofile.rs, the box round one piece of aprofile, 50 lines with its test. No kernel code is involved.
crates/ui-egui/: the new selection kind gets its arm where the Browser, the dialogs and Select Other match on a selection; nothing new draws.The ribbon: no planned id from
drawing_ui.rsis added or replaced.select.setandselection.deletewere never planned entries, so @Nathan-Dane's page can call them as they are.Pictures
Nothing new shows on screen at this commit: the sheet isn't on the page yet, so a screenshot
of the window shows only the model. The real-program check below reads the replies instead.
Tests
a_sheets_objects_say_where_each_one_isa_view_with_no_lines_is_an_object_at_its_boundarya_views_box_is_what_it_drawsthe_providers_objects_follow_its_viewsa_pieces_bounds_are_the_box_round_ita_drawings_objects_are_selected_without_changing_anythingwhat_isnt_on_the_drawing_open_is_not_selecteda_selected_object_that_goes_leaves_the_selectiona_views_projected_views_are_found_down_its_chainsa_view_goes_with_what_is_in_it_after_a_dry_runa_views_projected_views_go_only_when_askeda_dimension_and_a_balloon_go_alone_or_with_their_viewwhat_is_chosen_goes_in_any_orderhostile_deletes_in_a_drawing_are_refused_wholeseeded_deletes_in_a_drawing_keep_its_rulesPlanted faults: 29 planted, 29 caught, each restored with a clean run after it. The first
run left four uncaught (an empty box standing for a view's lines, a fill with no bounds, a
picture with no bounds, what's chosen coming back unsorted), so
a_views_box_is_what_it_drawsand
what_is_chosen_goes_in_any_orderwere added for them, and they also catch balloons comingback unsorted. Reading the code for the real-program check then showed
what_isnt_on_the_drawing_open_is_not_selectednever tried its other drawing, because it read thewrong field of the reply. It now tries that drawing's own view, which only the open-drawing check
refuses, and catches that check being removed.
What no test reaches
drawing.sceneyet: they are selected and deleted byid, and appear as objects once dimensions and balloons draw on paper, in a later slice.
frames::to_localfrom the page: the page doesn't pick yet.Session::execute's guard covers it, with no test of its own here.Validation
Rebased 3 Nov onto
drawings5bf3940 (after #10515's fonts and #7745's table lines); nothing in it changed. Rechecked on the new heads: clippy with-D warningson each of the three; on the tip, geom 350, doc 559 and engine 3133 library tests,lists,layers,i18n --checkand the app build pass, and 10 planted faults across the stack are each caught again (clean run passes). The pictures above are from before the rebase; nothing they show changed.On this commit, on
drawingsd5fd141: geom 346, doc 558 and engine 3126 library tests pass, the command-list andregistry tests with them. Clippy with
-D warningson geom, doc, engine and ui-egui, all targets;cargo xtask lists,layersandi18n --checkpass. The whole gate ran on this commit (Windows): fmt, assets, icons, licences, lists, layers, ui-containers, clippy, wasm and the web offline test pass. Its tests failed only where they always fail on this PC under the gate's load, and each passed run alone:kill_mid_save,help_outputandpattern_of_512_hole_cuts_finishes_in_reasonable_time. The ui-egui library tests pass alone (3608) withprogressive_image_controls_route_to_the_registered_hostskipped, which hangs on this PC. Thesolidcraft_gpulibrary tests were stopped: they spin on this PC's drivers, and this change touches no render code. CI runs both.The real program (
solidcraft.exe --control, safe mode, plain box and cube): made a drawing of a baseview, two projected views, a dimension and a balloon.
drawing.scenegave the border at 0-420 by 0-297, and each view's box at its boundary.contents: delete, the dryrun's reply and the real one matched, and only the border was left.
Integration status
Based on
drawings5bf3940. It waits for nothing. WE1 and WE2 stack on it. It conflicts with three open drafts, #10987, #10926 and #10469; whichever lands second rebases.Refs #4894, #860