# OndselSolver OndselSolver is the assembly constraint solver used by FreeCAD's Assembly workbench. Kindred Create vendors a fork of the solver as a git submodule. - **Path:** `src/3rdParty/OndselSolver/` - **Source:** `git.kindred-systems.com/kindred/solver` (Kindred fork) ## How it works The solver uses a **Lagrangian constraint formulation** to resolve assembly constraints (mates, joints, fixed positions). Given a set of parts with geometric constraints between them, it computes positions and orientations that satisfy all constraints simultaneously. The Assembly workbench (`src/Mod/Assembly/`) calls the solver whenever constraints are added or modified. Kindred Create has patches to `Assembly/` that extend `findPlacement()` for better datum and origin handling. ## Why a fork The solver is forked from the upstream Ondsel project for: - **Pinned stability** — the submodule is pinned to a known-good commit - **Potential modifications** — the fork allows Kindred-specific patches if needed - **Availability** — hosted on Kindred's Gitea instance for reliable access ## Future: GNN solver There are plans to explore a Graph Neural Network (GNN) approach to constraint solving that could complement or supplement the Lagrangian solver for specific use cases. This is not yet implemented. ## Related: GSL The `src/3rdParty/GSL/` submodule is Microsoft's Guidelines Support Library (`github.com/microsoft/GSL`), providing C++ core guidelines utilities like `gsl::span` and `gsl::not_null`. It is a build dependency, not related to the constraint solver.