Skip to main content

solid_contains_beside

Function solid_contains_beside 

Source
pub fn solid_contains_beside(
    model: &Model,
    solid_id: SolidId,
    shell_id: ShellId,
    face_id: FaceId,
    point: Vector3,
    normal: Vector3,
    max_nodes: usize,
    epsilon: Scalar,
    seed: u64,
) -> GeopResult<Beside>
Expand description

Classifies the points of the solid solid_id just off its face face_id (of its shell shell_id) on the side normal points to, at point, a point inside the face: inside if the solid is on that side of the face there. Other arguments as for shell_contains.

Decided by a ray from point in a random direction into the normal’s half space: every point of the ray just past the face is on that side, and the parity of the ray’s crossings past the face, over every shell of the solid, classifies them all at once (see [cast_ray], which does not count the ray’s start on the face it leaves). No point a chosen distance off the face is asked about: that asks about a point that far away, and on a non-convex solid a distance that looked small reaches through the local material into another part of it. A bore 18 from the side of a block, probed at 29 both ways, has the block on the normal’s side and the air past the block behind, and its wall reads as inverted.