Skip to main content

BSplineSurface

Struct BSplineSurface 

Source
pub struct BSplineSurface<'m> { /* private fields */ }
Expand description

A borrowed view of any IfcBSplineSurface subtype.

Implementations§

Source§

impl<'m> BSplineSurface<'m>

Source

pub fn new(id: EntityId, entity: &'m Entity) -> Self

Wrap an entity known to be an IfcBSplineSurface subtype.

Source

pub fn id(&self) -> EntityId

The entity id.

Source

pub fn u_degree(&self) -> GeometryResult<usize>

The u polynomial degree, guaranteed to fit the u control count.

Source

pub fn v_degree(&self) -> GeometryResult<usize>

The v polynomial degree, guaranteed to fit the v control count.

Source

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.

Source

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.

Source

pub fn surface_form(&self) -> BSplineSurfaceForm

The declared original form, defaulting to Unspecified.

Source

pub fn u_closed(&self) -> Option<bool>

The asserted UClosed flag; None for .U. or absent.

Source

pub fn v_closed(&self) -> Option<bool>

The asserted VClosed flag; None for .U. or absent.

Source

pub fn self_intersect(&self) -> Option<bool>

The asserted SelfIntersect flag; None for .U. or absent.

Source

pub fn knot_spec(&self) -> KnotType

The declared knot type, defaulting to Unspecified.

Source

pub fn has_knots(&self) -> bool

Is this the knotted subtype?

Source

pub fn is_rational(&self) -> bool

Whether the entity declares the rational subtype.

Source

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.

Source

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.

Source

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>

Source§

fn clone(&self) -> BSplineSurface<'m>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'m> Copy for BSplineSurface<'m>

Source§

impl<'m> Debug for BSplineSurface<'m>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'m> Freeze for BSplineSurface<'m>

§

impl<'m> RefUnwindSafe for BSplineSurface<'m>

§

impl<'m> Send for BSplineSurface<'m>

§

impl<'m> Sync for BSplineSurface<'m>

§

impl<'m> Unpin for BSplineSurface<'m>

§

impl<'m> UnsafeUnpin for BSplineSurface<'m>

§

impl<'m> UnwindSafe for BSplineSurface<'m>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.