Draft ShapeString tutorial/fr: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Caption|Texte créé en tant que ShapeString, c'est-à-dire en tant que collection d'arêtes dans un plan.}}")
(Replaced content with "== Créer un texte 3D ==")
Line 76: Line 76:
{{Caption|Texte créé en tant que ShapeString, c'est-à-dire en tant que collection d'arêtes dans un plan.}}
{{Caption|Texte créé en tant que ShapeString, c'est-à-dire en tant que collection d'arêtes dans un plan.}}


<div class="mw-translate-fuzzy">
== Créer un texte 3D ==
== Créer un texte 3D ==
* Sélectionner l'Atelier Pièce
* Assurez-vous que l'objet "Shapestring" est sélectionné dans l'arborescence
* Utiliser l'outil Extrusion [[Image: Part_Extrude.png | 32px]] avec les paramètres:
** extruder Z = 1 mm
** assurez-vous de cocher "créer le solide"
** utiliser "OK" pour finir l'opération d'extrusion partielle
* Assurez-vous que l'objet "Extruder" est sélectionné dans l'arborescence et appuyez sur <Espace> pour basculer état sur visible
[[Image: TutorialDraftShapeString_DraftShapestring.jpg | 300px]]
</div>


6. Switch back to the [[Part Workbench|Part Workbench]].
6. Switch back to the [[Part Workbench|Part Workbench]].

Revision as of 13:54, 19 January 2020

Tutoriel
Thème
Product design
Niveau
Débutant
Temps d'exécution estimé
30 minutes
Auteurs
r-frank et vocx
Version de FreeCAD
0.17 et suivantes
Fichiers exemples
Draft_Shapestring_Text
Voir aussi
None

Introduction

Ce tutoriel a été écrit à l'origine par Roland Frank († 2017, r-frank). Il a été réécrit et illustré par vocx.

Ce didacticiel décrit une méthode pour créer du texte 3D et l'utiliser avec des objets solides. Nous allons voir comment

Pour utiliser ShapeStrings à l'intérieur de l'atelier PartDesign, allez à la fin de ce didacticiel.

Maquette finale du texte gravé.

L'atelier Sketcher est utilisé brièvement pour tracer une ligne auxiliaire. Pour plus d'informations sur les outils de cet atelier, consultez

Installation

1. Lancez FreeCAD, créez un nouveau document vide avec Fichier → Nouveau et sélectionnez l'atelier Part.

1.1. Appuyez sur le bouton Vue isométrique ou appuyez sur 0 dans le pavé numérique de votre clavier, pour changer la vue à isométrique pour mieux visualiser les solides 3D.
1.2. Appuyez sur le bouton Tout afficher chaque fois que vous ajoutez des objets afin de faire un panoramique et un zoom sur Vue 3D afin que tous les éléments soient visibles dans la vue.
1.3. Maintenez Ctrl pendant que vous cliquez pour sélectionner plusieurs éléments. Si vous avez sélectionné quelque chose de mal ou souhaitez tout désélectionner, cliquez simplement sur un espace vide dans la Vue 3D.

Création de la forme de base

2. Insérer un cube primitif en cliquant sur Cube.

2.1. Sélectionnez Cube dans la vue en arborescence.
2.2. Modifiez les dimensions dans l'onglet Data de l'éditeur de propriétés.
2.3. Mettez Width à 31 mm.

3. Créer un chanfrein.

3.1. Sélectionnez le bord supérieur (Edge6) sur la face avant du Cube dans la Vue 3D.
3.2. Appuyez sur Chamfrein.
3.3. Dans Chamfer edges Panneau des tâches, se rendre à Selection puis choisir Select edges. En tant que Fillet type, choisissez Constant length puis définissez Length à 5 mm.
3.4. Appuyez sur OK. Cela créera un objet Chamfer.
3,5. Dans la vue en arborescence, sélectionnez Chamfer, dans l'onglet View, changez la valeur de Line Width à 2.0.

Objet de base créé à partir d'un cube et d'une opération de chanfrein.

Insertion du texte avec l'outil Dessin de ShapeString

4. Basculez vers l'atelier Draft.

4.1. Assurez-vous que rien n'est sélectionné dans vue en arborescence.
4.2. Établissez le plan de travail jusqu'à XY (haut) en cliquant sur Plan de travail et pressez Vue de dessus (XY).

5. Insérer le texte "FreeCAD".

5.1. Appuyez sur ShapeString.
5.2. Remplacez X en 0 mm.
5.3. Remplacez Y en 0 mm.
5.4. Remplacez Z en 0 mm.
5,5. Ou appuyez sur Reset point.
5.6. Remplacez String en FreeCAD; remplacez Height en 5 mm; remplacez Tracking en 0 mm.
5.7. Assurez-vous que Font file pointe vers une police valide, par exemple /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf. Appuyez sur les points de suspension ... pour ouvrir la boîte de dialogue du système d'exploitation pour trouver une police.
5.8. Appuyez sur OK. Cela créera un objet ShapeString.
5.9. Recalculez le document en appuyant sur Rafraîchir.
5.10. Dans la vue en arborescence, sélectionnez ShapeString, dans l'onglet View, changez la valeur de Line Width en {{incode|2.0} }.
5.11. Dans la vue en arborescence, sélectionnez Chamfer, dans l'onglet View, changez la valeur de Visibility en false ou appuyez sur Espace sur le clavier. Cela masquera l'objet afin que vous puissiez mieux voir le ShapeString.
5.12. Pour voir la ShapeString ci-dessus, changez la vue en appuyant sur Vue de dessus (XY) ou 2 dans le clavier.
5.13. Pour restaurer la vue en isométrique, appuyez sur Vue isométrique ou 0 sur le clavier.

Texte créé en tant que ShapeString, c'est-à-dire en tant que collection d'arêtes dans un plan.

Créer un texte 3D

6. Switch back to the Part Workbench.

6.1. In the tree view, select ShapeString, then press Extrude.
6.2. In the Extrude task panel go to Direction, choose Along normal; in Length, set Along to 1 mm; also tick the Create solid option.
6.3. Press OK. This will create an Extrude object.
6.4. In the tree view, select Extrude, in the View tab change the value of Line Width to 2.0.

Text created as a ShapeString, and turned into a solid by extrusion.

Insérer l'esquisse pour le positionnement

  • Sélectionner l'Atelier Esquisse
  • Assurez-vous que l'objet "chanfrein" est sélectionné dans l'arborescence et appuyez sur <Espace> pour basculer sa visibilité sur visible
  • Choisissez une face en pente créée par l'opération de chanfrein
  • Cliquez sur pour insérer une nouvelle esquisse
  • Dessinez une ligne (peut être horizontale ou verticale, la longueur n'est pas importante ...)
  • Restriction de l'un des points d'extrémité à une distance verticale de +2,5 mm et distance horizontale de +2,5 mm loin de l'origine
  • Fermer l'esquisse

Now we will draw a simple sketch that will be used as auxiliary geometry to position the ShapeString extrusion.

7. In the tree view, select Extrude, and press Space in the keyboard to make it invisible.

8. Switch to the Sketcher Workbench.

9. In the tree view, select Chamfer, and press Space in the keyboard to make it visible.

9.1. Choose the sloped face created by the chamfer operation (Face3).
9.2. Click on NewSketch. In the Sketch attachment dialog, select FlatFace, and press OK.
9.3. The view should adjust automatically so that the camera is parallel to the selected face.
9.4. Draw a horizontal line in a general position on top of the face. The length is not important; we are just interested in its position.
9.5. Constrain the left endpoint to be 2.5 mm away from the local X axis and from the local Y axis, using ConstrainDistanceX and ConstrainDistanceY.
9.6. Since the sketch is just an auxiliary object, we don't need to have it fully constrained. You can do this if you wish by assigning a fixed distance, say, 20 mm, again with ConstrainDistanceX.
9.7. Close the sketch.

Line being created with the sketcher, with constraints.

Sketch line created on top of the solid face, to be used as reference guide for positioning the extruded text.

Positionnement du texte 3D dans l'espace 3D

  • Assurez-vous que l'objet "Extruder" est sélectionné dans l'arborescence et appuyez sur <Espace> pour activer la visibilité sur visible
  • Assurez-vous que l'objet "Extrude" est sélectionné dans l'arborescence
  • Tâche Open Placement Edition-> Positionnement ...
  • Appliquer un placement incrémental, axe de rotation Z = 90 °
  • Appliquer un placement incrémental, axe de rotation Y = 45 °
  • Passer à l'atelier dessin
  • Passer au mode filaire
  • Assurez-vous que seul "terminaison" est activé Dessin-> Verrouillage -> Terminaison
  • Sélectionnez "extruder" -objet
  • Cliquez sur
  • Dans la vue 3D, cliquez sur le point d'extrémité le plus haut à gauche de l'objet "extruder" (1), puis cliquez sur le point contraint dans l'esquisse (2)

10. In the tree view, select Extrude, and press Space in the keyboard to make it visible.

11. In the tree view, select Extrude, in the Data tab of the property editor, click on the Placement value so the ellipsis button ... appears on the right.

11.1. Tick the option Apply incremental changes.
11.2. Change the Rotation to Rotation axis with angle; Axis to Z, and Angle to 90 deg, then click on Apply. This will apply a rotation around the Z-axis, and will reset the Angle field to zero.
11.3. Change the Rotation to Rotation axis with angle; Axis to Y, and Angle to 45 deg, then click on Apply. This will apply a rotation around the Y-axis, and will reset the Angle field to zero.
11.4. Click on OK to close the dialog.

12. Switch again to the Draft Workbench.

12.1. Switch to "Wireframe" draw style with View → Draw style Wireframe, or press the Wireframe button in the view toolbar. This will allow you to see the objects behind other objects.
12.2. Make sure the Draft Snap "Snap to endpoint" method is active. This can be done from the menu Draft → Snapping → File:Draft ToggleSnap.svg Toggle On/Off, and then File:Snap Endpoint.svg Endpoint, or by pressing the File:Draft ToggleSnap.svg ToggleSnap and File:Snap Endpoint.svg Snap endpoint buttons in the Snap toolbar.

13. In the tree view, select Extrude.

13.1. Click on Move.
13.2. In the 3D view click on the upper left corner point of the Extrude object (1), and then click on the leftmost point in the line drawn with the sketcher (2).
13.3. If File:Snap Endpoint.svg Snap endpoint is active, as soon as you move the pointer close to a vertex, you should see that it attaches to it exactly.
Note: if you have problems snapping to vertices, make sure only the File:Snap Endpoint.svg Snap endpoint method is enabled. Having multiple snapping methods active at the same time may make it difficult to select the right feature.
13.4. The extruded text should now be inside the body of the Fillet object.

The extruded ShapeString should be moved to the position of the sketched line that lies on the face of the base body.

Extruded ShapeString positioned in the Fillet.

Création de texte gravé

  • Passer à l'atelier Pièce
  • Passez à Affichage --> Style --> Comme Actuellement
  • Sélectionnez le texte 3D ("extruder"), puis l'objet de base ("chanfrein") dans l'arborescence
  • Appliquer une coupe booléenne en cliquant sur
  • Assurez-vous que l'objet "Esquisse" est sélectionné dans l'arborescence
  • Appuyez sur <Espace> pour activer la visibilité
  • Cliquez sur pour passer à la vue axonométrique
  • Cliquez sur pour zoomer pour adapter la vue
  • Fini

14. Switch back to the Part Workbench.

14.1. Switch to "As is" draw style with View → Draw style As is, or press the As is button in the view toolbar. This will show all objects with the normal shading and color.
14.2. In the tree view, select Sketch, and press Space in the keyboard to make it invisible.

15. In the tree view select Chamfer first, and then Extrude.

15.1. Then press Cut. This will create a Cut object. This is the final object.
Note: the order in which you select the objects is important for the cut operation. The base object is selected first, and the subtracting object comes at the end.
15.2. In the tree view, select Cut, in the View tab change the value of Line Width to 2.0.

Final model of a filleted cube, with carved text created from a ShapeString, Extrude, and boolean Cut operations.

Engraving 3D text with the PartDesign Workbench

A similar process as described above can be done with the PartDesign Workbench.

  1. Create the Draft ShapeString first.
  2. Create a PartDesign Body, make it active, and add a base solid by adding primitives, or using a Sketch and extruding it with PartDesign Pad.
  3. Move the ShapeString object into the active body.
  4. Attach the ShapeString object to one of the faces of the solid, or to a PartDesign Plane, using Part Attachment.
  5. Now create a PartDesign Pad or a PartDesign Pocket from the ShapeString, in order to produce an additive or a subtractive feature of the base body, respectively.

See the forum thread, How to use ShapeStrings in PartDesign.

Notes

  • pour créer un texte courbé, vous pouvez utiliser la macro Texte Circulaire
  • pour importer du texte depuis inkscape, regardez l' Importation de texte à partir du didacticiel inkscape
  • L'extrusion du texte Shapestring peut également être effectuée avec l'Outil Protusion PartDesign
  • N'oubliez pas que l'Objet-DraftShapestring ne peut pas être attaché à une face (donc pas de commande de poche possible)