Mesh2SDF
Converts an input mesh to a signed distance field. It can work with arbitrary meshes, even non-watertight meshes from ShapeNet.
Mesh2SDF is used in our paper Dual Octree Graph Networks (SIGGRAPH 2022) to generate the training data.
Installation
-
Install via the following command:
pip install mesh2sdf
-
Alternatively, install from source via the following commands.
git clone https://github.com/wang-ps/mesh2sdf.git pip install ./mesh2sdf
Example
After installing mesh2sdf, run the following command to process an input mesh
from ShapeNet:
python example/test.py
How does it work?
-
Given an input mesh, we first compute the unsigned distance field with the fast sweeping algorithm implemented by Christopher Batty (SDFGen). Note that the unsigned distance field can always be reliably and accurately computed even though the input mesh is non-watertight.
-
Then we extract the level sets with a small value d with the marching cube algorithm. The extracted level sets are represented with triangle meshes and are guaranteed to be manifold.
-
There exist multiple connected components in the extracted meshes, and we only keep the mesh with the largest bounding box.
-
Compute the signed distance field again with the kept triangle mesh as the final output. In this way, the signed distance field (SDF) is computed for a non-watertight input mesh.
Metadata
Release files for mesh2sdf 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mesh2sdf-1.1.0.tar.gz | 18.6 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mesh2sdf-1.1.0-cp39-cp39-win_amd64.whl | CPython 3.9 | CPython 3.9 | Windows x86-64 | Details |
| mesh2sdf-1.1.0-cp38-cp38-win_amd64.whl | CPython 3.8 | CPython 3.8 | Windows x86-64 | Details |
Total release size: 147.9 kB
Release files / mesh2sdf-1.1.0.tar.gz
| Download URL | mesh2sdf-1.1.0.tar.gz |
|---|---|
| Size | 18.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a045fa9a6803a0b106db41ff415fd4d72ee39a61b4a73a89a19c3dffd13d6cb5
|
|
BLAKE2b-256 checksum How to use checksums |
12e40c40bf04b1379816a7857f697087b40efbbe259dbffccb977f694f5f8947
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Release files / mesh2sdf-1.1.0-cp39-cp39-win_amd64.whl
| Download URL | mesh2sdf-1.1.0-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 64.6 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6e90299e9299b36d1cd2b10018aa4f183a2fb7c7b2e60a62975b6d8f6dae57d5
|
|
BLAKE2b-256 checksum How to use checksums |
613ea7192ee9e3822654d8d79a789bf06bdbc7055a39da1afbc439254ba102c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Release files / mesh2sdf-1.1.0-cp38-cp38-win_amd64.whl
| Download URL | mesh2sdf-1.1.0-cp38-cp38-win_amd64.whl |
|---|---|
| Size | 64.7 kB |
| Tags | CPython 3.8 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9c63798c1158220409c0c34d86ab28b58dd3833a47c3cff403fda6cff39da7b1
|
|
BLAKE2b-256 checksum How to use checksums |
ea7da226039045d3271acc500a89e4504a1a95149e2124378968a68844477236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.13
|
Security for mesh2sdf 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.