Skip to main content

GEL

GEL is a C++ library of geometry processing tools mostly intended for computer graphics applications. Python bindings for GEL are found in the included PyGEL library which is also available from PyPI under the package name PyGEL3D. inverse skeletonized structure created using diffusion limited aggregation

GEL contains

  • a fairly mature half-edge based polygonal mesh data structure which includes functions for traversing a mesh and a rich library of methods for modifying meshes,
  • a graph data structure which is also specialized for spatial graphs,
  • voxel grid data structures,
  • spatial data structures for triangles and points: BSP tree, bounding box hierarchy, and a kD-Tree in particular,
  • a linear algebra library for small vectors and matrices (2D, 3D, and 4D),
  • tools for visualization based on OpenGL and tools based on Plotly for visualization in Jupyter notebooks, and
  • various utilities.

Unique functionality includes

  • Local Separator Skeletonization: our graph-based skeletonization method that works on both meshes, voxel data, and point clouds, although you need to specify the connectivity for the latter two.
  • Inverse skeletonization: Face extrusion quad meshes (FEQ) from graphs.
  • Rotation System Reconstruction: a combinatorial method for reconstruction from point clouds.

There are several less unique but important features:

  • Garland-Heckbert simplification of triangle meshes,
  • signed distance field (SDF) computation from triangle meshes,
  • iso-surface polygonization for regular voxel grids: can produce both dual and primal connectivity,
  • edge flipping-based optimization for triangle meshes,
  • mesh smoothing: we include anisotropic smoothing, Taubin smoohing, and more.
  • topological analysis: a single (Python) function splits a mesh into components and analyses each.

GEL requires a recent C++ compiler but has very few dependencies. For visualization, OpenGL and GLFW are required, but these dependencies can be omitted if visualization is not needed. The basic philosophy is that GEL should have few dependencies itself since it is better that projects which use GEL can choose for themselves, say, which linear algebra package to use.

PyGEL

PyGEL is a set of Python bindings for a subset of the features in GEL. In particular, PyGEL covers almost all the mesh features. In addition PyGEL has its own viewer based on OpenGL, and PyGEL can be used from Jupyter notebooks. In this case, it is possible to visualize meshes using a plotly widget. A significant benefit here is that when the notebook is exported to HTML, the 3D view comes along. In fact, this makes PyGEL a useful tool for teaching geometry processing since work can be carried out in a Jupyter notebook and assignments submitted as HTML files. Moreover, PyGEL works in Google colab notebooks.

DOCUMENTATION

Some installation instructions below. But for more documentation please see the doc directory. There is a doxygen script for creating a reference manual and a latex file intro.tex which explains the basics. Please doxygen or pdflatex your documentation. A license is also found in the intro document.

INSTALLING PYGEL WITH PIP

PyGEL is on PyPI and can be installed with pip. For most potential users, there is no reason to look further than:

pip install PyGEL3D

The PyPI package is called PyGEL3D and not PyGEL. pip installs a wheel for your platform:

  • Linux x86_64 and ARM64 (manylinux, glibc 2.28+: Ubuntu 20.04, Debian 10, RHEL 8, Fedora, Colab, and similar)
  • macOS 11+ (universal2: Intel and Apple Silicon)
  • 64-bit Windows

The compiled library links against OpenGL (libGL). A normal desktop already has this. A minimal Linux system (container, CI, server, Colab) usually does not, and import pygel3d will then fail even though pip succeeded.

On Ubuntu/Debian install the OpenGL runtime:

sudo apt-get install libgl1

libgl1 is a virtual package. Apt will pull in whatever implementation the distribution ships — typically Mesa. That is not a request to use software rendering; your GPU driver still provides the actual OpenGL implementation.

On Google Colab, use this as the first cell:

!apt-get install libgl1
!pip install PyGEL3D

If there is no wheel for your platform (for example Alpine/musl), build from source as discussed below.

BUILDING AND INSTALLING GEL AND PYGEL

If you need or wish to build GEL/PyGEL from source, please download or clone it from https://github.com/janba/GEL. Below you will find instructions for how to build and create a package for PyGEL that can be installed via pip. If you look around you will find some other build options for Windows, Mac and Linux. Since GEL is primarily developed on Mac OS, the Xcode projects are actively maintained and cover everything. The two last build options are not actively maintained. However, they may prove of some use and hence not removed.

Building with CMake

If you are using a unix-like command line, build and install with

cmake -S . -B build
cmake --build build -j 8
cmake --install build

This installs the GEL library, headers, and a CMake package config into ~/.local (~/.local/include/GEL, ~/.local/lib) so other projects can locate GEL with find_package(GEL). No sudo is required. Override the location with -DCMAKE_INSTALL_PREFIX=<prefix> if needed.

Note that this process is automated by the build_install.sh script.

Using GEL from CMake

After installing GEL, a consumer project only needs:

find_package(GEL REQUIRED HINTS "$ENV{HOME}/.local")
target_link_libraries(my_app PRIVATE GEL::GEL)

If GEL is not in ~/.local or another default search path, point CMake at the install (or build) tree:

cmake -S . -B build -DCMAKE_PREFIX_PATH=<gel-install-prefix>

Creating a PyGEL3D package and installing it

From a source checkout, build a platform wheel (it compiles libPyGEL with CMake and tags the wheel for this OS/architecture):

python -m build --wheel
pip install dist/pygel3d-*.whl

You need CMake ≥ 3.25, a C++20 compiler, and the Python packages build and setuptools. Isolated builds also pull in the cmake and ninja packages automatically.

Alternatively,

pip install .

or the one-stop script

sh build_install.sh

builds GEL, installs the C++ library to ~/.local, and pip-installs a local PyGEL3D wheel (replacing any previous install).

PyPI releases are produced by GitHub Actions (.github/workflows/wheels.yml). Pushing a tag v* builds manylinux, macOS, and Windows wheels plus an sdist and publishes them. There is no local step of downloading binaries from CI.

Compilation of Demos and Tests

GEL comes with some test scripts and also demos. You can find these in GEL/src/test and GEL/src/demo. Tests are optional and built with the main project when BUILD_TESTING is on.

The philosophy behind the demos is that they require GEL and PyGEL3D (for the Python demos) have been installed and do not try to find header files, binaries, or Python packages in the GEL source tree.

In fact, the C++ demos are standalone CMake projects. They call find_package(GEL) and therefore expect an installed GEL package rather than a library sitting in the source tree. After a standard install to ~/.local:

cmake -S src/demo/MeshDistance -B src/demo/MeshDistance/build
cmake --build src/demo/MeshDistance/build

All C++ demos can also be configured together from src/demo and there is a script run_demos.py that runs all of them. Since many are interactive, you will frequently need to hit escape or quit a program if you run this script.

Practical Issues

Compiling both GEL and PyGEL requires that you have OpenGL installed unless you choose not to compile graphics support which you can do by setting Use_GLGraphics to OFF in the CMake file. GLFW is also needed, but CMake fetches GLFW from github and compiles it along with the GEL code. If you compile in some of the other ways (e.g. using XCode, Visual Studio) there is no simple way to avoid the dependency on graphics libraries. Thus, if you need to avoid the OpenGL requirements, CMake is the way to go.

GEL comes with a few demo applications. In addition to the requirements above, several of these also require GLUT to be installed. Going forward, we should remove the GLUT dependency and move to GLFW for the applications.

PyGEL has a module called jupyter_display which produces graphics suitable for Jupyter notebooks. This module is based on plotly which must then be installed for it to work. You will also need numpy. However, if you use pip, these required libraries will be downloaded automatically when you install PyGEL.

Download files

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

Source Distribution

pygel3d-0.8.0.tar.gz (859.6 kB view details)

Uploaded Source

Built Distributions

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

pygel3d-0.8.0-py3-none-win_amd64.whl (676.7 kB view details)

Uploaded Python 3Windows x86-64

pygel3d-0.8.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

pygel3d-0.8.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.6 MB view details)

Uploaded Python 3manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

pygel3d-0.8.0-py3-none-macosx_11_0_universal2.whl (2.2 MB view details)

Uploaded Python 3macOS 11.0+ universal2 (ARM64, x86-64)

File details

Details for the file pygel3d-0.8.0.tar.gz.

File metadata

  • Download URL: pygel3d-0.8.0.tar.gz
  • Upload date:
  • Size: 859.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pygel3d-0.8.0.tar.gz
Algorithm Hash digest
SHA256 cdd5407c71259226a618ced64b21fa415ef9eea35d07866dd8454cb4089311c0
MD5 a51e4a1638c1288f9b313adb573b376a
BLAKE2b-256 ec4f8e58c1f7cef75c2a4572c8db9b7cf29df8a1a4a23bd90c738935e183003a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygel3d-0.8.0.tar.gz:

Publisher: wheels.yml on janba/GEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygel3d-0.8.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: pygel3d-0.8.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 676.7 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pygel3d-0.8.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 9b729367314f92040d4307017f6aadcb1610e29be523d0859153927daf75536b
MD5 3ad84a98a42ed73bd23283fdab7125f9
BLAKE2b-256 1b5168173c847160eaf6373b51c24fd413d3abd0e4bfb3b7efdf84db903713ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygel3d-0.8.0-py3-none-win_amd64.whl:

Publisher: wheels.yml on janba/GEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygel3d-0.8.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pygel3d-0.8.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0d3be7b910f39a80bc35ae617b264931a09b531a3ada2e2a3b15bf006b42de0e
MD5 4edd196a4d489f28c190ffdbf6d46507
BLAKE2b-256 e58b1a6cccf719b893007f277d1b2b0ae4fa3fbf295243eead8e3b83199a4f42

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygel3d-0.8.0-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheels.yml on janba/GEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygel3d-0.8.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pygel3d-0.8.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7590220ceb6e1ceb0b53d15ff5e169fe93e8bed62aa910a72bb93a3fb97d6bbf
MD5 cad1b04a74f1cffe2d4fee85d0eb6cac
BLAKE2b-256 71e3c65ff7ed1b5b0333afb124dc2ca35787a138de7689b919e04247015f51cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygel3d-0.8.0-py3-none-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl:

Publisher: wheels.yml on janba/GEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pygel3d-0.8.0-py3-none-macosx_11_0_universal2.whl.

File metadata

File hashes

Hashes for pygel3d-0.8.0-py3-none-macosx_11_0_universal2.whl
Algorithm Hash digest
SHA256 b7bbe05e9df2ff9dfc0d333656c5947344592f2866668f2a84e1d76883273479
MD5 7c6faffd1156ca91664bd1514d29a75f
BLAKE2b-256 dfbae4e8dc5f9e754545c1d829a4c248e8f67de0104f8e3b61c2d4c60c5e08cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pygel3d-0.8.0-py3-none-macosx_11_0_universal2.whl:

Publisher: wheels.yml on janba/GEL

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.8.2

5 files

This release

0.8.0 This release

5 files

0.7.3

1 file

0.7.2

1 file

0.7.1

1 file

0.7.0

1 file

0.6.1

1 file

0.6.0

1 file

0.5.2

1 file

0.4.5

1 file

0.4.4

1 file

0.4.3

1 file

0.4.2

1 file

0.4.1

1 file

0.3.2

1 file

0.3.1

1 file

0.3.0

1 file

0.2.1

1 file

0.2.0

1 file

0.1.4

1 file

0.1.2

1 file

0.1.1

1 file

0.1.0

1 file

0.0.27

1 file

0.0.26

1 file

0.0.25

1 file

0.0.24

1 file

0.0.23

1 file

0.0.22

1 file

0.0.21

1 file

0.0.19

1 file

0.0.18

1 file

0.0.16

1 file

0.0.15

1 file

0.0.14

1 file

0.0.13

1 file

0.0.12

1 file

0.0.11

1 file

0.0.10

1 file

0.0.9

1 file

0.0.8

1 file

0.0.7

1 file

0.0.6

1 file

0.0.5

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page