pub struct OffsetSurface { /* private fields */ }Expand description
A surface displaced a constant signed distance along its basis’s normal, sharing the basis’s parameterization.
Point and first derivatives are exact; the normal’s derivative is the
projection formula over the basis’s second derivatives. The second
derivative would need the basis’s third, which the vocabulary does not
carry, so d2_at refuses by name rather than differencing quietly. For
an analytic basis the offset is itself analytic and the direct type is
the better spelling; this type exists for the free-form bases that have
no such spelling.
Implementations§
Source§impl OffsetSurface
impl OffsetSurface
Sourcepub fn new(basis: SurfaceGeometry, distance: f64) -> OgeomResult<Self>
pub fn new(basis: SurfaceGeometry, distance: f64) -> OgeomResult<Self>
Offset basis by a signed distance along its own normal.
§Errors
OgeomError::Construction if the
distance is not finite and non-zero.
Sourcepub const fn basis(&self) -> &SurfaceGeometry
pub const fn basis(&self) -> &SurfaceGeometry
The surface being offset.
Sourcepub fn analytic(&self, tol: Tolerances) -> OgeomResult<Option<SurfaceGeometry>>
pub fn analytic(&self, tol: Tolerances) -> OgeomResult<Option<SurfaceGeometry>>
The offset as the analytic surface it is, where the basis is one: a
plane moved along its normal, a drum, ball or ring’s tube grown or
shrunk, a cone’s reference radius changed by d / cos α over the
same half-angle. Which way the offset grows is read off the basis’s
own normal at a point, not assumed from its parameterization. None
for any other basis, or for an offset that would turn the surface
inside out (a radius through zero).
§Errors
As the basis’s evaluation, or as the analytic constructors.
Trait Implementations§
Source§impl Clone for OffsetSurface
impl Clone for OffsetSurface
Source§fn clone(&self) -> OffsetSurface
fn clone(&self) -> OffsetSurface
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 OffsetSurface
impl Debug for OffsetSurface
Source§impl PartialEq for OffsetSurface
impl PartialEq for OffsetSurface
Source§fn eq(&self, other: &OffsetSurface) -> bool
fn eq(&self, other: &OffsetSurface) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OffsetSurface
Source§impl Surface for OffsetSurface
impl Surface for OffsetSurface
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 d2_at(
&self,
_u: f64,
_v: f64,
_tol: Tolerances,
) -> OgeomResult<(Vector, Vector, Vector)>
fn d2_at( &self, _u: f64, _v: f64, _tol: Tolerances, ) -> OgeomResult<(Vector, Vector, Vector)>
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 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 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 OffsetSurface
impl RefUnwindSafe for OffsetSurface
impl Send for OffsetSurface
impl Sync for OffsetSurface
impl Unpin for OffsetSurface
impl UnsafeUnpin for OffsetSurface
impl UnwindSafe for OffsetSurface
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.