Sketcher ConstrainHorizontal/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>
{{UnfinishedDocu{{#translation:}}}}


{{Docnav
{{Docnav
Line 27: Line 26:
</div>
</div>


The Horizontal Constraint forces a selected line or lines in the sketch to be parallel to the horizontal axis of the sketch.
The [[Image:Sketcher_ConstrainHorizontal.svg|24px]] [[Sketcher_ConstrainHorizontal|Sketcher ConstrainHorizontal]] command constrains lines or pairs of points to be horizontal (parallel to the horizontal axis of the sketch).

{{Version|0.22}}: In most cases it is advisable to use the combined [[Sketcher_ConstrainHorVer|Sketcher ConstrainHorVer]] command instead.


<span id="Usage"></span>
<span id="Usage"></span>
Line 49: Line 50:
</div>
</div>


# Optionally do one of the following:
[[File:HorizontalConstraint1.png|500px]]
#* Select two or more points.
{{Caption|Select a line in the sketch by clicking on it.}}
#* Select two or more lines. Points can be included in the selection, but will be ignored.

# There are several ways to invoke the command:
[[File:HorizontalConstraint2.png|500px]]
#* {{VersionMinus|0.21}}: Press the {{Button|[[Image:Sketcher_ConstrainHorizontal.svg|16px]] [[Sketcher_ConstrainHorizontal|Constrain horizontally]]}} button.
{{Caption|The line turns dark green.}}
#* {{Version|0.22}}: Press the down arrow to the right of the {{Button|[[Image:Sketcher_ConstrainHorVer.svg||x16px]][[Image:Toolbar_flyout_arrow.svg|x16px]]}} button and select the {{MenuCommand|[[Image:Sketcher_ConstrainHorizontal.svg|16px]] Constrain horizontally}} option.

#* Select the {{MenuCommand|Sketch → Sketcher constraints → [[Image:Sketcher_ConstrainHorizontal.svg|16px]] Constrain horizontally}} option from the menu.
[[File:HorizontalConstraint3.png|500px]]
#* Use the keyboard shortcut: {{KEY|H}}.
{{Caption|Apply the Horizontal Constraint by clicking on the {{Button|[[File:Sketcher_ConstrainHorizontal.svg|16px]] [[Sketcher_ConstrainHorizontal|Constraint horizontal]]}} in the Sketcher Constraints toolbar or by selecting the Constrain horizontally menu item in the Sketcher constraints sub menu of the Sketch menu item in the Sketcher work bench (or the Part Design menu item of the Part Design work bench). The selected line is constrained to be parallel to the horizontal axis of the sketch.}}
# To indicate that the command has been activated the cursor changes to a white cross with the command icon.

# Optionally keep selecting elements. You can only select a single line or two points at a time now.
[[File:HorizontalConstraint4.png|500px]]
# To finish the command press {{KEY|Esc}} or the right mouse button, or start a another constraints or geometries command.
{{Caption|Multiple lines may be selected}}

[[File:HorizontalConstraint5.png|500px]]
{{Caption|and then applying the constraint as described above, they are constrained to be parallel to the sketch horizontal axis.}}


== Scripting ==
== Scripting ==

Revision as of 09:24, 20 January 2024

Constraint Horizontal

Umístění Menu
Sketch → Sketcher constraints → Constrain horizontally
Pracovní stoly
Sketcher, PartDesign
Výchozí zástupce
Nikdo
Představen ve verzi
-
Viz také
Constraint Vertical

Popis

Vazba Horizontálně zajistí, že vybraná přímka nebo přímky v obrázku budou paralelní k horizontální ose náčrtu.

The Sketcher ConstrainHorizontal command constrains lines or pairs of points to be horizontal (parallel to the horizontal axis of the sketch).

introduced in version 0.22: In most cases it is advisable to use the combined Sketcher ConstrainHorVer command instead.

Funkce

Kliknutím na ni vyberte přímku v náčrtu.

Přímka se zbarví na tmavězelenou.

Vazbu Horizontálně aplikujete kliknutím na její ikonu v panelu nástrojů Náčrtu nebo výběrem položky Vazba horizontálně v submenu Vazby v menu Náčrtu v Pracovní ploše Náčrt (nebo v menu Nákres Díl v pracovní ploše Díl). Vybraná přímka je upravena tak, aby byla paralelní s horizontální osou náčrtu.

Může být vybráno i více přímek

a potom vybrána Vazba horizontálně jak je popsáno výše, horizontálně jsou pak upraveny všechny přímky.

  1. Optionally do one of the following:
    • Select two or more points.
    • Select two or more lines. Points can be included in the selection, but will be ignored.
  2. There are several ways to invoke the command:
    • version 0.21 and below: Press the Constrain horizontally button.
    • introduced in version 0.22: Press the down arrow to the right of the button and select the Constrain horizontally option.
    • Select the Sketch → Sketcher constraints → Constrain horizontally option from the menu.
    • Use the keyboard shortcut: H.
  3. To indicate that the command has been activated the cursor changes to a white cross with the command icon.
  4. Optionally keep selecting elements. You can only select a single line or two points at a time now.
  5. To finish the command press Esc or the right mouse button, or start a another constraints or geometries command.

Scripting

Sketch.addConstraint(Sketcher.Constraint('Horizontal', Line))

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