FreeCAD Toggle Driving Reference Mode Explained

The "Toggle Driving/Reference Mode" in FreeCAD's Sketcher workbench is a tool that switches dimensional constraints between active controllers of geometry and passive measurement indicators. This article explains the difference between driving and reference constraints, outlines why and when to switch between them, and highlights how this feature prevents over-constraining while preserving critical design data.

Understanding Driving vs. Reference Constraints

In FreeCAD sketches, dimensional constraints define distances, lengths, radii, and angles. They operate in one of two modes:

  • Driving Constraints: These actively control and limit the geometry. When you set a driving length of 50 mm on a line, FreeCAD locks the line to that exact length and consumes a degree of freedom. If you alter the value, the geometry moves to reflect the change.
  • Reference Constraints: These act purely as measurements or readouts. They report the current dimension of the selected geometry without restricting its movement or consuming degrees of freedom. If the geometry is modified by other constraints, the reference constraint updates automatically to show the new value.

The Purpose of the Toggle Feature

The primary purpose of the "Toggle Driving/Reference Mode" tool is to prevent over-constraining a sketch while still allowing you to monitor and use critical dimensions. FreeCAD does not allow sketches to be over-constrained; adding one driving constraint too many causes the solver to fail and throws an error.

By toggling a constraint to reference mode, you can:

  1. Inspect Dimensions: Read real-time measurements across complex, fully constrained geometry without breaking the sketch solver.
  2. Drive External Parameters: Use the reference dimension's internal name as an input for mathematical expressions, spreadsheets, or other features elsewhere in your model without restricting the source sketch.
  3. Resolve Over-Constraint Conflicts: Quickly demote an existing driving constraint that is causing redundancy into an informative reference dimension instead of deleting it.

How the Mode Works in Practice

The toggle tool operates in two ways depending on your current workflow:

  • Before Creating a Constraint: Clicking the toggle button changes the active mode in the Sketcher toolbar. Any dimensional constraints placed afterward will automatically be created as reference constraints (typically displayed in a distinct color, such as orange or light blue, depending on your UI theme).
  • On Existing Constraints: Selecting an already placed constraint and clicking the toggle button converts it instantly between driving and reference status.

Using reference constraints keeps sketches robust and solver-friendly while maintaining the full dimensional visibility required for precision CAD modeling.