#[non_exhaustive]pub struct Mitre {
pub incoming: SectionFrame,
pub outgoing: SectionFrame,
pub normal: DVec3,
}Expand description
The plane a section stands in where a run crosses a seam whose tangents differ; see the module documentation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.incoming: SectionFrameThe section frame of the piece ending at the seam.
outgoing: SectionFrameThe section frame of the piece starting there.
normal: DVec3Unit normal of the mitre plane, (t_in + t_out) / |t_in + t_out|.
Implementations§
Source§impl Mitre
impl Mitre
Sourcepub fn between(
incoming: &SectionFrame,
outgoing: &SectionFrame,
) -> Result<Option<Mitre>, GeomError>
pub fn between( incoming: &SectionFrame, outgoing: &SectionFrame, ) -> Result<Option<Mitre>, GeomError>
The mitre between the two frames of a seam, or None when their
tangents agree within SEAM_TANGENT_TOLERANCE.
§Errors
Tangents that nearly reverse (the cosine of half the turn at most
MITRE_TOLERANCE), and two frames that do not share their point
(a seam that is not position continuous), by name.
Sourcepub fn place(
&self,
incoming: DVec3,
outgoing: DVec3,
longitudinal: f64,
) -> DVec3
pub fn place( &self, incoming: DVec3, outgoing: DVec3, longitudinal: f64, ) -> DVec3
A section point in the mitre plane: incoming and outgoing are
the same section point placed in each side’s frame (without a
longitudinal offset); each is projected along its side’s tangent
onto the plane, and the midpoint is moved longitudinal along the
normal.