Sketcher AktiveRandbedingungUmschalten

From FreeCAD Documentation
Revision as of 18:51, 24 June 2020 by Maker (talk | contribs) (Created page with "{{Caption|Vollständig beschränkte Skizze‎.}}")

Skizzierer UmschaltenAktiveBeschränkung

Menüeintrag
Skizze → Skizzierer Beschränkungen → Umschalten Aktivieren/Deaktivieren Beschränkung
Arbeitsbereich
Skizzierer
Standardtastenkürzel
-
Eingeführt in Version
0.19
Siehe auch
Umschalten treibende Beschränkungen

Beschreibung

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 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 ToggleActiveConstraint you can re-activate the old constraint immediately.

Usage

  1. Select an already placed constraint, then press ToggleActiveConstraint.
  2. Alternatively, got to the task panel, to the Constraints section, select the constraint, then open the context menu (right-click), and select Deactivate.
  3. To activate the constraint again, select it, and press ToggleActiveConstraint again.

Beispiele

Vollständig beschränkte Skizze‎.

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.

Task panel with the deactivated constraint.

Skripten

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.

Beispiel:

import FreeCAD as App

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