Contributing¶
Contributions to the OpenMagnetics Virtual Builder are welcome.
Development Setup¶
-
Fork and clone the repository:
-
Install dependencies:
-
Clone MAS data (for tests):
-
Run tests to verify setup:
Code Style¶
- Follow PEP 8 conventions
- Use descriptive variable names
- Add docstrings to public methods (Google style)
- Keep lines under 120 characters
Adding a New Shape Family¶
- Add the family to
ShapeFamilyenum inutils.py - Create the shape class in both
cadquery_builder.pyandfreecad_builder.py - Inherit from the appropriate base class (
IPiece,E,P,U, etc.) - Implement
get_shape_base()andget_negative_winding_window() - Register the shape in the engine's
shapersdict - Add dimension/subtype config to
shape_configs.pyif needed - Add tests and update documentation
Pull Request Process¶
- Create a feature branch from
main - Make your changes with clear, focused commits
- Ensure all tests pass
- Update documentation if needed
- Open a pull request against
main - Describe your changes and link any related issues
Reporting Issues¶
Please report bugs and feature requests on the GitHub Issues page.
Include:
- Python version
- Operating system
- Steps to reproduce
- Expected vs actual behavior
- Error messages / tracebacks