offset_polygon_with_holes
- compas_cgal.straight_skeleton_2.offset_polygon_with_holes(points, holes, offset)
Compute the offset from a 2D polygon with holes.
- Parameters:
- pointslist of point coordinates or
compas.geometry.Polygon
The points of the 2D polygon.
- holeslist of list of point coordinates or list of
compas.geometry.Polygon
The holes of the polygon.
- offsetfloat
The offset distance. If negative, the offset is outside the polygon, otherwise inside.
- pointslist of point coordinates or
- Returns:
- list of tuple of (
Polygon
, list[Polygon
]) The polygons with holes.
- list of tuple of (
- Raises:
- ValueError
If the normal of the polygon is not directed vertically upwards like [0, 0, 1]. If the normal of a hole is not directed vertically downwards like [0, 0, -1].