#[non_exhaustive]pub struct BodyItem {
pub item: EntityId,
pub type_name: String,
pub mapped_by: Vec<EntityId>,
pub kind: BodyKind,
pub swept: Option<SweptSolid>,
pub local_sweep: Option<LocalSweptSolid>,
pub swept_disk: Option<SweptDisk>,
pub item_world: Transform,
pub bounds: Option<BodyItemBounds>,
}Expand description
One geometric representation item of a body.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.item: EntityIdThe geometric item itself, never an IfcMappedItem.
type_name: StringIts concrete IFC type in upper case.
mapped_by: Vec<EntityId>The IfcMappedItems this item was reached through, outermost first.
Empty when the item is authored directly in the body.
kind: BodyKindHow the item models its shape.
swept: Option<SweptSolid>Profile and path in world coordinates, for the swept-area families
(BodyKind::is_swept_area); None for every other kind and for a
swept-area item whose Self::item_world is not rigid (a mapping
scaled or mirrored it). Self::local_sweep still describes it.
local_sweep: Option<LocalSweptSolid>Profile, Position and path in the item’s own frame, for every
swept-area family (BodyKind::is_swept_area); None for every other
kind. These are the authored parameters whatever the mapping does;
Self::item_world places them.
swept_disk: Option<SweptDisk>Radii, directrix and parameter range, for BodyKind::SweptDisk;
None for every other kind. The authored parameters in the item’s own
frame, whatever the mappings do; Self::item_world places them.
item_world: TransformThe frame the item’s own coordinates are placed in, in metres: the
representation context’s WorldCoordinateSystem and the product
placement, composed with every MappingTarget o MappingOrigin in
Self::mapped_by (#185). The identity composition for an item
authored directly in a body at the origin.
Unlike SweptSolid::placement_world it is not required to be rigid:
a mapping may scale or mirror any item kind, and this frame says so.
A swept solid’s world placement is this frame composed with the
solid’s own Position (LocalSweptSolid::position); it is
placement_world when this frame is rigid.
bounds: Option<BodyItemBounds>The exact bounds of a tessellated item’s referenced vertices, in the
representation frame (BodyDescription::frame): the item’s mappings
are applied, the frame is not. The frame maps the corner points: a
world box needs all eight corners transformed, not just min and
max. Some for
BodyKind::Tessellated, None for every other kind.
Implementations§
Source§impl BodyItem
impl BodyItem
Sourcepub fn is_mirrored(&self) -> Option<bool>
pub fn is_mirrored(&self) -> Option<bool>
Whether the item is placed mirrored: Self::item_world reverses
handedness, so a left-hand part appears as its right-hand twin.
None when the frame is degenerate (a zero or non-finite
determinant), which no valid placement or mapping produces.