Sketcher Micro Tutorial - Constraint Practices/fr: Difference between revisions

From FreeCAD Documentation
(Created page with "1. Ouvrez FreeCAD, créez un nouveau document vide avec {{MenuCommand|Fichier → 16px Nouveau}}. :1.1. Basculez vers l'Sketcher_Workbenc...")
(Created page with "Quelques actions à retenir: * Appuyez sur le bouton droit de la souris ou appuyez une fois sur {{KEY|Echap}} sur le clavier pour désélectionner l'outil actif en mode éditi...")
Line 25: Line 25:
:1.1. Basculez vers l'[[Sketcher_Workbench/fr|atelier Sketcher]] depuis le [[Std_Workbench/fr|sélectionneur d'atelier]] ou le {{MenuCommand|[[Std_View_Menu/fr|menu affichage]] → Atelier → Sketcher}}.
:1.1. Basculez vers l'[[Sketcher_Workbench/fr|atelier Sketcher]] depuis le [[Std_Workbench/fr|sélectionneur d'atelier]] ou le {{MenuCommand|[[Std_View_Menu/fr|menu affichage]] → Atelier → Sketcher}}.


Some actions to remember:
Quelques actions à retenir:
* Appuyez sur le bouton droit de la souris ou appuyez une fois sur {{KEY|Echap}} sur le clavier pour désélectionner l'outil actif en mode édition.
* Press the right mouse button, or press {{KEY|Esc}} in the keyboard once, to deselect the active tool in edit mode.
* To exit the sketch edit mode, press the {{Button|Close}} button in the [[task_panel|task panel]], or press {{KEY|Esc}} twice in the keyboard.
* Pour quitter le mode d'édition d'esquisse, appuyez sur le bouton {{Button|Fermer}} dans le [[Task_Panel/fr|Panneau des tâches]] ou appuyez deux fois sur {{KEY|Echap}} au le clavier.
* 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]]}}.
* Pour entrer à nouveau en mode édition, double-cliquez sur l'esquisse dans la [[tree view/fr|vue en arborescence]] ou sélectionnez-la puis cliquez sur {{Button|[[File:Sketcher_EditSketch.svg|16px]] [[Sketcher_EditSketch/fr|Sketcher Modifier l'esquisse]]}}.


== Create a sketch ==
== Create a sketch ==

Revision as of 16:27, 28 March 2020

Tutoriel
Thème
Sketcher
Niveau
Débutant
Temps d'exécution estimé
Moins de 15 minutes
Auteurs
Mark Stephen (Quick61) et vocx
Version de FreeCAD
0.19
Fichiers exemples
Sketcher Constraints practices
Voir aussi
None

Introduction

Ce tutoriel a été écrit à l'origine par Quick61 et a été écrit et illustré par vocx.

Ce tutoriel est conçu pour aider le nouvel utilisateur à se familiariser avec les meilleures pratiques de contrainte d'une Esquisse dans le flux de travail de l' atelier Sketcher.

Il existe une règle générale avec des contraintes: moins il y a de contraintes de données (dimensions), mieux c'est.

Il est préférable d'utiliser une contrainte géométrique à la place d'une dimensionnelle si possible. Cela a à voir avec le fonctionnement interne du solveur de contraintes de l'esquisse.

Installation

1. Ouvrez FreeCAD, créez un nouveau document vide avec Fichier → Nouveau.

1.1. Basculez vers l'atelier Sketcher depuis le sélectionneur d'atelier ou le menu affichage → Atelier → Sketcher.

Quelques actions à retenir:

  • Appuyez sur le bouton droit de la souris ou appuyez une fois sur Echap sur le clavier pour désélectionner l'outil actif en mode édition.
  • Pour quitter le mode d'édition d'esquisse, appuyez sur le bouton Fermer dans le Panneau des tâches ou appuyez deux fois sur Echap au le clavier.
  • Pour entrer à nouveau en mode édition, double-cliquez sur l'esquisse dans la vue en arborescence ou sélectionnez-la puis cliquez sur Sketcher Modifier l'esquisse.

Create a sketch

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.

Première approche

Pour exemple, prenons une esquisse représentant un carré. Sur la première capture d'écran, l'esquisse est complètement contrainte mais en utilisant uniquement des contraintes dimensionnelles (distances). C'est correct, mais excessivement compliqué, encombré et calculatoire pour le solveur. Bien que ça ne soit pas un problème pour un exemple aussi simple, ça peut le devenir pour une esquisse plus complexes.

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.

Une meilleure façon

La capture d'écran suivante est le même carré, contraint en utilisant quelques contraintes géométriques. On y utilise des contraintes géométriques d'horizontalité et de verticalité ainsi que des contraintes géométriques (distance). En utilisant simplement la contrainte horizontale et la contrainte verticale, vous pouvez voir que le nombre de contraintes dimensionnelles a été réduit. C'est une esquisse mieux contrainte que la première, mais ce n'est pas encore la meilleure façon de contraindre ce carré.

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.

Esquisse optimale

Maintenant, dans la dernière esquisse, il n'y a qu'une seule contrainte dimensionnelle (distance), le reste étant contraint par des contraintes géométriques. Ceci est la meilleure façon de contraindre cette esquisse. Avec une simple esquisse comme celle là, une façon de contraindre ou une autre ne change pas grand chose. Pour des esquisses plus complexes, suivre cette règle du nombre minimum de contraintes dimensionnelles sera un bénéfice pour vous lorsque vous vous attaquez à la construction de géométries à partir d'esquisses. Les contraintes géométriques utilisées dans cette esquisse sont horizontale, verticale, égale et symétrie.

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.

Ressources Additionelles

Template:Tutorials navi/fr