Skip to content

Refactor/mesh algorithm dependency inversion #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

ryancinsight
Copy link

  • Move convex_hull.rs and smoothing.rs into algorithm/ subdirectory
  • Split algorithms into serial and parallel implementations
  • Add trait definitions for algorithm interfaces
  • Update module structure and imports in mesh/mod.rs and connectivity.rs

- Implement dependency inversion pattern using BspOps trait
- Create separate SerialBspOps and ParallelBspOps implementations
- Replace manual loops with iterator patterns throughout
- Maintain backward compatibility with existing Node API
- Add SplittingPlaneStrategy trait for algorithm flexibility
- Organize code into clean submodule structure:
  - traits.rs: Core trait definitions
  - node.rs: Node data structure only
  - serial.rs: Serial BSP operations
  - parallel.rs: Parallel BSP operations (with rayon)
  - mod.rs: Public API and backward compatibility
- Fix doctest import issues and create missing directories
- All tests passing (98 lib tests + 28 doc tests)

This refactoring separates algorithms from data structures,
enables easy testing of different BSP strategies, and follows
modern Rust patterns while maintaining full API compatibility.
- Implement dependency inversion pattern using BspOps trait
- Create separate SerialBspOps and ParallelBspOps implementations
- Replace manual loops with iterator patterns throughout
- Maintain backward compatibility with existing Node API
- Add SplittingPlaneStrategy trait for algorithm flexibility
- Organize code into clean submodule structure:
  - traits.rs: Core trait definitions
  - node.rs: Node data structure only
  - serial.rs: Serial BSP operations
  - parallel.rs: Parallel BSP operations (with rayon)
  - mod.rs: Public API and backward compatibility
- Fix doctest import issues and create missing directories
- All tests passing (98 lib tests + 28 doc tests)

This refactoring separates algorithms from data structures,
enables easy testing of different BSP strategies, and follows
modern Rust patterns while maintaining full API compatibility.
- Implement dependency inversion pattern using BspOps trait
- Create separate SerialBspOps and ParallelBspOps implementations
- Replace manual loops with iterator patterns throughout
- Maintain backward compatibility with existing Node API
- Add SplittingPlaneStrategy trait for algorithm flexibility
- Organize code into clean submodule structure:
  - traits.rs: Core trait definitions
  - node.rs: Node data structure only
  - serial.rs: Serial BSP operations
  - parallel.rs: Parallel BSP operations (with rayon)
  - mod.rs: Public API and backward compatibility
- Fix doctest import issues and create missing directories
- All tests passing (98 lib tests + 28 doc tests)

This refactoring separates algorithms from data structures,
enables easy testing of different BSP strategies, and follows
modern Rust patterns while maintaining full API compatibility.
- Split monolithic sdf.rs into focused submodules
- Add grid.rs for SDF grid data structures
- Add traits.rs for common SDF interfaces
- Add serial.rs and parallel.rs for different computation strategies
- Update readme.md with new module structure
- Split monolithic sdf.rs into focused submodules
- Add grid.rs for SDF grid data structures
- Add traits.rs for common SDF interfaces
- Add serial.rs and parallel.rs for different computation strategies
- Update readme.md with new module structure
- Move convex_hull.rs and smoothing.rs into algorithm/ subdirectory
- Split algorithms into serial and parallel implementations
- Add trait definitions for algorithm interfaces
- Update module structure and imports in mesh/mod.rs and connectivity.rs

This refactoring improves code organization and enables better
dependency inversion for mesh processing algorithms.
@ryancinsight
Copy link
Author

I'm actually going to implement this differently

@ryancinsight ryancinsight marked this pull request as draft July 10, 2025 20:35
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.

1 participant