pub struct ToroidalSurface<'m> { /* private fields */ }Expand description
A borrowed view of an IfcToroidalSurface.
Implementations§
Source§impl<'m> ToroidalSurface<'m>
impl<'m> ToroidalSurface<'m>
Sourcepub fn new(id: EntityId, entity: &'m Entity) -> Self
pub fn new(id: EntityId, entity: &'m Entity) -> Self
Wrap an entity known to be an IfcToroidalSurface.
Sourcepub fn position_ref(&self) -> GeometryResult<EntityId>
pub fn position_ref(&self) -> GeometryResult<EntityId>
The placement; local Z is the torus axis.
Sourcepub fn position<'v>(
&self,
model: &'v Model,
) -> GeometryResult<Axis2Placement3D<'v>>
pub fn position<'v>( &self, model: &'v Model, ) -> GeometryResult<Axis2Placement3D<'v>>
The placement as a typed view, resolved from the model.
Self::position_ref returns the raw reference; this resolves it
so callers read location/axis/RefDirection without re-entering the
model themselves. A dangling reference is MissingEntity naming this
surface; any target other than an IfcAxis2Placement3D is
WrongEntityType naming the target.
Sourcepub fn major_radius(&self) -> GeometryResult<f64>
pub fn major_radius(&self) -> GeometryResult<f64>
Distance from the torus centre to the centre of the tube.
Sourcepub fn minor_radius(&self) -> GeometryResult<f64>
pub fn minor_radius(&self) -> GeometryResult<f64>
The tube’s own radius.
Sourcepub fn is_self_intersecting(&self) -> GeometryResult<bool>
pub fn is_self_intersecting(&self) -> GeometryResult<bool>
Is the tube radius at least the major radius?
IFC permits it and it is not an error: minor >= major gives a
self-intersecting “spindle” or “apple” torus rather than a ring. Worth
asking because a kernel that assumes a ring topology will produce
inverted normals on the inner surface, and because it is far more often
a units mistake in the file than a deliberate shape.
Sourcepub fn parameter_kinds(&self) -> (ParameterKind, ParameterKind)
pub fn parameter_kinds(&self) -> (ParameterKind, ParameterKind)
Both parameters are angles: around the axis and around the tube.