Expand description
Draggable linear and angular annotations for selected feature parameters.
Builders place local-space leaders on the feature’s geometry and apply the same intrinsic XYZ transform as the kernel, keeping annotations aligned with the rebuilt solid. Each annotation identifies the parameter it edits.
Structs§
- Feature
DimAnnotation - One editable dimension annotation.
- Resolved
Refs - Resolved scene geometry an annotation builder needs beyond the pure
inputParams— the profile plane (extrude/revolve) and the axis line (revolve). These are NOT pure params (they resolve scene references), so the engine resolves them from the run report’s sketch profiles / axes, or from the resident scene when the reference names a solid face / edge (seeEngineState::feature_dimension_refs), and hands them in. All fields are optional: a builder that can’t source what it needs returns[]gracefully.
Enums§
- Feature
DimKind - A dimension annotation’s kind. FD-1 was all
FeatureDimKind::Linear; FD-2 addsFeatureDimKind::Angular(torusarc, revolveangle).
Constants§
- ANGLE_
ARC_ RAD_ PX - The angle gizmo’s ARC radius, CSS pixels (screen-constant — matching the previous
FEATURE_ANGLE_RADIUS_PX). Shared with the engine so the drawn arc, the chip anchor (mid-sweep) and the drag hit-search all use the SAME radius.
Functions§
- angular_
chip_ anchor - The world-space chip anchor for an ANGULAR annotation: the arc mid-sweep point
at the screen-constant radius (
center + rotate(ref_dir, axis, value/2) * radius) — i.e.labelAnchor = vertex + bisector * radius. Camera-dependent (viaworld_per_pixel), so the engine computes it per frame. - append_
plain_ leader - Append a PLAIN leader line
a → b(thin silver rod, NO arrowhead cone / origin sphere — nothing that reads as grabbable) onto existing(positions, colors)triangle buffers. The NON-dimensional assembly-constraint overlays (coincident / parallel / …) draw their anchor-to-anchor leaders through this so the line styling stays in this ONE home (same silver + screen-constant radius as the dimension rods, slightly thinner because it carries no handle). - build_
annotations - Build the linear dimension annotations for a feature
typefrom itsinput_params. Dispatches on the primitive-solid type; returns[]for any type without an FD-1 builder (extrude / revolve / booleans / etc.). - build_
annotations_ with_ refs - Build the dimension annotations for a feature, given any resolved scene
references (
ResolvedRefs) it needs. The primitive-solid + torus builders ignoreresolved(pure params + the baked transform); extrude/revolve read the resolved profile plane / axis line and return[]when it is unavailable (an unresolved reference — see the builders). The engine resolves the profile plane from a sketch profile OR a resident solid face. - leaders_
buffers - Build the world-space leader geometry for a set of annotations as flat
triangle
(positions, colors)buffers (9 position + 9 color floats per triangle), ready to feed thefeature-dim-leadersoverlay group astris. Normals are omitted — the overlay parser computes a flat face normal per triangle, and the shader’s per-face shade gives the rods/cones/spheres their 3D read.world_per_pixelkeeps the rod/cone/sphere screen-constant. - rotate_
about_ axis - Rotate
vbyangleradians about unitaxis(Rodrigues). Shared with the engine’s angular drag/chip anchoring.