Difference between revisions of "Sketcher ConstrainBlock"

From FreeCAD Documentation
Jump to navigation Jump to search
(Created page.)
 
(Scripting_Sketcher_constraints_in_Python -> Sketcher_scripting)
 
(21 intermediate revisions by 9 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-->
 
{{GuiCommand
 
{{GuiCommand
 
|Name=Sketcher ConstrainBlock
 
|Name=Sketcher ConstrainBlock
|Workbenches=[[Sketcher Workbench|Sketcher]]
 
 
|MenuLocation=Sketch → Sketcher constraints → Constrain Block
 
|MenuLocation=Sketch → Sketcher constraints → Constrain Block
|SeeAlso=[[Sketcher_ConstrainLock|Constrain Lock]]
+
|Workbenches=[[Sketcher_Workbench|Sketcher]]
 +
|Version=0.17
 +
|SeeAlso=[[Sketcher_ConstrainLock|Sketcher Constrain Lock]]
 
}}
 
}}
  
==Description==
+
==Description== <!--T:2-->
 +
 
 +
<!--T:3-->
 +
'''Constrain Block''' blocks a geometric element in place with a single constraint.
 +
 
 +
<!--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.
 +
 
 +
==Usage== <!--T:5-->
 +
 
 +
<!--T:6-->
 +
# Select an element to constrain.
 +
# Press the {{Button|[[File:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain Block]]}} button.
  
'''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.
+
<!--T:13-->
 +
Or press the button first, and then select the elements.
  
{{Version|0.17}}
+
== Scripting == <!--T:14-->
  
==How to use==
+
</translate>
 +
{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Block', Edge))}}
 +
<translate>
  
# Select an element to constrain;
+
<!--T:15-->
# Press the {{KEY|[[File:Sketcher ConstrainBlock.png|24px]] '''Constrain Block'''}} button.
+
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.
'''Note:''' step 1 and 2 can be reversed.
+
 
 +
 
 +
<!--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}}

Latest revision as of 23:31, 23 January 2021

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎português do Brasil • ‎română • ‎русский
Arrow-left.svg Previous: Constraint Symmetric.svg Symmetric
Next: Lock Sketcher ConstrainLock.svg Arrow-right.svg

Sketcher ConstrainBlock.svg 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 Sketcher CreateBSpline.svg B-Splines, which can be difficult to fully constrain otherwise.

Usage

  1. Select an element to constrain.
  2. Press the Sketcher ConstrainBlock.svg 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.


Arrow-left.svg Previous: Constraint Symmetric.svg Symmetric
Next: Lock Sketcher ConstrainLock.svg Arrow-right.svg