Skip to content

Add 3D mesh generation examples#49

Merged
nash1111 merged 1 commit intomainfrom
issue-48
Feb 8, 2026
Merged

Add 3D mesh generation examples#49
nash1111 merged 1 commit intomainfrom
issue-48

Conversation

@nash1111
Copy link
Copy Markdown
Owner

@nash1111 nash1111 commented Feb 8, 2026

Summary

  • Add simple_3d_tetrahedralization example: Bowyer-Watson 3D on unit cube (8 vertices → 9 tetrahedra)
  • Add sphere_mesh_export example: Marching cubes sphere → STL, OBJ, GLB, quantized GLB, VTK
  • Add pipeline_example example: All pipeline algorithms (sphere, torus, surface_to_volume, octree_refined, voxel_refined)
  • Update .gitignore for generated output files (*.stl, *.obj, *.glb, *.vtk)
  • Update README with 3D example run instructions

Test plan

  • cargo build --examples compiles
  • cargo run --example simple_3d_tetrahedralization runs
  • cargo run --example sphere_mesh_export generates 5 output files
  • cargo run --example pipeline_example generates 7 output files
  • cargo fmt --check clean
  • cargo clippy -- -D warnings clean

Closes #48

🤖 Generated with Claude Code

- simple_3d_tetrahedralization: Bowyer-Watson 3D on unit cube vertices
- sphere_mesh_export: Marching cubes sphere exported to STL, OBJ, GLB,
  quantized GLB, and VTK formats
- pipeline_example: All pipeline algorithms (marching cubes sphere/torus,
  surface_to_volume, octree_refined, voxel_refined) with file export
- Update .gitignore for generated output files
- Update README with 3D example instructions

Closes #48

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 8, 2026 10:39
@nash1111 nash1111 merged commit c992b46 into main Feb 8, 2026
2 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new 3D example binaries to demonstrate mesh generation and export workflows, and documents how to run them (Issue #48).

Changes:

  • Added 3 new examples: Bowyer–Watson 3D tetrahedralization, marching-cubes sphere export, and a combined pipeline demo.
  • Updated README with 3D example run commands and viewer guidance.
  • Updated .gitignore to ignore generated example output artifacts in examples/.

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
examples/sphere_mesh_export.rs Generates a marching-cubes sphere and exports STL/OBJ/GLB (+ quantized) plus a volume VTK.
examples/simple_3d_tetrahedralization.rs Minimal Bowyer–Watson 3D tetrahedralization demo on unit-cube vertices.
examples/pipeline_example.rs Demonstrates multiple meshing/pipeline paths and exports STL/VTK outputs.
README.md Adds a 3D examples section with run instructions and viewer suggestions.
.gitignore Ignores generated .stl/.obj/.glb/.vtk output files under examples/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +84 to +85
println!("\nDone! View STL files with MeshLab/Blender, VTK files with ParaView.");
}
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description/test plan says pipeline_example generates 7 output files, but this example currently writes 6 files (marching_cubes_sphere.stl, marching_cubes_torus.stl, surface_to_volume.{stl,vtk}, octree_refined.vtk, voxel_refined.vtk). Please update the PR description/test plan or adjust the example outputs to match.

Copilot uses AI. Check for mistakes.
# Marching cubes sphere → export to STL, OBJ, GLB, VTK
cargo run --example sphere_mesh_export

# All pipeline algorithms (marching cubes, surface_to_volume, octree_refined, voxel_refined)
Copy link

Copilot AI Feb 8, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README claims this example covers “All pipeline algorithms”, but meshing::pipeline also exposes refine_tetrahedra (src/pipeline.rs) and this example doesn’t demonstrate it. Either include refine_tetrahedra here or reword this line to avoid implying complete coverage of the pipeline APIs.

Suggested change
# All pipeline algorithms (marching cubes, surface_to_volume, octree_refined, voxel_refined)
# Multiple pipeline algorithms (marching cubes, surface_to_volume, octree_refined, voxel_refined)

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 3D mesh generation examples

2 participants