Skip to main content

Module csg

Module csg 

Source
Expand description

CSG: analytic primitives and the solid that roots a CSG tree.

§The shape of a CSG solid

IfcCsgSolid holds a single TreeRootExpression, an IfcCsgSelect which is either an IfcBooleanResult or an IfcCsgPrimitive3D. The tree lives in the boolean results, so a CSG solid is a one-attribute wrapper, not a tree node itself.

§Where a primitive sits

Every IfcCsgPrimitive3D has a required Position (IfcAxis2Placement3D) at slot 0. Unlike IfcSweptAreaSolid.Position it is not optional, so there is no identity default to fall back on.

§Origin conventions differ per primitive

This is the trap. The placement origin is the corner of a block and of a pyramid’s base, but the centre of the base circle for a cylinder and a cone, and the centre of a sphere. Applying one convention uniformly offsets half the primitives by half their size.

Structs§

Block
IfcBlock: an axis-aligned box.
CsgPrimitive3D
IfcCsgPrimitive3D: the abstract primitive, giving access to Position.
CsgSolid
IfcCsgSolid: a solid defined by a CSG expression tree.
RectangularPyramid
IfcRectangularPyramid: a pyramid on a rectangular base.
RightCircularCone
IfcRightCircularCone: a cone standing on the placement XY plane.
RightCircularCylinder
IfcRightCircularCylinder: a cylinder standing on the placement XY plane.
Sphere
IfcSphere: a sphere centred on the placement origin.