Struct PeriodicBSplineSurface
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§
§impl PeriodicBSplineSurface
impl PeriodicBSplineSurface
pub fn new(surface: BSplineSurface) -> Result<PeriodicBSplineSurface, GeomError>
pub fn new(surface: BSplineSurface) -> Result<PeriodicBSplineSurface, GeomError>
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.
pub const fn as_bspline_surface(&self) -> &BSplineSurface
pub const fn as_bspline_surface(&self) -> &BSplineSurface
Borrow the canonical expanded neutral representation.
pub fn into_bspline_surface(self) -> BSplineSurface
pub fn into_bspline_surface(self) -> BSplineSurface
Consume the capability type and return its canonical expanded value.
pub const fn u_is_periodic(&self) -> bool
pub const fn u_is_periodic(&self) -> bool
Whether the U axis has explicit cyclic semantics.
pub const fn v_is_periodic(&self) -> bool
pub const fn v_is_periodic(&self) -> bool
Whether the V axis has explicit cyclic semantics.
pub const fn u_domain(&self) -> (f64, f64)
pub const fn u_domain(&self) -> (f64, f64)
Native active U domain; periodic evaluation treats it as half-open.
pub const fn v_domain(&self) -> (f64, f64)
pub const fn v_domain(&self) -> (f64, f64)
Native active V domain; periodic evaluation treats it as half-open.
pub const fn u_seam_continuity_order(&self) -> Option<u16>
pub const fn u_seam_continuity_order(&self) -> Option<u16>
Algebraic continuity order across the U seam, or None when U is open.
pub const fn v_seam_continuity_order(&self) -> Option<u16>
pub const fn v_seam_continuity_order(&self) -> Option<u16>
Algebraic continuity order across the V seam, or None when V is open.
pub const fn unique_u_control_count(&self) -> usize
pub const fn unique_u_control_count(&self) -> usize
Number of topologically unique U control rows.
pub const fn unique_v_control_count(&self) -> usize
pub const fn unique_v_control_count(&self) -> usize
Number of topologically unique V control columns.
pub fn wrap_parameters(&self, u: f64, v: f64) -> Result<(f64, f64), GeomError>
pub fn wrap_parameters(&self, u: f64, v: f64) -> Result<(f64, f64), GeomError>
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.
pub fn point(&self, u: f64, v: f64) -> Result<DVec3, GeomError>
pub fn point(&self, u: f64, v: f64) -> Result<DVec3, GeomError>
Evaluate a point after periodic parameter canonicalization.
pub fn jet(&self, u: f64, v: f64) -> Result<SurfaceJet, GeomError>
pub fn jet(&self, u: f64, v: f64) -> Result<SurfaceJet, GeomError>
Evaluate the full second-order jet after periodic canonicalization.
pub fn set_control_point(
&mut self,
u: usize,
v: usize,
point: DVec3,
) -> Result<(), GeomError>
pub fn set_control_point( &mut self, u: usize, v: usize, point: DVec3, ) -> Result<(), GeomError>
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.
pub fn set_control_point_wrapped(
&mut self,
u: i64,
v: i64,
point: DVec3,
) -> Result<(), GeomError>
pub fn set_control_point_wrapped( &mut self, u: i64, v: i64, point: DVec3, ) -> Result<(), GeomError>
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.
pub fn set_weight(
&mut self,
u: usize,
v: usize,
weight: f64,
) -> Result<(), GeomError>
pub fn set_weight( &mut self, u: usize, v: usize, weight: f64, ) -> Result<(), GeomError>
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.
Trait Implementations§
§impl Clone for PeriodicBSplineSurface
impl Clone for PeriodicBSplineSurface
§fn clone(&self) -> PeriodicBSplineSurface
fn clone(&self) -> PeriodicBSplineSurface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for PeriodicBSplineSurface
impl Debug for PeriodicBSplineSurface
§impl PartialEq for PeriodicBSplineSurface
impl PartialEq for PeriodicBSplineSurface
impl StructuralPartialEq for PeriodicBSplineSurface
Auto Trait Implementations§
impl Freeze for PeriodicBSplineSurface
impl RefUnwindSafe for PeriodicBSplineSurface
impl Send for PeriodicBSplineSurface
impl Sync for PeriodicBSplineSurface
impl Unpin for PeriodicBSplineSurface
impl UnwindSafe for PeriodicBSplineSurface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more