Skip to main content

face_interior_point

Function face_interior_point 

Source
pub fn face_interior_point(
    model: &Model,
    face_id: FaceId,
    max_nodes: usize,
    epsilon: Scalar,
    seed: u64,
) -> GeopResult<(Scalar, Scalar)>
Expand description

A (u, v) strictly inside face_id’s trimmed region.

Found the way the operation itself suggests: start on the boundary and step inward. The step is taken along the inward normal of the outer loop at a boundary point — inward in (u, v), obtained by rotating the loop’s own tangent — and halved whenever the point it lands on is not Inside. Halving converges on any non-degenerate face, since a sufficiently short inward step from a boundary point is always interior, and it needs no guess about the face’s size.

The domain midpoint is not usable for this: a trimmed face need not contain it, and for a face carved out by a boolean’s remesh it very often does not.

max_nodes/seed are passed straight to face_contains, and epsilon as its first tolerance: how far clear of the boundary, in (u, v), a point has to be — made finer where none is that far (see face_interior_point_where).