threecrate-reconstruction

Crates.iothreecrate-reconstruction
lib.rsthreecrate-reconstruction
version0.5.0
created_at2025-07-10 11:17:16.658085+00
updated_at2025-09-27 10:22:34.582329+00
descriptionSurface reconstruction algorithms for threecrate
homepagehttps://github.com/rajgandhi1/threecrate.git
repositoryhttps://github.com/rajgandhi1/threecrate.git
max_upload_size
id1746172
size238,464
Raj Gandhi (rajgandhi1)

documentation

https://docs.rs/threecrate-core

README

ThreeCrate Reconstruction

Crates.io Documentation License

Surface reconstruction algorithms for generating meshes from point clouds.

Features

  • Poisson Reconstruction: High-quality surface reconstruction using Poisson solving
  • Ball Pivoting: Fast surface reconstruction for uniformly sampled point clouds
  • Alpha Shapes: Geometric reconstruction using alpha complex
  • Delaunay Triangulation: 2D/3D triangulation for mesh generation
  • Parallel Processing: Multi-threaded algorithms for large datasets

Algorithms

Poisson Surface Reconstruction

  • High-quality mesh generation from oriented point clouds
  • Handles noise and irregular sampling well
  • Produces watertight meshes
  • Configurable octree depth and sample density

Ball Pivoting Algorithm (BPA)

  • Fast reconstruction for uniformly sampled point clouds
  • Good for dense, noise-free data
  • Preserves sharp features and boundaries
  • Configurable ball radius and clustering

Alpha Shapes

  • Geometric approach using alpha complex
  • Good for shape analysis and boundary detection
  • Multiple levels of detail with different alpha values
  • Handles complex topologies

Usage

Add this to your Cargo.toml:

[dependencies]
threecrate-reconstruction = "0.1.0"
threecrate-core = "0.1.0"

Example

use threecrate_reconstruction::{poisson_reconstruction, ball_pivoting_reconstruction};
use threecrate_core::{PointCloud, Point3f};

// Load point cloud with normals
let cloud = PointCloud::from_points(vec![/* points */]);

// Poisson reconstruction
let mesh = poisson_reconstruction(&cloud, 6, 1.0, 0.1)?;
println!("Generated mesh with {} faces", mesh.faces.len());

// Ball pivoting reconstruction
let radius = 0.1;
let mesh = ball_pivoting_reconstruction(&cloud, radius)?;
println!("Generated mesh with {} faces", mesh.faces.len());

Algorithm Details

Poisson Parameters

  • Octree Depth: Controls mesh resolution (6-10 recommended)
  • Sample Density: Point density factor (0.5-2.0)
  • Confidence Threshold: Quality filtering (0.0-1.0)

Ball Pivoting Parameters

  • Ball Radius: Reconstruction radius (depends on point density)
  • Clustering: Remove duplicate vertices and faces
  • Normal Consistency: Ensure consistent face orientations

Requirements

  • Point clouds with estimated normals for best results
  • Sufficient point density for reconstruction
  • Reasonable memory for large point clouds

License

This project is licensed under either of

at your option.

Commit count: 0

cargo fmt