pub enum SurfaceKind {
Plane,
CylindricalSurface,
SphericalSurface,
ToroidalSurface,
SurfaceOfLinearExtrusion,
SurfaceOfRevolution,
CurveBoundedPlane,
CurveBoundedSurface,
RectangularTrimmedSurface,
BSplineSurface,
BSplineSurfaceWithKnots,
RationalBSplineSurfaceWithKnots,
}Expand description
Which IfcSurface subtype an entity is.
Dispatch on the type name once, then construct the matching view. Returning
None rather than an error keeps “not a surface” separate from “a surface
we cannot read”, which callers scanning a representation need.
Variants§
Plane
IfcPlane.
CylindricalSurface
IfcCylindricalSurface.
SphericalSurface
IfcSphericalSurface.
ToroidalSurface
IfcToroidalSurface.
SurfaceOfLinearExtrusion
IfcSurfaceOfLinearExtrusion.
SurfaceOfRevolution
IfcSurfaceOfRevolution.
CurveBoundedPlane
IfcCurveBoundedPlane.
CurveBoundedSurface
IfcCurveBoundedSurface.
RectangularTrimmedSurface
IfcRectangularTrimmedSurface.
BSplineSurface
IfcBSplineSurface and its non-knotted form.
BSplineSurfaceWithKnots
IfcBSplineSurfaceWithKnots.
RationalBSplineSurfaceWithKnots
IfcRationalBSplineSurfaceWithKnots.
Implementations§
Source§impl SurfaceKind
impl SurfaceKind
Sourcepub fn classify(type_name: &str) -> Option<Self>
pub fn classify(type_name: &str) -> Option<Self>
Classify by IFC type name, None if not an IfcSurface subtype.
Sourcepub fn is_elementary(self) -> bool
pub fn is_elementary(self) -> bool
Is this an IfcElementarySurface?
The distinguishing property is not “analytic” but unbounded: these are the surfaces that need a container to supply their extent.
Sourcepub fn is_bounded(self) -> bool
pub fn is_bounded(self) -> bool
Is this an IfcBoundedSurface?
The only branch that carries its own extent, so the only branch that can be meshed without asking its container how far to go.
Sourcepub fn has_basis_surface(self) -> bool
pub fn has_basis_surface(self) -> bool
Does this surface delegate its shape to another surface?
True for the trimming and curve-bounding wrappers, whose BasisSurface
must be resolved before anything can be evaluated. A consumer that does
not follow the chain silently drops the geometry.