Repository navigation
Drawing sheets: balloons draw on the sheet, a numbered circle with a leader to its part (#3874) - #16842
Conversation
Pre-merge checks:
|
| Check name | Status | Explanation |
|---|---|---|
| Existing Defaults Unchanged | Summary: the pull request changes no existing UX default. Its changes are additive, so the check passes. Evidence from HEAD 7cb31e0 ("Drawings: balloons on the sheet ... (#3874)"), which is the rep… |
Full details: Existing Defaults Unchanged
-
Explanation
Summary: the pull request changes no existing UX default. Its changes are additive, so the check passes. Evidence from HEAD 7cb31e0 ("Drawings: balloons on the sheet ... (
#3874)"), which is the replayed commit of this PR: - Default settings, preferences, shortcuts and UI layout: the 19-file diff adds no setting, preference, shortcut or layout default. The only UI change is oneObjectKind::Balloon => "balloon"arm indrawing_sheet_page.rs. - Note gap constant:drawing_note_paper.rspreviously had a localGAP_MM: f64 = 1.0. It now importsGAP_MMfromdrawing_dimension_paper.rs, whereGAP_MM = SIZES.gapandSIZES.gapis1.0. The value is unchanged, so existing note layout does not move. - Object paint order:ObjectKind::Balloonis a new variant placed in band 3. Existing kinds keep their bands. -drawing.sceneanddrawing.exportgain aballoonslist. The list is omitted when a sheet has no balloons (skip_serializing_if = "Vec::is_empty"). This is additive. -drawing.checkgains aBalloonkind. Balloons are now checked foroutside_sheetandout_of_date. Existing finding kinds and their logic for views, dimensions, notes and tables are unchanged. The new findings only add entries for balloons. - The sheet now draws balloons that already exist in saved drawings. This is the feature itself, not a change to any existing object's place or style. Caveat: in thedrawing_check.rsdiff, an id that matches no view, dimension, balloon or note now returns an error. Before, it was listed as a note. The PR's description says that path is unreachable for ids from the drawing's own records, so normal use is unaffected. The description'sChanges a default: noagrees with the code. No UX default is changed. Kernel and geometry results are outside this check's scope.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
6368d77 to
2d3dd24
Compare
|
A note for whichever of this PR and #13033 (flat pattern views, now ready) lands second. #13033 adds |
…rd places them (tangency-labs#3874) A sheet's tables are read with its title block's text, laid out at the origin to learn their size, then placed at their anchor inside the drawing border (or the paper without one). Each is its own kind of object in the scene, export and sheet replies say whether each one drew and why not, and a table that can't be read leaves the rest of the sheet drawn. drawing.table.inspect says where a table sits, its rows, overrides and warnings. The words in the cells come next. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…their cells (tangency-labs#3874) Each line of a cell stands on the anchor its layout gives, left, middle or right as its column aligns, set as it was measured for the layout, so no word is shaped twice. The words' fonts join the sheet's. A word no font can set is left off and the table says why; in the window, a word whose font is still being looked for leaves the table off until the search answers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ngency-labs#3874) The rows a parts list draws hold the count in their ballooned field, worked out where the rows are built with the rule drawing.inspect uses, so the editor's column and drawing.inspect read one count. drawing.table.inspect gives each row's count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-labs#3874) A table's filter gains `ballooned: sheet | drawing`. A list with it shows the rows whose ballooned count is over 0, numbered and counted as in the whole list; with none, its heading alone. The count is worked out where the list's balloons are counted already (Drawing::balloons_by_list): for `sheet`, only the balloons on the list's sheet, so the drawn rows and drawing.inspect agree. A revision table refuses the filter: no balloon reads its rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r filled from this design (tangency-labs#3874) The rows of a parts list come from the design its record lists, asked through Session::drawn as every other reader of a source asks. A list a file made that names a linked design says why it can't be read and draws nothing, as a sheet documenting one does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h a leader to its edge (tangency-labs#3874) A balloon on a view now draws on its sheet: a circle round its number in its parts list, at its place from the view's centre, with a leader from its edge's middle to the circle's rim, ending in a dimension's arrowhead. It rides the annotation path that dimensions and notes use (one more `Annotation` arm): read with its view, kept across a close, and read again after any document change, as its number reads a parts list. A lost balloon keeps its circle and number with no leader; one with no row keeps an empty circle and says why. `drawing.scene` and `drawing.export` list each balloon (balloon, view, status, row_status, item, drawn, why). The row rule moves to doc as `Document::balloon_rows`, one BOM list per parts list, and `drawing.balloon.inspect` reads its row through it, so the sheet and inspect give the same answer. The text gap is one constant, shared by notes and balloons. `reads_fields` becomes `reads_document`. Nothing is saved: no format change. Deleting a balloon already works through `selection.delete`; the sheet now shows it gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2d3dd24 to
7cb31e0
Compare
Requested by Cam
Change
A balloon on a drawing view now draws on its sheet: a circle round the part's item number, with a leader to the part's edge. A balloon numbers one part of an assembly, and the number is that part's row in the sheet's parts list. Before this PR, a drawing saved its balloons, but the sheet did not draw them.
Part of #3874, into
drawings. One commit, 2d3dd241b4.Builds on #3876; until it merges the diff shows its commits too; this PR's own commit is the last one. #3876 prints the parts list whose numbers the balloons show.
Changes a default: no
No setting changes. A sheet without balloons looks the same. One command answers more: Check Drawing now lists a balloon off the paper (below).
What a user sees
outside_sheet, as it lists a dimension or a note. Before this PR, balloons were not among the sheet's objects, so Check Drawing could not see them.How it works
Annotation::Balloon). It is read with its view, kept across a close, and read again after any change to the design. Its number reads a parts list, and any change to the design can change the list.read_with, the one seam that dimensions and notes use since Drawings: dimensions, balloons and notes on posed and exploded views (#13048) #15839. So a posed or exploded view gives the edge as that view draws it.drawing.balloon.inspectand the parts list on the sheet read it. The number belongs to the parts list, and the list belongs to the design, not to one view.Document::balloon_rows. It makes one parts list for each list the balloons read, not one for each balloon.drawing.balloon.inspectnow reads its row through the same function. So the sheet and inspect give the same number and the same word.drawing_balloon_paper.rsdraws one balloon. It uses the dimension module's arrowhead, text size and text setting, with no copy.drawing_dimension_paper::GAP_MM. Notes and balloons both use it. Before, the note module had its own copy.ObjectKind::Balloonis a new sheet object kind, in paint band 3 (ObjectKind::band). Its export layer isBALLOON.drawing.sceneanddrawing.exportreplies gain aballoonslist. Each entry gives the balloon, its view, its edge's status, its row's status, its item number, whether it drew, and why not. The list is left out when a sheet has no balloons.drawing.scene.hitcan now answer with a balloon.drawing.checkgets one more match arm:ObjectKind::Balloon => CheckedKind::Balloon. That arm makes the Check Drawing change above.reads_fieldsbecomesreads_document, since a balloon reads the document as a note's fields do.One line in the Drawing workspace UI.
crates/ui-egui/src/drawing_sheet_page.rsgetsObjectKind::Balloon => "balloon"inkind_name. The match covers every kind, so the app does not compile without the line. @Nathan-Dane, this is your file: please check that the name fits your sheet page. Your #16229, merged since, changed the same file in other places.Cost: a view's balloons are read in one
balloon_rowscall. That call makes one parts list for each list the balloons read, then does one lookup for each balloon. On a sheet with 300 balloons in 3 lists, one read makes 3 lists. The window keeps each balloon's lines between reads.Rebased onto the newest
drawingsThis commit is replayed as 2d3dd241b4 onto #3876's new head d83948d4b7, on
drawings8647608. That base adds view labels (#16838), another sheet object kind. The conflicts are resolved with both kinds kept:ObjectKindhasViewLabelandBalloon, both in band 3 with dimensions, with export layersVIEW_LABELandBALLOON;drawing.checkand the sheet page'skind_nameget one arm each; the scene schema's kinds list stays in paint order. One long line was formatted.Validation
Local, Windows, dev profile, on 15 Nov. One group check ran on the whole stack, #3876's four commits with this commit on top, at 2d3dd241b4 on
drawings8647608:cargo fmt --checkon geom, doc, engine and ui-egui: clean.-D warningson geom, doc and engine, all targets: pass.cargo checkof ui-egui: pass.tableandpaper, 88 of 88; docdrawing::balloonanddrawing::table, 14 of 14; enginedrawing_balloon,drawing_table,drawing_scene,drawing_check,drawing_export,drawing_dimension_paper,drawing_note_paperandschema::, 950 of 950.cargo xtask lists. The replay adds no crate, dependency, catalog entry or format file.crates/engine/src/drawing_balloon_paper_tests.rs: a balloon is a circle round its number with a leader to its arrow; a wide number gets a wider circle; what a balloon can't draw leaves the rest and says why; hostile places and arrows never panic.crates/engine/src/cmd/drawing_balloon_tests.rs: a balloon draws on its sheet with its number and its leader, at places worked out by hand, and moves, exports and deletes with it; a lost balloon keeps its circle and number; the sheet and inspect read a balloon's row alike, for all five row words; the window keeps a balloon until what it reads changes; a held drawing keeps its balloons and exports them from a scratch copy.crates/engine/src/cmd/drawing_check_tests.rs:a_balloon_off_the_paper_is_listed, beside the dimension and note tests. A balloon on the paper is not listed. The same balloon moved off the paper is listed asoutside_sheet. Anda_held_views_balloon_is_out_of_date_as_a_balloon: a held view's balloon is listed as a balloon, not as a note.paper::tests::each_kind_paints_in_its_band; F4, Check Drawing calls a balloon a note, caught bya_balloon_off_the_paper_is_listed. A clean run then passed. This PR's other faults ran on 10-14 Nov, before this replay.What the tests don't reach:
drawing.balloon.addanddrawing.balloon.inspect. The sheet reads the edge through the sameread_withcall that Drawings: dimensions, balloons and notes on posed and exploded views (#13048) #15839 tests for dimensions and notes. No test draws such a balloon on a sheet; the exploded picture below shows it in the app.Screenshots of the behavior
Real app, sheet page, 1280 x 720 window, with this PR on #3876. The same plain test assembly as #3876's pictures: a 40 x 20 x 3 mm plate placed three times (item 1) and an 8 x 8 x 20 mm post on two of them (item 2).
Balloons on a sheet. Three on the iso view and one on the exploded front view, each a circle round its row's item number, with a leader to its part's edge:
A balloon on an exploded view. The front view draws the exploded view Apart, which lifts the posts 25 mm. The balloon's leader ends on the lifted post's bottom edge, where the view draws it:
A lost balloon. A fillet takes the post's top front edge that balloon 2 points at. The balloon keeps its circle and number, with no leader, and
drawing.balloon.inspectreadslost:Check Drawing listing a balloon off the paper. Balloon 3 moved to
at: [1000, 20]withdrawing.balloon.edit, thendrawing.checkon the sheet:{"kind": "outside_sheet", "object": {"kind": "balloon", "id": "3rf6qd1s38e2c"}, "why": "it lies off the paper"}Its counts on that sheet: 1 lost (balloon 2, above), 1 outside_sheet, and 7 empty title block fields.
Small-window check. The same sheet in an 800 x 520 window: the balloons, both tables and the title block still draw:
Steps: make the assembly and the drawing as in #3876's pictures, then
drawing.balloon.addwith an edge point and its occurrence path. For the exploded view:explode.create, then a base view withexploded: "Apart". For the lost balloon: a fillet on the post's top front edge. For the check:drawing.balloon.editwithat: [1000, 20], thendrawing.check.Integration status
On
drawings8647608, checked 15 Nov 2026, 10:05 UTC.git merge-treeof #3876's head and of this PR's head against each open PR intodrawingsthat shares a file:drawingsitself, and this stack adds no file to those conflicts.cmd/drawing_table.rs; Drawings: shaded views, the model drawn as a picture under the view's lines (#5624) #5626 and drawing scene: internal cleanups from the architecture review (#5624 follow-up) #16478 conflicted with the old head too. Whichever lands second keeps both sides.Open PRs on the same files:
ObjectKind::band, the scene schema's kinds list and the scene builder. Whichever PR lands second keeps both kinds, and keeps the schema's kinds list in paint order.cmd/drawing_balloon_tests.rs, where this PR adds tests too. Whichever lands second keeps both blocks.drawing_scene.rsin other places.Follow-ups, not in this PR:
Dimensions, notes and balloons now share line, arrowhead, gap and text from the dimension module. One shared annotation module would hold them.
Assembly::finishreturns a six-part tuple. A named struct would read better.The stale lists for dimensions, notes and balloons could be one list keyed by kind.
The
drawing.exportparameter text names the views, tables and title block, but not dimensions, notes or balloons.Rebased again, 16 Nov, onto this PR's base Drawing sheets: parts lists and revision tables print on the sheet, and a parts list can show only the parts its balloons number (#3874) #3876 at 7b93592, on
drawingse069e4e. This PR's own commit applied cleanly.Checked: on ab2b556, 194 engine, 14 doc and 88 geom tests passed, and clippy, rustfmt and
xtask listsare clean. On e069e4e, the table and balloon tests give 47 passed, and ui-egui builds.Follow-up, not in this PR: the balloons' rows in doc read the design without
Session::drawn. They should go through it, as the parts list now does. That is its own small change.