Expand description
Stations: a section frame at a distance along a curve (#241),
re-exported on the same footing as curve and surface.
Stations: a position at a distance along a curve, framed by the curve’s
section (#241, ADR 0082).
A station names a place by a measure along a basis curve instead of by
coordinates, the way an alignment is staked out. Reading it back is
curve evaluation, so it lives here, beside the arc-length machinery it
reuses (crate::arc_parameter).
§Distance convention
The distance is measured in the basis curve’s own convention, from its start:
- an
Elevated3or aBanked3is authored against PLAN distance, its own parameter, and a station on it is a plan distance (the curve-evaluation contract’sDistanceConvention::PlanDistance); - every other curve, 2D or 3D, is measured by its arc length (for a 2D curve, the plan length).
The start is parameter 0 for a line, a circle, an ellipse, an
intrinsic curve and a chain, and the first parameter of the domain for
a polyline or a B-spline. A distance must lie in [0, L], L the
curve’s length (station_length2, station_length3): one full turn
for a closed conic, no limit for a line. A negative or non-finite
distance, and one past L by more than
ARC_LENGTH_TOLERANCE * max(1, L), is refused by name; one past it
by less is read at L.
§Section frame
SectionFrame carries the point and three unit axes: tangent along
the curve, lateral to the LEFT of it, and up = tangent x lateral.
- A 2D curve lies in the plane
z = 0:lateralis the left normal,upis+Z. - A
Banked3is framed by its rolled section (crate::banked::banked_section):lateraltowards the left rail head. - Every other 3D curve, an
Elevated3included, gets the reference-up frame against+Z, the oneReferenceCurveEvaluator::frame_atreturns:lateralis horizontal,upleans back with the grade. A vertical tangent has no such frame and is refused by name.
SectionFrame::frame returns the axes in the curve-evaluation
provider’s layout: x the tangent, y up, z = -lateral (to the
right), the layout the contract’s frame_at documents (#242).
The curve-evaluation provider reads a seam side through this module:
ReferenceCurveEvaluator’s point_at_on, tangent_at_on and
frame_at_on answer a measure on a seam (below) with
station_section3_on (#286).
SectionFrame::plan is the vertical alternative: the tangent’s
horizontal projection, the horizontal left normal and +Z, with grade
and bank dropped.
§Explicit orientation (#246)
SectionFrame::oriented turns a section frame by an explicit axis and
reference direction given as components in that frame, (tangent, lateral, up), not in world coordinates: a linear placement’s axes “are
relative to the curve used for linear referencing …, maintaining the
relationship to the tangent of the curve” (buildingSMART IFC 4.3,
IfcAxis2PlacementLinear), whose local X, Y, Z are the tangent,
the left lateral and up. The axis is the oriented up, exact; the
reference direction is made perpendicular to it (Gram-Schmidt, axis
primary) and becomes the oriented tangent. The point does not move.
§Seams (#263)
A curve made of pieces has two frames where a polyline turns at a
vertex, a B-spline at a corner knot, an elevated curve’s grade breaks
or a banked curve’s cant jumps. A station within
ARC_LENGTH_TOLERANCE * max(1, s) of such a seam is ON it: it is
read at the seam’s own distance, from the piece that starts there
(SeamSide::Outgoing, station_section2 and station_section3)
or from the side station_section2_on and station_section3_on
are given. station_seams2 and station_seams3 say where the
seams are without evaluating the curve, and Mitre is the plane a
run of sections crossing one stands in; see seam for both. At the
curve’s start and end there is one piece, and both sides read it.
§Placing at a station (#264)
SectionFrame::placement is the rigid motion a node placed at a
station is moved by: local x, y, z onto the tangent, the left
lateral and up, the origin onto the point (a linear placement’s
reading). station_frame_is_exact2 and station_frame_is_exact3
say whether that frame is exact (a line) or carries the tolerances
below. SectionFrame::carried is the frame a station on the placed
curve has (#285): the source’s moved where the placement keeps +Z,
the placed curve’s own reference-up frame where it tilts it.
§Composite bases (#285)
CompositeBasis measures stations along pieces of atomic curves laid
end to end (StationPiece: a span of a curve, reversed or placed),
the neutral form of a composite curve relation. The distance runs
through the pieces in their common convention, every joint is a seam
read by the rule above, and a frame is exact only where every piece up
to the one read is; see composite.
§Offset bases (#289)
A piece may be an offset of a base piece (StationOffset), measured
in its OWN length from its start: arc length, or its own plan length
beside an elevated or banked curve. offset_pieces offsets pieces
laid end to end, one offset piece per span between seams; see
offset for the closed forms, the numerical reading and the
refusals.
§Certified joint distances and seam-snapping windows (#294)
A composite’s joints lie at the running sum of its pieces’ lengths, and
some of those lengths are quadratures (an offset other than a line or a
circle beside one, an ellipse, a B-spline). certify bounds each from
both sides, so CompositeBasis::joint_intervals answers every joint
with a DistanceInterval that contains its true distance, no wider
than a requested tolerance; a sum of stored lengths is a point. The
curve-evaluation provider hands them out as path_joint_distances.
A station may carry a seam-snapping window, wider than the arc-length
tolerance: snapped_distance2, snapped_distance3 and
CompositeBasis::snapped_distance read a station within its window
of exactly one seam whose frame may jump at that seam, using the
certified intervals where a seam’s distance is numerical, and refuse a
window holding two seams or with one on its edge by name; see
window.
§Accuracy contract
The point and frame are the exact curve’s at a measure within
ARC_LENGTH_TOLERANCE * max(1, s) of s where the arc length is
numerical (a conic, a polyline is exact, a B-spline), at s itself on a
line, an intrinsic curve, a chain and an elevated or banked curve (their
parameter is the measure), each evaluated to its own stated accuracy
(Gauss-Legendre quadrature for intrinsic positions, ADR 0060). A station
on a seam is read at the seam’s distance, within the same tolerance of
its own.
Modules§
- certify
- Certified lengths of station pieces, and so certified joint and seam distances (#294, ADR 0082 amendment).
- composite
- A composite station basis: stations along pieces of curves laid end to end (#285, ADR 0082 amendment).
- frame_
bound - Certified bounds on a section frame law’s derivatives in station distance (#247, ADR 0082 amendment).
- offset
- Offset pieces of a station basis: the curve beside a span of an atomic curve, measured in its own length (#289, ADR 0082 amendment).
- path_
bound - Curve-path piece bounds given as a native parameter or a point (#304, ADR 0082 amendment).
- seam
- Seams of a station’s basis curve: where they lie, which piece a station on one reads, and the mitre between the two (#263, ADR 0082 amendment).
- window
- Seam-snapping windows (#294, ADR 0082 amendment).
Structs§
- Composite
Basis - Pieces of curves laid end to end as one station basis; 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. - Frame
Law - Certified bounds on the frame law along a station basis (#316): an
atomic curve or a
CompositeBasis, over spans that cross no seam. - Frame
LawBounds - Certified suprema, over a span of station distance, of the derivatives of a section frame law in that distance; see the module documentation.
- Mitre
- The plane a section stands in where a run crosses a seam whose tangents differ; see the module documentation.
- Section
Frame - A point on a curve and the section axes there: tangent, left lateral
and up, unit and right-handed (
up = tangent x lateral). - Station
Offset - An offset of one base piece, measured in its own length; see the module documentation.
- Station
Piece - One piece of a
CompositeBasis: the span[start, end]of an atomic curve, in that curve’s station measure, traversed forwards or backwards, optionally placed by a rigid motion; see the module documentation. - Station
Seam - A place inside a curve where two of its pieces meet; see the module documentation.
Enums§
- Distance
Convention - Which distance a
CurveEvaluatormeasures. - Frame
Reading - Which section frame a run places its sections in.
- Station
Curve - The atomic curve under a
StationPiece.
Constants§
- CUSP_
TOLERANCE - Smallest speed of an offset in its base’s direction, relative to the
base’s, that is not a cusp; also the smallest scale
(r - a) / rof an offset circle that has not collapsed. - JOINT_
TOLERANCE - Relative tolerance within which two consecutive pieces of a
CompositeBasismeet: their joint points may beJOINT_TOLERANCE * max(1, |p|)apart,|p|the joint’s largest coordinate magnitude. - KEEPS_
UP_ TOLERANCE - How far a rigid placement’s image of
+Zmay lean and still count as keeping+Z(SectionFrame::carried): rounding only. - MAX_
CERTIFIED_ PANELS - Most panels one certified length may use.
- MITRE_
TOLERANCE - Smallest cosine of half the turn at a seam,
|t_in + t_out| / 2, that aMitreadmits; below it the tangents nearly reverse and the mitre plane would stretch a section without bound. - OFFSET_
TOLERANCE - Relative tolerance of a numerical offset’s own length and its inverse:
OFFSET_TOLERANCE * max(1, L)in the length unit. An estimate, as the quadrature’s agreement test is. - ORIENTATION_
TOLERANCE - Largest sine of the angle between an orientation’s axis and reference
direction that still counts as parallel (
SectionFrame::oriented); the graph refuses the same pairs when a station is pushed. - 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. - POINT_
BOUND_ UNSUPPORTED - The input a point bound on a curve this evaluator does not invert is refused for.
- POINT_
ROUNDING - The rounding error of a point evaluated in closed form, relative to the largest coordinate magnitude of the curve’s data, the point and the displacement (at least 1): about 45 units in the last place, several times what a de Boor or conic evaluation and a frame accumulate.
- SEAM_
TANGENT_ TOLERANCE - Largest angle, in radians, between the incoming and outgoing tangents of a seam that still counts as one direction: no mitre is cut there.
- SEAM_
WINDOW_ AMBIGUOUS - The input a window holding two seams is refused for.
- SEAM_
WINDOW_ STRADDLED - The input a seam straddling a window’s edge is refused for.
- UNCERTIFIED_
LENGTH - The input a length no certified bound here reaches is refused for.
- WINDOW_
CERTIFICATION - How finely a seam’s distance is certified for a window: the certified interval is at most this fraction of the window wide.
Functions§
- exact_
station_ seams2 station_seams2, refusing a curve with a seam whose distance is not read from stored data alone.- exact_
station_ seams3 station_seams3, refusing a curve with a seam whose distance is not read from stored data alone.- offset_
pieces - The offset of pieces laid end to end (a composite’s, in its measure)
by
law: oneStationOffsetpiece per span of a base piece between the seams of its curve, so every seam and joint of the base is a joint of the offset. AOffsetLaw::Linearlaw runs from itsstartat the first piece’s start to itsendat the last piece’s end, linearly in the base’s measure. - piece_
frame_ bounds - Certified bounds on the derivatives, in station distance, of the
section frame
piecepresents over[from, to](distances into the piece, in the composite’s direction), read asreading; see the module documentation. - point_
bound_ tolerance - How far from its curve a point bound may lie: the joint tolerance at the point.
- snapped_
distance2 - The distance a station at
distancealong a 2D curve, with the seam-snappingwindow, is read at; see the module documentation. - snapped_
distance3 snapped_distance2along a 3D curve.- station_
frame_ is_ exact2 - Whether a station frame on this 2D curve is exact (#264): its point and axes at the station’s distance itself, in closed form, rounding aside, with no quadrature or root find behind them.
- station_
frame_ is_ exact3 station_frame_is_exact2for a 3D curve: only a line.- station_
length2 - The length a station on a 2D curve is measured against:
Nonefor a line (unbounded), one turn for a circle or an ellipse, the arc length of its domain for a polyline or a B-spline, the stated length of an intrinsic curve or a chain. - station_
length3 - The length a station on a 3D curve is measured against, as
station_length2; an elevated curve’s is its plan’s, a banked curve’s the span of its cant law. - station_
seams2 - The seams of a 2D curve, every one located (see the module documentation); a B-spline’s corner knots by quadrature, flagged not exact.
- station_
seams3 - The seams of a 3D curve, every one located; see
station_seams2. - station_
section2 - The section of a 2D curve at arc length
distancefrom its start; see the module documentation for the conventions. - station_
section3 - The section of a 3D curve at
distancefrom its start: plan distance on an elevated or banked curve, arc length on any other; see the module documentation. - station_
section2_ on station_section2readingsideof a seam the station lies on (see the module documentation); off a seam the side does not matter.- station_
section3_ on station_section3readingsideof a seam the station lies on (see the module documentation); off a seam the side does not matter.