Thank you for your interest in contributing to Morphe! This document provides guidelines and information for contributors.
- Add CAD adapters: Implement adapters for other CAD systems (Onshape, CATIA, etc.)
- Improve existing adapters: Enhance FreeCAD, Fusion 360, SolidWorks, or Inventor adapters
- Improve test coverage: Add tests for edge cases and new functionality
- Report bugs: Open an issue with a clear description and reproduction steps
- Suggest features: Propose new geometry types, constraints, or capabilities
- Improve documentation: Fix typos, clarify explanations, or add examples
-
Clone the repository:
git clone https://github.com/codereclaimers/morphe.git cd morphe -
Install in development mode with dev dependencies:
pip install -e ".[dev]" -
Run the tests:
pytest tests/
This project uses automated tools to maintain consistent code style:
- Black for code formatting (line length: 100)
- Ruff for linting
- Mypy for type checking
Before submitting a pull request, please run:
black .
ruff check .
mypy morphe --exclude 'morphe/adapters/(freecad|fusion|inventor|solidworks)/'All adapters are implemented in Python. To add support for a new CAD system:
- Create a new package:
morphe/adapters/<cadname>/ - Implement the
SketchBackendAdapterabstract base class frommorphe.adapters.common - Add tests in
tests/test_<cadname>_adapter.pyor within the adapter package - Update the README to mention the new adapter
See morphe/adapters/freecad/ for a reference implementation. For Windows COM-based CAD systems (like SolidWorks or Inventor), see morphe/adapters/solidworks/ for patterns using pywin32.
- Keep changes focused and atomic
- Add tests for new functionality
- Update documentation as needed
- Ensure all tests pass before submitting
Open an issue on GitHub if you have questions or need help getting started.