Sketcher ConstrainRadiam: Difference between revisions

From FreeCAD Documentation
No edit summary
(9 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{Page_in_progress}}
<translate>
<translate>


<!--T:7-->
<!--T:7-->
{{Docnav
{{Docnav
|[[Sketcher_ConstrainDistance|Distance]]
|[[Sketcher_ConstrainDiameter|Diameter]]
|[[Sketcher_ConstrainRadius|Radius]]
|[[Sketcher_ConstrainAngle|Angle]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainDiameter.svg
|IconL=Sketcher_ConstrainDistance.svg
|IconR=Sketcher_ConstrainAngle.svg
|IconR=Sketcher_ConstrainRadius.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
}}
}}
Line 25: Line 26:


<!--T:6-->
<!--T:6-->
The [[Image:Sketcher_ConstrainRadiam.svg|24px]] [[Sketcher_ConstrainRadiam|Sketcher ConstrainRadiam]] tool fixes the radius of arcs and [[Sketcher_CreateBSpline#Notes|B-spline weight circles]], and the diameter of circles.
This constraint automatically constrains the value of the radius/diameter of a circle or arc to have a specific value.
Following rules are applied :
* If object is a B-spline pole, a weight constrain is added
* If object is a complete circle, a diameter constrain is added
* In other cases (typically an arc), a radius constrain is added
If more than one circle or arc is selected before launching the command :
* If the constrain is applied in 'Reference' mode, a new reference constrain is added to each object separately according above rules
* If the constrain is applied in 'Normal' (driving) mode, following rules are applied
** A reference constrain is applied separately on each object which is an external geometry
** {{Button|[[File:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Equal constrains]]}} are applied sequentially between all real/construction geometry objects and a dimensional constrain is applied to the first selected object according above rules
NB : B-spline poles can't be mixed with other object type in the selection


==Usage== <!--T:3-->
==Usage== <!--T:3-->

See also: [[Sketcher_Workbench#Drawing_aids|Drawing aids]].

===[[Sketcher_Workbench#Continue_modes|Continue mode]]===


<!--T:4-->
<!--T:4-->
# Make sure there is no selection.
# Pick one or more circles or arcs.
# There are several ways to invoke the tool:
# Press the {{Button|[[File:Sketcher_ConstrainRadiam.svg|16px]] [[Sketcher_ConstrainRadiam|Constrain auto radius/diameter]]}} button.
#* {{Version|0.22}}: 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_ConstrainRadiam.svg|16px]] Constrain auto radius/diameter}} option from the dropdown.
# A pop up dialog opens to edit or confirm the value. Press {{Button|OK}} to validate.
#* If this preference has a different value (and in {{VersionMinus|0.21}}): press the {{Button|[[Image:Sketcher_ConstrainRadiam.svg|16px]] [[Sketcher_ConstrainRadiam|Constrain auto radius/diameter]]}} button.
# Optionally the dimension label and line can be moved and rotated in the 3D view by clicking on the value and dragging while keeping the left mouse button pressed.
#* Select the {{MenuCommand|Sketch → Sketcher constraints → [[Image:Sketcher_ConstrainRadiam.svg|16px]] Constrain auto radius/diameter}} option from the 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}}.
# Do one of the following:
#* Select the edge of a circle or arc.
#* Select the edge of a B-spline weight circle.
# If a [[Sketcher_ToggleDrivingConstraint|driving dimensional constraint]] is created, depending on the [[Sketcher_Preferences#Display|preferences]], a dialog opens to [[Sketcher_Workbench#Edit_constraints|edit its value]].
# A constraint is added.
# Optionally keep creating constraints.
# To finish, right-click or press {{KEY|Esc}}, or start another geometry or constraint creation tool.


===Run-once mode===
<!--T:5-->

'''Note:''' the constraint tool can also be started with no prior selection. 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.
# 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.
# Invoke the tool as explained above.
# Optionally [[Sketcher_Workbench#Edit_constraints|edit the constraint value]].
# 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-->

</translate>
{{Code|code=
Sketch.addConstraint(Sketcher.Constraint('Radius', ArcOrCircle, App.Units.Quantity('123.0 mm')))
Sketch.addConstraint(Sketcher.Constraint('Diameter', ArcOrCircle, App.Units.Quantity('246.0 mm')))
}}
<translate>


<!--T:10-->
<!--T:10-->
No specific scripting applies. See the [[Sketcher_scripting|Sketcher scripting]] page that explains the values which can be used for {{incode|ArcOrCircle}} and {{incode|Circle}}, and contains further examples on how to create constraints from Python scripts.
The [[Sketcher_scripting|Sketcher scripting]] page explains the values which can be used for {{incode|ArcOrCircle}}, and contains further examples on how to create constraints from Python scripts.




<!--T:8-->
<!--T:8-->
{{Docnav
{{Docnav
|[[Sketcher_ConstrainDistance|Distance]]
|[[Sketcher_ConstrainDiameter|Diameter]]
|[[Sketcher_ConstrainRadius|Radius]]
|[[Sketcher_ConstrainAngle|Angle]]
|[[Sketcher_Workbench|Sketcher]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainDiameter.svg
|IconL=Sketcher_ConstrainDistance.svg
|IconR=Sketcher_ConstrainAngle.svg
|IconR=Sketcher_ConstrainRadius.svg
|IconC=Workbench_Sketcher.svg
|IconC=Workbench_Sketcher.svg
}}
}}

Revision as of 19:00, 11 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:
    • introduced in version 0.22: 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 auto radius/diameter option from the dropdown.
    • If this preference has a different value (and in version 0.21 and below): 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 dimensional constraint is created, depending on the preferences, a dialog opens to edit its value.
  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.

Run-once 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. Optionally edit the constraint value.
  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.