pub struct BSplineSurface { /* private fields */ }Expand description
A tensor-product B-spline patch, polynomial or rational.
Implementations§
Source§impl BSplineSurface
impl BSplineSurface
Sourcepub fn restricted_to_degree(
&self,
max_degree: usize,
tolerance: f64,
tol: Tolerances,
) -> OgeomResult<Fitted<Self>>
pub fn restricted_to_degree( &self, max_degree: usize, tolerance: f64, tol: Tolerances, ) -> OgeomResult<Fitted<Self>>
This patch at degrees no higher than max_degree in either
direction, to a stated tolerance: itself where it already is, and
otherwise a fit through a grid of its own points, the grid doubled
until the fit holds every sample to the tolerance or the budget
runs out. The fit’s parameterization is its own (chord-length
through the grid, not the patch’s), so a pcurve spoken against the
patch must be re-derived against the result.
§Errors
OgeomError::Construction if
max_degree is zero or the tolerance is not a distance; as
fit::fit_surface_grid.
Source§impl BSplineSurface
impl BSplineSurface
Sourcepub fn new(
u_knots: KnotVector,
v_knots: KnotVector,
grid: &ControlGrid<Point>,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn new( u_knots: KnotVector, v_knots: KnotVector, grid: &ControlGrid<Point>, tol: Tolerances, ) -> OgeomResult<Self>
Sourcepub fn rational(
u_knots: KnotVector,
v_knots: KnotVector,
grid: ControlGrid<Weighted<Point>>,
) -> OgeomResult<Self>
pub fn rational( u_knots: KnotVector, v_knots: KnotVector, grid: ControlGrid<Weighted<Point>>, ) -> OgeomResult<Self>
Sourcepub fn extended(
&self,
along_u: bool,
at_end: bool,
length: f64,
continuity: usize,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn extended( &self, along_u: bool, at_end: bool, length: f64, continuity: usize, tol: Tolerances, ) -> OgeomResult<Self>
This patch continued past one of its four sides by about length
in space: every column of the control net continued along u (or
every row along v), as BSplineCurve::extended continues a
curve, over one shared span so the net stays a grid. The span is the
length over the mean speed along that side, so the continuation
reaches the length where the side runs at its mean speed and less
where the surface stretches faster. The original patch keeps its
parameters; the domain grows at the side continued.
§Errors
OgeomError::Construction if the
side stands still, or the length is not positive; as
[ogeom_math::bspline::extend].
Sourcepub fn iso_u_curve(&self, at: f64, tol: Tolerances) -> OgeomResult<BSplineCurve>
pub fn iso_u_curve(&self, at: f64, tol: Tolerances) -> OgeomResult<BSplineCurve>
The u = at iso-curve: a B-spline over the v knots whose controls
are the control columns blended by the u basis at at, weights
and all: exactly the curve the surface traces up that column.
§Errors
OgeomError::Domain if at is
outside the u domain.
Sourcepub fn iso_v_curve(&self, at: f64, tol: Tolerances) -> OgeomResult<BSplineCurve>
pub fn iso_v_curve(&self, at: f64, tol: Tolerances) -> OgeomResult<BSplineCurve>
The v = at iso-curve, as BSplineSurface::iso_u_curve the other
way round.
§Errors
Sourcepub fn segment(
&self,
u: (f64, f64),
v: (f64, f64),
tol: Tolerances,
) -> OgeomResult<Self>
pub fn segment( &self, u: (f64, f64), v: (f64, f64), tol: Tolerances, ) -> OgeomResult<Self>
The patch of this surface over u by v, exactly and keeping its
parameters: the patch at (u, v) is this surface at (u, v).
§Errors
OgeomError::Domain if either range
is empty or leaves the domain.
Sourcepub const fn is_rational(&self) -> bool
pub const fn is_rational(&self) -> bool
Whether the weights differ, so the patch is genuinely rational.
Trait Implementations§
Source§impl Clone for BSplineSurface
impl Clone for BSplineSurface
Source§fn clone(&self) -> BSplineSurface
fn clone(&self) -> BSplineSurface
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BSplineSurface
impl Debug for BSplineSurface
Source§impl From<BSplineSurface> for SurfaceGeometry
impl From<BSplineSurface> for SurfaceGeometry
Source§fn from(s: BSplineSurface) -> Self
fn from(s: BSplineSurface) -> Self
Source§impl PartialEq for BSplineSurface
impl PartialEq for BSplineSurface
Source§fn eq(&self, other: &BSplineSurface) -> bool
fn eq(&self, other: &BSplineSurface) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BSplineSurface
Source§impl Surface for BSplineSurface
impl Surface for BSplineSurface
Source§fn point_at(&self, u: f64, v: f64, tol: Tolerances) -> OgeomResult<Point>
fn point_at(&self, u: f64, v: f64, tol: Tolerances) -> OgeomResult<Point>
(u, v). Read moreSource§fn d1_at(
&self,
u: f64,
v: f64,
tol: Tolerances,
) -> OgeomResult<(Vector, Vector)>
fn d1_at( &self, u: f64, v: f64, tol: Tolerances, ) -> OgeomResult<(Vector, Vector)>
(u, v). Read moreSource§fn jet_at(&self, u: f64, v: f64, tol: Tolerances) -> OgeomResult<SurfaceJet>
fn jet_at(&self, u: f64, v: f64, tol: Tolerances) -> OgeomResult<SurfaceJet>
Source§fn kind(&self) -> SurfaceKind
fn kind(&self) -> SurfaceKind
Source§fn continuity(&self) -> Continuity
fn continuity(&self) -> Continuity
Source§fn is_closed_u(&self, tol: Tolerances) -> bool
fn is_closed_u(&self, tol: Tolerances) -> bool
u.Source§fn is_closed_v(&self, tol: Tolerances) -> bool
fn is_closed_v(&self, tol: Tolerances) -> bool
v.Source§fn is_periodic_u(&self) -> bool
fn is_periodic_u(&self) -> bool
u repeats past the domain.Source§fn is_periodic_v(&self) -> bool
fn is_periodic_v(&self) -> bool
v repeats past the domain.Source§fn curvature_at(
&self,
u: f64,
v: f64,
tol: Tolerances,
) -> OgeomResult<SurfaceCurvature>
fn curvature_at( &self, u: f64, v: f64, tol: Tolerances, ) -> OgeomResult<SurfaceCurvature>
(u, v). Read moreSource§fn is_degenerate_at(&self, u: f64, v: f64, tol: Tolerances) -> OgeomResult<bool>
fn is_degenerate_at(&self, u: f64, v: f64, tol: Tolerances) -> OgeomResult<bool>
(u, v). Read moreAuto Trait Implementations§
impl Freeze for BSplineSurface
impl RefUnwindSafe for BSplineSurface
impl Send for BSplineSurface
impl Sync for BSplineSurface
impl Unpin for BSplineSurface
impl UnsafeUnpin for BSplineSurface
impl UnwindSafe for BSplineSurface
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,
impl<T> Scalar for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.