Skip to main content

Module station

Module station 

Source
Expand description

Stations along a graph’s curves, resolved (#241, ADR 0082).

A CurveStation node, an OffsetByStations curve, a StationedSpine solid and a SectionedSurface all name positions by a distance along a basis curve. This module resolves them through axiolid_reference::station, whose module documentation states the distance and frame conventions and the accuracy every resolved point carries (the arc-length inverse’s ARC_LENGTH_TOLERANCE where the measure is numerical).

The basis is an atomic 2D or 3D curve node, a curve placed at a station (#264), or a curve relation a distance runs along (#285, #289): a composite, a trim, a surface curve whose 3D curve governs, an offset or an offset curve by stations, nested and placed in any combination, measured as one composite (see Composite bases and Offset bases). An instance and any other relation (a p-curve) are refused by name.

§Meshing between stations

Everything between two stations is interpolated linearly in distance: the offsets, and each section point with its counterpart. The meshed sections stand at the stations and at distances bisected between them until every placed point at an interval’s midpoint is within the chord budget of the midpoint of its chord, and (#247) until each cell’s certified bound fits the budget. The bound module states the exact surface and the bound: a sectioned spine or surface reports DeviationBound::Certified wherever the frame law along its basis has certified derivative bounds – since #316 also where it reads its frame by quadrature, on an ellipse, a B-spline or an offset beside a curve in closed form, and since #361 on an intrinsic plan (a clothoid, or lines, arcs and transitions in one piecewise law), alone or under an elevation – and, since #396, a banked curve over it with the roll bounded from the cant law – and DeviationBound::Unbounded by name elsewhere (a frame on a chain, on a banked curve over one or on an intrinsic space curve with torsion or tilted, an offset beside an intrinsic curve or a chain, different curved profiles that do not pair). A cell beside a mitre is bounded (#335) against the exact mitred solid, see seams.

Different curved profiles that pair segment for segment (#361) – lines, circular and elliptic arcs, matched by ring and segment index after orientation – are flattened together (axiolid_construct::profile::paired_profile_rings): each segment is cut into one common number of equal steps of its own parameter, so a vertex of one section is matched to the vertex at the same fraction of the other and the flattening bound holds for every interpolated section, not only the stations. That bound is the profile’s share, and the fold margin. A polyline or B-spline segment, another segment family or a different segment structure does not pair and stays unbounded by name; the exact compiler refuses a curved section that changes either way.

A spine whose section planes fold is no solid (#361), and a sectioned surface or open-section run alike no sheet (#407): where a section vertex lies on the inner side of a bend at or past its centre of curvature, or recedes along the tangent faster than the basis advances, the planes stop advancing and the sections cross. The spine is refused as invalid input, by this compiler and the exact one alike, wherever the frame law has a closed-form bend (unturned sections), a touch within rounding included; for a turned section or a frame read by quadrature the bound module’s conservative bound never refuses and reports DeviationBound::Unbounded by name when it cannot exclude a fold. The check is local: a run that meets itself far away is not detected (#407); a turned section or a frame read by quadrature is never refused (#406).

The exact module builds the runs with a closed form exactly (#247): a constant section along a line or a straight polyline (an extrusion) or along a horizontal circle (a revolution), and a linear taper of straight-edged sections along a straight basis (a planar polyhedron).

§Orientation and tags (#246)

An OrientedCurveStation and the sections of a SectionsAtStations spine or an OpenSectionsAtStations surface may carry an explicit orientation, which turns the frame a profile is placed in (and a resolved station presents) while the offsets stay in the base frame; between two sections the unit axis and reference direction are interpolated linearly in the base frame and orthonormalised again. Tagged sections are matched by tag: an open section’s polyline is reversed when its tags run backwards, and a closed section’s rings are re-ordered and re-started so that every ring lines up with the first section’s, which needs a polygonal contour. The rules are axiolid_model::station’s; a mismatch is refused by name.

§Seams (#263)

A station on a seam of its basis curve (axiolid_reference::station’s module documentation says when it is on one) reads the piece its SeamSide names: an OrientedCurveStation’s own side, the outgoing piece for a plain CurveStation. A run of sections or offsets reads the outgoing piece at its first station and the incoming one at its last, the pieces it lies on. Where it crosses a seam whose two tangents differ – between two stations, or at a station standing on the seam – it gets a section in the seam’s Mitre plane, the bisector of the two tangents, each side’s placement projected along its own tangent onto the plane; the sampling meets that section exactly and refines on either side of it as before. A near reversal is refused by name. A seam whose tangents agree (a chain join, a jump in a banked curve’s roll alone) is sampled as before.

The deviation reported across a mitre (#335) is measured against the exact mitred solid: each side’s surface extruded past its end along its end tangent and cut by the mitre plane, moved along its normal by the longitudinal offset, plus the planar faces between the two cuts. The mesh keeps its one mitre row, the midpoint of the projections; the bound module’s mitre states the bound per cell. A cell that does not cross the plane transversally, or lies between two mitres on a curved piece or with a changing section, is unbounded by name and refined; a gap between the mitre row and a side’s cut that no refinement removes is reported as it is.

An OrientedCurveStation may carry a seam-snapping window (#294), a distance in its basis’s measure: within it of exactly one seam whose frame may jump, the station is read ON that seam from its side, its point the seam’s (axiolid_reference::station::window states the rule); a window holding two seams, or with one whose certified position straddles its edge, is refused by name. Every resolution of an oriented station applies it: resolve, placement and so an InstanceAtStation wherever it is compiled or used as a basis. A numerical joint (after an offset, an ellipse or a B-spline piece) is located by its certified interval (axiolid_reference::station::CompositeBasis::joint_intervals).

The stations of a run carry a window and a side too (#301): the sections of a SectionsAtStations spine or an OpenSectionsAtStations surface, and the stations of an OffsetsAtStations curve. Each is snapped by the same rule before the run is read, and the run then stands on the snapped distances; snapped distances that no longer increase strictly are refused by name. An interior station snapped onto a seam whose tangents differ is the mitre’s knot, so its section is the mitre section whatever side it names; the run’s first station reads the outgoing piece and its last the incoming one, as before; an interior station on a seam whose tangents agree is placed in the frame of the side it names. An offset by stations used as a basis breaks its law at the snapped distances.

A station of an OffsetsAtStations curve may stand at its basis’s start or end without stating the distance (#303, axiolid_model::RunStation::at_basis_end). It is resolved before the run is snapped: the start to 0, the end to the basis’s length by the kernel’s own measure, the length curve_path states for the basis as axiolid_reference::station::CompositeBasis measures it, bitwise (a line’s parameter domain |d|, as #298 resolves an open path end). The resolved distances must increase strictly, so a stated station at or past the basis’s end is refused by name; the windows then snap them as above. Every reading of the offset resolves alike: swept as a directrix, and flattened as a basis or by curve_path.

seams reads where a graph curve’s seams are without evaluating it: an atomic curve’s from its stored data, a composite basis’s joints at the running sum of its pieces’ lengths with each piece’s own seams inside it (#285).

§Placing at a station (#264)

An InstanceAtStation reuses a node in the frame of an oriented station: placement resolves that station exactly as resolve does (its frame, orientation and seam side) and returns the rigid motion taking the source’s local x, y, z onto the oriented tangent, left lateral and up, its origin onto the station’s point (axiolid_model::station names the mapping). The frame is exact only on a line (ResolvedPlacement::exact); on any other basis it is the exact curve’s at a distance read by an estimate, and placement_accuracy states how far the placement lies from the exact one (#405): PlacementAccuracy::Certified on a circle, a polyline, an elevated or banked curve over a line or a circle, an intrinsic plan alone or under a closed-form profile and composites of them, where a mesh placed in it reports the frame’s error as a certified StationPlacement contribution that grows every bound of the instance; PlacementAccuracy::Unbounded by name elsewhere, where it reports its placement DeviationBound::Unbounded. The accuracy module states the bound.

A station along a placed curve is its source’s station carried by the placement: a rigid motion keeps arc length, and one that keeps +Z keeps plan distance and carries the source’s section frame (reference-up, banked or 2D) onto the placed curve’s own. Where the placement tilts +Z (#285), an arc-length-measured source’s station keeps its carried point and tangent and takes the placed curve’s own reference-up frame against +Z, since the carried frame is not it; an elevated or banked source so placed is refused by name, its plan distance not being the placed curve’s (axiolid_reference::station::SectionFrame::carried). The source may be any curve a station can be measured along, a relation included.

§Composite bases (#285)

A curve relation is flattened into the spans of atomic curves it runs along (axiolid_reference::station::StationPiece), read as a composite directrix reads it: segments in order, one whose sense disagrees reversed, an untrimmed line its domain [0, 1], a trim between the parameters its selectors name (a closed conic’s possibly across its parameter seam), a trim of a relation between parameter selectors read as its arc length, a placed curve carried by its placement. The spans are measured as one axiolid_reference::station::CompositeBasis, whose module documentation states the rules:

  • the distance runs end to end through the pieces, each in its own convention, all of which must agree: plan distance when every piece is an elevated or banked curve, arc length when none is (so a composite of segments placed at stations of an elevated curve is measured in its own segments’ arc length); mixed pieces are refused by name;
  • consecutive pieces must meet within axiolid_reference::station::JOINT_TOLERANCE (relative); a gap and a piece whose undeclared sense runs it backwards are refused by name;
  • every joint is a seam under the #263 rule: a station on it reads the piece its SeamSide names, the incoming one at its end or the outgoing one at its start; a run crossing a joint whose tangents differ is mitred there like any seam;
  • a frame on a composite is exact only where every piece up to and including the one read is a line placed, if at all, exactly (ResolvedPlacement::exact).

§Curve paths (#290)

curve_path hands out the flattening itself: the relation as an owned axiolid_curve::CurvePath, the neutral pieces a consumer reads through the curve-evaluation contract’s path_point_at_on, path_tangent_at_on and path_frame_at_on. The reference provider measures it with the same CompositeBasis a station here is resolved by, so a placement framed through the contract agrees with the station lowered as geometry.

§Offset bases (#289)

A constant offset (2D: along the left normal; 3D: along V x T) and an offset curve by stations are flattened into offset pieces (axiolid_reference::station::offset_pieces): the basis split at every seam of its pieces and, for an offset by stations, at every station, so each seam of the basis and each break of the distance law is a joint of the offset. A station along it is measured in the offset’s OWN length from its start (its own plan length beside an elevated or banked curve) and framed by its own section frame; the axiolid_reference::station::offset module documentation states the closed forms (a line beside a line, exact; a circle beside a circle), the numerical reading of every other offset (never exact, so a placement on it is unbounded) and the refusals: a collapse, a cusp, a planar self-crossing, an offset across a corner of its basis where its two sides do not meet, an offset of an offset. A trim of an offset relation is refused by name: an offset takes its basis’s parameter, not its own length.

Structs§

PlacementBound
How far a placement at a station lies from the exact one, see placing at a station.
ResolvedPlacement
A node placed at a station (#264), resolved.
ResolvedStation
A station resolved to a point and a frame.

Enums§

PlacementAccuracy
How far a node placed at a station lies from its exact placement.

Functions§

curve_path
The curve id a distance runs along, flattened into the neutral CurvePath (#290): the pieces a station on it is measured along, its curves copied, to be read through the curve-evaluation contract’s path_* queries.
placement
Resolve an InstanceAtStation node’s placement (#264).
placement_accuracy
How far the placement placement resolves for the InstanceAtStation node id lies from the exact one, its frame law’s quadratures certified to tolerance (see placing at a station).
resolve
Resolve a CurveStation or an OrientedCurveStation node to its point and frame.
seams
Where a graph curve’s seams are, read from its stored data (#263): the distances in its station measure, with the curve’s own parameter.