ifcopenshell.api.geometry.clip_solid¶
Module Contents¶
- ifcopenshell.api.geometry.clip_solid.clip_solid(file: ifcopenshell.file, item: ifcopenshell.entity_instance, location: Sequence[float], normal: Sequence[float], element: ifcopenshell.entity_instance | None = None) ifcopenshell.entity_instance¶
Clip a solid with a half-space plane, returning an IfcBooleanClippingResult.
Convenience wrapper around
ifcopenshell.util.data.Clippingfor use with any solid. This is the same convention used by theclippingsparameter ofadd_wall_representation().Warning
The
normalpoints toward the removed material (the discarded side), not toward the kept material. For a slope clip the normal points upward into the removed wedge above the slope line. For a side mitre the normal points outward away from the wall body.After clipping, set the parent
IfcShapeRepresentationRepresentationTypeto"Clipping".Example — trim an extruded solid to a lean-to slope (removed material is above the slope):
bcr = ifcopenshell.api.run( "geometry.clip_solid", model, item=extrusion, location=[0.0, 0.0, 3.26], normal=[0.419, 0.0, 0.908], # points UP toward removed material )
- Parameters:
item – The solid to clip (
IfcSweptAreaSolid,IfcSweptDiskSolid, orIfcBooleanClippingResult).location – A point on the clipping plane in the representation’s local coordinate system.
normal – Plane normal pointing toward the material to be removed (see warning above).
element – If provided, the resulting
IfcBooleanClippingResultis registered in the element’sBBIM_Booleanproperty set so thatregenerate_wall_representation()preserves it during regeneration.
- Returns:
The resulting
IfcBooleanClippingResult.