Sketcher ConstrainParallel/sv: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
(4 intermediate revisions by the same user not shown)
Line 4: Line 4:
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Constraint_Horizontal.svg
|IconL=Sketcher_ConstrainHorizontal.svg
|IconR=Sketcher_ConstrainPerpendicular.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
|IconR=Constraint_Perpendicular.png
}}
}}


Line 21: Line 21:
The sketch contains two randomly oriented lines.
The sketch contains two randomly oriented lines.


[[Image:ConstrainParallel1.png|256px]]
[[Image:ConstrainParallel1.png|500px]]


Select both lines by clicking successively on each of them.
{{Caption|Select both lines by clicking successively on each of them.}}


[[File:ConstrainParallel2.png|256px]]
[[File:ConstrainParallel2.png|500px]]


Apply the Constrain Parallel constraint by either:
Apply the Constrain Parallel constraint by either:
* Pressing the {{Button|[[Image:Constraint_Parallel.png|16px]] [[Sketcher ConstrainParallel|Constrain Parallel]]}} button from the Sketcher constraints toolbarby 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 {{KEY|Shift}} + {{KEY|P}} keyboard shortcut.
* Use the {{MenuCommand|Sketch → Sketcher constraints → Constrain parallel}} entry from the top menu.
* Use the {{MenuCommand|Sketch → Sketcher constraints → Constrain parallel}} entry from the top menu.


[[Image:ConstrainParallel3.png|256px]]
[[Image:ConstrainParallel3.png|500px]]

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

{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Parallel', Line1, Line2))}}

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.


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


{{Docnav
{{Docnav
Line 40: Line 47:
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
|[[Sketcher_ConstrainPerpendicular|Perpendicular]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Constraint_Horizontal.svg
|IconL=Sketcher_ConstrainHorizontal.svg
|IconR=Sketcher_ConstrainPerpendicular.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
|IconR=Constraint_Perpendicular.png
}}
}}



Revision as of 23:25, 23 January 2021

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.

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.