Constraint
Jump to navigation
Jump to search
Sketcher
Document objects
User documentation
Introduction
In FreeCAD the word "Constraint" is normally used to refer to a "rule" to draw geometrical shapes inside a 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 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.
Usage
- Create a sketch either from the
Sketcher Workbench or through the
PartDesign Workbench.
- Press
Sketcher NewSketch, or
PartDesign Body followed by
PartDesign NewSketch.
- Double click the created sketch to enter its edit mode.
- Draw a series of lines using
Create polyline.
- Pick one of the lines, and use
Constrain vertical.
- Pick one of the lines, and use
Constrain horizontal.
- Pick the vertical line, and use
Constrain distance Y; assign a distance.
- Pick the horizontal line, and use
Constrain distance X; assign a distance.
Notes
- Constraints are useful to create very precise profiles which can the be turned into solid extrusions by using the
PartDesign Pad or
Part Extrude operations.
- Constraints are only used within Sketches; other 2D objects such as those created with the
Draft Workbench do not understand about constraints; the latter are simply placed in 3D space, and their properties define their shape and position.
- General: Create sketch, Edit sketch, Leave sketch, View sketch, View section, Map sketch to face, Reorient sketch, Validate sketch, Merge sketches, Mirror sketch, Stop operation
- Sketcher geometries: Point, Line, Arc, Arc by 3 points, Circle, Circle by 3 points, Ellipse, Ellipse by 3 points, Arc of ellipse, Arc of hyperbola, Arc of parabola, B-spline, Periodic B-pline, Polyline, Rectangle, Centered rectangle, Rounded rectangle, Triangle, Square, Pentagon, Hexagon, Heptagon, Octagon, Regular polygon, Slot, Fillet, Trim, Extend, Split, External geometry, Carbon copy, Toggle construction geometry
- Sketcher constraints:
- Geometric constraints: Coincident, Point on object, Vertical, Horizontal, Parallel, Perpendicular, Tangent, Equal, Symmetric, Block
- Dimensional constraints: Lock, Horizontal distance, Vertical distance, Distance, Radius, Diameter, Radiam, Angle, Snell's law, Internal alignment
- Constraint tools: Toggle driving/reference constraint, Activate/deactivate constraint
- Sketcher tools: Select unconstrained DoF, Close shape, Connect edges, Select associated constraints, Select associated geometry, Select redundant constraints, Select conflicting constraints, Show/hide internal geometry, Select origin, Select vertical axis, Select horizontal axis, Symmetry, Clone, Copy, Move, Rectangular array, Remove axes alignment, Delete all geometry, Delete all constraints
- Sketcher B-spline tools: Show/hide B-spline degree, Show/hide B-spline control polygon, Show/hide B-spline curvature comb, Show/hide B-spline knot multiplicity, Show/hide B-spline control point weight, Convert geometry to B-spline, Increase B-spline degree, Decrease B-spline degree, Increase knot multiplicity, Decrease knot multiplicity, Insert knot
- Sketcher virtual space: Switch virtual space
- Additional: Sketcher Dialog, Preferences, Sketcher scripting
- Core: App DocumentObject
- Basic: App FeaturePython, App GeoFeature, Part Feature, Mesh Feature, Fem FemMeshObject
- Internal shapes: Part TopoShape, Mesh MeshObject, Fem FemMesh
- Structure: App DocumentObjectGroup (Std Group), App Part (Std Part), App Link (Std LinkMake)
- Derived: Part Part2DObject, Sketcher SketchObject, PartDesign Body, PartDesign Feature

- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Arch, Draft, FEM, Image, Inspection, Mesh, OpenSCAD, Part, PartDesign, Path, Points, Raytracing, Reverse Engineering, Sketcher, Spreadsheet, Start, Surface, TechDraw, Test Framework, Web
- Deprecated or unmaintained workbenches: Complete, Drawing, Robot
- Hubs: User hub, Power users hub, Developer hub