Sketcher ConstrainBlock: Difference between revisions

From FreeCAD Documentation
(Version=0.17 in the {{GuiCommand}} template)
(Scripting_Sketcher_constraints_in_Python -> Sketcher_scripting)
(18 intermediate revisions by 8 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:8-->
{{Docnav
|[[Sketcher_ConstrainSymmetric|Symmetric]]
|[[Sketcher_ConstrainLock|Lock]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Constraint_Symmetric.svg
|IconR=Sketcher_ConstrainLock.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]]
|SeeAlso=[[Sketcher_ConstrainLock|Constrain Lock]]
|Version=0.17
|Version=0.17
|SeeAlso=[[Sketcher_ConstrainLock|Sketcher Constrain Lock]]
}}
}}


Line 13: Line 23:


<!--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.
'''Constrain Block''' blocks a geometric element in place with a single constraint.


<!--T:4-->
<!--T:12-->
It is mainly intended to be used with {{Button|[[File:Sketcher_CreateBSpline.svg|16px]] [[Sketcher_CreateBSpline|B-Splines]]}}, which can be difficult to fully constrain otherwise.
{{Version|0.17}}


==How to use== <!--T:5-->
==Usage== <!--T:5-->


<!--T:6-->
<!--T:6-->
# Select an element to constrain;
# Select an element to constrain.
# Press the {{KEY|[[File:Sketcher ConstrainBlock.png|24px]] '''Constrain Block'''}} button.
# Press the {{Button|[[File:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain Block]]}} button.

'''Note:''' step 1 and 2 can be reversed.
<!--T:13-->
Or press the button first, and then select the elements.

== 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.


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


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

Revision as of 23:31, 23 January 2021

Sketcher ConstrainBlock

Menu location
Sketch → Sketcher constraints → Constrain Block
Workbenches
Sketcher
Default shortcut
None
Introduced in version
0.17
See also
Sketcher Constrain Lock

Description

Constrain Block blocks a geometric element in place with a single constraint.

It is mainly intended to be used with B-Splines, which can be difficult to fully constrain otherwise.

Usage

  1. Select an element to constrain.
  2. Press the Constrain Block button.

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

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.