pub struct BSpline2d { /* private fields */ }Expand description
A B-spline in the plane, polynomial or rational.
Implementations§
Source§impl BSpline2d
impl BSpline2d
Sourcepub fn new(
knots: KnotVector,
control: Vec<Point2>,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn new( knots: KnotVector, control: Vec<Point2>, tol: Tolerances, ) -> OgeomResult<Self>
Sourcepub fn rational(
knots: KnotVector,
control: Vec<Weighted<Point2>>,
) -> OgeomResult<Self>
pub fn rational( knots: KnotVector, control: Vec<Weighted<Point2>>, ) -> OgeomResult<Self>
Sourcepub const fn knots(&self) -> &KnotVector
pub const fn knots(&self) -> &KnotVector
The knot vector.
Sourcepub fn control_points(&self) -> &[Weighted<Point2>]
pub fn control_points(&self) -> &[Weighted<Point2>]
The weighted control points.
Sourcepub const fn is_rational(&self) -> bool
pub const fn is_rational(&self) -> bool
Whether the weights differ.
Sourcepub fn reseamed_at(
&self,
u: f64,
lap: Vector2,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn reseamed_at( &self, u: f64, lap: Vector2, tol: Tolerances, ) -> OgeomResult<Self>
The same closed image with its seam moved to u: what was the
stretch from u to the end now comes first, and the stretch from
the start to u follows it, carried by lap so that it continues
from the end. lap is how far the end stands from the start: zero
for a loop closed in the plane, a whole period for an image winding
once round a periodic chart. The domain keeps its length and begins
at u, so the image at a parameter past the old end is the old
image a domain’s length earlier, moved by lap.
§Errors
OgeomError::Construction if
the end stands further than the parametric tolerance from the start
carried by lap; as bspline::split if u is an end of the
domain.
Trait Implementations§
Source§impl Curve2d for BSpline2d
impl Curve2d for BSpline2d
Source§fn is_closed(&self, tol: Tolerances) -> bool
fn is_closed(&self, tol: Tolerances) -> bool
Where its ends meet, which its end control points say only for clamped knots.
Source§fn point_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Point2>
fn point_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Point2>
u. Read moreSource§fn d1_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Vector2>
fn d1_at(&self, u: f64, tol: Tolerances) -> OgeomResult<Vector2>
u. Read moreSource§fn derivatives_at(
&self,
u: f64,
n: usize,
tol: Tolerances,
) -> OgeomResult<Vec<Vector2>>
fn derivatives_at( &self, u: f64, n: usize, tol: Tolerances, ) -> OgeomResult<Vec<Vector2>>
Source§fn is_periodic(&self) -> bool
fn is_periodic(&self) -> bool
Source§fn start(&self, tol: Tolerances) -> OgeomResult<Point2>
fn start(&self, tol: Tolerances) -> OgeomResult<Point2>
Source§fn end(&self, tol: Tolerances) -> OgeomResult<Point2>
fn end(&self, tol: Tolerances) -> OgeomResult<Point2>
Source§impl From<BSpline2d> for PlanarCurve
impl From<BSpline2d> for PlanarCurve
impl StructuralPartialEq for BSpline2d
Auto Trait Implementations§
impl Freeze for BSpline2d
impl RefUnwindSafe for BSpline2d
impl Send for BSpline2d
impl Sync for BSpline2d
impl Unpin for BSpline2d
impl UnsafeUnpin for BSpline2d
impl UnwindSafe for BSpline2d
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.