Skip to main content

face_interior_point

Function face_interior_point 

Source
pub fn face_interior_point<S: Scalar>(
    model: &Model<S>,
    face_id: FaceId,
    max_nodes: usize,
    epsilon: S,
    seed: u64,
) -> GeopResult<(S, S)>
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/epsilon/seed are passed straight to face_contains.