Sketcher ConstrainBlock: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 33: Line 33:


See also: [[Sketcher_Workbench#Drawing_aids|Drawing aids]].
See also: [[Sketcher_Workbench#Drawing_aids|Drawing aids]].

===[[Sketcher_Workbench#Continue_modes|Continue mode]]===


<!--T:6-->
<!--T:6-->
# Make sure there is no selection.
# Select one or more edges (skip this step if the tool should run in [[Sketcher_Workbench#Continue_modes|continue mode]]).
# There are several ways to invoke the tool:
# There are several ways to invoke the tool:
#* Press the {{Button|[[Image:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain block]]}} button.
#* Press the {{Button|[[Image:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain block]]}} button.
Line 41: Line 43:
#* {{Version|0.22}}: Right-click in the [[3D_view|3D view]] and select the {{MenuCommand|Constrain → [[Image:Sketcher_ConstrainBlock.svg|16px]] Constrain block}} option from the context menu.
#* {{Version|0.22}}: Right-click in the [[3D_view|3D view]] and select the {{MenuCommand|Constrain → [[Image:Sketcher_ConstrainBlock.svg|16px]] Constrain block}} option from the context menu.
#* Use the keyboard shortcut: {{KEY|K}} then {{KEY|B}}.
#* Use the keyboard shortcut: {{KEY|K}} then {{KEY|B}}.
# The cursor changes to a white cross with the tool icon.
# If the tool runs in [[Sketcher_Workbench#Continue_modes|continue mode]]:
# Select a single edge.
## The cursor changes to a white cross with the tool icon.
# A constraint is added.
## Select a single edge.
## Optionally keep creating constraints.
# Optionally keep creating constraints.
## To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.
# To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.

===Once-only mode===

# Select one or more edges.
# Invoke the tool as explained above.
# Depending on the selection one or more constraints are added.


== Scripting == <!--T:14-->
== Scripting == <!--T:14-->

Revision as of 10:20, 7 March 2024

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Sketcher ConstrainBlock

Menu location
Sketch → Sketcher constraints → Constrain block
Workbenches
Sketcher
Default shortcut
K B
Introduced in version
0.17
See also
Sketcher Constrain Lock

Description

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 addition constraints to a blocked edge can modify it.

Usage

See also: Drawing aids.

Continue mode

  1. Make sure there is no selection.
  2. There are several ways to invoke the tool:
    • Press the Constrain block button.
    • Select the Sketch → Sketcher constraints → Constrain block option from the menu.
    • introduced in version 0.22: Right-click in the 3D view and select the Constrain → Constrain block option from the context menu.
    • Use the keyboard shortcut: K then B.
  3. The cursor changes to a white 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.

Once-only mode

  1. Select one or more edges.
  2. Invoke the tool as explained above.
  3. Depending on the selection one or more constraints are added.

Scripting

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.