ifcopenshell.api.geometry.clip_solid_bounded¶
Module Contents¶
- ifcopenshell.api.geometry.clip_solid_bounded.clip_solid_bounded(file: ifcopenshell.file, item: ifcopenshell.entity_instance, location: Sequence[float], normal: Sequence[float], boundary_points: Sequence[Sequence[float]], boundary_position: Sequence[float] = (0.0, 0.0, 0.0), element: ifcopenshell.entity_instance | None = None) ifcopenshell.entity_instance¶
Clip a solid with a polygonally bounded half-space, returning an IfcBooleanClippingResult.
Like
clip_solid(), but the boolean subtraction is restricted to the region enclosed byboundary_pointsrather than extending across the entire half-space. The clipping plane is still infinite, but material is only removed within the extruded footprint of the polygon.The
normalconvention is the same asclip_solid(): it points toward the removed material.After clipping, set the parent
IfcShapeRepresentationRepresentationTypeto"Clipping".Example:
bcr = ifcopenshell.api.run( "geometry.clip_solid_bounded", model, item=extrusion, location=[2.5, 0.0, 2.0], normal=[0.6, 0.0, 0.8], boundary_points=[[2.0, 0.0], [3.0, 0.0], [3.0, 2.0], [2.0, 2.0]], )
- 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.
boundary_points – 2D
[x, y]points defining the closed polygonal boundary in the coordinate system ofboundary_position. The polygon is automatically closed — do not repeat the first point.boundary_position – 3D origin of the boundary coordinate system (axes default to the global X/Y/Z directions). Defaults to the origin.
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.