Skip to main content

solids_from_shells

Function solids_from_shells 

Source
pub fn solids_from_shells(
    model: &mut Model,
    shells: &[Shape],
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

The solids shells bound: one where a single shell is outermost, else a compound of them, one per outermost shell and per shell lying in a void.

Each shell is placed against each other shell by its vertices that lie off it, classified by ray parity, which needs no shell to face either way; they must all read inside or all outside. Shells whose faces cross with no vertex of either inside the other are not told apart from shells side by side. A shell’s parent is the deepest shell that holds it. A shell held by an even number of shells is an outer boundary, and the shells it is the parent of are its voids. Each solid is put together by make_solid, which turns an outer shell to face out of the volume it bounds and a void’s to face into its cavity.

§Errors

OgeomError::Construction if shells is empty, holds something that is not a closed shell, or two shells cross (vertices of one on both sides of the other, or each holding the other) or one has every vertex on the other; as classification otherwise.