-
-
Notifications
You must be signed in to change notification settings - Fork 24
Refactor BSP module with dependency inversion and iterators #88
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
base: main
Are you sure you want to change the base?
Refactor BSP module with dependency inversion and iterators #88
Conversation
- 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.
…m/ryancinsight/csgrs into refactor/bsp-dependency-inversion
…m/ryancinsight/csgrs into refactor/bsp-dependency-inversion
…m/ryancinsight/csgrs into refactor/bsp-dependency-inversion
…m/ryancinsight/csgrs into refactor/bsp-dependency-inversion
…m/ryancinsight/csgrs into refactor/bsp-dependency-inversion
…m/ryancinsight/csgrs into refactor/bsp-dependency-inversion
…m/ryancinsight/csgrs into refactor/bsp-dependency-inversion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review by RecurseML
🔍 Review performed on e3113a7..f6c932f
✨ No bugs found, your code is sparkling clean
✅ Files analyzed, no issues (18)
• examples/adjacency_demo.rs
• src/io/stl.rs
• src/lib.rs
• src/main.rs
• src/mesh/bsp.rs
• src/mesh/bsp/mod.rs
• src/mesh/bsp/node.rs
• src/mesh/bsp/parallel.rs
• src/mesh/bsp/serial.rs
• src/mesh/bsp/traits.rs
• src/mesh/bsp_parallel.rs
• src/mesh/metaballs.rs
• src/mesh/mod.rs
• src/nurbs/mod.rs
• src/sketch/extrudes.rs
• src/sketch/hershey.rs
• src/sketch/shapes.rs
• src/tests.rs
This refactoring separates algorithms from data structures, enables easy testing of different BSP strategies, and follows modern Rust patterns while maintaining full API compatibility.