Sketcher ConstrainBlock: Difference between revisions

From FreeCAD Documentation
(Use the proper SVG icon)
No edit summary
 
(25 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{Page_in_progress}}
<translate>
<translate>

<!--T:8-->
<!--T:8-->
{{Docnav
{{Docnav|[[Sketcher_ConstrainSymmetric|Symmetric]]|[[Sketcher ConstrainLock|Lock]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Symmetric.png|IconC=Workbench_Sketcher.svg|IconR=Sketcher_ConstrainLock.svg‎}}
|[[Sketcher_ConstrainSymmetric|Symmetric]]
|[[Sketcher_Dimension|Dimension]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Constraint_Symmetric.svg
|IconR=Sketcher_Dimension.svg‎
|IconC=Workbench_Sketcher.svg
}}


<!--T:1-->
<!--T:1-->
{{GuiCommand
{{GuiCommand
|Name=Sketcher ConstrainBlock
|Name=Sketcher ConstrainBlock
|MenuLocation=Sketch → Sketcher constraints → Constrain Block
|MenuLocation=Sketch → Sketcher constraints → Constrain block
|Workbenches=[[Sketcher Workbench|Sketcher]]
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|Shortcut={{KEY|K}} {{KEY|B}}
|SeeAlso=[[Sketcher_ConstrainLock|Constrain Lock]]
|Version=0.17
|Version=0.17
|SeeAlso=[[Sketcher_ConstrainLock|Sketcher Constrain Lock]]
}}
}}


Line 16: Line 26:


<!--T:3-->
<!--T:3-->
'''Constrain Block''' blocks a geometric element in place with a single constraint. Its main intended use is to work with [[Sketcher_CreateBSpline|B-Splines]] which can be difficult to fully constrain otherwise.
The [[Image:Sketcher_ConstrainBlock.svg|24px]] [[Sketcher_ConstrainBlock|Sketcher ConstrainBlock]] tool blocks edges in place with a single constraint. It is mainly intended for [[Sketcher_CreateBSpline|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== <!--T:5-->
==Usage== <!--T:5-->

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 an element to constrain.
# There are several ways to invoke the tool:
# Press the {{Button|[[File:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain Block]]}} button.
#* Press the {{Button|[[Image:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain block]]}} button.
#* Select the {{MenuCommand|Sketch → Sketcher constraints → [[Image:Sketcher_ConstrainBlock.svg|16px]] Constrain block}} option from the 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}}.
# The cursor changes to a cross with the tool icon.
# Select a single edge.
# A constraint is added.
# Optionally keep creating constraints.
# To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.

===Run-once mode===

# Select one or more edges.
# Invoke the tool as explained above, or with the following additional option:
#* {{Version|0.22}}: Right-click in the [[3D_view|3D view]] and select the {{MenuCommand|[[Image:Sketcher_ConstrainBlock.svg|16px]] Constrain block}} option from the context menu.
# Depending on the selection one or more constraints are added.

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

</translate>
{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Block', Edge))}}
<translate>

<!--T:15-->
The [[Sketcher_scripting|Sketcher scripting]] page explains the values which can be used for {{incode|Edge}} and contains further examples on how to create constraints from Python scripts.


Or press the button first, and then select the elements.


<!--T:9-->
<!--T:9-->
{{Docnav
{{Docnav|[[Sketcher_ConstrainSymmetric|Symmetric]]|[[Sketcher ConstrainLock|Lock]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Symmetric.png|IconC=Workbench_Sketcher.svg|IconR=Sketcher_ConstrainLock.svg‎}}
|[[Sketcher_ConstrainSymmetric|Symmetric]]
|[[Sketcher_Dimension|Dimension]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Constraint_Symmetric.svg
|IconR=Sketcher_Dimension.svg‎
|IconC=Workbench_Sketcher.svg
}}


</translate>
</translate>
{{Sketcher Tools navi{{#translation:}}}}
{{Sketcher_Tools_navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Latest revision as of 09:36, 18 April 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 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

  1. Select one or more edges.
  2. Invoke the tool as explained above, or with the following additional option:
  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.