boolean_intersection_polygon_polygon

compas.geometry.boolean_intersection_polygon_polygon(A, B)[source]

Compute the boolean intersection of two polygons.

For this operation, the polygons are assumed to lie in the XY plane. Therefore, the Z components of the points defining the polygons are simply ignored. If the polygons are not in the XY plane, it is the responibility of the user to transform them accordingly. Otherwise the results are meaningless.

Parameters:
Asequence[point]

The vertices of polygon A.

Bsequence[point]

The vertices of polygon B.

Returns:
list[point]

The vertices of the boolean difference.

Notes

This function is a “pluggable”. This means that it doesn’t provide an implementation, but receives an implementation from a corresponding “plugin”. To use the plugin implementation, you have to install it in the same environment as COMPAS. One such plugin is available through shapely.