Jump to content

Sketcher ConstrainBlock

From FreeCAD Documentation
This is the approved revision of this page, as well as being the most recent.

Sketcher ConstrainBlock

Menu location
Sketch → Constraints → Block Constraint
Workbenches
Sketcher
Default shortcut
K B
Introduced in version
0.17
See also
Sketcher ConstrainLock

Description[edit | edit source]

The Sketcher ConstrainBlock tool blocks edges in place with a single constraint. It is mainly intended for B-splines, which can be difficult to fully constrain otherwise.

The block constraint only affects the freely movable parts of an edge. Blocked edges can have other constraints, and applying additional constraints to a blocked edge can modify it.

Usage[edit | edit source]

See also: Drawing aids.

Continue mode[edit | edit source]

  1. Make sure there is no selection.
  2. There are several ways to invoke the tool:
    • Press the Block Constraint button.
    • Select the Sketch → Constraints → Block Constraint option from the menu.
    • introduced in 1.0: Right-click in the 3D View and select the Constrain → Block Constraint option from the context menu.
    • Use the keyboard shortcut: K then B.
  3. The cursor changes to a cross with the tool icon.
  4. Select a single edge.
  5. A constraint is added.
  6. Optionally keep creating constraints.
  7. To finish, right-click or press Esc, or start another geometry or constraint creation tool.

Run-once mode[edit | edit source]

  1. Select one or more edges.
  2. Invoke the tool as described above, or with one of the following additional options:
    • introduced in 1.0: Right-click in the 3D View and select the Block Constraint option from the context menu.
    • Right-click in the Elements section of the Sketcher Dialog and select the Block Constraint option from the context menu.
  3. Depending on the selection one or more constraints are added.

Scripting[edit | edit source]

Sketch.addConstraint(Sketcher.Constraint('Block', Edge))

The Sketcher scripting page explains the values which can be used for Edge and contains further examples on how to create constraints from Python scripts.