apply_parameters
apply_parameters(root, free_params)
Write solved/optimized values back into a tree’s free parameters.
The inverse of :func:extract_parameters for the free set: walks the same tree and assigns free_params[name] to each free Parameter’s value. Because generated solids share Parameter objects with their construction tree, applying to either tree updates both.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| root | Fluent | The Fluent tree (construction node or SDF) to update. | required |
| free_params | dict | Name-keyed values, as returned by solve_constraints, extract_parameters, or an optimization loop. |
required |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If a name in free_params matches no free parameter in the tree, or a value’s shape does not match the parameter’s. |
Example
solved = solve_constraints(profile)
apply_parameters(profile, solved) # sketch, overlay, and solid update