Skip to content

Drawing dimensions: between two cylinders' silhouettes (#4896, W20b) - #9251

Merged
bherbruck merged 4 commits into
tangency-labs:drawingsfrom
CamWight:w20b-silhouettes-4896
Oct 31, 2026
Merged

bherbruck merged 4 commits into
tangency-labs:drawingsfrom
CamWight:w20b-silhouettes-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: W20b, second slice: the distance between a silhouette of one cylinder and a silhouette of another. Two shafts side by side, or a boss and a hole, are dimensioned by their outline lines as the view shows them. When both silhouettes belong to one cylinder, the dimension is that cylinder's diameter (the first slice's), never a plain distance. The plan is on #4896.

Changes a default: no

It adds a dimension kind and command fields; what exists keeps its meaning.

What it does

  • Naming a silhouette: each silhouette is a face of its cylinder plus a side: near (the silhouette nearer the other cylinder on the view) or far. The sides are named by where the other cylinder is, not by up or down on the paper, so the dimension keeps to the same two lines whichever way round a view shows the cylinders.
  • The rule, in geom: drawing_measure::between_silhouettes takes the two cylinders, their sides and a direction as a linear dimension takes it: aligned (square to the silhouettes, the default), horizontal, vertical or along a direction. The silhouettes must be parallel on the view, and the axes must be apart there, or near and far would mean nothing; a direction along the silhouettes is refused. It is foreshortened when the axes aren't parallel in the model, or when the silhouettes lie at different depths. Cylinder is now geom's type: doc kept the same type privately.
  • The record: DimensionKind::Silhouettes { a, b, direction }, each a Silhouette { face, side }, where the face is a ModelFace as the first slice saves it. It reads as the view shows it only (no reading). Its text is the plain number.
  • Finding it again, strictly: each face is found as the first slice finds a cylinder's (by name, or the pieces it was cut into, all on one cylinder), and the silhouette measured must lie on that cylinder's faces. So a silhouette that a fillet's quarter round doesn't reach is refused, with the reason.
  • One cylinder: Document::silhouettes_kind decides what drawing.dimension.add saves. When both faces lie on one cylinder of one body placed once (the kernel's own condition, as the first slice uses), it saves that cylinder's diameter, which takes no direction. Otherwise it saves the distance between the silhouettes. Lookup::on_cylinder is now the one lookup for both kinds.
  • Its points are each silhouette's ends, from the faces' one end along the axis to the other, a's first, for the layout to come.
  • Commands: drawing.dimension.add takes {silhouettes: {a: {face, side}, b: {face, side}, direction?}}; edit changes its direction and refuses its other settings.

Pictures

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

Tests

  • geom: two shafts along X in the front view, radius 5 at the origin and radius 3 at z = 30, read near to near 22, near to far 28, far to near 32 and far to far 38, whichever is given first; up the view the same; along (1, 1) 22√2. Behind the first, or leaning back, the second still reads 22, foreshortened. In the isometric view, two posts along Z read 10√2 − 3 between their near silhouettes. Refused: silhouettes not parallel on the view, axes in one line, a reading of 0, a direction along the silhouettes, a zero direction, a cylinder seen end-on, a zero axis, a radius of 0, negative, not finite or past 1e12, an axis point not finite or past 1e12, and a bad basis. The seeded test (20,000 cases, a quarter hostile) now also measures two cylinders parallel on the view (39,976 pairs of sides): every reading is more than 0, far to far is the most of the four, and aligned is the least of the directions.
  • doc: the record saves each face and side and its direction, and reads back the same; each face keeps a reference's rules; a zero direction, a side that is neither near nor far, a reading and edges on a face are refused.
  • Through the commands, on the 80 × 40 × 30 box with two bosses along X on its right face (radius 5 at z = 15 and radius 3 at z = 25): the front view reads 2, 8, 12 and 18 for the four pairs of sides, exact and not foreshortened, saved by each face's name and side; up the view it reads the same. Two faces of the big boss save its cylinder dimension and read Ø10.00; with a direction they are refused. The edit names direction and refuses a reading. Refused, with the drawing unchanged: a flat face, the near side of a fillet's quarter round, a hole seen end-on, and a side that is neither near nor far. Hostile values anywhere in a silhouettes add never panic.
  • Found again in the model: the big boss's near silhouette (z = 20) is 8 from the small one's far one (z = 28), exactly, each from x = 80 to 100; the right view looks along their axes (unmeasurable); a flat cut along the small boss's top takes its far silhouette away (unmeasurable, naming it); with the small boss suppressed, it is no longer found.

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

What no test reaches

Two faces of one cylinder on a body placed twice (each placement is its own cylinder, so they stay a plain distance); the occurrence frame (every test body is the design's own); a pick that finds pieces on two different cylinders (ambiguous).

Validation

Integration status

Based on drawings 693cf91, on #9250 (W20b's first slice: a whole cylinder's diameter) and #9249 (W20c). Until they land, its diff shows them too; its own commit is the last one.

Refs #4896, #860

CamWight and others added 4 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>
…es (tangency-labs#4896, W20b)

A cylinder dimension saves a face by name (ModelFace, as ModelEdge names an edge) and reads Ø
between the cylinder's two silhouettes, which any view but one along its axis shows 2r apart
(`drawing_measure::silhouette_side`). The face, or the pieces it was cut into, must lie on one
cylinder (the kernel's own condition for faces on a common cylinder); every face of the body on
it counts, since the kernel builds a whole cylinder as two half faces; and both silhouettes must
lie on those faces, so a fillet's quarter round is refused. `Document::face_reference` picks a
face by a point on it or by its index; `drawing.dimension.add` takes `{cylinder: {face}}`, edit
refuses its settings, and inspect can list face candidates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#4896, W20b)

A dimension between a silhouette of one cylinder and a silhouette of another, as the view shows
them. Each is named by a face of its cylinder and by its side: the one nearer the other cylinder
on the view, or the one farther (SilhouetteSide). So it keeps to them whichever way round the
view shows the cylinders.

- geom: drawing_measure::between_silhouettes takes the two cylinders (Cylinder, now geom's: the
  type doc kept privately), their sides and a direction as a linear dimension takes it (aligned:
  square to the silhouettes). The silhouettes must be parallel on the view and the axes apart
  there. Foreshortened when the axes aren't parallel in the model, or the silhouettes lie at
  different depths.
- doc: DimensionKind::Silhouettes { a, b: Silhouette { face, side }, direction }, read as the
  view shows it. Each silhouette must lie on its cylinder's faces (Lookup::on_cylinder, now shared
  with the cylinder kind). Document::silhouettes_kind makes two silhouettes of one cylinder of
  one body that cylinder's diameter (which takes no direction), else the distance between them.
- engine: drawing.dimension.add takes {silhouettes: {a, b: {face, side}, direction?}};
  drawing.dimension.edit changes its direction only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@CamWight
CamWight force-pushed the w20b-silhouettes-4896 branch from 670ecfe to 4ff59fe Compare October 31, 2026 08:43
@bherbruck
bherbruck merged commit 0d4739f into tangency-labs:drawings Oct 31, 2026
25 checks passed
@CamWight
CamWight deleted the w20b-silhouettes-4896 branch October 31, 2026 09:21
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.

2 participants