Constraint sketches
Example Jansen's leg: one sketch, the crank angle updated
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). 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