Sketcher ConstrainLock/cs: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 2: Line 2:


{{Docnav
{{Docnav
|[[Sketcher_ConstrainAngle|Angle]]
|[[Sketcher_Dimension|Dimension]]
|[[Sketcher_ConstrainSnellsLaw|Refraction (Snell's law)]]
|[[Sketcher_ConstrainDistanceX|Horizontal distance]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_Dimension.svg
|IconL=Sketcher_ConstrainAngle.svg
|IconR=Sketcher_ConstrainDistanceX.svg‎
|IconR=Sketcher_ConstrainSnellsLaw.svg‎
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
}}
}}
Line 28: Line 28:
</div>
</div>


'''Constraint Lock''' applies {{Button|[[File:Sketcher_ConstrainDistanceX.svg|16px]] [[Sketcher_ConstrainDistanceX|Horizontal distance]]}} and {{Button|[[File:Sketcher_ConstrainDistanceY.svg|16px]] [[Sketcher_ConstrainDistanceY|Vertical distance]]}} constraints to selected vertices (points) in the sketch. If a single vertex is selected, the horizontal and vertical distance constraints will refer to the sketch origin point. If two or more points are selected, horizontal and vertical distance constraints will be added for each pair of points. There is no automatic prompt to edit the constraints' values, they must be edited manually.
The [[Image:Sketcher_ConstrainLock.svg|24px]] [[Sketcher_ConstrainLock|Sketcher ConstrainLock]] tool applies [[Sketcher_ConstrainDistanceX|Horizontal distance]] and [[Sketcher_ConstrainDistanceY|Vertical distance]] constraints to points. If a single point is selected the constraints reference the sketch origin. If two or more points are selected the constraints reference the last selected point.


<span id="Usage"></span>
<span id="Usage"></span>
Line 58: Line 58:
</div>
</div>


See also: [[Sketcher_Workbench#Drawing_aids|Drawing aids]].
# Select one or more vertices (points) in the sketch.
# Press the {{Button|[[File:Sketcher_ConstrainLock.svg|16px]] [[Sketcher_ConstrainLock|Constrain lock]]}} button.
# To edit the constraints values, double-click on a constraint value in the 3D view, or double-click on the constraint or right-click and select '''Edit value''' in the Constraint list in the Tasks tab.


===[[Sketcher_Workbench#Continue_modes|Continue mode]]===
'''Note:''' the constraint tool can also be started with no prior selection, but it will then only work on a single vertex, and reference the constraints to the sketch origin point. By default the command will be in continue mode to create new constraints; press the right mouse button or {{KEY|ESC}} once to quit the command.


# Make sure there is no selection.
== Scripting ==
# There are several ways to invoke the tool:
#* {{Version|1.0}}: If the {{MenuCommand|Dimensioning constraints}} [[Sketcher_Preferences#General|preference]] is set to {{Value|Single tool}} (default): press the down arrow to the right of the {{Button|[[Image:Sketcher_Dimension.svg||x16px]][[Image:Toolbar_flyout_arrow.svg|x16px]]}} button and select the {{MenuCommand|[[Image:Sketcher_ConstrainLock.svg|16px]] Constrain lock}} option from the dropdown.
#* If this preference has a different value (and in {{VersionMinus|0.21}}): press the {{Button|[[Image:Sketcher_ConstrainLock.svg|16px]] [[Sketcher_ConstrainLock|Constrain lock]]}} button.
#* Select the {{MenuCommand|Sketch → Sketcher constraints → [[Image:Sketcher_ConstrainLock.svg|16px]] Constrain lock}} option from the menu.
#* {{Version|1.0}}: Right-click in the [[3D_view|3D view]] and select the {{MenuCommand|Dimension → [[Image:Sketcher_ConstrainLock.svg|16px]] Constrain lock}} option from the context menu.
#* Use the keyboard shortcut: {{KEY|K}} then {{KEY|L}}.
# The cursor changes to a cross with the tool icon.
# Select a single point.
# Two constraints are added.
# Optionally keep creating constraints.
# To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.


===Run-once mode===
The [[File:Sketcher_ConstrainLock.svg|24px]] [[Sketcher_ConstrainLock|Lock]] constraint is a GUI command which creates a [[File:Sketcher_ConstrainDistanceX.svg|24px]] [[Sketcher_ConstrainDistanceX|Horizontal distance]] and a [[File:Sketcher_ConstrainDistanceY.svg|24px]] [[Sketcher_ConstrainDistanceY|Vertical distance]] constraint, it is not a constraint of its own. See the [[Sketcher_scripting|Sketcher scripting]] page for details and examples on how to create these constraints from Python scripts.

# Select one or more points.
# Invoke the tool as explained above.
# Depending on the selection two or more constraints are added.

==Notes==

* There is no automatic prompt to edit the constraint values. If required values can be [[Sketcher_Workbench#Edit_constraints|edited manually]].




{{Docnav
{{Docnav
|[[Sketcher_ConstrainAngle|Angle]]
|[[Sketcher_Dimension|Dimension]]
|[[Sketcher_ConstrainSnellsLaw|Refraction (Snell's law)]]
|[[Sketcher_ConstrainDistanceX|Horizontal distance]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_Dimension.svg
|IconL=Sketcher_ConstrainAngle.svg
|IconR=Sketcher_ConstrainDistanceX.svg‎
|IconR=Sketcher_ConstrainSnellsLaw.svg‎
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
}}
}}

Revision as of 15:23, 23 April 2024

Sketcher ConstrainLock

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

"Vytvoření zámku na vybrané položce"

Popis

Tento nástroj se pokusí plně ustavit jakoukoliv vybranou položku.

The Sketcher ConstrainLock tool applies Horizontal distance and Vertical distance constraints to points. If a single point is selected the constraints reference the sketch origin. If two or more points are selected the constraints reference the last selected point.

Díky tomu, že FreeCAD je stále ještě ve vývoji - tento nástroj předvádí podivné chování, když se pokouší 'zamknout' cokoliv jiného než bod. Například (jako ve V0.12 R4802), když uzamknete kružnici její obvodovou čárou a ne jejím středovým bodem, zobrazí se v dialogovém okně horizontální i vertikální vazební hodnoty, ale jsou nastaveny na nulu a nezobrazí se v grafickém okně.

Postup

  1. Nejdříve je nutné vysvítit položku, kterou chcete uzamknout. Z důvodů uvedených výše je rozumné vysvítit pouze bod.
  2. Vysvícení nakreselené položky je dosaženo posunutím myši nad položku a kliknutím na levé tlačítko myši. Vysvícená položka změní barvu na zelenou.
  3. Jakmile je položka vysvícena, kliknutím levým tlačítkem myši na vazbu uzamknout uzamčete položku na jejím místě. Obyčejně je to představováno jako dvě vazby: horizontální vzdálenost od počátku a vertikální vzdálenost od počátku. Tyto vzdálenosti jsou obecně nastaveny na aktuální koordináty bodu.
  4. Vertikální a horizontální vazba, které určují zámek mohou být editovány buď dvojklikem na příslušnou vazbu v náčrtu nebo v záložce vazeb rozbalovacího panelu pohledu. To otevře dialogové okno pro editaci vazeb. Kliknutí na horizontální vazbu vyvolá:
    .
  5. Zadejte požadovanou hodnotu v dialogovém okně a klikněte na OK.
  6. Nová hodnota vazby je ihned aplikována výkres.
  7. Podobně může být editována i vertikální vazba pro ustavení bodu na požadovaném místě.

See also: Drawing aids.

Continue mode

  1. Make sure there is no selection.
  2. There are several ways to invoke the tool:
    • introduced in version 1.0: If the Dimensioning constraints preference is set to Single tool (default): press the down arrow to the right of the button and select the Constrain lock option from the dropdown.
    • If this preference has a different value (and in version 0.21 and below): press the Constrain lock button.
    • Select the Sketch → Sketcher constraints → Constrain lock option from the menu.
    • introduced in version 1.0: Right-click in the 3D view and select the Dimension → Constrain lock option from the context menu.
    • Use the keyboard shortcut: K then L.
  3. The cursor changes to a cross with the tool icon.
  4. Select a single point.
  5. Two constraints are added.
  6. Optionally keep creating constraints.
  7. To finish, right-click or press Esc, or start another geometry or constraint creation tool.

Run-once mode

  1. Select one or more points.
  2. Invoke the tool as explained above.
  3. Depending on the selection two or more constraints are added.

Notes

  • There is no automatic prompt to edit the constraint values. If required values can be edited manually.