Sketcher ConstrainParallel: Difference between revisions

From FreeCAD Documentation
(Marked this version for translation)
(Scripting_Sketcher_constraints_in_Python -> Sketcher_scripting)
(25 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<languages/>
<translate>
<translate>
<!--T:12-->
{{Docnav
|[[Sketcher_ConstrainHorizontal|Horizontal]]
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainHorizontal.svg
|IconR=Sketcher_ConstrainPerpendicular.svg
|IconC=Workbench_Sketcher.svg
}}

<!--T:10-->
<!--T:10-->
{{GuiCommand
{{GuiCommand|Name=Constraint Parallel|Workbenches=[[Sketcher Workbench|Sketcher]], [[PartDesign Workbench|PartDesign]]|MenuLocation=Sketch → Sketcher constraints → Constrain parallel|SeeAlso=[[Constraint Vertical]], [[Constraint Horizontal]]}}
|Name=Sketcher ConstrainParallel
|MenuLocation=Sketch → Sketcher constraints → Constrain parallel
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|Shortcut={{KEY|Shift}} + {{KEY|P}}
|SeeAlso=[[Sketcher_ConstrainVertical|Sketcher Constraint Vertical]], [[Sketcher_ConstrainHorizontal|Sketcher Constraint Horizontal]]
}}


====Description==== <!--T:2-->
==Description== <!--T:16-->

<!--T:2-->
The Constrain Parallel constraint forces two selected straight lines or edges to be parallel to each other.
The Constrain Parallel constraint forces two selected straight lines or edges to be parallel to each other.


====Operation==== <!--T:3-->
==Operation== <!--T:17-->

<!--T:3-->
The sketch contains two randomly oriented lines.
The sketch contains two randomly oriented lines.


<!--T:4-->
<!--T:4-->
[[File:ConstrainParallel1.png|256px]]
[[Image:ConstrainParallel1.png|500px]]


<!--T:5-->
<!--T:5-->
Select both lines by clicking successively on each of them.
{{Caption|Select both lines by clicking successively on each of them.}}


<!--T:6-->
<!--T:6-->
[[File:ConstrainParallel2.png|256px]]
[[File:ConstrainParallel2.png|500px]]


<!--T:7-->
<!--T:7-->
Apply the Constrain Parallel constraint by either:
Apply the Constrain Parallel constraint by selecting the Constrain Parallel icon [[File:Constraint_Parallel.png|16px]] from the Sketcher constraints toolbar or by selecting the Constraint Parallel menu item from the Sketcher constraints sub menu of the Sketcher (Sketcher workbench selected) or Part Design (Part Design workbench selected) menu item.
* Pressing the {{Button|[[File:Sketcher_ConstrainParallel.svg|16px]] [[Sketcher_ConstrainParallel|Constrain parallel]]}} button from the Sketcher constraints toolbar by selecting the Constraint Parallel menu item from the Sketcher constraints sub menu of the Sketcher (Sketcher workbench selected) or Part Design (Part Design workbench selected) menu item.
* Use the {{KEY|Shift}} + {{KEY|P}} keyboard shortcut.
* Use the {{MenuCommand|Sketch → Sketcher constraints → Constrain parallel}} entry from the top menu.


<!--T:8-->
<!--T:8-->
[[File:ConstrainParallel3.png|256px]]
[[Image:ConstrainParallel3.png|500px]]


<!--T:9-->
<!--T:9-->
The selected lines are forced to be parallel to each other. Changing the orientation of one line will change the orientation of the other to be the same.
{{Caption|Result: The selected lines are forced to be parallel to each other. Changing the orientation of one line will change the orientation of the other to be the same.}}

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


</translate>
</translate>
{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Parallel', Line1, Line2))}}
<languages/>
<translate>

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


<!--T:13-->
{{Docnav
|[[Sketcher_ConstrainHorizontal|Horizontal]]
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainHorizontal.svg
|IconR=Sketcher_ConstrainPerpendicular.svg
|IconC=Workbench_Sketcher.svg
}}

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

Revision as of 23:23, 23 January 2021

Sketcher ConstrainParallel

Menu location
Sketch → Sketcher constraints → Constrain parallel
Workbenches
Sketcher
Default shortcut
Shift + P
Introduced in version
-
See also
Sketcher Constraint Vertical, Sketcher Constraint Horizontal

Description

The Constrain Parallel constraint forces two selected straight lines or edges to be parallel to each other.

Operation

The sketch contains two randomly oriented lines.

Select both lines by clicking successively on each of them.

Apply the Constrain Parallel constraint by either:

  • Pressing the Constrain parallel button from the Sketcher constraints toolbar by selecting the Constraint Parallel menu item from the Sketcher constraints sub menu of the Sketcher (Sketcher workbench selected) or Part Design (Part Design workbench selected) menu item.
  • Use the Shift + P keyboard shortcut.
  • Use the Sketch → Sketcher constraints → Constrain parallel entry from the top menu.

Result: The selected lines are forced to be parallel to each other. Changing the orientation of one line will change the orientation of the other to be the same.

Scripting

Sketch.addConstraint(Sketcher.Constraint('Parallel', Line1, Line2))

The Sketcher scripting page explains the values which can be used for Line1 and Line2 and contains further examples on how to create constraints from Python scripts.