pub struct BSplineSurface<'m> { /* private fields */ }Expand description
A borrowed view of any IfcBSplineSurface subtype.
Implementations§
Source§impl<'m> BSplineSurface<'m>
impl<'m> BSplineSurface<'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 IfcBSplineSurface subtype.
Sourcepub fn u_degree(&self) -> GeometryResult<usize>
pub fn u_degree(&self) -> GeometryResult<usize>
The u polynomial degree, guaranteed to fit the u control count.
Sourcepub fn v_degree(&self) -> GeometryResult<usize>
pub fn v_degree(&self) -> GeometryResult<usize>
The v polynomial degree, guaranteed to fit the v control count.
Sourcepub fn control_points(&self) -> GeometryResult<ControlPointGrid>
pub fn control_points(&self) -> GeometryResult<ControlPointGrid>
The control point grid, checked to be rectangular.
A ragged grid is not a tensor-product surface, so it cannot be
evaluated at all; catching it here beats an out-of-bounds read in a
kernel’s inner loop. Self::control_point_views resolves the ids.
Sourcepub fn control_point_views<'v>(
&self,
model: &'v Model,
) -> GeometryResult<Vec<Vec<CartesianPoint<'v>>>>
pub fn control_point_views<'v>( &self, model: &'v Model, ) -> GeometryResult<Vec<Vec<CartesianPoint<'v>>>>
The rectangular grid resolved to typed point views, [u][v].
Same shape and u/v convention as Self::control_points. One bad
reference fails the whole grid: a hole in a tensor-product net has
no meaning, so there is no partial result.
Sourcepub fn surface_form(&self) -> BSplineSurfaceForm
pub fn surface_form(&self) -> BSplineSurfaceForm
The declared original form, defaulting to Unspecified.
Sourcepub fn self_intersect(&self) -> Option<bool>
pub fn self_intersect(&self) -> Option<bool>
The asserted SelfIntersect flag; None for .U. or absent.
Sourcepub fn is_rational(&self) -> bool
pub fn is_rational(&self) -> bool
Whether the entity declares the rational subtype.
Sourcepub fn u_knots(&self) -> GeometryResult<Option<KnotVector>>
pub fn u_knots(&self) -> GeometryResult<Option<KnotVector>>
The u knot vector, checked against the u control point count.
Ok(None) for a surface without knots.
Sourcepub fn v_knots(&self) -> GeometryResult<Option<KnotVector>>
pub fn v_knots(&self) -> GeometryResult<Option<KnotVector>>
The v knot vector, checked against the v control point count.
Ok(None) for a surface without knots.
Sourcepub fn weights(&self) -> GeometryResult<Option<Vec<Vec<f64>>>>
pub fn weights(&self) -> GeometryResult<Option<Vec<Vec<f64>>>>
The weight grid, matching the control point grid exactly.
Ok(None) for a non-rational surface. Every weight must be finite and positive:
a zero divides by zero at that control point and a negative one flips
the patch through infinity.
Trait Implementations§
Source§impl<'m> Clone for BSplineSurface<'m>
impl<'m> Clone for BSplineSurface<'m>
Source§fn clone(&self) -> BSplineSurface<'m>
fn clone(&self) -> BSplineSurface<'m>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more