Enum structural_shapes::StructuralShape [−][src]
#[non_exhaustive]
pub enum StructuralShape {
Pipe {
outer_radius: Length,
thickness: Length,
center_of_gravity: (Length, Length),
},
IBeam {
width: Length,
height: Length,
web_thickness: Length,
flange_thickness: Length,
center_of_gravity: (Length, Length),
},
BoxBeam {
width: Length,
height: Length,
thickness: Length,
center_of_gravity: (Length, Length),
},
Rod {
radius: Length,
center_of_gravity: (Length, Length),
},
Rectangle {
width: Length,
height: Length,
center_of_gravity: (Length, Length),
},
}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
IBeam
Fields
width: LengthWidth of the beam
height: LengthHeight of the beam
web_thickness: LengthThickness of the web
flange_thickness: LengthThickness of the flange
This is an I-Beam, with a width, height, web thickness, and flange thickness
BoxBeam
Fields
width: LengthWidth of the box beam
height: LengthHeight of the box beam
thickness: LengthThickness of the wall
This is a box beam with a width, height, and thickness
Rod
Fields
radius: LengthRadius of the road
This is a rod with a radius only
Rectangle
This is a solid rectangular with width and height
Implementations
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();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();Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for StructuralShape
impl Send for StructuralShape
impl Sync for StructuralShape
impl Unpin for StructuralShape
impl UnwindSafe for StructuralShape
Blanket Implementations
Mutably borrows from an owned value. Read more
