The constraints solving took a good amount of thinking while designing FluidCAD. At first I tried to make it all declarative where user just create unconstrained geometries then define constraints, something like: const l1 = line(); const c1 = circle(); // define constraint l1.length(100).position(x, y).tangentTo(c1) ...

Then I decided against this idea because it results in too much typing + the constraint solver implementation is not trivial and there is not much web based open source solvers. I went with a mixed approach instead between declarative and imperative. https://fluidcad.io/docs/guides/sketching/constrained-geomet...