Repository navigation
Drawing dimensions: chains along one line, and a hole's or an arc's centre as a point (#4896, W20c) - #9249
Closed
CamWight wants to merge 2 commits into
Closed
Drawing dimensions: chains along one line, and a hole's or an arc's centre as a point (#4896, W20c)#9249CamWight wants to merge 2 commits into
CamWight wants to merge 2 commits into
Conversation
This was referenced Oct 30, 2026
CamWight
force-pushed
the
w20c-chain-4896
branch
from
October 30, 2026 13:35
c4b64d2 to
2deda17
Compare
CamWight
marked this pull request as ready for review
October 30, 2026 13:35
… from (tangency-labs#4896, W20c) A linear dimension's point can be the centre of a circle or an arc, saved as its one edge's name with `centre`. It is found again as construction geometry finds a round edge's centre (`construct::as_circle`), in 3D, so any view can measure it; a split edge is ambiguous, and an edge that is no longer round can't be measured. `drawing.dimension.add` takes `{centre: edge}` wherever a corner goes, and refuses a straight edge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s#4896, W20c) A chain dimension runs through 3 to 64 points in order (corners or hole centres) and reads the distance from each to the next along one line as the view shows it: horizontal, vertical, along a direction, or aligned from the first point to the last. The line runs the way the first point to the last goes, and a point out of order is refused, never moved, so the members add up to the overall from the first point to the last (`drawing_measure::chain`). It reads projected only (true lengths of points off one line don't add up) and shows its members' numbers, never a text instead. `drawing.dimension.add` takes `{chain: {points, direction?}}` and counts the points before looking any up; `drawing.dimension.edit` changes its direction; inspect lists its members, its value being the overall. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CamWight
force-pushed
the
w20c-chain-4896
branch
from
October 31, 2026 08:43
2deda17 to
34a1570
Compare
Contributor
Author
|
This work is in |
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.
Part of #4896 (W19 and W20, dimensions on drawing views), into
drawings: W20c: chain dimensions, and a hole's centre as a point to measure from. A chain runs through points in order along one line and reads the distance from each to the next; its members add up to the overall from the first point to the last. Because a chain's points are usually hole centres, the first commit makes the centre of a circle or an arc a point any linear dimension can measure from. The plan is on #4896.Changes a default: no
It adds a dimension kind, a kind of point and command fields; what exists keeps its meaning.
What it does
A centre as a point (first commit).
ModelPoint) can be the centre of a circle or an arc:centre: true, naming that one edge. A corner names 2 to 16 edges as before;centreis written only when it's true, so older drawings read as they were.construct::as_circle, now shared withindoc), in 3D, so any view can measure it, not only one that sees the circle face on. A split rim isambiguous; an edge that is no longer round isunmeasurable.drawing.dimension.addtakes{centre: edge}wherever a corner goes (the edge is picked as any edge is, without a path of its own), and refuses a straight edge at once.Chains (second commit).
geombeside the other measurements:drawing_measure::chaintakes the points in order and one direction (horizontal, vertical, along a direction, or aligned from the first point to the last). The line runs the way the first point to the last goes. Each member must be more than 0 along it, so a point out of order, or lined up across the line with the one before, is refused, never moved. The members are projections along one line, so they add up to the overall.DimensionKind::Chain { points, direction }, 3 to 64 points (2 make a linear dimension). It reads as the view shows it only: true lengths between points off one line don't add up. It shows its members' numbers, so it takes no text instead.Resolved::membersgives each member's value and text;measuredis the overall, so the last good value andinspect'svalueare the overall. A chain has notextof its own.drawing.dimension.addtakes{chain: {points, direction?}}and counts the points before looking any up (one rule, indoc:check_chain_length);drawing.dimension.editchanges a chain's direction and refuses its other settings;inspectlistsmembers.Pictures
No visible change in the app: nothing shows dimensions yet.
Tests
geom: up a 3-4-5 slope, aligned, each member is its own part; a point behind the view's plane makes its members and the chain foreshortened; refused: no points, 2 points, a point out of order, a point lined up across the line, a repeated point, an aligned chain whose ends are one point in the view, a zero direction, a non-finite point, a bad basis. The seeded test (20,000 cases, a quarter hostile) now also checks that every chain it can measure (4,088) has members over 0 adding up to its overall.doc: a chain saves its points in order and its direction and reads back the same; 0, 2 and 65 points are refused, 3 and 64 read; a centre's one-edge rule, a zero direction, a text instead and areadingare refused. A centre with 0 or 2 edges is refused, and with 1 savescentre: true.direction; its reading, side, diameter and text are refused; 65 points are refused before any is looked up. Hostile values anywhere in a chain'saddandeditnever panic.ambiguous; with the hole suppressed it islost.Planted faults: 18, all caught, then a clean run.
What no test reaches
A chain's
exactwhen one of its points is found through a piece of a split edge (every test chain is found exactly, or not at all).Validation
drawings693cf91, after A lost dimension keeps its last value after the design is reopened (#4896 W19d) #9764 (a dimension's saved last good value) and Recovery: unsaved drawing work survives a crash (#3890, K9′) #9289 landed. The conflicts were doc text, command text and tests, with both sides kept, and these commits' new test dimensions now givelast_good. The gate on the top of the W20 stack, 4ff59fe (Windows, robustness goldens skipped): fmt, assets, icons, licences, lists, layers, ui-containers, both clippy runs, wasm and the offline web test pass; the tests of the 14 crates this can reach: 10,286 passed, 0 failed. The planted faults below ran before this rebase and were not run again.drawingsf87b66d after Drawing dimensions: a circle's or an arc's radius and diameter (#4896, W20a) #8959 and Drawing balloons: the record, its rules and its commands (#3874) #9126 (balloons) landed. The conflicts were indimension.rs, where both sides changed the same lines: the chain's helpers now sit besidecheck_edge, which balloons share, and theStatusnote names both. On these two commits: fmt; thegeommeasuring tests, thedocdrawing tests and the engine's drawing and schema tests; clippy with all targets ongeom,docand the engine; and, on the top of the stack, lists and the wasm build: all pass.drawingsf87b66d: fmt, assets, icons, licences, lists, layers, ui-containers, clippy, 75 test binaries, wasm and the offline web test. Four tests failed, none in this work:ui_containers::tests::new_packages_examples_and_nested_modules_cannot_escape_the_gate(it expects/in a path, and Windows gives\) andrequested_menu_icons_have_artwork_and_match_manifest(a CRLF checkout, fixed onmainby icon_audit: compare the requested-icons manifest with CRLF checkouts ignored (#4932) #4960), which fail on this PC ondrawingswithout these commits; anda_pin_seated_line_to_line_in_its_bushing_is_measuredandfillet_beside_a_modelled_thread_finishes, time limits under the gate's load, which pass alone in 15 s together.drawingsfefca6b with no conflicts, since Drawing W07: a view's lines, on paper, for the occurrences it shows (#5866) #8970, Bill of materials: stable item numbers, saved with the design (#3874) #7779, Bill of materials: virtual components and a typed quantity (#3874, P6) #9226, Drawing export: a sheet of the open drawing as SVG, from its scene (#4890 A7) #9137 and the revision rows don't touch these files. On the replayed commits: fmt; thegeom,docand engine drawing tests and the engine's schema tests; clippy with all targets ongeom,docand the engine; lists; and the wasm build: all pass.Integration status
Based on
drawings693cf91, after #8959 (W20a, radial dimensions, with its Ø sign) landed: its diff is its own two commits. W20b (a cylinder's diameter between its silhouettes, #9250, then #9251) builds on it.Refs #4896, #860