pub struct HalfSpaceSolid<'m> { /* private fields */ }Expand description
IfcHalfSpaceSolid: an infinite solid on one side of a surface.
See the module documentation. This type is not tessellatable and callers
must route it through a boolean; Self::is_infinite exists so that a
pipeline can assert the invariant rather than discovering it at render time.
Implementations§
Source§impl<'m> HalfSpaceSolid<'m>
impl<'m> HalfSpaceSolid<'m>
Sourcepub fn new(id: EntityId, entity: &'m Entity) -> Self
pub fn new(id: EntityId, entity: &'m Entity) -> Self
Wrap an entity assumed to be an IfcHalfSpaceSolid or a subtype.
Sourcepub fn base_surface(&self) -> GeometryResult<EntityId>
pub fn base_surface(&self) -> GeometryResult<EntityId>
The IfcSurface reference dividing space. Normally an IfcPlane.
TODO: resolve through the surface module once it exists; this crate deliberately does not define a competing surface view.
Sourcepub fn agreement_flag(&self) -> GeometryResult<bool>
pub fn agreement_flag(&self) -> GeometryResult<bool>
Which side of BaseSurface is material.
true means the solid lies on the side the surface normal points away
from. Inverting this silently cuts the wrong half away.
Sourcepub fn is_infinite(&self) -> bool
pub fn is_infinite(&self) -> bool
Is the solid unbounded in every direction?
true for a plain IfcHalfSpaceSolid. false for the two bounded
subtypes, whose extra attributes give a finite region to work in.
Note that even a false here does not make the entity meaningful on its
own: it is still only valid as a boolean operand. What changes is that a
consumer can build a finite body for it.
Sourcepub fn is_bounded(&self) -> bool
pub fn is_bounded(&self) -> bool
Does the concrete type carry a bounding attribute?
Sourcepub fn reject_standalone_use(&self) -> GeometryError
pub fn reject_standalone_use(&self) -> GeometryError
Reject use of this half space anywhere other than a boolean operand.
Exists so the “cannot be tessellated” rule is a single call rather than
a comment every consumer is expected to have read. The error is
crate::GeometryError::Unsupported, because the file is perfectly
valid – it is the requested operation that is not.