From FreeCAD Documentation
Jump to navigation Jump to search
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎русский


In FreeCAD the word "Constraint" is normally used to refer to a "rule" to draw geometrical shapes inside a Workbench Sketcher.svg Sketch (Sketcher::SketchObject class). A constraint limits the position of a certain geometrical element in different ways, for example, it can specify whether the element is horizontal, vertical, tangent, parallel, perpendicular, coincident with a point, concentric to another object, etc.

There are two big types of constraints:

  • Geometric constraints define characteristics of the shapes without specifying exact dimensions, for example, horizontality, verticality, parallelism, perpendicularity, and tangency.
  • Datum or dimensional constraints define characteristics of the shapes by specifying dimensions, for example, a numeric length or an angle.

See the information in the Workbench Sketcher.svg Sketcher Workbench for a list of all constraints that can be applied. Some of them apply to lines, some to curves, and some to vertices. See also the basic sketcher tutorial.


  1. Create a sketch either from the Workbench Sketcher.svg Sketcher Workbench or through the Workbench PartDesign.svg PartDesign Workbench.
  2. Press
  3. Double click the created sketch to enter its edit mode.
  4. Draw a series of lines using Sketcher CreatePolyline.svg Create polyline.
  5. Pick one of the lines, and use Sketcher ConstrainVertical.svg Constrain vertical.
  6. Pick one of the lines, and use Sketcher ConstrainHorizontal.svg Constrain horizontal.
  7. Pick the vertical line, and use Sketcher ConstrainDistanceY.svg Constrain distance Y; assign a distance.
  8. Pick the horizontal line, and use Sketcher ConstrainDistanceX.svg Constrain distance X; assign a distance.


  • Constraints are useful to create very precise profiles which can the be turned into solid extrusions by using the PartDesign Pad.svg PartDesign Pad or Part Extrude.svg Part Extrude operations.
  • Constraints are only used within Sketches; other 2D objects such as those created with the Workbench Draft.svg Draft Workbench do not understand about constraints; the latter are simply placed in 3D space, and their properties define their shape and position.