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
impl PeriodicBSplineSurface
Sourcepub fn new(surface: BSplineSurface) -> GeomResult<Self>
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.
Sourcepub const fn as_bspline_surface(&self) -> &BSplineSurface
pub const fn as_bspline_surface(&self) -> &BSplineSurface
Borrow the canonical expanded neutral representation.
Sourcepub fn into_bspline_surface(self) -> BSplineSurface
pub fn into_bspline_surface(self) -> BSplineSurface
Consume the capability type and return its canonical expanded value.
Sourcepub const fn u_is_periodic(&self) -> bool
pub const fn u_is_periodic(&self) -> bool
Whether the U axis has explicit cyclic semantics.
Sourcepub const fn v_is_periodic(&self) -> bool
pub const fn v_is_periodic(&self) -> bool
Whether the V axis has explicit cyclic semantics.
Sourcepub const fn u_domain(&self) -> (Scalar, Scalar)
pub const fn u_domain(&self) -> (Scalar, Scalar)
Native active U domain; periodic evaluation treats it as half-open.
Sourcepub const fn v_domain(&self) -> (Scalar, Scalar)
pub const fn v_domain(&self) -> (Scalar, Scalar)
Native active V domain; periodic evaluation treats it as half-open.
Sourcepub 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.
Sourcepub 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.
Sourcepub const fn unique_u_control_count(&self) -> usize
pub const fn unique_u_control_count(&self) -> usize
Number of topologically unique U control rows.
Sourcepub const fn unique_v_control_count(&self) -> usize
pub const fn unique_v_control_count(&self) -> usize
Number of topologically unique V control columns.
Sourcepub fn wrap_parameters(
&self,
u: Scalar,
v: Scalar,
) -> GeomResult<(Scalar, Scalar)>
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.
Sourcepub fn point(&self, u: Scalar, v: Scalar) -> GeomResult<Point3>
pub fn point(&self, u: Scalar, v: Scalar) -> GeomResult<Point3>
Evaluate a point after periodic parameter canonicalization.
Sourcepub fn jet(&self, u: Scalar, v: Scalar) -> GeomResult<SurfaceJet>
pub fn jet(&self, u: Scalar, v: Scalar) -> GeomResult<SurfaceJet>
Evaluate the full second-order jet after periodic canonicalization.
Sourcepub fn set_control_point(
&mut self,
u: usize,
v: usize,
point: Point3,
) -> GeomResult<()>
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.
Sourcepub fn set_control_point_wrapped(
&mut self,
u: i64,
v: i64,
point: Point3,
) -> GeomResult<()>
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.
Sourcepub fn set_weight(
&mut self,
u: usize,
v: usize,
weight: Scalar,
) -> GeomResult<()>
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.
Sourcepub fn set_weight_wrapped(
&mut self,
u: i64,
v: i64,
weight: Scalar,
) -> GeomResult<()>
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
impl Clone for PeriodicBSplineSurface
Source§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