Expand description
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).
§Where the seams are
station_seams2 and station_seams3 list the places strictly
inside a curve where two of its pieces meet, each as a
StationSeam: its distance in the curve’s station measure (the
parent module’s convention), its native parameter, whether
the stored data guarantees the same section frame on both sides
(StationSeam::smooth), and whether the distance is read from stored
data alone (StationSeam::exact). They are read without evaluating
the curve:
- a polyline’s interior vertices, at the running sum of its segment lengths (a repeated vertex is one seam), not smooth;
- a B-spline’s interior knots of multiplicity at least its degree
(where it may turn a corner), not smooth, and NOT exact: the arc
length to a knot is a quadrature (
crate::arc_parameter); - an intrinsic curve’s curvature (and, in 3D, torsion) law seams, and an arc-length chain’s joins and its intrinsic pieces’ seams, at their stored arc lengths, smooth: the heading is continuous by construction;
- an elevated curve’s plan seams (smooth, as above) and its profile’s seams, where the grade may jump (not smooth); a banked curve’s, and the seams of its cant law (the roll may jump) and its pivot law (the grade of its point path may jump), all at their stored plan distances.
A line, a circle and an ellipse have none. exact_station_seams2 and
exact_station_seams3 refuse, by a typed
GeomError::UnsupportedInput, a curve with a seam that is not exact.
§Which piece a station on a seam reads
A station whose distance lies within ARC_LENGTH_TOLERANCE * max(1, s) of a seam that is not smooth is ON it, and is read at the seam’s
own distance from the piece SeamSide names: the piece that starts
there (SeamSide::Outgoing, what every evaluator reads by default) or
the one that ends there (SeamSide::Incoming). The incoming piece is
read as the curve TRUNCATED at the seam, at its end: a polyline’s
segment ending at the vertex, a B-spline’s span ending at the knot
(the reversed spline’s outgoing span), an elevated curve whose profile,
and a banked curve whose cant and pivot laws, stop at the seam.
§Mitre
Where a run of sections or offsets crosses a seam whose two tangents
differ, its section there stands in the Mitre plane: through the
seam’s point, normal to the bisector n = (t_in + t_out) / |t_in + t_out|. A section point is placed twice, once in each side’s frame,
each projected along its own side’s tangent onto the plane, which is
where that side’s extrusion of the section meets it; the two agree
whenever the outgoing frame is the incoming one turned about t_in x t_out (a plan turn, a grade break on a straight plan), and their
midpoint is taken otherwise. A longitudinal offset moves the section
along n. Tangents within SEAM_TANGENT_TOLERANCE of each other
need no mitre, and a near reversal, |t_in + t_out| / 2 (the cosine of
half the turn) at most MITRE_TOLERANCE, has no usable plane and is
refused by name.
Structs§
- Mitre
- The plane a section stands in where a run crosses a seam whose tangents differ; see the module documentation.
- Station
Seam - A place inside a curve where two of its pieces meet; see the module documentation.
Constants§
- 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. - 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.
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.- 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.