pub struct TreadFlight { /* private fields */ }Expand description
A stair flight measured from its body.
The flight rises from base, its body’s lowest point, through its treads
in ascending order, to top, its body’s highest point. The first riser
runs from the base to the first tread: the flight is taken to stand on
the level it starts from. When the top lies above the last tread, the
flight ends in a riser from the last tread to the top, meeting the upper
floor; when it lies no higher than the last tread’s surface, the last
tread is the top step. A top the intervals cannot place either way is
refused.
Implementations§
Source§impl TreadFlight
impl TreadFlight
Sourcepub fn try_new(
request: TreadFlightRequest,
walking_line: WalkingLine,
base: ElevationInterval,
top: ElevationInterval,
treads: Vec<Tread>,
evidence: Evidence,
) -> Result<Self, WalkingSurfaceError>
pub fn try_new( request: TreadFlightRequest, walking_line: WalkingLine, base: ElevationInterval, top: ElevationInterval, treads: Vec<Tread>, evidence: Evidence, ) -> Result<Self, WalkingSurfaceError>
The flight answering request, climbing along walking_line.
Treads must be given bottom to top, strictly ascending in elevation and in front position; the base must lie below the first tread and the top at or above the last, decidably. A straight line must be horizontal, a turning one at least two distinct plan points. The evidence is exact exactly when every position is a point.
Sourcepub fn with_final_riser(self, riser: RiserClosure) -> Self
pub fn with_final_riser(self, riser: RiserClosure) -> Self
The flight with whether its final riser, from the last tread to the top, closes the step; ignored when the flight ends on its last tread.
Sourcepub fn request(&self) -> &TreadFlightRequest
pub fn request(&self) -> &TreadFlightRequest
The request this answers.
Sourcepub fn walking_line(&self) -> &WalkingLine
pub fn walking_line(&self) -> &WalkingLine
The line the flight climbs along.
Sourcepub fn base(&self) -> ElevationInterval
pub fn base(&self) -> ElevationInterval
Elevation of the body’s lowest point, where the first riser starts.
Sourcepub fn top(&self) -> ElevationInterval
pub fn top(&self) -> ElevationInterval
Elevation of the body’s highest point.
Sourcepub fn ends_in_riser(&self) -> bool
pub fn ends_in_riser(&self) -> bool
Whether the flight ends in a riser above its last tread.
Sourcepub fn risers(&self) -> Vec<MeasuredInterval>
pub fn risers(&self) -> Vec<MeasuredInterval>
Riser heights, bottom to top: from the base to the first tread, between consecutive treads, and from the last tread to the top when the flight ends in a riser. Their number is the flight’s number of risers (steps).
Sourcepub fn riser_closures(&self) -> Vec<RiserClosure>
pub fn riser_closures(&self) -> Vec<RiserClosure>
Whether each riser closes its step, in the order of
Self::risers: the riser below each tread, then the final riser
when the flight ends in one.
Sourcepub fn goings(&self) -> Vec<MeasuredInterval>
pub fn goings(&self) -> Vec<MeasuredInterval>
Goings, bottom to top: the distance along the walking line from
each tread’s nosing to the next one’s. A flight of n treads has
n - 1 goings.
Sourcepub fn nosings(&self) -> Vec<MeasuredInterval>
pub fn nosings(&self) -> Vec<MeasuredInterval>
Nosing projections, bottom to top: how far each tread above the first reaches over the tread below it, the lower tread’s back less the upper tread’s front. Zero or less where it does not overhang.
Sourcepub fn winder_angles(&self) -> Vec<Option<MeasuredInterval>>
pub fn winder_angles(&self) -> Vec<Option<MeasuredInterval>>
Winder angles, bottom to top: for each tread below the last, the
plan angle between its nosing and the next tread’s, 0 for a
straight tread. None where a nosing is not measured or too short
for its uncertainty to fix a direction.
Sourcepub fn rise(&self) -> MeasuredInterval
pub fn rise(&self) -> MeasuredInterval
The flight’s rise: from the base to the top of its last riser.
Sourcepub fn width(&self) -> Option<MeasuredInterval>
pub fn width(&self) -> Option<MeasuredInterval>
The flight’s width: its narrowest tread’s, when every tread’s sides were measured.