Skip to content

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
tangency-labs:drawingsfrom
CamWight:w20c-chain-4896
Closed

CamWight wants to merge 2 commits into
tangency-labs:drawingsfrom
CamWight:w20c-chain-4896

Conversation

@CamWight

@CamWight CamWight commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

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).

  • A dimension's point (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; centre is written only when it's true, so older drawings read as they were.
  • It is found again as construction geometry finds a round edge's centre (construct::as_circle, now shared within doc), in 3D, so any view can measure it, not only one that sees the circle face on. A split rim is ambiguous; an edge that is no longer round is unmeasurable.
  • drawing.dimension.add takes {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).

  • The rule is in geom beside the other measurements: drawing_measure::chain takes 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.
  • The record: 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.
  • Reading it: Resolved::members gives each member's value and text; measured is the overall, so the last good value and inspect's value are the overall. A chain has no text of its own.
  • Commands: drawing.dimension.add takes {chain: {points, direction?}} and counts the points before looking any up (one rule, in doc: check_chain_length); drawing.dimension.edit changes a chain's direction and refuses its other settings; inspect lists members.

Pictures

No visible change in the app: nothing shows dimensions yet.

Tests

  • The spec's case: a corner at 0 and holes at 10, 30 and 60 along the box's front read 10, 20 and 30, and they add up to the overall 60 within 1e-9. Given the other way round, the members come last to first; a direction given against the chain's way reads the same.
  • 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 a reading are refused. A centre with 0 or 2 edges is refused, and with 1 saves centre: true.
  • Through the commands: a linear dimension from a corner to a hole's centre reads 40 across and 15 up, and between the hole's centre and a fillet arc's centre 35 and 10; a straight edge as a centre and a centre's own path are refused. The chain's edit names direction; its reading, side, diameter and text are refused; 65 points are refused before any is looked up. Hostile values anywhere in a chain's add and edit never panic.
  • Found again in the model: a hole's centre is exact; a slot across its rim makes it ambiguous; with the hole suppressed it is lost.

Planted faults: 18, all caught, then a clean run.

What no test reaches

A chain's exact when one of its points is found through a piece of a split edge (every test chain is found exactly, or not at all).

Validation

Integration status

Based on drawings 693cf91, 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

CamWight and others added 2 commits October 31, 2026 06: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

Copy link
Copy Markdown
Contributor Author

This work is in drawings through #9251, which carried the whole W20 stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:doc timeline, components, parameters, naming area:kernel B-rep kernel, booleans, blends, STEP/IGES

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant