Home > PCB_MathPolygon > discretize
PCB_MathPolygon.discretize() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Discretize a single polygon into point data
Signature
typescript
function discretize(
polygon: IPCB_Polygon | TPCB_PolygonSourceArray,
options?: IPCB_DiscretizeOptions,
): Promise<Array<IPCB_DiscretizedPoint>>;1
2
3
4
2
3
4
Parameters
Parameter | Type | Description |
|---|---|---|
polygon | Single polygon object | |
options | (Optional) Discretization options |
Returns
Promise<Array<IPCB_DiscretizedPoint>>
Discretized point data
Remarks
Discretize the boundary of a single polygon into a series of points