Skip to main content

make_half_space

Function make_half_space 

Source
pub fn make_half_space(
    model: &mut Model,
    face: &Shape,
    inside: Point,
    tol: Tolerances,
) -> OgeomResult<Built>
Expand description

Build the unbounded solid on one side of a face.

inside names the side: it is a point in the material. The face is oriented so its normal leads away from that point, which is what “outward” means for a solid, and the result is a solid bounded by that one face.

§It is only as unbounded as its surface is

A half space is genuinely infinite; a surface in this kernel is not. A plane declares a finite domain (very large, but finite), and the solid built here reaches exactly as far as its face’s surface does. So its volume and its centre of mass are properties of that declared extent rather than of a half space, and mean nothing. What does mean something is which side of the face a point is on, which is the question a half space exists to answer.

That is what it is for: a half space is an argument to a boolean: cut a solid with one and you have trimmed it by a surface. cut, common and section all accept one as either operand; fuse refuses it by name, because an unbounded fuse has no volume to keep. Classification against it works too and is what the tests here use.

§Errors

OgeomError::Construction if face is not a face, or if inside lies on it; a point on the boundary names no side.