Skip to main content

make_hexahedron

Function make_hexahedron 

Source
pub fn make_hexahedron(
    model: &mut Model,
    corners: [Point; 8],
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

A hexahedron: the solid on eight corners laid out like a box’s, whose six faces are planar. The corners come in a box’s order: the four of the bottom face counter-clockwise from the origin corner ((0,0,0), (1,0,0), (1,1,0), (0,1,0)), then the four above them in the same order.

A box and a parallelepiped are the square and sheared cases; a corner tool’s block at an oblique vertex, bounded by the three host planes and three planes through the ball’s centre, is the general one. Each face’s four corners must be coplanar; a corner off its face’s plane is refused.

§Errors

OgeomError::Construction if a corner is not finite, a face’s four corners are not coplanar, or the corners span no volume.