Skip to main content

project_on_surface

Function project_on_surface 

Source
pub fn project_on_surface(
    surface: &SurfaceGeometry,
    target: Point,
    samples: usize,
    tol: Tolerances,
) -> OgeomResult<SurfaceProjection>
Expand description

The nearest point on a surface to target.

A coarse grid to bracket, then Newton on the two conditions that define a foot point: the displacement from the surface to the target is perpendicular to both tangents. Grid resolution is samples per direction, for the same reason as project_on_curve.

ยงErrors

OgeomError::Domain if the surface cannot be evaluated over its own domain.