Skip to main content

Module boolean

Module boolean 

Source
Expand description

Booleans: IfcBooleanResult and the clipping specialisation.

§A boolean is a tree, not a pair of solids

FirstOperand and SecondOperand are both IfcBooleanOperand, a SELECT that includes IfcBooleanResult itself. Real files nest these deeply: a wall with eight openings is commonly a left-leaning chain of eight IfcBooleanClippingResults, each one’s FirstOperand being the previous result.

Any consumer that assumes two leaf solids handles the first opening and drops the other seven. BooleanResult::operands therefore returns references to be walked recursively, and OperandKind classifies what was found so a walker knows when to recurse.

Depth is bounded in practice but not by the schema, and a self-referencing tree is expressible, so any recursive walk needs its own depth limit and cycle check – see crate::GeometryError::CyclicChain.

§IfcBooleanClippingResult is a constrained IfcBooleanResult

It adds no attributes. Its EXPRESS WHERE rules require the operator to be DIFFERENCE, the first operand to be a swept solid or another clipping result, and the second to be an IfcHalfSpaceSolid. It exists so a consumer can recognise “solid minus half space” – the cheap, always-implementable case – without inspecting the operands.

Re-exports§

pub use IfcBooleanOperator as BooleanOperator;

Structs§

BooleanClippingResult
IfcBooleanClippingResult: a solid clipped by a half space.
BooleanResult
IfcBooleanResult: two operands combined by a set operation.
ParseIfcBooleanOperatorError
Invalid IfcBooleanOperator token.

Enums§

IfcBooleanOperator
IfcBooleanOperator: the three set operations IFC defines.
OperandKind
What an IfcBooleanOperand reference actually points at.