Sketcher Micro Tutorial - Constraint Practices/pt-br: Difference between revisions

From FreeCAD Documentation
No edit summary
(Updating to match new version of source page)
 
(16 intermediate revisions by one other user not shown)
Line 4: Line 4:
|Topic=Sketcher
|Topic=Sketcher
|Level=Iniciante
|Level=Iniciante
|Time=30 minutes
|Time=30 minutos
|Author=Mark Stephen ([[User:Quick61|Quick61]]) and vocx
|Author=Mark Stephen ([[User:Quick61|Quick61]]) e vocx
|FCVersion=0.19
|FCVersion=0.19
|Files=[https://forum.freecadweb.org/viewtopic.php?f=36&p=371659#p371659 Sketcher Constraints practices]
|Files=[https://forum.freecadweb.org/viewtopic.php?f=36&p=371659#p371659 Sketcher Constraints practices]
}}
}}


<span id="Introduction"></span>
== Introdução ==
== Introdução ==


Este tutorial foi originalmente escrito por Quick61, e reescrito e reilustrado por vocx.
Este tutorial foi originalmente escrito por Quick61, e reescrito e reilustrado por vocx.


Este tutorial foi composto para ajudar o novo usuário a se familiarizar com as melhores práticas de restrição de [[Sketch|esboço]] no fluxo de trabalho da [[File:Workbench_Sketcher.svg|24px]] [[Sketcher Workbench|Sketcher Workbench]].
Este tutorial foi composto para ajudar o novo usuário a se familiarizar com as melhores práticas de restrição de [[Sketch|esboço]] no fluxo de trabalho da [[File:Workbench_Sketcher.svg|24px]] [[Sketcher Workbench/pt-br|Sketcher Workbench]].


There is a general rule with constraints: the fewer amount of {{Emphasis|datum constraints}} (dimensions), the better.
Existe uma regra geral para as restrições: quanto menor a quantidade de {{Emphasis|restrições de dados}} (cotas ou dimensões), melhor.


It is preferable to use a {{Emphasis|geometric constraint}} in place of a dimensional one if possible. This has to do with the internal workings of the Sketcher's constraint solver.
É preferível usar uma {{Emphasis|restrição geométrica}} em vez de uma dimensional, se possível. Isso tem a ver com o funcionamento interno do solucionador de restrições do Sketcher.


== Setup ==
<span id="Setup"></span>
== Configuração ==


1. Open FreeCAD, create a new empty document with {{MenuCommand|File → [[File:Std_New.svg|16px]] [[Std_New|New]]}}.
1. Abra o FreeCAD, crie um novo documento em branco com {{MenuCommand|Arquivo → [[File:Std_New.svg|16px]] [[Std_New|Novo]]}}.
:1.1. Switch to the [[Sketcher_Workbench|Sketcher Workbench]] from the [[Std_Workbench|workbench selector]], or the menu {{MenuCommand|[[Std_View_Menu|View]] → Workbench → Sketcher}}.
:1.1. Switch to the [[Sketcher_Workbench|Sketcher Workbench]] from the [[Std_Workbench|workbench selector]], or the menu {{MenuCommand|[[Std_View_Menu|View]] → Workbench → Sketcher}}.


Line 30: Line 32:
* To enter again edit mode, double click on the sketch in the [[tree_view|tree view]], or select it, and then click on {{Button|[[File:Sketcher_EditSketch.svg|16px]] [[Sketcher_EditSketch|Edit sketch]]}}.
* To enter again edit mode, double click on the sketch in the [[tree_view|tree view]], or select it, and then click on {{Button|[[File:Sketcher_EditSketch.svg|16px]] [[Sketcher_EditSketch|Edit sketch]]}}.


<span id="Create_a_sketch"></span>
== Create a sketch ==
== Crie um Esboço ==


2. Click on {{Button|[[Image:Sketcher_NewSketch.svg‎‎|16px]] [[Sketcher_NewSketch|New sketch]]}}.
2. Click on {{Button|[[Image:Sketcher_NewSketch.svg‎‎|16px]] [[Sketcher_NewSketch|New sketch]]}}.
Line 38: Line 41:
{{Emphasis|Note:}} in the [[task_panel|task panel]] expand the {{MenuCommand|Edit controls}} section, and make sure the {{MenuCommand|Auto constraints}} option is disabled. Also turn off the grid snap, and hide the grid.
{{Emphasis|Note:}} in the [[task_panel|task panel]] expand the {{MenuCommand|Edit controls}} section, and make sure the {{MenuCommand|Auto constraints}} option is disabled. Also turn off the grid snap, and hide the grid.


<span id="First_approach:_datum_constraints"></span>
== First approach: datum constraints ==
== Primeira Abordagem: Restrições de Referência ==


3. We will draw a fully constrained square, centered at the origin.
3. We will draw a fully constrained square, centered at the origin.
Line 60: Line 64:
Looking at the {{MenuCommand|Constraints}} section in the [[task_panel|task panel]], we see that the constraints are too many; they also clutter the view of the sketch. These constraints are also computationally intensive for the solver; while this is not an issue with a simple shape, it can become one with more complex shapes.
Looking at the {{MenuCommand|Constraints}} section in the [[task_panel|task panel]], we see that the constraints are too many; they also clutter the view of the sketch. These constraints are also computationally intensive for the solver; while this is not an issue with a simple shape, it can become one with more complex shapes.


<span id="A_better_way:_datum_and_geometric_constraints"></span>
== A better way: datum and geometric constraints ==
== Uma Maneira Melhor: Referência e Restrições Geométricas ==


4. We will draw the same square fully constrained, and centered at the origin. When you create the new sketch, make sure the {{MenuCommand|Auto constraints}} option is disabled.
4. We will draw the same square fully constrained, and centered at the origin. When you create the new sketch, make sure the {{MenuCommand|Auto constraints}} option is disabled.
Line 82: Line 87:
This is a better constrained sketch than the first one. The horizontal and vertical geometric constraints allow us to use fewer datum constraints, so our sketch looks less cluttered.
This is a better constrained sketch than the first one. The horizontal and vertical geometric constraints allow us to use fewer datum constraints, so our sketch looks less cluttered.


<span id="Optimum_scheme:_mostly_geometric_constraints"></span>
== Optimum scheme: mostly geometric constraints ==
== Esquema Ótimo: Principalmente Restrições Geométricas ==


5. We will draw the same square fully constrained, and centered at the origin. When you create the new sketch, make sure the {{MenuCommand|Auto constraints}} option is disabled.
5. We will draw the same square fully constrained, and centered at the origin. When you create the new sketch, make sure the {{MenuCommand|Auto constraints}} option is disabled.
Line 107: Line 113:
This is the best way to constrain this sketch, as we only used one datum (dimensional) constraint.
This is the best way to constrain this sketch, as we only used one datum (dimensional) constraint.


<span id="Additional_resources"></span>
== Additional resources ==
== Recursos Adicionais ==


* [[Basic_Sketcher_Tutorial|Basic Sketcher Tutorial]]
* [[Basic_Sketcher_Tutorial|Basic Sketcher Tutorial]]
Line 113: Line 120:
* [[Sketcher_Tutorial|Sketcher Tutorial]]
* [[Sketcher_Tutorial|Sketcher Tutorial]]



{{Tutorials navi{{#translation:}}}}
{{Sketcher Tools navi{{#translation:}}}}
{{Sketcher Tools navi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}
{{Userdocnavi{{#translation:}}}}

Latest revision as of 13:01, 14 April 2023

Tutorial
Topic
Sketcher
Level
Iniciante
Time to complete
30 minutos
Authors
Mark Stephen (Quick61) e vocx
FreeCAD version
0.19
Example files
Sketcher Constraints practices
See also
None

Introdução

Este tutorial foi originalmente escrito por Quick61, e reescrito e reilustrado por vocx.

Este tutorial foi composto para ajudar o novo usuário a se familiarizar com as melhores práticas de restrição de esboço no fluxo de trabalho da Sketcher Workbench.

Existe uma regra geral para as restrições: quanto menor a quantidade de restrições de dados (cotas ou dimensões), melhor.

É preferível usar uma restrição geométrica em vez de uma dimensional, se possível. Isso tem a ver com o funcionamento interno do solucionador de restrições do Sketcher.

Configuração

1. Abra o FreeCAD, crie um novo documento em branco com Arquivo → Novo.

1.1. Switch to the Sketcher Workbench from the workbench selector, or the menu View → Workbench → Sketcher.

Some actions to remember:

  • Press the right mouse button, or press Esc in the keyboard once, to deselect the active tool in edit mode.
  • To exit the sketch edit mode, press the Close button in the task panel, or press Esc twice in the keyboard.
  • To enter again edit mode, double click on the sketch in the tree view, or select it, and then click on Edit sketch.

Crie um Esboço

2. Click on New sketch.

2.1. Choose the sketch orientation, that is, one of the base XY, XZ, or YZ planes. We will use the default plane and options.
2.2. Click OK to start constructing the sketch.

Note: in the task panel expand the Edit controls section, and make sure the Auto constraints option is disabled. Also turn off the grid snap, and hide the grid.

Primeira Abordagem: Restrições de Referência

3. We will draw a fully constrained square, centered at the origin.

3.1. Click on Create polyline, then trace four lines in the general shape of a rectangle around the origin.

Unconstrained rectangular sketch.

3.2. Select one horizontal line, and press Horizontal distance, then enter 20 mm.
3.3. Select the other horizontal line, and repeat the constraint with the same distance.
3.4. Select one vertical line, and press Vertical distance, then enter 20 mm.
3.5. Select the other vertical line, and repeat the constraint with the same distance.
3.6. Select one bottom corner point (a), and the origin of the sketch, and press Horizontal distance, then enter 10 mm.
3.7. Select the top corner point (b) above the previous corner point (a), and the origin of the sketch, and repeat the horizontal constraint with the same distance.
3.8. Select the other bottom corner point (c), and the origin of the sketch, and press Vertical distance, then enter 10 mm.
3.9. Select the top corner point (b) again, and the origin of the sketch, and repeat the vertical constraint with the same distance.

Left: datum constraints for the sides. Right: additional datum constraints for the interior distances.

Looking at the Constraints section in the task panel, we see that the constraints are too many; they also clutter the view of the sketch. These constraints are also computationally intensive for the solver; while this is not an issue with a simple shape, it can become one with more complex shapes.

Uma Maneira Melhor: Referência e Restrições Geométricas

4. We will draw the same square fully constrained, and centered at the origin. When you create the new sketch, make sure the Auto constraints option is disabled.

4.1. Click on Create polyline, then trace four lines in the general shape of a rectangle around the origin.
4.2. Select one horizontal line, and press Horizontal.
4.3. Select the other horizontal line, and repeat the constraint.
4.4. Select one vertical line, and press Vertical.
4.5. Select the other vertical line, and repeat the constraint.

Geometrical horizontal and vertical constraints.

4.6. Select one horizontal line, and press Horizontal distance, then enter 20 mm. We see that the other horizontal line changes size at the same time.
4.7. Select one vertical line, and press Vertical distance, then enter 20 mm. We see that the other vertical line changes size at the same time.
4.8. Select one bottom corner point (a), and the origin of the sketch, and press Horizontal distance, then enter 10 mm.
4.9. Select the top corner point (b) above the previous corner point (a), and the origin of the sketch, and press Vertical distance, then enter 10 mm.

Left: datum constraints for only two sides. Right: additional datum constraints for only two interior distances.

This is a better constrained sketch than the first one. The horizontal and vertical geometric constraints allow us to use fewer datum constraints, so our sketch looks less cluttered.

Esquema Ótimo: Principalmente Restrições Geométricas

5. We will draw the same square fully constrained, and centered at the origin. When you create the new sketch, make sure the Auto constraints option is disabled.

5.1. Click on Create polyline, then trace four lines in the general shape of a rectangle around the origin.
5.2. Select one horizontal line, and press Horizontal.
5.3. Select the other horizontal line, and repeat the constraint.
5.4. Select one vertical line, and press Vertical.
5.5. Select the other vertical line, and repeat the constraint.

Geometrical horizontal and vertical constraints.

5.6. Select one bottom corner point (a), then the top corner point that is diagonally opposite, and then the origin of the sketch; then press Symmetric. The two selected points will be equidistant from the origin.
5.7. Select two adjacent sides of the rectangle (connected at one corner), and press Equal length. Notice that due to the symmetry of the corner points, all sides are now of the same size.

Left: symmetric constraint for only two corner points. Right: additional equal length distances for only two adjacent sides.

5.8. Select one horizontal line, and press Horizontal distance, then enter 20 mm. Due to the symmetric and length equality constraints previously added, we see that all sides become equal at the same time.

All geometric constraints applied, and a single datum constraint for a side.

This is the best way to constrain this sketch, as we only used one datum (dimensional) constraint.

Recursos Adicionais