Skip to main content

PlacedSolid

Struct PlacedSolid 

Source
pub struct PlacedSolid<'a> {
    pub name: String,
    pub instance: String,
    pub reader: Reader<'a>,
    pub model: Cow<'a, NamedModel>,
    pub solid: SolidId,
    pub pose: Option<Pose>,
}
Expand description

A solid of a part, or of a part placed in it: named as the part names it (/pin:extrude(pin) for one of the part placed as pin, see Located::key), where it is.

Fields§

§name: String§instance: String

The path of the part placed it is of: empty for the part’s own.

§reader: Reader<'a>

The part it is a solid of — whose material it is made of.

§model: Cow<'a, NamedModel>§solid: SolidId§pose: Option<Pose>

Where its part is placed; None for the part’s own solids.

Implementations§

Source§

impl PlacedSolid<'_>

Source

pub fn thickness(&self) -> Option<f64>

The thickness of the sheet it is bent from (mm), for a sheet-metal body (see crate::SolidNote::thickness).

Source

pub fn material(&self) -> Option<Material>

What it is made of: its part’s material, none where it is not given.

Source

pub fn shape_properties( &self, shapes: &mut Shapes, ) -> GeopResult<MassProperties>

The mass properties of its shape alone, where it is: of density one, so its mass is its volume and its centre the centroid — what it has whatever it is made of. Its shape’s are taken from shapes.

Source

pub fn mass_properties( &self, shapes: &mut Shapes, ) -> GeopResult<Option<MassProperties>>

Its mass properties, where it is, of its part’s material: none for a solid of no material, which has no mass. Its shape’s are taken from shapes.

Auto Trait Implementations§

§

impl<'a> !RefUnwindSafe for PlacedSolid<'a>

§

impl<'a> !Send for PlacedSolid<'a>

§

impl<'a> !Sync for PlacedSolid<'a>

§

impl<'a> !UnwindSafe for PlacedSolid<'a>

§

impl<'a> Freeze for PlacedSolid<'a>

§

impl<'a> Unpin for PlacedSolid<'a>

§

impl<'a> UnsafeUnpin for PlacedSolid<'a>

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> 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, 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.