Skip to content

Block Constraint

In one sentence: Freeze a geometry element in its current position — fixing all its degrees of freedom at once without adding explicit dimensional constraints.


Overview

Workbench: Sketcher · Menu: Sketch → Sketcher constraints → Block Constraint
Toolbar: Sketcher Constraints · Shortcut: K, B

Block is a catch-all constraint that removes all remaining degrees of freedom from a geometry element by recording its current coordinates as fixed values. Unlike Lock Position (which applies to points) or explicit dimensional constraints (which set specific measurements), Block simply says "stay exactly where you are now."


Intuition

Imagine putting a sticker on a drawing: the sticker doesn't move and doesn't say why it's there — it's just fixed. Block is the constraint equivalent. It's useful when you want to lock geometry quickly without reasoning about which specific constraints are needed, or when the geometry's position is determined externally (e.g. by an equation-driven formula) and should not be moved by the solver.


When to use it

  • You have geometry generated by a macro or formula that should not be disturbed by the Sketcher solver.
  • You want to temporarily freeze part of a sketch while working on the rest.
  • A geometry element's position is fully defined by its context but you cannot easily express that as explicit constraints.

When NOT to use it

  • You want parametric control over the position — use explicit constraints (Lock Position, Distance, Radius, etc.) instead; Block bypasses parametric driving.
  • You need to match a dimension — Block records the current position; if the position is wrong, Block will freeze it in the wrong state.

Step-by-step walkthrough

  1. Select one or more geometry elements.
  2. Press K, B or activate Sketch → Block Constraint.
  3. The element is frozen. The solver cannot move it. All elements appear as constrained (green if fully constrained by other constraints too).

To unblock: select the element and delete the Block constraint from the Constraints panel.


Parameters

No numeric parameters. Block records the current floating-point coordinates of all vertices and curve parameters.


Common mistakes and pitfalls

Block constraint hides a genuine under-constrained sketch

Cause: A sketch that is under-constrained but blocked everywhere will show as green (fully constrained), masking the fact that the positions are arbitrary and unstable.
Fix: For production designs, always prefer explicit constraints. Use Block only for temporary freezing or for geometry that is externally managed.


Python API

Minimal example

import FreeCAD as App
import Sketcher

doc = App.activeDocument()
sketch = doc.getObject("Sketch")

# Block geometry at index 0
sketch.addConstraint(Sketcher.Constraint("Block", 0))
doc.recompute()

See also