Sketcher ConstrainEqual/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
<languages/>
<languages/>

{{Docnav|[[Sketcher ConstrainTangent|Tangent]]|[[Sketcher_ConstrainSymmetric|Symmetric]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Tangent.png|IconC=Workbench_Sketcher.svg|IconR=Constraint_Symmetric.png}}
{{Docnav
|[[Sketcher_ConstrainTangent|Tangent]]
|[[Sketcher_ConstrainSymmetric|Symmetric]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainTangent.svg
|IconR=Sketcher_ConstrainSymmetric.svg
|IconC=Workbench_Sketcher.svg
}}


{{GuiCommand
{{GuiCommand
|Name=Sketcher ConstrainEqual
|Name=Sketcher ConstrainEqual
|Workbenches=[[Sketcher Workbench|Sketcher]]
|MenuLocation=Sketch → Sketcher constraints → Constrain equal
|MenuLocation=Sketch → Sketcher constraints → Constrain equal
|Workbenches=[[Sketcher_Workbench|Sketcher]]
|Shortcut=E
|Shortcut={{KEY|E}}
|SeeAlso=[[Sketcher_ConstrainRadius|Constrain radius]]
|SeeAlso=[[Sketcher_ConstrainRadius|Sketcher Constrain radius]]
}}
}}


==Description==
==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).
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==
==Operation==
The example sketch below contains a number of sketch primitives ( line,poly-line, rectangle, arc and circle).<br /><br />
[[File:EqualConstraint1.png|256px]]<br /><br />
Select two or more line segments (e.g. line and one side of the rectangle).<br /><br />
[[File:EqualConstraint2.png|256px]]<br /><br />
Click on the Constrain Equal icon [[File:Constraint_EqualLength.png|16px]] 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.<br /><br />
[[File:EqualConstraint3.png|256px]]<br /><br />
Now select the arc and the circle in the sketch.<br /><br />
[[File:EqualConstraint4.png|256px]]<br /><br />
and apply the Constrain Equal [[File:Constraint_EqualLength.png|16px]] constraint as before.<br /><br />
[[File:EqualConstraint5.png|256px]]<br /><br />
Now select the line segment, all segments of the poly-line and one of the remaining unconstrained sides of the rectangle <br /><br />
[[File:EqualConstraint6.png|256px]]<br /><br />
and apply the Constrain Equal [[File:Constraint_EqualLength.png|16px]] constraint as before.<br /><br />
[[File:EqualConstraint7.png|256px]]<br /><br />
Select the line segment and the arc<br /><br />
[[File:EqualConstraint8.png|256px]]<br /><br />
and apply the Constrain Equal [[File:Constraint_EqualLength.png|16px]] constraint 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).<br /><br />
[[File:EqualConstraint9.png|256px]]


The example sketch below contains a number of sketch primitives (line, poly-line, rectangle, arc and circle).
{{Docnav|[[Sketcher ConstrainTangent|Tangent]]|[[Sketcher_ConstrainSymmetric|Symmetric]]|[[Sketcher_Workbench|Sketcher]]|IconL=Constraint_Tangent.png|IconC=Workbench_Sketcher.svg|IconR=Constraint_Symmetric.png}}


[[File:EqualConstraint1.png]]
{{Sketcher Tools navi}}

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

[[File:EqualConstraint2.png]]

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.

[[File:EqualConstraint3.png]]

Now select the arc and the circle in the sketch.

[[File:EqualConstraint4.png]]

and apply {{Button|[[File:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Constrain equal]]}} as before.

[[File:EqualConstraint5.png]]

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

[[File:EqualConstraint6.png]]

and apply {{Button|[[File:Sketcher_ConstrainEqual.svg|16px]] [[Sketcher_ConstrainEqual|Constrain equal]]}} as before.

[[File:EqualConstraint7.png]]

Select the line segment and the arc

[[File:EqualConstraint8.png]]

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).

[[File:EqualConstraint9.png]]

== Scripting ==

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

The [[Sketcher_scripting|Sketcher scripting]] 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.


{{Docnav
|[[Sketcher_ConstrainTangent|Tangent]]
|[[Sketcher_ConstrainSymmetric|Symmetric]]
|[[Sketcher_Workbench|Sketcher]]
|IconL=Sketcher_ConstrainTangent.svg
|IconR=Sketcher_ConstrainSymmetric.svg
|IconC=Workbench_Sketcher.svg
}}


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

Latest revision as of 20:24, 20 March 2022

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 Sketcher scripting page explains the values which can be used for Edge1 and Edge2 and contains further examples on how to create constraints from Python scripts.