GeomPP — Python Bindings
Python bindings for geompp — a C++ 2D/3D geometry library.
Changelog — full release notes for every version.
Install
pip install geompp
Pre-built wheels are available for:
| Platform | Python versions |
|---|---|
| Linux x86_64 | 3.8 · 3.9 · 3.10 · 3.11 · 3.12 · 3.13 · 3.14 |
| Windows x64 | 3.8 · 3.9 · 3.10 · 3.11 · 3.12 · 3.13 · 3.14 |
If your platform or Python version is not in the table above, pip will compile from source — you will need CMake ≥ 3.15 and a C++20-capable compiler.
Classes
| 2D | 3D |
|---|---|
| Point2D | Point3D |
| Vector2D | Vector3D |
| Line2D | Line3D |
| Ray2D | Ray3D |
| LineSegment2D | LineSegment3D |
| Polyline2D | Polyline3D |
| Triangle2D | Triangle3D |
| Polygon2D | Polygon3D |
| BBox2D | BBox3D |
| BBall2D | BBall3D |
| BRect2D | |
| BPrism3D | |
| GeometryCollection2D | GeometryCollection3D |
| Plane | |
| View2D |
Free functions
| Function | Description |
|---|---|
are_collinear(p1, p2, p3) |
Three points on the same line |
are_coplanar(points) |
List of Point3D on the same plane |
closest_world_plane_to(points) |
XY / YZ / ZX plane nearest to the point cloud |
are_ccw(points[, ref_plane]) |
Counter-clockwise winding (2D or 3D) |
are_cw(points[, ref_plane]) |
Clockwise winding (2D or 3D) |
remove_collinear(points) |
Drop collinear intermediate points |
remove_duplicates(points) |
Drop duplicate points |
average(points) |
Arithmetic mean |
linear_combination(points, weights) |
Weighted sum |
has_intersections(segments) |
Shamos–Hoey: True if any two segments in list[LineSegment2D] cross |
find_intersections(segments) |
Bentley–Ottmann: returns list[Point2D] — every crossing point, sorted left-to-right |
convex_hull(points) |
Andrew's monotone chain: convex hull of a list[Point2D], returned in CCW order |
convex_hull(points, normal=None) |
Convex hull of a coplanar list[Point3D]; optional Vector3D normal (auto-detected if omitted) |
principal_axes(points) |
PCA on a list[Point3D]: returns CoordinateFrame (.x primary, .y secondary, .z best-fit normal) |
principal_normal(points) |
Best-fit plane normal of a list[Point3D] (PCA eigenvector with smallest eigenvalue) |
principal_direction(points) |
Dominant direction of a list[Point3D] (PCA eigenvector with largest eigenvalue) |
tangents_to(polygon, point_or_polygon) |
PolygonTangents2D/PolygonTangents3D (.left/.right) — tangent segments to a point, or common outer tangents to another polygon |
How to use it
You can look at the test suite to see detailed usage.
A quick list of code examples per topic is provided here.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geompp-0.13.0.tar.gz.
File metadata
- Download URL: geompp-0.13.0.tar.gz
- Upload date:
- Size: 49.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c56a06ce5caec096c09af582502de237d3a77e5f57a1396d5a4d79b61b3a330b
|
|
| MD5 |
715e747a8a7656358f99716e1d127b47
|
|
| BLAKE2b-256 |
acef2ee665f2b3651686f1782e4c8550a68e3815b056aecd01149368b06e21d9
|
File details
Details for the file geompp-0.13.0-cp313-cp313-win_amd64.whl.
File metadata
- Download URL: geompp-0.13.0-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 4.5 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b616ac6863c1f45ce528e355b2d2a4ade6d72b68219d13a55939c45678a0d021
|
|
| MD5 |
b5101041b4e060b9fbbf23ce42f41c5c
|
|
| BLAKE2b-256 |
a715e71b5a11b23cc10f96977a21fa69c43f17ee516cf95a002d141d507f820c
|
File details
Details for the file geompp-0.13.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.13.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 6.9 MB
- Tags: CPython 3.13, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c756f342ce9f665bdc6326075932e314e564e22e89eba7adf18122efc602c606
|
|
| MD5 |
8c1a8a6a5dafb2e9bd65f9cb07424fd9
|
|
| BLAKE2b-256 |
60e816e2a6e76c646123fdf24689ed3d6a3ae81c074b16a96de7559845cf8cd9
|
File details
Details for the file geompp-0.13.0-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: geompp-0.13.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 3.8 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
df50e50611bdd4a3da4e991e99ffd0189310df543681941694a873704a9cce20
|
|
| MD5 |
b8504561ed2413758518453c98a1eab3
|
|
| BLAKE2b-256 |
d12c2b0fcae3a4bff94b6f2e56aaacf58733d8f34e9bb98b112b953248050beb
|
File details
Details for the file geompp-0.13.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.13.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.8 MB
- Tags: CPython 3.12, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ff960c9a1ded03a304432283a4aaf9ed19bcd1318d0152822d64f594444f8d7
|
|
| MD5 |
fd1a96481cdf22ce170a9e61c5c1fc9d
|
|
| BLAKE2b-256 |
fcb2b604c4ee6c1c63f1aa35ec0b1fcdf3d4a4627705435c0f8a872c6f6f1eda
|
File details
Details for the file geompp-0.13.0-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: geompp-0.13.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53dba0be706f06d62231ce13f52d9e5f31906913e854b1c121c6779058a8934f
|
|
| MD5 |
dbcf50b42bfd9491b52d030c4c4fbc0e
|
|
| BLAKE2b-256 |
537605cfb13a8deada2a9a9ccf4072d4e14454e9528872a3edeceb2bc615f50c
|
File details
Details for the file geompp-0.13.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.13.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0be8b682fa81fa366b34c90759db5204d33501e0bc2192a515c7e849c9e730ad
|
|
| MD5 |
06c8ea21aece1517b45f9da8baaef96a
|
|
| BLAKE2b-256 |
eac83998b7b43ebcc4d4dabf9e6b886d80897cb80bbeecdc79f023661697a948
|
File details
Details for the file geompp-0.13.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: geompp-0.13.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6d9a9c26749c4f22c9db7e634bdda0b83bf4b6212fedfb125bdcc9397c3ea3a
|
|
| MD5 |
8f647a23094a52cc7d55c63c6b0f1f92
|
|
| BLAKE2b-256 |
ba3a760d356e178d23fd35d6feae0dfc74d63c7bae2df928be4e39ed1b728442
|
File details
Details for the file geompp-0.13.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.13.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.5 MB
- Tags: CPython 3.10, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
580cc95ecd674949b0eb730957d2449204e4e56c63f50510358c0c4b6f180f61
|
|
| MD5 |
37e620e7eace852598cfc6591a7ae7a1
|
|
| BLAKE2b-256 |
5c5810894d52b84dede73ef1cf6d23d08bb2f22b29f56b6d0472d04c2785830e
|
File details
Details for the file geompp-0.13.0-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: geompp-0.13.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b891ae7d669427e90873f9536996e6eebbbfb7b05180e4f666a18db63bfab011
|
|
| MD5 |
9b91a773d04da9d59533fd483a97fafd
|
|
| BLAKE2b-256 |
5247cec98b6ed1db0fceec184a4744b072fcf70e4cca42aa86b9c0afd5f375f3
|
File details
Details for the file geompp-0.13.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.13.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c465e252c3548bdba21362cdd136f259332b10e8d8e7adbbe3b7a3223c6c1012
|
|
| MD5 |
43a017c2b9573350c7b624e850f8abbf
|
|
| BLAKE2b-256 |
f911161a355946e8a909a52ca297dfafa735c84cd08d0fb0821bd8e0a9532cd6
|
File details
Details for the file geompp-0.13.0-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: geompp-0.13.0-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 1.1 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9020426d9b850d14e055d209740b6ba65cee896fe4f088a23c5570e615e07c81
|
|
| MD5 |
fa974964424a461b85c93fa4ea14c678
|
|
| BLAKE2b-256 |
cc2f658f4f24d3fcb515a43adc4f5eb25f6fd400f8730409f49b319feeee6802
|
File details
Details for the file geompp-0.13.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.13.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8, manylinux: glibc 2.27+ x86-64, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18e81588de353b28718fbea4044b7a12d883ad1c73b3f776beef15dcfd3d834d
|
|
| MD5 |
051b72f22b2dceda3d0c039595e253d1
|
|
| BLAKE2b-256 |
580ce369771ce2fb95cce94dd1dee34e1fcb696506f3780a670f8006f659c51b
|