Skip to main content

pypoisson2

A new Python bindings for Poisson Reconstruction with optional grid output, density values, and gradient vectors.

The corresponding C++ version: v18.74 of PoissonRecon by mkazhdan.

Features

  • Poisson surface reconstruction via C++ libraries (int32/int64 auto-selection)
  • Optional implicit grid field output
  • Boundary condition support (neumann/dirichlet/free)
  • Optional density and gradient outputs

Requirements

  • Python 3.9+
  • NumPy
  • Compiled PoissonRecon shared libraries in poisson/lib/, lib/, or build/
  • C++ build deps: cmake, g++, make, zlib, libpng, libjpeg, OpenMP

Installation

pip install -e .

Quick Start

# Build shared libs
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
make -C build -j$(nproc)

# Install Python package
pip install -e .

# Run a basic reconstruction
python - <<'PY'
import numpy as np
from poisson import poisson_reconstruction

points = np.random.randn(1000, 3).astype(np.float64)
points /= np.linalg.norm(points, axis=1, keepdims=True)
normals = points.copy()

vertices, faces = poisson_reconstruction(points, normals, depth=6)
print(vertices.shape, faces.shape)
PY

Build (PoissonRecon + Dump Tool)

This repo builds two executables:

  • PoissonRecon in build/
  • PoissonReconDump in build_dump/ (exports density/gradients for test alignment)
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
make -C build -j$(nproc)

cmake -S poisson_dump -B build_dump -DCMAKE_BUILD_TYPE=Release
make -C build_dump -j$(nproc)

Note: Do not define FAST_COMPILE if you need full boundary/degree support.

PyPI Release (Maintainers)

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*

Basic Usage

import numpy as np
from poisson import poisson_reconstruction

points = np.random.randn(1000, 3).astype(np.float64)
points /= np.linalg.norm(points, axis=1, keepdims=True)

normals = points.copy()

vertices, faces = poisson_reconstruction(points, normals, depth=6)

Advanced Outputs

vertices, faces, grid, iso_value, densities, gradients = poisson_reconstruction(
    points,
    normals,
    depth=6,
    grid_depth=5,
    output_density=True,
    output_gradients=True,
)

Core Parameters

poisson_reconstruction exposes core solver parameters:

  • depth, full_depth, cg_depth, iters, degree
  • scale, samples_per_node, point_weight, confidence
  • exact_interpolation, show_residual, low_depth_cutoff
  • width, cg_solver_accuracy, base_depth, solve_depth, kernel_depth, base_v_cycles
  • parallel_type, grid_depth
  • validate_finite (default True), force_big (force int64 library)

Tests

Tests use unittest and are run as modules (not pytest).

python -m unittest poisson.tests.exe.test_exe_consistency_core
python -m unittest poisson.tests.exe.test_exe_consistency_params
python -m unittest poisson.tests.exe.test_exe_boundary
python -m unittest poisson.tests.exe.test_dump_outputs
python -m unittest poisson.tests.python.test_python_validation

Executable paths (optional overrides):

  • POISSON_EXE_PATH defaults to build/PoissonRecon
  • POISSON_DUMP_EXE_PATH defaults to build_dump/PoissonReconDump

Notes:

  • Boundary tests default to the horse dataset: poisson/examples/horse_with_normals.xyz.
  • PoissonReconDump supports ASCII PLY inputs (x y z nx ny nz).

Metadata

Release files for pypoisson2 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pypoisson2 1.0.0
File Size Uploaded Provenance
pypoisson2-1.0.0.tar.gz 2.6 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pypoisson2 1.0.0
File Interpreter ABI Platform
pypoisson2-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.39+ x86-64 Details

Total release size: 8.1 MB

Release files / pypoisson2-1.0.0.tar.gz

Download URL pypoisson2-1.0.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
3c1f62e25eaf0c27f5daac78ede2f2a52e31dba23db8dd7f58b4ca8809bbeb58
BLAKE2b-256 checksum
How to use checksums
d45e4a57eed8302aca804d92f3b07f36bd917106cd600739bfcb680fb918960f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / pypoisson2-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl

Download URL pypoisson2-1.0.0-cp312-cp312-manylinux_2_39_x86_64.whl
Size 5.5 MB
Tags CPython 3.12 Linux glibc 2.39+ x86-64
SHA-256 checksum
How to use checksums
612ad0f4e0312c6f0cdfc3add35c71b26ff0cbecdececce4123717a145fd559e
BLAKE2b-256 checksum
How to use checksums
512bc0065630bafdeccbe29c3e98604fa80f765661516e48e439d292e6fecb6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for pypoisson2 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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