Skip to main content

Python bindings for geompp — a C++ 2D/3D geometry library

Project description

← back

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

    # Points & vectors
    p = geompp.Point2D(1.0, 2.0)
    v = geompp.Vector2D(3.0, 0.0)
    q = p + v                       # Point2D(4, 2)
    diff = q - p                    # Vector2D(3, 0)

    # Lines and intersection
    l1 = geompp.Line2D.make(geompp.Point2D(0,0), geompp.Point2D(1,0))
    l2 = geompp.Line2D.make(geompp.Point2D(0.5,-1), geompp.Point2D(0.5,1))
    hit = l1.intersection(l2)       # Point2D(0.5, 0) or None

    # 3D
    p3 = geompp.Point3D(1, 2, 3)
    plane = geompp.Plane.xy()
    proj = plane.project_onto(p3)   # Point3D(1, 2, 0)

    # Precision
    geompp.set_decimal_precision(geompp.DP_SIX)

    # File parser
    parser = geompp.LVSParser.open("geometry.lsv")
    while parser.has_next():
        item = parser.next()
        if item is not None:
            print(geompp.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

Build the python bindings from source

Linux

Build

    mkdir build && cd build
    cmake .. [-DCMAKE_BUILD_TYPE=Release] [-DBUILD_PYTHON=ON]
    make -j6

The -DBUILD_PYTHON=ON will build locally the python bindings and run the smoke tests immediately.

To try out the library after building it use this

    # from the main directory geompp
    pip3 install --break-system-packages ./geompp_python
    python3 -c "import geompp as g; print(g.Point3D(1,2,3).to_wkt())"
    # should print POINT (1 2 3)

Windows

Build the library

    mkdir build_win
    cd build_win
    cmake -S .. -G "Visual Studio 18 2026" -A x64
    cmake --build . --target geompp [--config Release] [-DBUILD_PYTHON=ON]

The -DBUILD_PYTHON=ON will build locally the python bindings and run the smoke tests immediately.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geompp-0.1.1.tar.gz (16.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

geompp-0.1.1-cp312-cp312-win_amd64.whl (2.3 MB view details)

Uploaded CPython 3.12Windows x86-64

geompp-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

geompp-0.1.1-cp311-cp311-win_amd64.whl (1.9 MB view details)

Uploaded CPython 3.11Windows x86-64

geompp-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

geompp-0.1.1-cp310-cp310-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.10Windows x86-64

geompp-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

geompp-0.1.1-cp39-cp39-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.9Windows x86-64

geompp-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

geompp-0.1.1-cp38-cp38-win_amd64.whl (680.3 kB view details)

Uploaded CPython 3.8Windows x86-64

geompp-0.1.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (966.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file geompp-0.1.1.tar.gz.

File metadata

  • Download URL: geompp-0.1.1.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for geompp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 998219ed7b6b0d6ffa229c0b10fd896da601fa66a19be0ca4dc06a0523a929db
MD5 40796a9ae37de60260cec93bc6773c85
BLAKE2b-256 a5529f7db9d30081c08bbf2920fead2e2e2a57b762d842c9bbf8204a2178d944

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: geompp-0.1.1-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

Hashes for geompp-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 58555bc4cc9357a227de19850fdf6c1022467a179ad4a4b9d4b0074f6b060135
MD5 2989a35256cce473338793212dd63edf
BLAKE2b-256 3d042053a7cde84bba9533e74907458c7f1a89a341774a61dd33d7e2625c6cda

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for geompp-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c26263a69784429ecf2f270b11b59aacfe6f6677faf1844429c45838d7d8b46
MD5 06045fe11e92aaea87efd7dc846b7233
BLAKE2b-256 973331b46ebddec64dd761dfe8928c3f9469a9eabe760eff7ee6d81ce69e3b98

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: geompp-0.1.1-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

Hashes for geompp-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8cef3cf533bc4ff0dcf941a8409af300ae9d38111263e9426c34978420874630
MD5 f0803cbb18fd8e32b3dbb0d20c221c86
BLAKE2b-256 c8bf790d624a9ebce29d20cbb9f4b855c460bff4a55afc4b25157d28e37091db

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for geompp-0.1.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fbf61b4bc7c784708bb678156ae25c6d18516b477de346309c196cdf3b3ff5a2
MD5 8e3195e982564372d996b7158d57a375
BLAKE2b-256 65101107ab3d8ddbfca3bd6d63c4f3caa957f6fe22df8e5be2866b972acfe149

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: geompp-0.1.1-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

Hashes for geompp-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a9076f022b6bf3eb2f2f39ed14e2c261695c4ef4fde3f949770a8da715247064
MD5 8272921aa59548dca79fe124a858e9cd
BLAKE2b-256 5f0169c825bed1e6a79dc0dbc21e7c6541f3258d18644eeeda016c8b75196e3f

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for geompp-0.1.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b017a440ae8cb32a962e8d8ec1070a4e2effb2caf1e4e057ee5671ad9e82bbdf
MD5 9b4f1d33dee105fefa08028c261df3e5
BLAKE2b-256 a31aac1a37eb7f6185ca282454cd5b09f263c1b2a8a49908d1a78d3af16eb86c

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: geompp-0.1.1-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

Hashes for geompp-0.1.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 954c6e1bc9f1900c9c4f266f56ff2d453d19639570ae79472c16af44fcc9239c
MD5 8bc4d2874904f58316da3508e2971f61
BLAKE2b-256 f8560acf49cb8cde19e81c0ad671de62f47d1b47f2b27d8e7a564db923d706a4

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for geompp-0.1.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 99c078f8e31e6cad769f28a391fa6bdac2fbccacdfb811c7033e4a67deb604e8
MD5 55f08492c0dda0d1debefa29e4026324
BLAKE2b-256 aa473ef62bf2e57276360d774ca63fe2f2f78defd2e13660957c9ada5e4b840e

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: geompp-0.1.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 680.3 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

Hashes for geompp-0.1.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 59095921b93daee025ef69a036781381320642fe6e4cb24d7dfa78ccfb2c4deb
MD5 17ca7f80d6b5c0437de9ae1e26c6cc37
BLAKE2b-256 77a6130a22951ddef9fd555cbde4ee147e1ffcab3b3f05e7a4be2818351ba75b

See more details on using hashes here.

File details

Details for the file geompp-0.1.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for geompp-0.1.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 42ed8994fc494ed6556149d692d89bd78c3d1225d1fca8e228cc9782473a3e9b
MD5 75cc09240e4f6c245e63d592bd107978
BLAKE2b-256 9178ac3f1af8ee8c9ecd314c90b226f392380e6671c07f4144e1e29cc1dbc8cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page