Difference between revisions of "Sketcher ConstrainBlock"

From FreeCAD Documentation
Jump to navigation Jump to search
(Button template)
(Scripting_Sketcher_constraints_in_Python -> Sketcher_scripting)
 
(8 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
<translate>
 
<translate>
 
<!--T:8-->
 
<!--T:8-->
{{Docnav|[[Sketcher_ConstrainSymmetric|Symmetric]]|[[Sketcher ConstrainLock|Lock]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Symmetric.png|IconC=Workbench_Sketcher.svg|IconR=Sketcher_ConstrainLock.svg‎}}
+
{{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-->
Line 8: Line 15:
 
|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 18: Line 25:
 
'''Constrain Block''' blocks a geometric element in place with a single constraint.
 
'''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.
 
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.
  
Line 26: Line 34:
 
# Press the {{Button|[[File:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain Block]]}} button.
 
# Press the {{Button|[[File:Sketcher_ConstrainBlock.svg|16px]] [[Sketcher_ConstrainBlock|Constrain Block]]}} button.
  
 +
<!--T:13-->
 
Or press the button first, and then select the elements.
 
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-->
 
<!--T:9-->
{{Docnav|[[Sketcher_ConstrainSymmetric|Symmetric]]|[[Sketcher ConstrainLock|Lock]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Symmetric.png|IconC=Workbench_Sketcher.svg|IconR=Sketcher_ConstrainLock.svg‎}}
+
{{Docnav
 +
|[[Sketcher_ConstrainSymmetric|Symmetric]]
 +
|[[Sketcher_ConstrainLock|Lock]]
 +
|[[Sketcher_Workbench|Sketcher]]
 +
|IconL=Constraint_Symmetric.svg
 +
|IconR=Sketcher_ConstrainLock.svg‎
 +
|IconC=Workbench_Sketcher.svg
 +
}}
  
 
</translate>
 
</translate>

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