Skip to main content

BodyKind

Enum BodyKind 

Source
#[non_exhaustive]
pub enum BodyKind {
Show 19 variants Extrusion, TaperedExtrusion, Revolution, TaperedRevolution, DirectrixSweep, SweptDisk, SectionedSpine, Brep, Csg, CsgPrimitive, HalfSpace, BoundingBox, Tessellated, SurfaceModel, Face, GeometricSet, Curve, Surface, Point,
}
Expand description

How one representation item models its shape.

Finer than crate::solid::SolidKind, which groups every sweep as Swept: a rule check that allows extrusions but not directrix sweeps needs the distinction. The concrete IFC type is reported beside the kind, so a caller that needs more detail than the kind states can read it.

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

Extrusion

IfcExtrudedAreaSolid: a profile swept along a straight direction.

§

TaperedExtrusion

IfcExtrudedAreaSolidTapered: an extrusion lofted to an end profile.

§

Revolution

IfcRevolvedAreaSolid: a profile swept about an axis.

§

TaperedRevolution

IfcRevolvedAreaSolidTapered: a revolution lofted to an end profile.

§

DirectrixSweep

IfcFixedReferenceSweptAreaSolid or IfcSurfaceCurveSweptAreaSolid: a profile swept along a directrix curve.

§

SweptDisk

IfcSweptDiskSolid or IfcSweptDiskSolidPolygonal: a circular disk swept along a curve.

§

SectionedSpine

IfcSectionedSpine: cross sections interpolated along a spine.

§

Brep

A faceted or advanced boundary representation, with or without voids.

§

Csg

IfcCsgSolid, IfcBooleanResult or IfcBooleanClippingResult: a boolean tree.

§

CsgPrimitive

A CSG primitive: IfcBlock, IfcSphere, IfcRightCircularCylinder, IfcRightCircularCone or IfcRectangularPyramid.

§

HalfSpace

A half space. Infinite; only meaningful as a boolean operand.

§

BoundingBox

IfcBoundingBox: a proxy extent, not a shape.

§

Tessellated

IfcTriangulatedFaceSet or IfcPolygonalFaceSet.

§

SurfaceModel

IfcShellBasedSurfaceModel or IfcFaceBasedSurfaceModel. Never a solid, even when every shell is closed.

§

Face

IfcFaceSurface or IfcAdvancedFace: one bounded face on a carrier surface. Never a solid: a single face encloses nothing.

§

GeometricSet

IfcGeometricSet or IfcGeometricCurveSet.

§

Curve

Any IfcCurve.

§

Surface

Any IfcSurface.

§

Point

IfcPointOnCurve or IfcPointOnSurface.

Implementations§

Source§

impl BodyKind

Source

pub fn classify(type_name: &str) -> Option<Self>

Classify a representation item’s IFC type name, case-insensitively.

None for IfcMappedItem (resolved, not classified) and for anything that is not a representation item family this crate interprets.

Source

pub fn is_swept_area(self) -> bool

Is this a swept-area family, whose profile crate::SweptSolid describes?

Trait Implementations§

Source§

impl Clone for BodyKind

Source§

fn clone(&self) -> Self

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 Copy for BodyKind

Source§

impl Debug for BodyKind

Source§

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

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

impl Eq for BodyKind

Source§

impl Hash for BodyKind

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for BodyKind

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BodyKind

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.