Repository navigation
Drawings: a full section view shows the part cut open along its line (#13046) - #17610
Conversation
Pre-merge checks:
|
| Check name | Status | Explanation |
|---|---|---|
| Existing Defaults Unchanged | The check passes. The pull request changes no UX default that a user already relies on. Evidence from HEAD commit 5832128 (#13046): - No default setting, preference, shortcut or UI layout value cha… |
Full details: Existing Defaults Unchanged
-
Explanation
The check passes. The pull request changes no UX default that a user already relies on. Evidence from HEAD commit 5832128 (
#13046): - No default setting, preference, shortcut or UI layout value changes. A search of the diff for default, preference, shortcut, layout, theme and setting found no changed value. The onlyDefaulthit isDefaultHasherin test-only or hashing code. - The only user-visible change is for full section views. Before, a section view showed the placeholder "not supported yet: cutting a section view's bodies". Now it draws each body cut along its line. The PR body says no command creates a section view until the next part, so users reach these views only through saved drawing files. Such views were not usable before. This is completion of the feature from#13047, not a change to a behaviour that users depend on. - Thedrawing.viewparameter help only addscut_awayto the list of placeholder reasons (additive). - Indrawing_dimension.rs,drawing_picture.rsanddrawing_scene.rs, section views are still refused for dimensions and pictures, as before. The refusal now usesview.cut.is_some()instead ofnot_cut_yet. Non-section views keep the same outcome. - Inmesh_lines/meshes.rs, the change tounambiguousonly affects bodies with no geometry key, which are the section cut bodies. It groups geometry for sharing and does not change the kernel result. - Kernel and geometry code under solidcore/ is not changed in this commit, which is consistent with the check's exclusion. The description'sChanges a default: noagrees with the code. No failure condition applies.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
f5ff610 to
3dca354
Compare
3dca354 to
e9afe26
Compare
… line (tangency-labs#13046) A full section view now cuts each model body along its cutting line and draws what the arrows keep. Each body's cut is made once per plane and remembered on the body, so every copy of the body shares it. Reference parts, mesh bodies and bodies whose cut fails are drawn whole, and the view says which. A line that keeps none of the parts shows the placeholder with its own reason, cut_away. Half, offset and aligned sections, and shaded ones, still say "not supported yet". Pictures and dimensions still leave section views out. A section view prepares its cut bodies apart from the sheet's other views, so they keep sharing theirs. A body with no geometry key no longer shares lines with another body. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e9afe26 to
5832128
Compare
Requested by Cam
Change
On a drawing sheet, a full section view now shows the part cut open along its cutting line. A section view is a view of a part sliced along a line drawn across another view, looking the way the line's arrows point. Until now a section view could be saved (#13047, merged) but drew only a placeholder that said "not supported yet: cutting a section view's bodies". Now each part is cut along the line, and the view draws what the arrows keep: its outline, the holes the cut passes through, and the parts beyond the cut.
This is a later part of the series for #13046 (part of #860). The first part, #13047, set the shape: the view kind, its saved form and the cut it gives to whoever draws it.
Changes a default: no
Test change:
a_section_view_inspects_copies_and_draws(#13047's test) checked the placeholder words that this PR removes, so it now checks the drawn lines instead. Its helper's cutting line moved so that it crosses the test block.What it does
ModelBody::section(&plane)cuts one body along a plane with the kernel's existing half-space cut and keeps the side the arrows point to. The result keeps the body's name, placement and component, so picking a line on the section still names its part.measured, which every reader of a view's lines and size goes through, cuts the bodies of a full section view. So the sheet, its fit,drawing.view.inspectand the "outside the sheet" check all see the same cut part.cut_away("its cutting line keeps none of the parts").Validation
Only the changed crates' tests, plus planted faults:
solidcraft-docsection_tests: 1 of 1 (a body's section is remembered by its copies, and another plane cuts again).solidcraft-enginesection tests: 7 of 7. Six are new: the view draws the cut bodies; copies of a part are cut apart; reference parts are not cut; a mesh body is drawn whole and the view says so; a line that keeps nothing shows the placeholder; other sections and shaded ones wait. One changed (above).solidcraft-enginedrawing tests (drawing_view,drawing_scene,drawing::,delete,schema): 194 of 194. On the branch as pushed (drawing_view,drawing_scene,mesh_lines): 273 passed, and the one known failure below.-D warnings(doc, engine, all targets), rustfmt,cargo xtask layers,mesh-decisions,listsandwasm: all pass.ui.inspectshows both views drawn and up to date.Not reached by a test: a body whose cut fails (no input is known to fail it).
Screenshots of the behavior
A 100 x 60 x 20 mm plate with three 12 mm holes and a 25 mm rib. The lower view is its top view; the upper one is a full section along the line through the three holes, looking towards the rib. The cut passes through each hole, so each shows as a pair of edges 12 mm apart, and the rib beyond the cut is drawn too. The view is turned the way a view projected from the top view is turned, so it sits above its parent in third-angle projection.
In the app at 1280x720, light theme (the upper view is the section):
Close-up of the two views, cropped from the shot above:
Dark theme, and a 760x520 window:
Before this PR, the same file showed the section view's box with "not supported yet: cutting a section view's bodies".
Integration status
drawings, b190018 (checked 16 Nov 11:59 UTC), which has Drawings: a sheet prepares each body once for all its views (#13218) #13220 in it.tests/KNOWN_FAILING_TESTSexpects:a_cylinders_sides_meet_its_rims_from_every_corner(Drawing W06a: exact orthographic hidden lines for the analytic subset #2455, from Drawings: a sheet prepares each body once for all its views (#13218) #13220's stack).git merge-treeagainst the latestdrawings: clean. @armin0411's Drawing views: add automatic centre marks (#9462) #16144 and Drawing sheets: add manual centre marks and centre lines (#9419) #16132 edit other functions indrawing_view.rs; at worst a text overlap.