pub struct Transition { /* private fields */ }Expand description
A transition between two diameters: a boattail narrowing toward the tail, or a cone stepping the airframe up or down. Its fore end takes the diameter of the body part before it.
Implementations§
Source§impl Transition
impl Transition
Sourcepub fn from_catalog(part: &Part) -> Result<Self, Error>
pub fn from_catalog(part: &Part) -> Result<Self, Error>
The catalog transition part, as the module says: both ends their own
diameters, each shoulder (if any) its own radius, named by its maker and number.
§Errors
Error::Catalog: CatalogProblem::Kind for a part of another kind,
CatalogProblem::UndefinedMaterial for one whose material its file doesn’t define,
CatalogProblem::NoWall for one neither filled nor given a wall,
CatalogProblem::Shape for a shape the builder doesn’t know,
CatalogProblem::NoVolume for one that states a mass but has no volume to hold it;
Error::Domain for a stated mass that is negative or not finite; and Error::Design
for one that states a mass but whose sizes can’t be weighed, such as a bore no narrower
than its outside (a part that states no mass is refused for that when it is added).
Source§impl Transition
impl Transition
Sourcepub fn conical(
length_m: f64,
aft_diameter_m: f64,
wall_m: f64,
material: Material,
) -> Self
pub fn conical( length_m: f64, aft_diameter_m: f64, wall_m: f64, material: Material, ) -> Self
A hollow conical transition length_m long, to aft_diameter_m at its aft end, with a
wall wall_m thick.
Sourcepub fn with_shape(self, shape: NoseShape) -> Self
pub fn with_shape(self, shape: NoseShape) -> Self
The same transition with the profile shape instead of a cone. It stays clipped, or
not, as it was (Transition::with_clipped).
Sourcepub fn with_clipped(self, clipped: bool) -> Self
pub fn with_clipped(self, clipped: bool) -> Self
The same transition with its profile cut from a whole nose cone (true), or scaled
between its two radii (false, as Transition::conical makes it):
hpr_design::Transition::clipped. A conical or tangent-ogive transition is the same
either way.
Trait Implementations§
Source§impl Clone for Transition
impl Clone for Transition
Source§fn clone(&self) -> Transition
fn clone(&self) -> Transition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for Transition
impl Debug for Transition
Source§impl<'de> Deserialize<'de> for Transition
impl<'de> Deserialize<'de> for Transition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for Transition
impl PartialEq for Transition
Source§fn eq(&self, other: &Transition) -> bool
fn eq(&self, other: &Transition) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for Transition
impl Serialize for Transition
impl StructuralPartialEq for Transition
Auto Trait Implementations§
impl Freeze for Transition
impl RefUnwindSafe for Transition
impl Send for Transition
impl Sync for Transition
impl Unpin for Transition
impl UnsafeUnpin for Transition
impl UnwindSafe for Transition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more