--- jupyter: description: 'Constraint sketches in planex2d: draw roughly, constrain with flags and dimensions, and solve; dimensions by id, Update for parametric parts, and export like any other sketch.' --- # Constraint sketches
Jansen's walking leg solved by one constraint sketch, the crank angle updated frame by frameExample Jansen's leg: one sketch, the crank angle updated A horizontal tank with its dipstick: every mark solved so that 10 % of the volume lies between two marksA dipstick: every mark solved for 10 % of the volume A plate with a fillet and a hole, fully constrained, every constraint shown by its signA plate, fully constrained, with every constraint shown
A constraint sketch, `px.Sketch`, supports every drawing call of `px.QuickSketch`: lines, arcs, circles and splines from references, construction elements, offsets, trimming and mirroring (see [Quick sketch](../sketch/index.md)). In addition, it keeps constraints that turn a rough drawing into an exact one, such as a line that must be horizontal, an arc that must be tangent, or a hole 8 in diameter and 40 from the center. planex2d solves these constraints, moves every element as little as they allow, and shows what is still free. Every dimension has an id, and setting a dimension solves the sketch again, so the sketch becomes a parametric part. Expressions tie dimensions together as design rules. The same solver also moves mechanisms: given a crank angle, it returns the position of every joint. The solved sketch exports like any other, as faces, wires, OpenCASCADE shapes and netgen geometries.

In this section

## Constraining - [Drawing with constraints](drawing.md) - [Converting sketches](converting.md) - [Constraints and dimensions](kinds.md) - [Fully, under- and over-constrained](diagnosis.md)
Drawing with constraints
Drawing with constraintsFlags in the drawing calls, helpers as constraints, and how the drawing decides which tangent is meant.
Converting sketches
Converting sketchesA quick sketch turned into a constraint sketch with the constraints it shows, and back, and a sketch from a solid's face.
Constraints and dimensions
Constraints and dimensionsEvery kind of constraint, reference dimensions, and how the sketch shows them.
Fully, under- and over-constrained
Fully, under- and over-constrainedFinding what is still free, what is redundant and what conflicts.
## Changing the design - [Changing dimensions](update.md) - [Expressions: design rules](expressions.md) - [Formulas: a dipstick for a tank](formulas.md)
Changing dimensions
Changing dimensionsA parameter study with Update, walking in steps, and branch changes.
Expressions: design rules
Expressions: design rulesEquations between dimensions, so that one number drives a family of parts.
Formulas: a dipstick for a tank
Formulas: a dipstick for a tankEvery mark of a dipstick solved for an equal share of the volume.
## More geometry - [Symmetry and patterns](symmetry.md) - [Splines](splines.md) - [Trim, split and project](trim.md) - [Offsets and profiles revisited](offsets-profiles.md)
Symmetry and patterns
Symmetry and patternsMirrored halves, symmetry lines and circular patterns.
Splines
SplinesSplines with constraints, from a bottle to a cam and its roller.
Trim, split and project
Trim, split and projectCuts that follow the dimensions, and OpenCASCADE geometry as references.
Offsets and profiles revisited
Offsets and profiles revisitedSlot widths, fillet radii and offset distances as dimensions, with offsets that follow their sources.
## Beyond drawings - [Mechanisms: the sketch as a solver](mechanisms.md)
Mechanisms: the sketch as a solver
Mechanisms: the sketch as a solverA four-bar linkage and its coupler curve, solved position by position.