Expand description
Portable curve-evaluation contract and conformance suite.
Curve evaluation was the only kernel capability without a contract, so a consumer that wanted to ask for a point at a distance had to depend on a specific engine. This crate lets the capability be NAMED without binding an implementation to it.
See docs/adr/0063-curve-evaluation-contract.md.
Modules§
- conformance
- Conformance suite every curve-evaluation provider must pass.
Structs§
- Backend
Descriptor - Provider identity only. It deliberately contains no operation booleans.
- Backend
Id - Stable provider identifier for logs and explicit selection.
- Curve
Path - Pieces of curves laid end to end, in the order the path runs; see the module documentation.
- Distance
Interval - A distance certified to lie in
[lower, upper]: whatCurveEvaluator::path_joint_distancesreturns for each joint of a curve path. - Path
Offset - An offset of a base piece (#289); see the module documentation.
- Path
Offsets - The displacement of an offset at one place, in its base’s frame:
lateralto the left,verticalalong up,longitudinalalong the tangent (ADR 0082’s station offsets). - Path
Piece - One piece of a
CurvePath: the span[start, end]of a curve in its station measure, traversed forwards or backwards, optionally carried by a rigid placement; see the module documentation.
Enums§
- Curve
Measure - Where along a curve to evaluate, and by WHICH method of measurement.
- Determinism
- Reproducibility requirement.
- Distance
Convention - Which distance a
CurveEvaluatormeasures. - Execution
Target - Broad execution target. Specific ISA/device features stay in provider crates.
- Geom
Error - Why a backend-neutral geometry operation failed.
- Offset
Frame - Which frame of the base an
OffsetLaw::Lineardisplacement is read in: ADR 0082’s station frames. - Offset
Law - How far, and which way, an offset lies from its base piece.
- Operation
- Operation name used for diagnostics only. Implementing an operation trait is the capability proof; this enum never drives capability discovery.
- Path
Bound - Where a
PathPiecestarts or ends when its distance is not stated (#304): the evaluator resolves it to a distance in the curve’s station measure; see the module documentation. - Path
Curve - The curve under a
PathPiece. - Seam
Side - The piece a position exactly on a seam is read from.
Constants§
- CAPABILITY_
ID - Capability this contract names.
- CURVE_
PATH_ UNSUPPORTED - The input a provider that does not implement curve paths refuses, in
the
GeomError::UnsupportedInputits defaultpath_*queries return. - OPEN_
PATH_ END_ UNSUPPORTED - The input a provider that reads curve paths but not open piece ends (#298) refuses a path with one for.
- PATH_
JOINT_ DISTANCES_ UNSUPPORTED - The input a provider that does not certify joint distances refuses, in
the
GeomError::UnsupportedInputits defaultpath_joint_distancesreturns. - PATH_
PIECE_ BOUND_ UNSUPPORTED - The input a provider that reads curve paths but not piece bounds given as a native parameter or a point (#304) refuses a path with one for.
- PATH_
POINT_ AMBIGUOUS - The input a point bound of a curve path piece (#304) is refused for when several parameters of the curve name it: a curve that passes through it more than once, or the seam of a closed curve other than a circle or an ellipse (whose angle runs round).
- PATH_
POINT_ OFF_ CURVE - The input a point bound of a curve path piece (#304) is refused for
when it does not lie on the piece’s curve within the joint tolerance
1e-9 * max(1, |p|): a provider never projects it onto the curve. - SEAM_
SIDE_ UNSUPPORTED - The input a provider that does not implement seam sides refuses, in
the
GeomError::UnsupportedInputits default sided methods return.
Traits§
- Backend
- Runtime geometry backend metadata.
- Curve
Evaluator - Curve evaluation provider.
Functions§
- window_
span - The window
[around - window, around + window]ofpath_joint_distances_within, checked:aroundfinite,windowfinite and not negative.
Type Aliases§
- Geom
Result - Result alias for geometry operations.