Sketcher ConstrainRadiam: Difference between revisions

From FreeCAD Documentation
(Docnav)
No edit summary
Line 41: Line 41:
#* {{Version|0.22}}: Right-click in the [[3D_view|3D view]] and select the {{MenuCommand|Dimension → [[Image:Sketcher_ConstrainRadiam.svg|16px]] Constrain auto radius/diameter}} option from the context menu.
#* {{Version|0.22}}: Right-click in the [[3D_view|3D view]] and select the {{MenuCommand|Dimension → [[Image:Sketcher_ConstrainRadiam.svg|16px]] Constrain auto radius/diameter}} option from the context menu.
#* Use the keyboard shortcut: {{KEY|K}} then {{KEY|S}}.
#* Use the keyboard shortcut: {{KEY|K}} then {{KEY|S}}.
# Do one of the following:
# For further steps see [[Sketcher_ConstrainRadius#Continue_mode|Sketcher ConstrainRadius]].
#* Select the edge of a circle or arc.
#* Select the edge of a B-spline weight circle.
# If a [[Sketcher_ToggleDrivingConstraint|driving constraint]] is created, and the {{MenuCommand|Ask for value after creating a dimensional constraint}} option is selected (default) in the [[Sketcher_Preferences#Display|Sketcher Preferences]]:
## A dialog opens to edit the constraint value.
## Press the {{Button|OK}} button to confirm.
# A constraint is added.
# Optionally keep creating constraints.
# To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.


===Once-only mode===
===Once-only mode===


# Do one of the following:
See [[Sketcher_ConstrainRadius#Once-only_mode|Sketcher ConstrainRadius]].
#* Select the edge of one or more circles or arcs.
#* Select the edge of one or more B-spline weight circles.
# Invoke the tool as explained above.
# Edit and/or confirm the constraint value as explained above.
# Depending on the selection one or more constraints are added, see [[#Notes|Notes]].

==Notes==

* If [[Sketcher_ToggleDrivingConstraint|driving constraints]] are created and multiple elements that are not [[Sketcher_External|external geometry]] have been pre-selected, only the first of those receives a dimensional constraint, while between the first and the others [[Image:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Equal constrains]] are applied.


== Scripting == <!--T:9-->
== Scripting == <!--T:9-->

Revision as of 10:25, 8 March 2024

This documentation is a work in progress. Please don't mark it as translatable since it will change in the next hours and days.

Sketcher ConstrainRadiam

Menu location
Sketch → Sketcher constraints → Constrain auto radius/diameter
Workbenches
Sketcher
Default shortcut
K S
Introduced in version
0.20
See also
Sketcher Constrain distance, Sketcher Constrain horizontal distance, Sketcher Constrain vertical distance

Description

The Sketcher ConstrainRadiam tool fixes the radius of arcs and B-spline weight circles, and the diameter of circles.

Usage

See also: Drawing aids.

Continue mode

  1. Make sure there is no selection.
  2. There are several ways to invoke the tool:
    • Press the Constrain auto radius/diameter button.
    • Select the Sketch → Sketcher constraints → Constrain auto radius/diameter option from the menu.
    • introduced in version 0.22: Right-click in the 3D view and select the Dimension → Constrain auto radius/diameter option from the context menu.
    • Use the keyboard shortcut: K then S.
  3. Do one of the following:
    • Select the edge of a circle or arc.
    • Select the edge of a B-spline weight circle.
  4. If a driving constraint is created, and the Ask for value after creating a dimensional constraint option is selected (default) in the Sketcher Preferences:
    1. A dialog opens to edit the constraint value.
    2. Press the OK button to confirm.
  5. A constraint is added.
  6. Optionally keep creating constraints.
  7. To finish, right-click or press Esc, or start another geometry or constraint creation tool.

Once-only mode

  1. Do one of the following:
    • Select the edge of one or more circles or arcs.
    • Select the edge of one or more B-spline weight circles.
  2. Invoke the tool as explained above.
  3. Edit and/or confirm the constraint value as explained above.
  4. Depending on the selection one or more constraints are added, see Notes.

Notes

Scripting

Sketch.addConstraint(Sketcher.Constraint('Radius', ArcOrCircle, App.Units.Quantity('123.0 mm')))
Sketch.addConstraint(Sketcher.Constraint('Diameter', ArcOrCircle, App.Units.Quantity('246.0 mm')))

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