Skip to main content

Module halfspace

Module halfspace 

Source
Expand description

Half spaces: infinite solids, valid only as boolean operands.

§Read this before using anything in this module

An IfcHalfSpaceSolid is everything on one side of a surface. It has infinite volume. It cannot be tessellated, cannot be given a bounding box, and has no meaningful surface area. Any pipeline that treats it as an ordinary solid either hangs, allocates until it dies, or emits a mesh the size of the coordinate space.

It is legal in exactly one place: as an operand of an IfcBooleanResult (in practice as the SecondOperand of an IfcBooleanClippingResult, where the schema requires it). The intended reading is “cut this solid with a plane”, and the infinite half space is how IFC spells the cutting tool.

§BaseSurface and AgreementFlag

BaseSurface is an IfcSurface, and in real files essentially always an IfcPlane. It divides space in two. AgreementFlag picks which of the two halves is the material:

  • .T. – the solid is on the side the plane’s normal points away from (that is, the side of decreasing surface parameter / below the plane in its own coordinate system).
  • .F. – the solid is on the other side.

Getting this backwards does not fail: it cuts away the part that should have been kept, producing a wall with the wrong end missing. There is no geometric check that catches it, so the flag must be transcribed exactly.

§The two bounded subtypes

Both bound the half space, but in different senses, and the difference matters:

  • BoxedHalfSpace carries an Enclosure bounding box. It is a declaration of the region of interest, letting a consumer clip the infinite solid to something finite before the boolean.
  • PolygonalBoundedHalfSpace carries a 2D PolygonalBoundary in the XY plane of its own Position and is bounded by the prism obtained by extruding that boundary along +Z of that same Position. The subtraction body is the intersection of the half space with that prism.

Structs§

BoxedHalfSpace
IfcBoxedHalfSpace: a half space with a declared bounding box.
HalfSpaceSolid
IfcHalfSpaceSolid: an infinite solid on one side of a surface.
PolygonalBoundedHalfSpace
IfcPolygonalBoundedHalfSpace: a half space clipped by an extruded polygon.