Skip to main content

face_curvature_samples

Function face_curvature_samples 

Source
pub fn face_curvature_samples(
    model: &Model,
    face: &Shape,
    density: usize,
    tol: Tolerances,
) -> OgeomResult<Vec<(Point, SurfaceCurvature)>>
Expand description

The surface’s curvature over a face, on a grid: what a curvature map or a zebra display draws from.

The box the face’s trim spans in its surface’s parameters is cut into density by density cells, and each cell’s centre that lies inside the trim gives one sample: the point in space and the principal curvatures there. The trim is read as the mesher reads it, at the default deflection. A centre where the surface has no normal (a pole, an apex) has no curvature and gives no sample.

Each sample is placed where the face stands and signed against the normal the face’s mesh carries: the placement moves the point and the directions, its scale divides the curvatures, and a reversed face turns the normal round. A convex face reads negative, a cavity positive.

§Errors

OgeomError::Construction if face is not a face or density is zero; OgeomError::Dangling if it is not in this model.