ifcopenshell.api.geometry.add_boolean¶
Module Contents¶
- ifcopenshell.api.geometry.add_boolean.add_boolean(file: ifcopenshell.file, first_item: ifcopenshell.entity_instance, second_items: list[ifcopenshell.entity_instance], operator: Literal['DIFFERENCE', 'INTERSECTION', 'UNION'] = 'DIFFERENCE') list[ifcopenshell.entity_instance]¶
Adds a boolean operation to two or more representation items
This function protects against recursive booleans.
After a boolean operation is made, since the items of IfcShapeRepresentation may be modified, it is not guaranteed that the RepresentationType is still valid. After performing all your booleans, it is recommended to run
ifcopenshell.api.geometry.validate_csg()to ensure correctness.- Parameters:
first_item – The IfcBooleanOperand that the operation is performed upon
second_items – The IfcBooleanOperands that the operation will be performed with, in the order given of the list.
operator – The type of boolean operation to perform
- Returns:
A list of newly created IfcBooleanResult in the order of boolean operations (based on the order of second items). If nothing was created, the list will be empty.