Repository navigation
Conversation
0998080 to
8d0eaa9
Compare
8d0eaa9 to
04d6eb0
Compare
04d6eb0 to
f10d55a
Compare
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
| Check name | Status | Explanation |
|---|---|---|
| Existing Defaults Unchanged | The PR changes how drawing views are drawn, not the UX defaults that the check covers. Evidence from the checked-out branch (HEAD 09c9eb6, diff HEAD~5...HEAD): - No default value, preference, setti… |
Full details: Existing Defaults Unchanged
-
Explanation
The PR changes how drawing views are drawn, not the UX defaults that the check covers. Evidence from the checked-out branch (HEAD 09c9eb6, diff HEAD~5...HEAD): - No default value, preference, setting, shortcut or UI layout changed. The chord constants are unchanged in
drawing_view_lines.rs(CHORD_MM = 0.01,CHORD_RANGE = 0.001..=1.0,MIN_MODEL_CHORD_MM = 0.0001). The documented parameter defaults incmd/drawing_view.rsare unchanged:chord_mm0.01,tangent_edgeshide,visual_styleandreference_stylevisible,reference_shown_percent0. The only edits to the.paramstext add new values formax_error_mmandstatus(exact,hidden_lines). - The changed output is the drawn result for the same inputs. Lines become exact lines and arcs instead of mesh chords.status.linesandstatus.provenancereport the new state.max_error_mmnow certifies views that previously were refused. The check excludes changed geometry results from being treated as changed defaults, and this 2D drawing output falls in that class. - The PR description's "Changes a default: no" matches the code. I found no default-value change that would trigger the second failure condition. Caveat: a strict reading of "what a command or tool does when used the usual way" could cover the new default drawing output. I did not apply that reading, because the change alters a result of the same request and does not alter a default the user sets or relies on.
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
44823eb to
1644123
Compare
1644123 to
17ac5a0
Compare
|
drawings now includes main as of today; please merge drawings into your branch. Thanks! |
… edges it draws mesh_lines::prepare grouped the placed bodies (which placements share one copy of a definition's geometry, and which are their own group, such as a mirror image) and chose the edges a view draws inline. Both now live in their own functions in meshes.rs, `placed` and `drawn_edges`, so the exact hidden lines can use the same rules. Nothing a view draws changes. A new test checks the grouping: a copy moved by a rigid transform shares its original's geometry, and a mirror image is a group of its own. Part of tangency-labs#5866. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… only for bodies the exact lines can't draw A drawing view now draws its visible and hidden lines with hlr, from each body's exact faces and edges: straight edges and circles come out exact, other curves as chords within the asked error. A body falls back to the old mesh projection when the exact lines can't draw it (mesh bodies, split round faces, faces or trims hlr can't read, a mesh body that may stand in front of it), and the view's status names how many bodies fell back and why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wn to fail in hlr (tangency-labs#2455) A cylinder seen from each upper corner at 1:2: each side line must end where a piece of its bottom rim ends, visible and hidden, to 1e-6 mm. Two corners miss by 0.75 mm on paper: hlr gives the rim no split where the side line touches it, and the visibility change falls in the first tenth of the rim's one stretch, which classify_range doesn't search. The other sides are 7.7e-6 mm off, at the grazing ray's own-face margin. The test is listed in tests/KNOWN_FAILING_TESTS until hlr splits the rim there; the fix drops the line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
938bc4e to
f1fc0df
Compare
…gency-labs#2455) A reference part's lines now come from a second hidden_lines call, not from the mesh. That call holds every reference part first, then each model body that may hide one. So reference lines are tested against everything, the model still sees through reference parts unless the view says they hide it, and a reference line on a model line keeps all of it. Reference lines still stop at the view's boundary: a piece inside keeps its exact curve, a line is cut exactly, and an arc is cut on its chords and put back on its circle, as the mesh projection does. Views with reference parts get faster (83 to 63 ms with one, 103 to 79 ms with three, on a plate with four holes and a boss) and certify any max_error_mm. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…angency-labs#2455) A body with a face split on one cylinder, cone, sphere or torus stays drawn from its exact curves. Only the split edge, which hidden lines don't draw, comes from the mesh projection, picked by body and edge. The provenance and the max_error_mm refusal name those edges. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Closing, as this PR's work is already in |
A drawing view is a 2D picture of the model on a drawing sheet: its outline, its hidden lines and any reference parts. Until now, every view was drawn from the display mesh, so its circles and curves were chains of short straight chords. This PR draws a view's lines from the model's exact shape instead, through the hidden-line module
hlr(#2455). Lines stay lines and circles become true arcs. A circle seen at an angle is drawn within the view'schord_mm, by a bound that is proven, not sampled. Part of #5866 (drawing.view) and of #2455 (exact hidden lines).What's in it, commit by commit:
mesh_lines::placed,drawn_edges). Both the mesh projection and the exact lines call it. Nothing drawn changes.status.hlr, so it is listed intests/KNOWN_FAILING_TESTS. The fix belongs inhlr(Drawing W06a: exact orthographic hidden lines for the analytic subset #2455).hidden_linescall draws them against the model, with the same rule the mesh path used: reference lines are tested against everything, and each part keeps its whole outline where it lies on a model line. Where the view's boundary cuts a reference part, its lines stop at the boundary. A cut circle stays one arc.hlrdoesn't draw the split line itself, so only that edge comes from the mesh.What a user sees:
status.provenanceishidden_lines,mesh_projectionor both, andstatus.linesisexact,boundedorapproximate.max_error_mmnow certifies views that are drawn exact, including views with reference parts. It still refuses a view with any mesh lines, and says what came from the mesh (for example "edges drawn from the mesh: 1 for split faces").Cost: measured in the app on 7 Nov. The box, cylinder and sphere export about 220 ms faster (267 → 45 ms). The plate with four holes is slower (55 → 158 ms): each of its four views prepares the plate for exact lines again. #13220 (a sheet prepares each body once for all its views) removes about 75 ms of that, and goes up after this PR. Views with reference parts got 17-24% faster with commit 4, because nothing is meshed any more.
Known limits, each on the way to a fix:
approximate.hlrdraws a rim seen edge-on as a short polyline that doubles back about 1.8 mm at one end. It is the same family as the known rim failure in commit 3.hlr. Where those go is a question for Drawing W06a: exact orthographic hidden lines for the analytic subset #2455.Changes a default: no
Validation
On this branch's head, on
drawings864760834f, dev profile, the tests these changes reach:cargo test -p solidcraft-engine --lib -- drawing_view: 138 passed. The one failure isa_cylinders_sides_meet_its_rims_from_every_corner, the known failure commit 3 lists.drawing_scene drawing_picture drawing_balloon drawing_check drawing_dimension drawing_sheet), run after commit 4: 319 passed. The two failures are listed intests/KNOWN_FAILING_TESTS(Drawing W13, W14: references that survive model edits, and updating drawings when the model changes #4892).a_reference_line_never_takes_a_stretch_from_a_model_line.cargo fmt --checkandcargo clippy -p solidcraft-engine --all-targets -- -D warnings: clean.cargo xtask mesh-decisions: no new mesh decision sites. The exact path takes the drawn edges as data and reads no mesh.Tests whose expectations changed, each with the reason in its doc comment:
a_views_lines_are_the_blocks_outline,each_placements_hole_is_its_own_exact_circle,a_rim_cut_where_its_visibility_changes_is_exact(was_stays_sampled),chords_and_accuracy_checks_out_of_range_are_refusedand the cancel test: the lines are now exact.a_scene_draws_reference_parts_thin_under_the_model: reference parts are exact now, so the view certifies.a_split_round_face_is_drawn_from_the_meshbecamea_split_round_face_draws_only_its_split_from_the_mesh.Screenshots of the behavior (when observable)
Sheets exported from the app built at this branch's head, through the control channel (
drawing.view.basewith hidden lines shown, thendrawing.exportto PNG at 300 dpi). Each design is new and has no private data. The provenance under each picture is whatdrawing.view.snapshotreported for the same views.A plate with four holes (commit 2). Top, front, right and iso at 1:2. The holes show as dashed hidden lines in the front, right and iso views. All four views:
hidden_lines,exact.Reference parts (commit 4). A 40 × 40 × 5 plate with two Ø10 reference pins standing on it, at 2:1. The pins are drawn thin. In the top view, the pin inside the view is one exact circle, and the pin over the plate's edge is cut at the view's boundary as one arc. In the front view, the pins stand above the plate, outside the view's boundary, so nothing of them is drawn (the boundary grows only when asked). Top:
hidden_lines,approximate(the cut arc is sampled); front and iso:hidden_lines,exact.A split cylinder (commit 5). A Ø20 × 30 cylinder whose side is split across at half height, at 4:1. The split is the one line drawn from the mesh: across the front view, and solid in front and dashed behind in the iso view. The outline and rims are
hlr's. Both views:hidden_lines_and_mesh_projection,approximate.max_error_mm0.01 is refused with "edges drawn from the mesh: 1 for split faces". The small gap at the iso view's lower right, where a side line meets the bottom rim, is the known rim fault of commit 3.Integration status
drawings864760834f(the latest): this branch sits on it, 0 commits behind, and merges cleanly.drawing_view_lines::linesandcertifytoo:git merge-treemerges it cleanly. Whichever lands second re-checks that one call.drawingsincmd/drawing_view_tests.rs. This PR adds no new conflict there.