# Parametric Sketch Constraint Solver > Solve a 2-D constraint sketch with parameters, report degrees of freedom and extrude it. Solve points, lines, arcs and circles under geometric and dimensional constraints driven by named parameters. Get exact coordinates, the remaining degrees of freedom, redundant and conflicting constraints, and the profile extruded as a Kerfwise Form Studio solid. Part of usefulweb.app (https://usefulweb.app/). Part of [Kerfwise](https://kerfwise.usefulweb.app/) (ownerApp: kerfwise). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://kerfwisesketchconstraintsolver.usefulweb.app/ (interactive tool at https://kerfwisesketchconstraintsolver.usefulweb.app/tool) - JSON API: POST https://kerfwisesketchconstraintsolver.usefulweb.app/api/v1/calculate with a JSON object of inputs (schema: https://kerfwisesketchconstraintsolver.usefulweb.app/api/v1/tool) - OpenAPI: https://kerfwisesketchconstraintsolver.usefulweb.app/openapi.json - MCP (Streamable HTTP): https://kerfwisesketchconstraintsolver.usefulweb.app/mcp - tool `kerfwise_sketch_constraint_solver` ## Inputs - sketch (textarea): Sketch JSON (points, entities, constraints, optional height) - Points {id, x, y} in mm; entities line {a, b}, arc {c, a, b} counter-clockwise, circle {c, r}; constraints {id, type, refs, value}. - parameters (textarea): Parameters (one “name = expression” per line) - Each expression may use the parameters above it, for example D = W / 2. - name (text): Solid name ## Method - Variables are the coordinates of every point that is not fixed and the radius of every circle; an arc adds the equation |start − centre| = |end − centre|. Each constraint adds one or two residual equations in millimetres (angles are scaled by the sketch size), so the solution is r(x) = 0. - Levenberg–Marquardt with identity damping: each step solves min ‖J·δ + r‖² + μ‖δ‖² by Householder QR (Proofline’s linear algebra). With small μ this is the minimum-norm Gauss–Newton step, so geometry that the constraints leave free moves as little as possible from the stored sketch. - Degrees of freedom = variables − rank of the Jacobian at the solution. The rank comes from Gram–Schmidt over the normalised constraint rows in order: a row that is a combination of earlier rows is redundant if its residual is zero, or conflicting (with the rows it depends on) if it is not. - Dimensions are numbers or expressions in the parameter table, compiled by Proofline’s safe expression parser (no eval). Lengths are millimetres, angles degrees, tangency at a shared end point is written as radius ⊥ line. - The profile is the single closed loop of non-construction lines and arcs (or one circle), arcs tessellated with chords of at most 15°, at most 64 points. It becomes a Form Studio extrusion with the evaluated height. ## Limits - Concept geometry. A sketch can have several solutions (for example an arc bulging inward or outward); the solver finds the one nearest to the stored points. Check the drawing.