Expand description
Feature-dimension annotations (FD-1) — the engine-native port of the original
FeatureDimensionAnnotationBuilder.
When a primitive-solid feature is selected and its ◎ is in DIMENSION mode,
its key numeric params render as draggable dimension annotations: a leader
from world point_a → point_b, editing the param field_key. FD-1 covers
the LINEAR builders only (cube / cylinder / cone / sphere / pyramid); the
angular + add-material builders (torus arc, revolve/extrude, pattern, port)
are FD-2.
Each local-space point convention is copied verbatim from the previous app’s builder so
the dims land on the SAME edges it drew — and, because the kernel bakes
inputParams.transform with the exact intrinsic XYZ Euler order used here, on the
rebuilt solid’s edges too. See the per-builder notes below for the local
corner conventions (e.g. the cube’s minimum corner is the origin; the pyramid
is centered on its axis with the base at y = -h/2).
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.