forbes c728bd93f7
Some checks failed
CI / datagen (push) Blocked by required conditions
CI / lint (push) Failing after 2m20s
CI / test (push) Has been cancelled
CI / type-check (push) Has been cancelled
Merge remote-tracking branch 'public/main'
2026-02-03 18:03:54 -06:00
2024-08-15 09:06:53 -06:00
2026-02-02 13:26:38 -06:00
2026-02-02 13:26:38 -06:00
2025-08-07 21:43:45 -05:00
2024-09-09 13:48:07 -06:00
2024-08-30 15:19:30 -06:00
2024-01-04 17:58:44 -06:00
2026-02-02 13:26:38 -06:00
2023-10-17 09:56:26 -05:00
2026-02-02 13:26:38 -06:00
2025-10-09 09:13:17 -05:00

Kindred Solver

Assembly constraint solver for Kindred Create. Combines a numerical multibody dynamics engine (OndselSolver) with a GNN-based constraint prediction layer.

Components

OndselSolver (C++)

Numerical assembly constraint solver using multibody dynamics. Solves joint constraints between rigid bodies using a Newton-Raphson iterative approach. Used by FreeCAD's Assembly workbench as the backend solver.

  • Source: OndselSolver/
  • Entry point: OndselSolverMain/
  • Tests: tests/, testapp/
  • Build: CMake

Theory: MbDTheory

Building

cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build

ML Solver Layer (Python)

Graph neural network that predicts constraint independence and per-body degrees of freedom. Trained on synthetic assembly data generated via the pebble game algorithm, with the goal of augmenting or replacing the numerical solver for common assembly patterns.

  • Core library: solver/
  • Data generation: solver/datagen/ (pebble game, synthetic assemblies, labeling)
  • Model architectures: solver/models/ (GIN, GAT, NNConv)
  • Training: solver/training/
  • Inference: solver/inference/
  • FreeCAD integration: freecad/
  • Configuration: configs/ (Hydra)

Setup

pip install -e ".[train,dev]"
pre-commit install

Usage

make help          # show all targets
make dev           # install all deps + pre-commit hooks
make test          # run tests
make lint          # run ruff linter
make check         # lint + type-check + test
make data-gen      # generate synthetic data
make train         # run training
make export        # export model

Docker is also supported:

docker compose up train       # GPU training
docker compose up test        # run tests
docker compose up data-gen    # generate synthetic data

Repository structure

kindred-solver/
├── OndselSolver/       # C++ numerical solver library
├── OndselSolverMain/   # C++ solver CLI entry point
├── tests/              # C++ unit tests + Python tests
├── testapp/            # C++ test application
├── solver/             # Python ML solver library
│   ├── datagen/        # Synthetic data generation (pebble game)
│   ├── datasets/       # PyG dataset adapters
│   ├── models/         # GNN architectures
│   ├── training/       # Training loops
│   ├── evaluation/     # Metrics and visualization
│   └── inference/      # Runtime prediction API
├── freecad/            # FreeCAD workbench integration
├── configs/            # Hydra configs (dataset, model, training, export)
├── scripts/            # CLI utilities
├── data/               # Datasets (not committed)
├── export/             # Model packaging
└── docs/               # Documentation

License

OndselSolver: LGPL-2.1-or-later (see LICENSE) ML Solver Layer: Apache-2.0

Description
An assembly solving stack for Kindred Create based on a trained GNN layer between placement actions in the UI and actual constraints applied.
Readme LGPL-2.1 17 MiB
Languages
C++ 66.2%
Python 32.5%
CMake 1.1%