Skip to content

Polygon2DOffsetUtil

implementation of the polygon offset algorithm for 2D polygons

  • add offset to individual segments of a polygon
  • calculate the resulting offset polygon

Polygon2DOffsetUtil

Canonical path: Utils.Geometry.Polygon2DOffsetUtil.Polygon2DOffsetUtil

implementation of the polygon offset algorithm for 2D polygons

__init__

__init__(polygon: Polygon2D)

initialize the polygon offset util

Parameters:

execute

execute() -> Polygon2D

execute the offset algorithm

Returns:

set_offset

set_offset(segment_index: int, offset: float)

set the offset value

Parameters:

  • segment_index (int) –

    segment index to offset

  • offset (float) –

    offset value

Placeholder