Struct PeriodicBSplineSurface

Source
pub struct PeriodicBSplineSurface { /* private fields */ }
Expand description

An owned tensor-product B-spline surface with validated cyclic axes.

A periodic axis uses the standard expanded periodic representation: the final degree control rows or columns exactly repeat the first degree, and the expanded knot vector repeats after one active period. Parameters on that axis are evaluated modulo the half-open active domain. The wrapped neutral BSplineSurface remains available for serialization and for algorithms that understand the same explicit representation.

Construction is additive: the neutral evaluator continues to clamp native parameters and does not infer cyclic behavior from closure metadata.

Implementations§

Source§

impl PeriodicBSplineSurface

Source

pub fn new(surface: BSplineSurface) -> GeomResult<Self>

Validate and own an explicitly periodic surface.

At least one neutral closure flag must be set. Every declared periodic axis must satisfy exact control/weight aliasing and periodic knot extension invariants. Rational weights must be finite and positive.

Source

pub const fn as_bspline_surface(&self) -> &BSplineSurface

Borrow the canonical expanded neutral representation.

Source

pub fn into_bspline_surface(self) -> BSplineSurface

Consume the capability type and return its canonical expanded value.

Source

pub const fn u_is_periodic(&self) -> bool

Whether the U axis has explicit cyclic semantics.

Source

pub const fn v_is_periodic(&self) -> bool

Whether the V axis has explicit cyclic semantics.

Source

pub const fn u_domain(&self) -> (Scalar, Scalar)

Native active U domain; periodic evaluation treats it as half-open.

Source

pub const fn v_domain(&self) -> (Scalar, Scalar)

Native active V domain; periodic evaluation treats it as half-open.

Source

pub const fn u_seam_continuity_order(&self) -> Option<u16>

Algebraic continuity order across the U seam, or None when U is open.

Source

pub const fn v_seam_continuity_order(&self) -> Option<u16>

Algebraic continuity order across the V seam, or None when V is open.

Source

pub const fn unique_u_control_count(&self) -> usize

Number of topologically unique U control rows.

Source

pub const fn unique_v_control_count(&self) -> usize

Number of topologically unique V control columns.

Source

pub fn wrap_parameters( &self, u: Scalar, v: Scalar, ) -> GeomResult<(Scalar, Scalar)>

Canonicalize finite parameters on periodic axes.

Non-periodic parameters are left unchanged and retain the neutral evaluator’s established clamping behavior. Periodic offsets whose binary64 spacing cannot resolve one complete period are refused rather than reduced modulo an under-resolved quotient coordinate.

Source

pub fn point(&self, u: Scalar, v: Scalar) -> GeomResult<Point3>

Evaluate a point after periodic parameter canonicalization.

Source

pub fn jet(&self, u: Scalar, v: Scalar) -> GeomResult<SurfaceJet>

Evaluate the full second-order jet after periodic canonicalization.

Source

pub fn set_control_point( &mut self, u: usize, v: usize, point: Point3, ) -> GeomResult<()>

Replace one topologically unique control point and all seam aliases.

Indices address the unique cyclic net, never the duplicated expansion. Doubly periodic corner aliases are updated atomically with the primary control. Knot topology and rational weights are unchanged.

Source

pub fn set_control_point_wrapped( &mut self, u: i64, v: i64, point: Point3, ) -> GeomResult<()>

Replace a control point using signed cyclic indices.

Periodic-axis indices wrap modulo the topologically unique control count, so -1 and unique_count - 1 edit the same seam-adjacent control. Indices on non-periodic axes remain strict.

Source

pub fn set_weight( &mut self, u: usize, v: usize, weight: Scalar, ) -> GeomResult<()>

Replace one topologically unique rational weight and all seam aliases.

Polynomial surfaces reject this operation. The replacement must remain finite and strictly positive so rational certification stays well posed.

Source

pub fn set_weight_wrapped( &mut self, u: i64, v: i64, weight: Scalar, ) -> GeomResult<()>

Replace a rational weight using signed cyclic indices.

Trait Implementations§

Source§

impl Clone for PeriodicBSplineSurface

Source§

fn clone(&self) -> PeriodicBSplineSurface

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for PeriodicBSplineSurface

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for PeriodicBSplineSurface

Source§

fn eq(&self, other: &PeriodicBSplineSurface) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for PeriodicBSplineSurface

Auto Trait Implementations§

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
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.

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.