-
Notifications
You must be signed in to change notification settings - Fork 18
pygeo
Daniel Flassig edited this page Jul 31, 2026
·
7 revisions
The pygeo.* api functions contain geometry-processing helpers for 2D polygonal data and for coordinate lists.
These functions operate on geometric loop, chain or point data and return cleaned or modified results. They do not create PYTHA parts themselves.
Currently available functions:
The pygeo.* namespace is intended for geometric preprocessing and analysis.
In particular, the cleaning functions can be used to:
- remove self-intersections from 2D polygon input
- normalize outer and inner loops
- convert arc-based polygon definitions into cleaned point loops
The offset functions can be used to:
- offset open or closed polyline chains by a given distance
- control the treatment of convex corners (sharp, rounded, chamfer)
- produce either plain point lists or chains with reconstructed arc segments
The point-test functions can be used to:
- test whether a point lies inside a polygon via its winding number
- test whether a point lies on a polygon boundary within a tolerance
- detect coordinates that coincide within a tolerance, so that they can be merged
The returned loop orientation follows the usual convention:
- outer loops are counter-clockwise (CCW)
- inner loops are clockwise (CW)
Refer to each function's detail page for its minimum PYTHA version.