Sketcher ToggleActiveConstraint/ru: 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 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>


<div class="mw-translate-fuzzy">
{{Docnav/ru
{{Docnav/ru
|[[Sketcher_ToggleDrivingConstraint/ru|Переключить ограничения в построительные/основные]]
|[[Sketcher_ConstrainInternalAlignment/ru|Привязать к внутренней геометрии]]
|[[Sketcher_SelectElementsWithDoFs/ru|Выбрать геометрию имеющую неограниченные степени свободы]]
|[[Sketcher_SelectElementsWithDoFs/ru|Выбрать геометрию имеющую неограниченные степени свободы]]
|[[Sketcher_Workbench/ru|Верстак "Sketcher"]]
|[[Sketcher_Workbench/ru|Верстак "Sketcher"]]
|IconL=Sketcher_ToggleDrivingConstraint.svg
|IconL=Constraint_InternalAlignment.png
|IconR=Sketcher SelectElementsWithDoFs.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
|IconR=Sketcher SelectElementsWithDoFs.svg
}}
}}
</div>


{{GuiCommand
{{GuiCommand
Line 16: Line 14:
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|MenuLocation=Sketch → Sketcher constraints → Activate/deactivate constraint
|MenuLocation=Sketch → Sketcher constraints → Activate/deactivate constraint
|Shortcut={{KEY|K}} {{KEY|Z}}
|SeeAlso=[[Sketcher_ToggleDrivingConstraint|Sketcher Toggle driving constraints]]
|Version=0.19
|Version=0.19
|SeeAlso=[[Sketcher_ToggleDrivingConstraint|Sketcher ToggleDrivingConstraint]]
}}
}}


<span id="Description"></span>
==Описание==
==Описание==


{{Button|[[File:Sketcher_ToggleActiveConstraint.svg|16px]] [[Sketcher_ToggleActiveConstraint|ToggleActiveConstraint]]}} allows you to activate and deactivate an already placed constraint. This allows you to keep the constraint in the background but temporarily test another arrangement of the existing geometry.
The [[Image:Sketcher_ToggleActiveConstraint.svg|24px]] [[Sketcher_ToggleActiveConstraint|Sketcher ToggleActiveConstraint]] tool activates or deactivates selected constraints. Deactivating constraints allows you to test other geometry arrangements without deleting constraints.


This is tool is similar to [[Sketcher_ToggleDrivingConstraint|Sketcher ToggleDrivingConstraint]], but contrary to that tool also works for geometric constraints, and values of deactivated dimensional constraints are preserved.
The {{Button|[[File:Sketcher_ToggleDrivingConstraint.svg|16px]] [[Sketcher_ToggleDrivingConstraint|Toggle driving constraint]]}} tool is similar in that it disables the effect of the constraint; however, with this tool, the constraint does not keep its old value. On the other hand, with {{Button|[[File:Sketcher_ToggleActiveConstraint.svg|16px]] [[Sketcher_ToggleActiveConstraint|ToggleActiveConstraint]]}} you can re-activate the old constraint immediately.


<span id="Usage"></span>
== Применение ==
== Применение ==


# Select one or more constraints.
# Select an already placed constraint, then press {{Button|[[File:Sketcher_ToggleActiveConstraint.svg|16px]] [[Sketcher_ToggleActiveConstraint|ToggleActiveConstraint]]}}.
# There are several ways to invoke the tool:
# Alternatively, got to the [[task_panel|task panel]], to the {{MenuCommand|Constraints}} section, select the constraint, then open the context menu (right-click), and select {{MenuCommand|Deactivate}}.
# To activate the constraint again, select it, and press {{Button|[[File:Sketcher_ToggleActiveConstraint.svg|16px]] [[Sketcher_ToggleActiveConstraint|ToggleActiveConstraint]]}} again.
#* Press the {{Button|[[Image:Sketcher_ToggleActiveConstraint.svg|16px]] [[Sketcher_ToggleActiveConstraint|Activate/deactivate constraint]]}} button.
#* Select the {{MenuCommand|Sketch → Sketcher constraints → [[Image:Sketcher_ToggleActiveConstraint.svg|16px]] Activate/deactivate constraint}} option from the menu.
#* {{Version|1.0}}: Right-click in the [[3D_view|3D view]] and select the {{MenuCommand|[[Image:Sketcher_ToggleActiveConstraint.svg|16px]] Activate/deactivate constraint}} option from the context menu.
#* In the '''Constraints''' section of the [[Sketcher_Dialog|Sketcher Dialog]] select the {{MenuCommand|Activate}} or {{MenuCommand|Deactivate}} option from the context menu. The offered option depends on the state of the constraint under the cursor.
#* Use the keyboard shortcut: {{KEY|K}} then {{KEY|Z}}.
# Active selected constraints are deactivated and turn grey (default [[Sketcher_Preferences#Appearance|color]]), while deactivated selected constraints are activated and return to red (default color).


<span id="Example"></span>
<div class="mw-translate-fuzzy">
== Примеры ==
== Примеры ==
</div>


[[File:Sketcher_ToggleActiveConstraint_example_active.png|x350px]]
[[File:Sketcher_ToggleActiveConstraint_example_active.png|400px]]
{{Caption|Fully constrained sketch.}}
{{Caption|A fully constrained sketch.}}


[[File:Sketcher_ToggleActiveConstraint_example_disabled_1.png|x350px]] [[File:Sketcher_ToggleActiveConstraint_example_disabled_2.png|x350px]]
[[File:Sketcher_ToggleActiveConstraint_example_disabled_1.png|400px]]
{{Caption|One of the angular constraints has been deactivated, the sketch is no longer fully constrained.}}
{{Caption|Left: deactivated constraint; the sketch is no longer fully constrained. Right: the unconstrained geometry can be moved around; the older constraint is still available, and can be re-activated to return to the fully constrained sketch.}}


[[File:Sketcher_ToggleActiveConstraint_example_disabled_2.png|400px]]
[[File:Sketcher_ToggleActiveConstraint_task_panel.png|x350px]]
{{Caption|Task panel with the deactivated constraint.}}
{{Caption|The unconstrained geometry can be moved around. The deactivated constraint is still available, and can be re-activated to return to the fully constrained sketch.}}


<span id="Scripting"></span>
==Программирование==
==Программирование==


Line 63: Line 73:




<div class="mw-translate-fuzzy">
{{Docnav/ru
{{Docnav/ru
|[[Sketcher_ToggleDrivingConstraint/ru|Переключить ограничения в построительные/основные]]
|[[Sketcher_ConstrainInternalAlignment/ru|Привязать к внутренней геометрии]]
|[[Sketcher_SelectElementsWithDoFs/ru|Выбрать геометрию имеющую неограниченные степени свободы]]
|[[Sketcher_SelectElementsWithDoFs/ru|Выбрать геометрию имеющую неограниченные степени свободы]]
|[[Sketcher_Workbench/ru|Верстак "Sketcher"]]
|[[Sketcher_Workbench/ru|Верстак "Sketcher"]]
|IconL=Sketcher_ToggleDrivingConstraint.svg
|IconL=Constraint_InternalAlignment.png
|IconR=Sketcher SelectElementsWithDoFs.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
|IconR=Sketcher SelectElementsWithDoFs.svg
}}
}}
</div>


{{Sketcher_Tools_navi{{#translation:}}}}
{{Sketcher_Tools_navi{{#translation:}}}}

Revision as of 10:24, 21 April 2024

Sketcher ToggleActiveConstraint

Menu location
Sketch → Sketcher constraints → Activate/deactivate constraint
Workbenches
Sketcher
Default shortcut
K Z
Introduced in version
0.19
See also
Sketcher ToggleDrivingConstraint

Описание

The Sketcher ToggleActiveConstraint tool activates or deactivates selected constraints. Deactivating constraints allows you to test other geometry arrangements without deleting constraints.

This is tool is similar to Sketcher ToggleDrivingConstraint, but contrary to that tool also works for geometric constraints, and values of deactivated dimensional constraints are preserved.

Применение

  1. Select one or more constraints.
  2. There are several ways to invoke the tool:
    • Press the Activate/deactivate constraint button.
    • Select the Sketch → Sketcher constraints → Activate/deactivate constraint option from the menu.
    • introduced in version 1.0: Right-click in the 3D view and select the Activate/deactivate constraint option from the context menu.
    • In the Constraints section of the Sketcher Dialog select the Activate or Deactivate option from the context menu. The offered option depends on the state of the constraint under the cursor.
    • Use the keyboard shortcut: K then Z.
  3. Active selected constraints are deactivated and turn grey (default color), while deactivated selected constraints are activated and return to red (default color).

Примеры

A fully constrained sketch.

One of the angular constraints has been deactivated, the sketch is no longer fully constrained.

The unconstrained geometry can be moved around. The deactivated constraint is still available, and can be re-activated to return to the fully constrained sketch.

Программирование

See also: FreeCAD Scripting Basics.

The active status of a constraint can be controlled in macros and from the Python console.

SketchObject.toggleActive(index)

Use the toggleActive method of an existing Sketcher SketchObject, and the index of the constraint to activate it or deactivate it. The index starts from 0 all the way to N-1, where N is the total number of constraints.

Пример:

import FreeCAD as App

sketch = App.ActiveDocument.Sketch
sketch.toggleActive(3)