Skip to main content

PrimitiveSolid

Enum PrimitiveSolid 

Source
pub enum PrimitiveSolid {
    Box {
        length: Length,
        width: Length,
        height: Length,
    },
    Cylinder {
        radius: Length,
        height: Length,
        angle: Angle,
    },
    Cone {
        radius1: Length,
        radius2: Length,
        height: Length,
        angle: Angle,
    },
    Sphere {
        radius: Length,
        latitude1: Angle,
        latitude2: Angle,
        longitude: Angle,
    },
    Ellipsoid {
        x_radius: Length,
        y_radius: Length,
        z_radius: Length,
        latitude1: Angle,
        latitude2: Angle,
        longitude: Angle,
    },
    Torus {
        major_radius: Length,
        minor_radius: Length,
        latitude1: Angle,
        latitude2: Angle,
        longitude: Angle,
    },
    Prism {
        sides: u32,
        circumradius: Length,
        height: Length,
    },
    Wedge {
        xmin: Length,
        ymin: Length,
        zmin: Length,
        x2min: Length,
        z2min: Length,
        xmax: Length,
        ymax: Length,
        zmax: Length,
        x2max: Length,
        z2max: Length,
    },
}
Expand description

Canonical dimensions of an analytic solid primitive.

Variants§

§

Box

Rectangular solid aligned to its feature frame.

Fields

§length: Length

Size along the local x-axis.

§width: Length

Size along the local y-axis.

§height: Length

Size along the local z-axis.

§

Cylinder

Circular cylinder aligned to its feature-frame z-axis.

Fields

§radius: Length

Circular base radius.

§height: Length

Axial height.

§angle: Angle

Angular sweep around the axis.

§

Cone

Circular cone or frustum aligned to its feature-frame z-axis.

Fields

§radius1: Length

Radius at the local-frame origin.

§radius2: Length

Radius at the opposite end.

§height: Length

Axial height.

§angle: Angle

Angular sweep around the axis.

§

Sphere

Spherical segment.

Fields

§radius: Length

Sphere radius.

§latitude1: Angle

Lower latitude bound.

§latitude2: Angle

Upper latitude bound.

§longitude: Angle

Longitudinal sweep.

§

Ellipsoid

Ellipsoidal segment aligned to its feature frame.

Fields

§x_radius: Length

Radius along local x.

§y_radius: Length

Radius along local y.

§z_radius: Length

Radius along local z.

§latitude1: Angle

Lower latitude bound.

§latitude2: Angle

Upper latitude bound.

§longitude: Angle

Longitudinal sweep.

§

Torus

Toroidal segment aligned to its feature frame.

Fields

§major_radius: Length

Distance from the axis to the tube center.

§minor_radius: Length

Tube radius.

§latitude1: Angle

Lower tube-angle bound.

§latitude2: Angle

Upper tube-angle bound.

§longitude: Angle

Sweep around the torus axis.

§

Prism

Regular polygonal prism aligned to its feature frame.

Fields

§sides: u32

Number of polygon sides.

§circumradius: Length

Distance from polygon center to each vertex.

§height: Length

Axial height.

§

Wedge

General wedge defined by two x-z profiles across a y interval.

Fields

§xmin: Length

Lower x bound.

§ymin: Length

Lower y bound.

§zmin: Length

Lower z bound.

§x2min: Length

Inner x coordinate on the lower-y profile.

§z2min: Length

Inner z coordinate on the lower-y profile.

§xmax: Length

Upper x bound.

§ymax: Length

Upper y bound.

§zmax: Length

Upper z bound.

§x2max: Length

Inner x coordinate on the upper-y profile.

§z2max: Length

Inner z coordinate on the upper-y profile.

Trait Implementations§

Source§

impl Clone for PrimitiveSolid

Source§

fn clone(&self) -> PrimitiveSolid

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PrimitiveSolid

Source§

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

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

impl<'de> Deserialize<'de> for PrimitiveSolid

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl JsonSchema for PrimitiveSolid

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for PrimitiveSolid

Source§

fn eq(&self, other: &PrimitiveSolid) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for PrimitiveSolid

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for PrimitiveSolid

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

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

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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.