offsetToPaths(params: OffsetParams): Paths | undefined
offsetToPolyTree(params: OffsetParams): PolyTree | undefined
Performs a polygon offset operation, returning the resulting PolyTree or undefined if failed.
This method encapsulates the process of offsetting (inflating/deflating) both open and closed paths using a number of different join types and end types.
- The orientations of closed paths must be consistent such that outer polygons share the same orientation, and any holes have the opposite orientation (ie non-zero filling). Open paths must be oriented with closed outer polygons.
- Polygons must not self-intersect.
When offsetting, small artefacts may appear where polygons overlap. To avoid these artefacts, offset overlapping polygons separately.