Sketcher ConstrainEqual: Difference between revisions

From FreeCAD Documentation
m (initial editing stages - lots of edits!)
m (typo)
(25 intermediate revisions by 9 users not shown)
Line 1: Line 1:
<languages/>
{{GuiCommand|Name=Constraint EqualLength|Workbenches=[[Sketcher Workbench|Sketcher]], [[PartDesign Module|PartDesign_Workbench]]|MenuLocation=Sketcher → Constrain equal|SeeAlso=[[Constraint radius]]}}
<translate>
<!--T:6-->
{{Docnav
|[[Sketcher_ConstrainTangent|Tangent]]
|[[Sketcher_ConstrainSymmetric|Symmetric]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainTangent.svg
|IconR=Sketcher_ConstrainSymmetric.svg
|IconC=Workbench_Sketcher.svg
}}


<!--T:1-->
====Description====
{{GuiCommand
|Name=Sketcher ConstrainEqual
|MenuLocation=Sketch → Sketcher constraints → Constrain equal
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|Shortcut=E
|SeeAlso=[[Sketcher_ConstrainRadius|Sketcher Constrain radius]]
}}


==Description== <!--T:2-->
<WRONG> This tool draws an arc by picking three points: the center, the start angle along the radius, and the end angle.


<!--T:4-->
When starting the tool, the mouse pointer changes to a white cross with a red arc icon. The coordinates of the pointer are shown beside it in blue in real time.
The Constrain Equal constraint forces two or more line segments in a line, poly-line or rectangle to have equal length. If applied to arcs or circles the radii are constrained to be equal. It cannot be applied to geometry primitives which are not of the same type (e.g. line segments and arcs).


==Operation== <!--T:3-->
[[Image:Sketcher_ArcExample1.png|The center has been selected, dragging to set the radius‎]] [[Image:Sketcher_ArcExample2.png|407x360px|The center and start angle have been selected, dragging to set end angle‎]] </WRONG>


<!--T:10-->
====Usage====
The example sketch below contains a number of sketch primitives (line, poly-line, rectangle, arc and circle).


<!--T:11-->
<WRONG> * Pick points on an empty area of the 3D view, or on an existing object (auto constraints must be active in TaskView).
[[File:EqualConstraint1.png]]
* Pressing {{KEY|ESC}} or clicking the right mouse button cancels the function. </WRONG>


<!--T:12-->
Select two or more line segments (e.g. line and one side of the rectangle).


<!--T:13-->
{{languages | {{es|Sketcher_Arc/es}} }}
[[File:EqualConstraint2.png]]

<!--T:14-->
Click on {{Button|[[File:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Constrain equal]]}} in the Sketcher toolbar (in either the Sketcher or Part Design workbenches) or select the Constrain Equal menu item from the Sketcher constraints sub menu item in either the Sketch or Part Design menu item depending upon which workbench is selected (Sketcher or Part Design) to apply the constraint to the selected items.

<!--T:15-->
[[File:EqualConstraint3.png]]

<!--T:16-->
Now select the arc and the circle in the sketch.

<!--T:17-->
[[File:EqualConstraint4.png]]

<!--T:18-->
and apply {{Button|[[File:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Constrain equal]]}} as before.

<!--T:19-->
[[File:EqualConstraint5.png]]

<!--T:20-->
Now select the line segment, all segments of the poly-line and one of the remaining unconstrained sides of the rectangle

<!--T:21-->
[[File:EqualConstraint6.png]]

<!--T:22-->
and apply {{Button|[[File:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Constrain equal]]}} as before.

<!--T:23-->
[[File:EqualConstraint7.png]]

<!--T:24-->
Select the line segment and the arc

<!--T:25-->
[[File:EqualConstraint8.png]]

<!--T:26-->
and apply {{Button|[[File:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Constrain equal]]}} as before. A pop-up message indicates that the constrained items have to be of the same geometrical type (lines of zero curvature or lines of non-zero curvature).

<!--T:27-->
[[File:EqualConstraint9.png]]

== Scripting ==

</translate>
{{Code|code=Sketch.addConstraint(Sketcher.Constraint('Equal', Edge1, Edge2))}}
<translate>

The [[Scripting Sketcher constraints in Python]] page explains the values which can be used for {{incode|Edge1}} and {{incode|Edge2}} and contains further examples on how to create constraints from Python scripts.

<!--T:7-->
{{Docnav
|[[Sketcher_ConstrainTangent|Tangent]]
|[[Sketcher_ConstrainSymmetric|Symmetric]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainTangent.svg
|IconR=Sketcher_ConstrainSymmetric.svg
|IconC=Workbench_Sketcher.svg
}}

</translate>
{{Sketcher Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{clear}}

Revision as of 17:48, 19 January 2021

Sketcher ConstrainEqual

Menu location
Sketch → Sketcher constraints → Constrain equal
Workbenches
Sketcher
Default shortcut
E
Introduced in version
-
See also
Sketcher Constrain radius

Description

The Constrain Equal constraint forces two or more line segments in a line, poly-line or rectangle to have equal length. If applied to arcs or circles the radii are constrained to be equal. It cannot be applied to geometry primitives which are not of the same type (e.g. line segments and arcs).

Operation

The example sketch below contains a number of sketch primitives (line, poly-line, rectangle, arc and circle).

Select two or more line segments (e.g. line and one side of the rectangle).

Click on Constrain equal in the Sketcher toolbar (in either the Sketcher or Part Design workbenches) or select the Constrain Equal menu item from the Sketcher constraints sub menu item in either the Sketch or Part Design menu item depending upon which workbench is selected (Sketcher or Part Design) to apply the constraint to the selected items.

Now select the arc and the circle in the sketch.

and apply Constrain equal as before.

Now select the line segment, all segments of the poly-line and one of the remaining unconstrained sides of the rectangle

and apply Constrain equal as before.

Select the line segment and the arc

and apply Constrain equal as before. A pop-up message indicates that the constrained items have to be of the same geometrical type (lines of zero curvature or lines of non-zero curvature).

Scripting

Sketch.addConstraint(Sketcher.Constraint('Equal', Edge1, Edge2))

The Scripting Sketcher constraints in Python page explains the values which can be used for Edge1 and Edge2 and contains further examples on how to create constraints from Python scripts.