Registry / data / polygon3

polygon3

JSON →
library3.0.9.1pypypi✓ verified 82d ago

A Python 3 library for handling polygonal shapes in 2D, including intersection, union, and clipping operations. Current version 3.0.9.1, with maintenance updates as needed.

pip install polygon3
INSTALL
IMPORT
SIG · POLYGON3
P
polygon3
datapythonv3.0.9.1
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Polygon
from Polygon import Polygon
from polygon import Polygon
cPolygon
from Polygon import cPolygon
STYLE_LIST
from Polygon import STYLE_LIST

Create two polygons, compute their intersection and union.

from polygon import Polygon # Create two polygons poly1 = Polygon([(0,0), (1,0), (1,1), (0,1)]) poly2 = Polygon([(0.5,0.5), (1.5,0.5), (1.5,1.5), (0.5,1.5)]) # Compute intersection intersection = poly1 & poly2 print(f"Intersection area: {intersection.area()}") # Compute union union = poly1 | poly2 print(f"Union area: {union.area()}")
Debug
Known issues
breakingPolygon3 is a fork of the original 'polygon' library (Python 2). Do not confuse with 'polygon' package; import from 'polygon' (not 'polygon3') after installation.
fix
Install with `pip install polygon3`, then import as `from polygon import Polygon`.
affects: all
gotchaCoordinates must be in clockwise or counterclockwise order; self-intersecting or malformed polygons may cause incorrect results or crashes.
fix
Ensure polygons are simple and vertices are ordered consistently.
affects: all
Upgrade
Version history
3.0.9.1latest on PyPI · released Mar 9, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
polygon3 — pip install polygon3 · libregistry