Python bindings for geompp — a C++ 2D/3D geometry library
Project description
geompp
Python bindings for geompp — a C++ 2D/3D geometry library.
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 |
| Windows x64 | 3.8 · 3.9 · 3.10 · 3.11 · 3.12 |
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.
Quick start
import geompp as g
# Points & vectors
p = g.Point2D(1.0, 2.0)
v = g.Vector2D(3.0, 0.0)
q = p + v # Point2D(4, 2)
diff = q - p # Vector2D(3, 0)
# Lines and intersection
l1 = g.Line2D.make(g.Point2D(0,0), g.Point2D(1,0))
l2 = g.Line2D.make(g.Point2D(0.5,-1), g.Point2D(0.5,1))
hit = l1.intersection(l2) # Point2D(0.5, 0) or None
# 3D
p3 = g.Point3D(1, 2, 3)
plane = g.Plane.xy()
proj = plane.project_onto(p3) # Point3D(1, 2, 0)
# Precision
g.set_decimal_precision(g.DP_SIX)
# File parser
parser = g.LVSParser.open("geometry.lsv")
while parser.has_next():
item = parser.next()
if item is not None:
print(g.LVSParser.to_wkt(item))
Classes
| 2D | 3D |
|---|---|
| Point2D | Point3D |
| Vector2D | Vector3D |
| Line2D | Line3D |
| Ray2D | Ray3D |
| LineSegment2D | LineSegment3D |
| Polyline2D | Polyline3D |
| Triangle2D | Triangle3D |
| Polygon2D | Polygon3D |
| BBox2D | BBox3D |
| Plane |
Project details
Release history Release notifications | RSS feed
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.1.2.tar.gz.
File metadata
- Download URL: geompp-0.1.2.tar.gz
- Upload date:
- Size: 15.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 |
7f29ac5760cddf2f449be8c68cda0897c9080be6620968720a5c5184229a84a2
|
|
| MD5 |
770b94a46761930d9e465e8f17e9e5a7
|
|
| BLAKE2b-256 |
092f8970fdb5639259ec7fbf24355c8e8ea077bcd5851d36b485b35ba5edcd16
|
File details
Details for the file geompp-0.1.2-cp312-cp312-win_amd64.whl.
File metadata
- Download URL: geompp-0.1.2-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 2.3 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 |
083d23727a6b04bd3f4d32f98939bbeba5faedfa4db7454495b3339d369d542e
|
|
| MD5 |
14f5d39043278d3d9b87edfd4aa5ae85
|
|
| BLAKE2b-256 |
7bc7bc6c43ff675f43c398293836da326c4bd7c7d1c10ef4a372558eb664a2d8
|
File details
Details for the file geompp-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 4.4 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 |
e156af08ddc81ab61c9aa438b5d317d25e5bf77e88893500d28af50e923c1674
|
|
| MD5 |
a953f855956ba621b132fc9412f4f30e
|
|
| BLAKE2b-256 |
75e960eeb17557a9accd5c84fa9acce07721f5cebfa342aa2bb41beb63489789
|
File details
Details for the file geompp-0.1.2-cp311-cp311-win_amd64.whl.
File metadata
- Download URL: geompp-0.1.2-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 1.9 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 |
e77730adc9bc149356862b04a6a6b1aaf24f6ba5b56d12d2c9f03eea08d79183
|
|
| MD5 |
9eb8fe15de13c9b16a846d296e1db713
|
|
| BLAKE2b-256 |
a90d37a5a6450b8c56b3db3985f9528d60258d47821bf8e9bd4133c15ab2324d
|
File details
Details for the file geompp-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.1.2-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.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 |
f74b7d24b13fcb1b93d426cfa3e9d338bce43b24d101019b4ece52ecc3ce94e2
|
|
| MD5 |
5a6f255f882490012a7aa95fa30bf078
|
|
| BLAKE2b-256 |
62ce5515998ef4e361a3d087fc0f75f6a5cd9841f2ee20a01a87d0e0d688c02d
|
File details
Details for the file geompp-0.1.2-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: geompp-0.1.2-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 1.5 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 |
90f7d4f4e39b1eac94cd82d31527cb22d4745306b124eefa028fa7fda4818cbf
|
|
| MD5 |
42286b1496d46306836f17f94950ff0d
|
|
| BLAKE2b-256 |
76cdb69cb8045dd043a7ace8e0ffb0dadf3105273022a6d3044c40e69c146e9b
|
File details
Details for the file geompp-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.1.2-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 2.7 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 |
44527e643bd90d1c107f38fe2ef5a3b217c3eb0fd9dd72d59373557e2f771981
|
|
| MD5 |
e2cbb683677e44a94852b64157e349da
|
|
| BLAKE2b-256 |
d52cb577e9757679af061d2312920a36e9580a11b34fbdfed6b0cd75b2bf3ddd
|
File details
Details for the file geompp-0.1.2-cp39-cp39-win_amd64.whl.
File metadata
- Download URL: geompp-0.1.2-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 1.1 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 |
1022d05a72e84c8ea7cbb939ecb17988f3786eb7ac1f91fe33e0a8664ad3e100
|
|
| MD5 |
47c3f177cb4a9a136bfae9c9f18847c3
|
|
| BLAKE2b-256 |
536c7445b18ea9684b185cbcc4de95bbce3843c2a907b266d405050041f06b40
|
File details
Details for the file geompp-0.1.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.1.2-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 1.8 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 |
0ceadfc546cb3e4f9e30005bd6af13055ed1f3913e75b2783303f52095230612
|
|
| MD5 |
bd0363fa1ce71a0da50c888a37c213cc
|
|
| BLAKE2b-256 |
1435796c793fdebb03059d1901600d544b231cde6f9150c003171cea3a49d364
|
File details
Details for the file geompp-0.1.2-cp38-cp38-win_amd64.whl.
File metadata
- Download URL: geompp-0.1.2-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 683.9 kB
- 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 |
e1d9712e1921ab7b2c664f68f78d249a8dd4614295c7a11f6083a4f8b13a6b3a
|
|
| MD5 |
bd7a99fe41701f2704b6108821174eea
|
|
| BLAKE2b-256 |
a7224506db39e6b3ad03bf948fe27d23d509713b1f4158ade68b91e6302255ea
|
File details
Details for the file geompp-0.1.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.
File metadata
- Download URL: geompp-0.1.2-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
- Upload date:
- Size: 969.2 kB
- 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 |
5f1f451eac190f8a2d2b8c1dddbb342869eca9c87cae6bb05b9bec07ccdc3a35
|
|
| MD5 |
cc0a75e2f36c09b20ef947e42f6a9fa1
|
|
| BLAKE2b-256 |
b252f530221f2f2a184e2819d97f984095f3950680a0171641324c69880b3243
|