pub struct HandrailEvidence { /* private fields */ }Expand description
The handrails along a flight or run.
parts are the stretch’s straight parts (StretchPart), bottom to
top: one for a straight flight or a run. pitch holds the positions
where the pitch line starts, along the first part’s direction (a
flight’s first nosing, a run’s lower end), and where it ends, along the
last part’s (the last nosing or the upper floor’s edge, a run’s upper
end). rails names every requested rail whose body runs along the
stretch, each measured in the frame of one part: it overlaps the
stretch along that part’s direction and lies within the request’s reach
of its sides across it. A rail’s heights are computed, so the evidence
is never exact.
Implementations§
Source§impl HandrailEvidence
impl HandrailEvidence
Sourcepub fn try_new(
request: HandrailRequest,
direction: MetricDirection,
pitch: (ElevationInterval, ElevationInterval),
walking_sides: (ElevationInterval, ElevationInterval),
rails: Vec<(ObjectId, RailMeasurement)>,
evidence: Evidence,
) -> Result<Self, WalkingSurfaceError>
pub fn try_new( request: HandrailRequest, direction: MetricDirection, pitch: (ElevationInterval, ElevationInterval), walking_sides: (ElevationInterval, ElevationInterval), rails: Vec<(ObjectId, RailMeasurement)>, evidence: Evidence, ) -> Result<Self, WalkingSurfaceError>
The handrails answering request along one straight part: the
horizontal direction and the walking surface’s sides across it.
Every rail must be requested, named once and measured in that part;
they are kept in identity order.
Sourcepub fn try_in_parts(
request: HandrailRequest,
parts: Vec<StretchPart>,
pitch: (ElevationInterval, ElevationInterval),
rails: Vec<(ObjectId, RailMeasurement)>,
evidence: Evidence,
) -> Result<Self, WalkingSurfaceError>
pub fn try_in_parts( request: HandrailRequest, parts: Vec<StretchPart>, pitch: (ElevationInterval, ElevationInterval), rails: Vec<(ObjectId, RailMeasurement)>, evidence: Evidence, ) -> Result<Self, WalkingSurfaceError>
The handrails answering request along the straight parts, bottom
to top, at least one. Every rail must be requested, named once and
measured in one of the parts; they are kept in identity order.
Sourcepub fn request(&self) -> &HandrailRequest
pub fn request(&self) -> &HandrailRequest
The request this answers.
Sourcepub fn parts(&self) -> &[StretchPart]
pub fn parts(&self) -> &[StretchPart]
The stretch’s straight parts, bottom to top.
Sourcepub fn direction(&self) -> MetricDirection
pub fn direction(&self) -> MetricDirection
The first part’s horizontal walking direction: the stretch’s, when it is one part.
Sourcepub fn pitch(&self) -> (ElevationInterval, ElevationInterval)
pub fn pitch(&self) -> (ElevationInterval, ElevationInterval)
Where the pitch line starts, along the first part’s direction, and where it ends, along the last part’s.
Sourcepub fn sides(&self) -> (ElevationInterval, ElevationInterval)
pub fn sides(&self) -> (ElevationInterval, ElevationInterval)
Positions of the walking surface’s sides across the first part’s direction: the stretch’s, when it is one part.
Sourcepub fn rails(&self) -> &[(ObjectId, RailMeasurement)]
pub fn rails(&self) -> &[(ObjectId, RailMeasurement)]
The rails running along the stretch, in identity order.
Sourcepub fn bottom_extension(
&self,
rail: &RailMeasurement,
) -> Option<MeasuredInterval>
pub fn bottom_extension( &self, rail: &RailMeasurement, ) -> Option<MeasuredInterval>
How far a rail reaches beyond the bottom of the pitch line, along
the first part’s direction: negative where it starts above it.
None for a rail measured along a later part, which does not run
along the first.
Sourcepub fn top_extension(&self, rail: &RailMeasurement) -> Option<MeasuredInterval>
pub fn top_extension(&self, rail: &RailMeasurement) -> Option<MeasuredInterval>
How far a rail reaches beyond the top of the pitch line, along the
last part’s direction; None for a rail measured along an earlier
part.
Sourcepub fn side_rail(
&self,
side: RailSide,
) -> Result<Vec<&(ObjectId, RailMeasurement)>, Vec<ObjectId>>
pub fn side_rail( &self, side: RailSide, ) -> Result<Vec<&(ObjectId, RailMeasurement)>, Vec<ObjectId>>
The pieces of the handrail along side: every measured rail running
along it (Self::side), bottom to top, part by part. Within a part,
pieces are consecutive when each starts and ends decidably further
along than the one before; two starting or ending where the
positions cannot tell apart, or one lying within another’s stretch
(a second rail beside or below it), leave the order undecided, and
the pieces are returned as Err, named. No rail along the side is an
empty rail.
Sourcepub fn gap(
&self,
a: &RailMeasurement,
b: &RailMeasurement,
) -> Option<MeasuredInterval>
pub fn gap( &self, a: &RailMeasurement, b: &RailMeasurement, ) -> Option<MeasuredInterval>
The gap in plan between two rails: the least horizontal distance
between the rectangles their bodies fill, each along its own part,
zero where they touch or overlap, as an interval sure to hold it.
None when a rail’s positions leave no rectangle it surely fills,
so no upper bound.
Sourcepub fn side(&self, rail: &RailMeasurement) -> Option<RailSide>
pub fn side(&self, rail: &RailMeasurement) -> Option<RailSide>
The side a rail runs along: the one whose half of its part’s walking
surface holds it wholly across, None for a rail that may reach over
the middle.