Enum StructuralShape

Source
#[non_exhaustive]
pub enum StructuralShape { Pipe { outer_radius: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>), }, IBeam { width: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, height: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, web_thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, flange_thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>), }, BoxBeam { width: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, height: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>), }, Rod { radius: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>), }, Rectangle { width: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, height: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>), }, }
Expand description

This enum contains different structural shapes

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Pipe

This is a pipe with an outer_radius and a thickness

Fields

§outer_radius: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Outer radius of hte pipe

§thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Thickness of the pipe wall

§center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>)

Coordinates of center of gravity

§

IBeam

This is an I-Beam, with a width, height, web thickness, and flange thickness

Fields

§width: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Width of the beam

§height: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Height of the beam

§web_thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Thickness of the web

§flange_thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Thickness of the flange

§center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>)

Coordinates of center of gravity

§

BoxBeam

This is a box beam with a width, height, and thickness

Fields

§width: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Width of the box beam

§height: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Height of the box beam

§thickness: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Thickness of the wall

§center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>)

Coordinates of center of gravity

§

Rod

This is a rod with a radius only

Fields

§radius: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Radius of the road

§center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>)

Coordinates of center of gravity

§

Rectangle

This is a solid rectangular with width and height

Fields

§width: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Width of the rectangle

§height: Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

Height of the rectangle

§center_of_gravity: (Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>, Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UTerm, B1>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>)

Coordinates of center of gravity

Implementations§

Source§

impl StructuralShape

Source

pub fn moi_x( &self, ) -> Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

This function returns the moment of inertia of the structural shape around the x-axis

let shape = StructuralShape::Rod{radius: length(2.0), center_of_gravity: point(0.0, 0.0)};
let moi = shape.moi_x();
Source

pub fn moi_y( &self, ) -> Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UInt<UInt<UTerm, B1>, B0>, B0>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

This function returns the moment of inertia of hte structural shape around the y-axis

let shape = StructuralShape::Rod{radius: length(2.0), center_of_gravity: point(0.0, 0.0)};
let area = shape.moi_y();
Source

pub fn area( &self, ) -> Quantity<dyn Dimension<Kind = dyn Kind, Th = Z0, L = PInt<UInt<UInt<UTerm, B1>, B0>>, N = Z0, T = Z0, I = Z0, M = Z0, J = Z0>, dyn Units<f64, thermodynamic_temperature = kelvin, time = second, amount_of_substance = mole, electric_current = ampere, luminous_intensity = candela, length = meter, mass = kilogram>, f64>

This function returns the cross-sectional area of the structural shape

let shape = StructuralShape::Rod{radius: length(2.0), center_of_gravity: point(0.0, 0.0)};
let area = shape.area();

Trait Implementations§

Source§

impl Clone for StructuralShape

Source§

fn clone(&self) -> StructuralShape

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for StructuralShape

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Copy for StructuralShape

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.