feat(solver): Phase 3a — JSON serialization for KCSolve types #155
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Phase 3a: JSON Serialization
Add
to_dict()/from_dict()methods to all KCSolve types in the pybind11 module, enabling JSON transport ofSolveContextandSolveResultbetween client, server, and runner.See docs/SOLVER.md — Phase 3a
Files to modify
src/Mod/Assembly/Solver/bindings/kcsolve_py.cpp— add dict conversion methodsTypes requiring serialization
SolveContext(parts, constraints, motions, simulation params)SolveResult(status, placements, dof, diagnostics)Transform(position[x,y,z], quaternion[w,x,y,z])Constraint.Limit,MotionDef,SimulationParams"Revolute","Success")Verification
ctx.to_dict()must round-trip throughSolveContext.from_dict()without loss.Notes