0b5813b5a9d2c67b0580cd596ee84f0b9c301a2d
Add 4 new topology generators to SyntheticAssemblyGenerator: - generate_tree_assembly: random spanning tree with configurable branching - generate_loop_assembly: closed ring producing overconstrained data - generate_star_assembly: hub-and-spoke topology - generate_mixed_assembly: tree + loops with configurable edge density Each accepts joint_types as JointType | list[JointType] for per-joint type sampling. Add complexity tiers (simple/medium/complex) with predefined body count ranges via COMPLEXITY_RANGES dict and ComplexityTier type alias. Update generate_training_batch with 7-way generator selection, complexity_tier parameter, and generator_type field in output dicts. Extract private helpers (_random_position, _random_axis, _select_joint_type, _create_joint) to reduce duplication. 44 generator tests, 130 total — all passing. Closes #7
kindred-solver
Assembly constraint prediction via GNN. Produces a trained model embedded in a FreeCAD workbench (Kindred Create library), later integrated into vanilla Create.
Overview
kindred-solver predicts whether assembly constraints (joints) are independent or redundant using graph neural networks. Given an assembly graph where bodies are nodes and joints are edges, the model classifies each constraint and reports degrees of freedom per body.
Repository Structure
kindred-solver/
├── solver/ # Core library
│ ├── datagen/ # Synthetic data generation (pebble game)
│ ├── datasets/ # PyG dataset adapters
│ ├── models/ # GNN architectures (GIN, GAT, NNConv)
│ ├── training/ # Training loops and configs
│ ├── evaluation/ # Metrics and visualization
│ └── inference/ # Runtime prediction API
├── freecad/ # FreeCAD integration
│ ├── workbench/ # FreeCAD workbench addon
│ ├── bridge/ # FreeCAD <-> solver interface
│ └── tests/ # Integration tests
├── export/ # Model packaging for Create
├── configs/ # Hydra configs (dataset, model, training, export)
├── scripts/ # CLI utilities
├── data/ # Datasets (not committed)
├── tests/ # Unit and integration tests
└── docs/ # Documentation
Setup
Install (development)
pip install -e ".[train,dev]"
pre-commit install
pre-commit install --hook-type commit-msg
Using Make
make help # show all targets
make dev # install all deps + pre-commit hooks
make test # run tests
make lint # run ruff linter
make type-check # run mypy
make check # lint + type-check + test
make train # run training
make data-gen # generate synthetic data
make export # export model
Using Docker
# GPU training
docker compose up train
# Run tests (CPU)
docker compose up test
# Generate data
docker compose up data-gen
License
Apache 2.0
Languages
C++
66.2%
Python
32.5%
CMake
1.1%