Simplify
simplify
Simplifying functions.
dsimplify
dsimplify(
points: list[DPoint], tolerance: float
) -> list[kdb.DPoint]
Simplify a list of um points to a certain tolerance (in um).
Uses Ramer-Douglas-Peucker algorithm
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
points
|
list[DPoint]
|
list of |
required |
tolerance
|
float
|
if two points are > tolerance (in um) apart, delete most suitable points. |
required |
Source code in kfactory/utils/simplify.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 | |
simplify
simplify(
points: list[Point], tolerance: float
) -> list[kdb.Point]
Simplify a list of klayout.db.Point to a certain tolerance (in dbu).
Uses Ramer-Douglas-Peucker algorithm
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
points
|
list[Point]
|
list of points to simplify |
required |
tolerance
|
float
|
if two points are > tolerance (in dbu) apart, delete most suitable points. |
required |
Source code in kfactory/utils/simplify.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | |