Expand description
PMI — Product and Manufacturing Information: the document’s pmi block
(views that own annotations), the annotation type table with its schemas
and selection predicates, and the history tail that resolves every
annotation against the just-built scene into a typed PmiReport.
§The pmi block
{ views: [{ id, name, camera?, display, annotations: [...] }], idCounter }
on the history request, round-tripped through the saved document and
ABSENT on every document without PMI (so those files re-serialize
byte-identically). A view is a named camera snapshot plus display
state (text size, wireframe, section; what it hides is its hide steps) plus an
ordered list of annotations; a saved view maps to an AP242
DRAUGHTING_MODEL + CAMERA_MODEL_D3 on export and is the unit a future
drawing sheet places. What a view hides is its hide steps (hide
annotations naming solids / components, tracked like explode steps; the
solids hidden at capture are its baseline step): PmiView::hides is the one
rule every consumer reads, and the report lists the outcome per view.
An annotation is { type, enabled, inputParams, labelWorld? }: its
params follow a kernel schema exactly like a feature’s or an assembly
constraint’s (inputParams.id is its id, {SHORT}{n} minted from the
block’s counter), so the app’s dialog engine draws every annotation form
from pmi_schema_catalogue and nothing is hand-written. Geometry is
referenced by kernel entity NAME (faces / edges, {solid}@x,y,z vertices
in WORLD coordinates, D/P frame names) — plain and component-owned
geometry alike — so a rebuilt model re-resolves every value and a renamed
or deleted entity puts the annotation into an error status without ever
aborting the view or the run.
Every drawn annotation has an annotation plane: its optional plane
reference names a planar face or a reference plane the annotation lies
IN (label projected onto it, drags stay in it, the dimension / extension
lines and frames drawn in it, the AP242 ANNOTATION_PLANE placed on it);
left empty, the annotation aligns to the view camera. A picked plane must
be parallel to what it carries — a linear dimension’s direction, an
angle’s or a circle’s plane — or the annotation reports an error rather
than a foreshortened value. Drawing sheets will show, per sheet view, the
annotations whose plane is parallel to the view.
§The tail
finish_history_run runs after the wire-harness tail on every run and
resolves EVERY view’s annotations (a few name lookups each) into a
PmiReport: per annotation the status, the display text (value +
tolerance block, kernel-formatted so the viewport and the STEP file agree),
the measured value, the resolved analytic geometry the presentation is laid
out from (layout) and the label position (stored, or a default derived
from the geometry). The report rides HistoryResult.pmi (never the JSON
ABI) and the render crate’s scene report across the runner seam. Nothing
here touches the incremental feature cache: PMI is annotation state, not
history, and a label drag never re-executes a feature.
§Measurement contracts (kernel queries only)
Every value is read from the exact BREP through crate::assembly_resolve
(planes, carrier lines, circles, axes, points) — never from tessellation.
Linear: point–point, point–line (perpendicular), line–line (carrier lines:
parallel spacing or closest points), point–plane, parallel plane spacing,
single straight edge length, optional X/Y/Z component. Radial: cylinder /
sphere / circular edge radius from the face metadata. Angle: the two
elements’ directions folded to acute / obtuse / reflex, optionally
reversed. Hole callout: the owning Hole feature’s parameters. Datum letters
are unique per part; a feature control frame’s datum references must name
defined datums.
Re-exports§
pub use anchor::balloon_head;pub use anchor::nearest_displayed_point;pub use anchor::nearest_displayed_point_on_edge;pub use anchor::nearest_point_on_edge;pub use anchor::nearest_point_on_solid;pub use anchor::pose_apply;pub use anchor::pose_unapply;pub use anchor::BalloonAnchor;pub use anchor::BalloonAnchorMode;pub use anchor::HalfSpace;pub use anchor::HeadScope;pub use anchor::PmiPose;pub use anchor::SolidPoses;pub use annotations::pmi_schema_catalogue;pub use annotations::pmi_type;pub use annotations::PmiTypeDef;pub use annotations::PMI_TYPES;
Modules§
- anchor
- Balloon leader anchoring: where a Find-number balloon’s arrow head lands.
- annotations
- The PMI annotation type table — eleven types, each a module exposing its
PmiTypeDef(DEF), itsschema()and its resolver. The table is the third applicability family beside the feature catalogue and the assembly constraint types: an annotation predicate accepts plain AND component geometry. - font
- The stroke font of the PMI polyline presentation — single-line glyphs (cap height 10, baseline 0, body x ∈ [0, 6], monospace advance 7.5 = 0.75 × cap height, the same constant the layout’s FCF / datum cells are sized by). Digits, upper-case letters (lower case maps to upper case), punctuation, and the PMI symbols the resolvers emit: ⌀ ± ° × ⌴ ⌵ ↧ △, Ⓜ Ⓛ and the fourteen characteristic symbols. An unknown character is drawn as a box so nothing vanishes silently. Proofed from a rasterized sheet before being emitted as this table.
- layout
- PMI presentation layout — the polylines an annotation is DRAWN with, laid out from its resolved geometry and its label position. ONE implementation serves the viewport overlay (screen-constant sizes, from the camera’s world-per-pixel) and the AP242 polyline presentation (fixed model-unit sizes from the view’s text size), so the file shows what the screen shows.
- resolve
- PMI reference resolution and the measurement helpers every annotation resolver shares.
Structs§
- FcfFrame
- The cells of a feature control frame.
- Plugin
Annotation Output - Provider output. Only geometry with a host-owned layout adapter is accepted.
- Plugin
Annotation Replay - Serializable transition input needed to reproduce an accepted callback result. No geometry/output presentation is cached: callbacks always run and validate.
- PmiAnnotation
- One annotation: schema-driven params keyed by its
type. - PmiAnnotation
Report - One resolved annotation.
- PmiCamera
- The camera snapshot: eye / target / up / projection / viewport size — the
render crate’s
ViewCameraminus near/far, which are a per-frame depth window and never persisted. Applying a snapshot under another viewport aspect refits the frustum, preserving the apparent size at the target. - PmiContext
- What the annotation resolvers read: the live scene, the request (hole features for callouts, the datum registry) and the expression sheet.
- PmiDisplay
- Per-view display state.
- PmiPlane
- A resolved annotation plane: the plane the annotation lies in (its
planereference — a planar face or a reference plane),normaloriented toward the view’s captured camera,x_axisthe in-plane text direction (the camera’s right projected into the plane). The viewport overlay and the AP242ANNOTATION_PLANEboth lay the annotation out in this frame. - PmiReport
- The tail’s resolution of every view’s annotations.
- PmiSection
- A display-only half-space through
originplus an offset along the normal. - PmiSection
Plane - One further plane of a
PmiSection:X,Y,ZorView(the captured camera’s direction, frozen innormalwhen set),offsetalong it from the section’s origin,flipkeeping the other side. - PmiState
- The document’s
pmiblock. Loading it folds every view’s legacydisplay.hiddenlist into that view’s baseline hide step (seePmiDisplay), so every reader — the run, the parts library, STEP export, plugins, the 3D PDF — sees one representation. - PmiView
- A PMI view: a camera snapshot, display state and the annotations it owns.
- PmiView
Report - Resolved
- The outcome of one annotation’s resolver.
- Tolerance
Block - The tolerance block of a dimension:
tolModenone / symmetric / deviation / limits withtolUpper/tolLower.
Enums§
- PmiGeometry
- The analytic geometry an annotation resolved to — what the presentation
(
layout) and the STEP semantic export are built from. - PmiProjection
- PmiStatus
- Tolerance
Mode
Constants§
- HIDE_
BASELINE_ PARAM - The
hidestep param marking a view’s baseline step: the solids hidden when the view was captured (or a generated instructions step’s not-yet-placed parts, or a pre-2026-11-05display.hiddenlist). A name in it that no longer exists is skipped, not an error.
Functions§
- baseline_
hide_ id - The id a view’s baseline hide step is given:
HID-{view id}, unique (one baseline per view) and derived, so making one never advances the document’s id counter and every id minted after it stays what it was. - clamp_
text_ size - The text size clamp:
[1, 288]points. - entry_
names_ solid - Whether a SOLID / COMPONENT list entry names
solid: the solid itself, or a component it belongs to (ACOMP1coversACOMP1:Partand a nestedACOMP1:ACOMP2:Part; a prefix of a longer name,ACOMP1forACOMP10:Part, is not the name). The rule a section’s Not cut list and a view’s hide steps share. - format_
dimension - The dimension text:
prefix(⌀/R/"") + the nominal (+ the tolerance block) +suffix(°/""); a reference dimension is parenthesized and shows no tolerance. - format_
number valuewithdecimalsplaces (0..=8), no exponent.- resolve_
annotation - Resolve one annotation through its type’s resolver into a report row:
the type’s measurement, then its annotation plane (
cameraorients the plane toward the view;Nonefor a view without a camera). - resolve_
state - Resolve
state(the tail’s body, callable on any scene).