pub struct PolygonalBoundedHalfSpace<'m> { /* private fields */ }Expand description
IfcPolygonalBoundedHalfSpace: a half space clipped by an extruded polygon.
§How the bounding actually works
This is the single most misread entity in IFC clipping, so, precisely:
Positionis anIfcAxis2Placement3Destablishing a local coordinate system. It is independent ofBaseSurface; the two need not share an origin or an orientation.PolygonalBoundaryis a 2D bounded curve (anIfcPolylineor anIfcCompositeCurve, and in IFC4X3 also anIfcIndexedPolyCurve, per the schema’sBoundaryTyperule) lying in the XY plane ofPosition. Its coordinates are 2D, so it is not a curve in world space and cannot be used without applyingPosition.- The bounding body is that polygon extruded along +Z of
Position, unbounded in that direction. - The final solid is the intersection of that prism with the infinite half
space defined by
BaseSurfaceandAgreementFlag.
The consequence is that the polygon does not lie on the base surface and should never be projected onto it. Doing so produces a clip of roughly the right shape in roughly the wrong place, which is why bad wall openings look almost correct.
Implementations§
Source§impl<'m> PolygonalBoundedHalfSpace<'m>
impl<'m> PolygonalBoundedHalfSpace<'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 IfcPolygonalBoundedHalfSpace.
Sourcepub fn base(&self) -> HalfSpaceSolid<'m>
pub fn base(&self) -> HalfSpaceSolid<'m>
The inherited IfcHalfSpaceSolid attributes.
Sourcepub fn position(&self) -> GeometryResult<EntityId>
pub fn position(&self) -> GeometryResult<EntityId>
The IfcAxis2Placement3D whose XY plane holds the boundary.
Required here, unlike the optional Position on IfcSweptAreaSolid:
without it the 2D boundary cannot be placed at all.
Sourcepub fn polygonal_boundary(&self) -> GeometryResult<EntityId>
pub fn polygonal_boundary(&self) -> GeometryResult<EntityId>
The 2D IfcBoundedCurve reference bounding the half space.
Its coordinates are in the XY plane of Self::position; the clipping
body is this curve extruded along that placement’s +Z.
Returned as a reference on purpose. The attribute is typed as the
abstract IfcBoundedCurve, so there is no single view to resolve
into: lower::halfspace dispatches on the concrete curve type
(refusing the families it does not lower by name) and the typed views
live in crate::curve.
Trait Implementations§
Source§impl<'m> Clone for PolygonalBoundedHalfSpace<'m>
impl<'m> Clone for PolygonalBoundedHalfSpace<'m>
Source§fn clone(&self) -> PolygonalBoundedHalfSpace<'m>
fn clone(&self) -> PolygonalBoundedHalfSpace<'m>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more