|Sketch → Sketcher constraints → Toggle activate/deactivate constraint
|Introduced in version
|Sketcher Toggle driving constraints
ToggleActiveConstraint allows you to activate and deactivate an already placed constraint. This allows you to keep the constraint in the background but temporarily test another arrangement of the existing geometry.
The Toggle driving constraint tool is similar in that it disables the effect of the constraint; however, with this tool, the constraint does not keep its old value. On the other hand, with ToggleActiveConstraint you can re-activate the old constraint immediately.
- Select an already placed constraint, then press ToggleActiveConstraint.
- Alternatively, got to the task panel, to the Constraints section, select the constraint, then open the context menu (right-click), and select Deactivate.
- To activate the constraint again, select it, and press ToggleActiveConstraint again.
Fully constrained sketch.
Left: deactivated constraint; the sketch is no longer fully constrained. Right: the unconstrained geometry can be moved around; the older constraint is still available, and can be re-activated to return to the fully constrained sketch.
Task panel with the deactivated constraint.
See also: FreeCAD Scripting Basics.
The active status of a constraint can be controlled in macros and from the Python console.
toggleActive method of an existing Sketcher SketchObject, and the
index of the constraint to activate it or deactivate it. The index starts from
0 all the way to
N is the total number of constraints.
import FreeCAD as App
sketch = App.ActiveDocument.Sketch
- Sketcher geometries: Point, Line by 2 point, Create an arc, Arc, Arc by 3 Point, Create a circle, Circle, Circle by 3 Point, Create a conic, Ellipse by center, Ellipse by 3 points, Arc of ellipse, Arc of hyperbola, Arc of parabola, Create a B-spline, Create B-spline, Create periodic B-pline, Polyline (multiple-point line), Rectangle, Create regular polygon, Triangle, Square, Pentagon, Hexagon, Heptagon, Octagon, Create Regular Polygon, Slot, Fillet, Trimming, Extend, External Geometry, CarbonCopy, Construction Mode
- Sketcher constraints
- Geometric constraints Coincident, Point On Object, Vertical, Horizontal, Parallel, Perpendicular, Tangent, Equal Length, Symmetric, Constrain Block
- Dimensional constraints Lock, Horizontal Distance, Vertical Distance, Distance, Radius, Internal Angle, Snell's Law, Internal Alignment, Toggle reference/driving constraint,
- Sketcher tools Select solver DOFs, Close Shape, Connect Edges, Select Constraints, Select Origin, Select Vertical Axis, Select Horizontal Axis, Select Redundant Constraints, Select Conflicting Constraints, Select Elements Associated with constraints, Show/Hide internal geometry, Symmetry, Clone, Copy, Move, Rectangular Array, Delete All Geometry, Delete All Constraints
- 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