Difference between revisions of "Sketcher ConstrainParallel/sv"

From FreeCAD Documentation
Jump to navigation Jump to search
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<languages/>
 
<languages/>
{{Docnav|[[Sketcher_ConstrainHorizontal|Horizontal]]|[[Sketcher_ConstrainPerpendicular|Perpendicular]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Horizontal.png|IconC=Workbench_Sketcher.svg|IconR=Constraint_Perpendicular.png}}
+
{{Docnav
 +
|[[Sketcher_ConstrainHorizontal|Horizontal]]
 +
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
 +
|[[Sketcher_Workbench|Sketcher]]
 +
|IconL=Sketcher_ConstrainHorizontal.svg
 +
|IconR=Sketcher_ConstrainPerpendicular.svg
 +
|IconC=Workbench_Sketcher.svg
 +
}}
  
 
<div class="mw-translate-fuzzy">
 
<div class="mw-translate-fuzzy">
Line 6: Line 13:
 
</div>
 
</div>
  
==Description==
+
==Description==  
 +
 
 
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==
+
==Operation==  
 +
 
 
The sketch contains two randomly oriented lines.
 
The sketch contains two randomly oriented lines.
  
[[File:ConstrainParallel1.png|256px]]
+
[[Image:ConstrainParallel1.png|500px]]
 +
 
 +
{{Caption|Select both lines by clicking successively on each of them.}}
 +
 
 +
[[File:ConstrainParallel2.png|500px]]
 +
 
 +
Apply the Constrain Parallel constraint by either:
 +
* 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.
  
Select both lines by clicking successively on each of them.
+
[[Image:ConstrainParallel3.png|500px]]
  
[[File:ConstrainParallel2.png|256px]]
+
{{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.}}
  
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.
+
== Scripting ==
  
[[File:ConstrainParallel3.png|256px]]
+
{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Parallel', Line1, Line2))}}
  
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.
+
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.
  
{{Docnav|[[Sketcher_ConstrainHorizontal|Horizontal]]|[[Sketcher_ConstrainPerpendicular|Perpendicular]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Horizontal.png|IconC=Workbench_Sketcher.svg|IconR=Constraint_Perpendicular.png}}
 
  
{{Sketcher Tools navi}}
+
{{Docnav
 +
|[[Sketcher_ConstrainHorizontal|Horizontal]]
 +
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
 +
|[[Sketcher_Workbench|Sketcher]]
 +
|IconL=Sketcher_ConstrainHorizontal.svg
 +
|IconR=Sketcher_ConstrainPerpendicular.svg
 +
|IconC=Workbench_Sketcher.svg
 +
}}
  
{{Userdocnavi}}
+
{{Sketcher Tools navi{{#translation:}}}}
 +
{{Userdocnavi{{#translation:}}}}
 +
{{clear}}

Latest revision as of 23:25, 23 January 2021

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎português • ‎português do Brasil • ‎română • ‎svenska • ‎čeština • ‎русский

Constraint Parallel.svg Constraint Parallel

Menyplacering
Sketch → Sketcher constraints → Constrain parallel
Arbetsbänkar
Sketcher, PartDesign
Standard genväg
Ingen
Introducerad i version
-
Se även
Constraint Vertical, 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.

ConstrainParallel1.png

Select both lines by clicking successively on each of them.

ConstrainParallel2.png

Apply the Constrain Parallel constraint by either:

  • Pressing the Sketcher ConstrainParallel.svg 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.

ConstrainParallel3.png

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.