Skip to content

Conversation

@Leguark
Copy link
Member

@Leguark Leguark commented Oct 9, 2025

[ENH] Dual contouring v2

This PR introduces a new version of the dual contouring algorithm with significant improvements:

  • Added a new implementation _dual_contouring_v2.py that processes surfaces individually
  • Refactored the data flow to handle surfaces more efficiently
  • Renamed all_stack_intersection to all_surfaces_intersection for clarity
  • Added surface slicing functionality to process individual surfaces
  • Removed unused left_right parameter from DualContouringMesh class
  • Optimized triangulation logic in fancy_triangulation.py with more efficient algorithms
  • Enhanced voxel mapping with improved search methods using isin and optimized mask-to-indices conversion
  • Added trimesh-based mesh cleanup as a final processing step
  • Improved parallel processing capabilities with better worker management
  • Added legacy mode toggle to maintain backward compatibility

The new implementation provides better performance by processing each surface independently and using more efficient data structures and algorithms.

@Leguark Leguark force-pushed the optimize_parallel_ branch from ec0d9e4 to ee4bcf8 Compare October 9, 2025 09:09
@Leguark Leguark force-pushed the optimize_parallel_ branch from ee4bcf8 to 062654a Compare October 9, 2025 09:27
@Leguark Leguark changed the title [ENH] Dual contouring v2 [ENH] Implement surface-based dual contouring with optimized triangulation Oct 9, 2025
@Leguark Leguark marked this pull request as ready for review October 9, 2025 09:35
Copy link
Member Author

Leguark commented Oct 9, 2025

Merge activity

  • Oct 9, 10:07 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Oct 9, 10:24 AM UTC: Graphite rebased this pull request as part of a merge.
  • Oct 9, 10:26 AM UTC: @Leguark merged this pull request with Graphite.

@Leguark Leguark force-pushed the optimize_parallel_ branch from f0fd83c to 4ec0a28 Compare October 9, 2025 10:10
@Leguark Leguark changed the base branch from optimize_perth to graphite-base/35 October 9, 2025 10:18
@Leguark Leguark changed the base branch from graphite-base/35 to main October 9, 2025 10:22
Renamed and updated benchmarking tests for consistency, including changes to test file names and parameters. Improved voxel mapping logic in `fancy_triangulation.py` for efficiency, reducing computational overhead and adding optimized methods. Enhanced octree level settings and benchmarking configurations for better profiling.
…line

Streamlined handling of `left_right_codes` across functions and classes, updating method signatures and data structures for consistency. Removed unused `left_right_codes` parameters in parallel processing functions and restructured relevant logic to improve maintainability.
@Leguark Leguark force-pushed the optimize_parallel_ branch from 4ec0a28 to 8a0849f Compare October 9, 2025 10:23
@Leguark Leguark merged commit 5999fb1 into main Oct 9, 2025
2 checks passed
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.

2 participants