pub struct SurfaceSeeds { /* private fields */ }Expand description
A surface’s seeding structure, built once and asked many times.
project_on_surface builds the same seeding structure for every
call: a B-spline patch’s span boxes, or a grid of surface points
for a surface with no closed form. A caller projecting many targets
onto one surface builds it once, and each projection reduces to the
search plus the Newton polish: the same seeds, the same refinement, the
same answer to the bit.
Implementations§
Source§impl SurfaceSeeds
impl SurfaceSeeds
Sourcepub fn over(
surface: &SurfaceGeometry,
samples: usize,
tol: Tolerances,
) -> OgeomResult<Self>
pub fn over( surface: &SurfaceGeometry, samples: usize, tol: Tolerances, ) -> OgeomResult<Self>
Build the seeding structure project_on_surface would use, once.
§Errors
Never for a well-formed surface; evaluation failures leave gaps in the grid exactly as the per-call version tolerates them.
Sourcepub fn project(
&self,
surface: &SurfaceGeometry,
target: Point,
tol: Tolerances,
) -> OgeomResult<SurfaceProjection>
pub fn project( &self, surface: &SurfaceGeometry, target: Point, tol: Tolerances, ) -> OgeomResult<SurfaceProjection>
Project target, seeded from the stored structure, bit-identical to
project_on_surface at the same sample count.
§Errors
Trait Implementations§
Source§impl Clone for SurfaceSeeds
impl Clone for SurfaceSeeds
Auto Trait Implementations§
impl Freeze for SurfaceSeeds
impl RefUnwindSafe for SurfaceSeeds
impl Send for SurfaceSeeds
impl Sync for SurfaceSeeds
impl Unpin for SurfaceSeeds
impl UnsafeUnpin for SurfaceSeeds
impl UnwindSafe for SurfaceSeeds
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.