Expand description
Safe Rust bindings for the Poisson Surface Reconstruction algorithm implemented by Michael Kazhdan.
Original source: https://github.com/mkazhdan/PoissonRecon
§Example
let mesh = poissonrecon::reconstruct_surface(
&points,
&normals,
&poissonrecon::PoissonParamsBuilder::default().build(),
)?;§Comparison to the poisson_reconstruction crate
The poisson_reconstruction crate is an excellent Rust reimplementation of
the Screened Poisson Surface Reconstruction algorithm. It’s maintained by
the Foresight Mining Software Corporation.
This poissonrecon crate on the other hand, is a Rust wrapper around Michael Kazhdan’s
original C++ implementation. It compiles a C++ library that you must drag along
with your Rust project. It also exposes more tuning parameters for the algorithm
than the poisson_reconstruction crate does, which may be useful for some
applications.
You should use the poisson_reconstruction crate if you want a pure Rust
implementation.
You should use the poissonrecon crate if you want to use the original battle-tested
implementation, and you don’t mind dragging along a C++ library.
The repository contains an example comparing the output of the two implementations:
cargo run --release --example comparison§Template unrolling
The PoissonRecon C++ algorithm is templated over the FEMDegree and the BoundaryType. You can enable compilation of different combinations of FEMDegree and BoundaryType by enabling or disabling the corresponding feature flags.
These are the available feature flags:
degree_1: Enables theDegree::Oneoption.degree_2: Enables theDegree::Twooption.degree_3: Enables theDegree::Threeoption.boundary_free: Enables theBoundaryType::Freeoption.boundary_dirichlet: Enables theBoundaryType::Dirichletoption.boundary_neumann: Enables theBoundaryType::Neumannoption.
degree_1 and boundary_neumann are enabled by default.
⚠️ You must have at least one degree and one boundary type enabled. If none are enabled, the library will forcefully compile as if
degree_1andboundary_neumannwere enabled.
It is recommended to enable only the feature flags you need, as each
combination will significantly increase the compilation time and binary size.
Enabling all feature flags will result in a 3 * 3 = 9 increase in compilation time
and binary size.
Structs§
- Level
SetExtraction Parameters - Parameters for the surface mesh extraction from the Poisson solution.
- Level
SetExtraction Parameters Builder - Builder for
LevelSetExtractionParameters. - Mesh3D
- Simple 3D mesh datastructure.
- Poisson
Params - Options for Poisson Surface Reconstruction
- Poisson
Params Builder - Builder for
PoissonParams. - Solution
Parameters - Main parameters for the Poisson surface reconstruction algorithm.
- Solution
Parameters Builder - Builder for
SolutionParameters.
Enums§
- Boundary
Type - This integer specifies the boundary type for the finite elements.
- Degree
- This integer specifies the degree of the B-spline that is to be used to define the finite elements system.
- Poisson
Error
Functions§
- reconstruct_
surface - Perform Poisson Surface Reconstruction on the given points and normals.