constraints.solve.satisfy_constraints

constraints.solve.satisfy_constraints(
    root,
    *,
    steps=8,
    method=ConstraintSolveMethod.NEWTON,
)

Project a construction/SDF tree onto its attached constraints in place.

Unlike :func:solve_constraints, this is also useful for under-constrained sketches: unconstrained degrees of freedom stay near their current values while the selected method satisfies the relationships that do exist.

The returned mapping is also applied to root so construction overlays and generated solids sharing those Parameter objects update together.

Parameters

Name Type Description Default
root Fluent Construction or SDF tree whose attached constraints are solved. required
steps int Number of optimizer updates. 8
method ConstraintSolveMethodLike A :class:~cadjoint.enums.ConstraintSolveMethod or its plain string spelling — "newton" for minimum-norm manifold projection, or "adam"/"sgd" for Optax residual minimization. ConstraintSolveMethod.NEWTON

Returns

Name Type Description
dict[str, Array] The solved free-parameter mapping, after applying it to root.