Outils pour utilisateurs

Outils du site


issue122:freecad

In this series, we will be examining the world of FreeCAD, an open-source CAD modelling application that it still in Beta, but has been gaining acceptance in recent years. Naturally, it is readily available in the Ubuntu repositories. In the second article on using FreeCAD, we created a simple planar object to illustrate the use of the main workspaces (Draft and Part), drawing tools, and extrusion. In this part, we will use further tools to create a more complex 3D object, representing a Y-junction between two pipes of different diameters. This project is actually quite involved from the standpoint of technical drawing, since at one point we will be representing the intersection between two curved surfaces - which always makes for interesting shapes as any pipe welder can testify to.

Dans cette série, nous examinerons le monde de FreeCAD, une application Open Source de modélisation par CAO qui est encore en bêta, mais qui a reçu un bon accueil ces dernières années. Naturellement, elle est déjà disponible dans les dépôts d'Ubuntu. Dans le second article sur l'utilisation de FreeCAD, nous avons créé un simple objet plan pour illustrer l'utilisation des ateliers principaux (Draft et Part), les outils de dessin et l'extrusion.

Dans cet article, nous allons utiliser d'autres outils pour créer un objet 3D plus complexe, représentant une jonction Y entre 2 tubes de diamètres différents. Le projet est vraiment très complexe du point de vue d'un dessin technique, car, à un moment, nous représenterons l'intersection de deux surfaces courbes, ce qui fait toujours des formes intéressantes comme tout soudeur de tuyau peut en témoigner.

Rolling a pipe Let us begin with the section of thin-walled pipe shown here. All dimensions are in millimeters. In this example, total length is 120 mm, with an initial flared section 30 mm long on the inside and 35 mm outside. The shell is 3 mm thick along most of its length, with a slightly thicker section where the flare meets the main tube body. This is done with a gradient of 1:2 both inside and outside. Finally, the main tube body has an inner diameter of 40 mm, while the flare goes out to 50 mm internal diameter. What is particularly interesting about this piece is the axis of revolution shown in dashed gray: if we take the outside edge of our object and make it revolve around this axis, we will be creating the outside shell of our solid object in 3D. Likewise, the inside edge of the wall (in dotted lines) may also be revolved around the same axis, giving us the inner shell of our 3D object. In essence, we will be using a similar tool to the extrusion used in the last part of this series, but running around a circle instead of moving in a straight line.

Tourner un tuyau

Commençons avec la section de tuyau à paroi mince présenté ici. Toutes les dimensions sont en millimètres. Dans cet exemple, la longueur totale est de 120 mm, avec une une section initiale évasée longue de 30 mm à l'intérieur et de 35 mm à l'extérieur. La paroi est épaisse de 3 mm sur presque toute la longueur, avec une section un peu plus épaisse quand la partie évasée rejoint le tube principal. Ceci est réalisé par une pente de 1:2 à l'intérieur comme à l'extérieur. Enfin, le tube principal a un diamètre intérieur de 40 mm, tandis que la partie évasée a un diamètre intérieur de 50 mm.

Ce qui est particulièrement intéressant avec cette pièce, c'est son axe de rotation qui est indiqué par un trait gris pointillé : si nous prenons le bord extérieur de notre objet et que nous le faisons tourner autour de cet axe, nous créerons la surface extérieure de notre objet solide en 3D. De même, le bord intérieur de la paroi (en lignes pointillées) peut aussi tourner autour du même axe, nous donnant la surface intérieure de notre objet 3D. En substance, nous utiliserons un outil similaire à celui de l'extrusion utilisé dans le dernier article de la série, mais en tournant en cercle au lieu de se déplacer en ligne droite.

To design this part, I could have begun within the Draft workbench of FreeCAD, and drawn each line section needed to complete a section of the tube wall. However, I actually started out with LibreCAD. As discussed previously, the LibreCAD application is best suited to drawing objects in two dimensions, which is why FreeCAD had been preferred as a base tool for this series. However, LibreCAD does have an option to export drawings in the widely-used DXF (AutoCAD) file format, which can then be imported into FreeCAD and used as a basis to work with. Since the lines are already correctly positioned, it may be advantageous to use this scheme to set up our FreeCAD object. In FreeCAD, begin by starting a new project. Now choose menu option File > Import Now, we have several more elements than are needed for the tube wall. The axis needs to be removed, as well as the (previously dotted) lines denoting rotated edges. The lower copy of the wall section will also be erased, leaving just the higher copy, ready to be rotated. In the Draft workbench, examine the Combo view on your left, and you will see each individual line from the DXF file, that can then be erased, moved, or modified, as needed.

Pour concevoir cette pièce, nous pourrions commencer avec l'atelier Draft de FreeCAD et dessiner chaque section de ligne nécessaire pour arriver à une section de la paroi du tube. Cependant, je commencerai en fait avec LibreCAD. Comme présenté précédemment, l'application LibreCAD est bien armée pour dessiner des objets en deux dimensions, raison pour laquelle FreeCAD a été préféré comme outil de base de cette série. Cependant, LibreCAD a une option pour exporter des dessins dans le format de fichier DXF très utilisé (AutoCAD), lequel peut être importé dans FreeCAD et utilisé comme base de travail. Comme les lignes sont déjà correctement positionnées, il peut être avantageux d'utiliser ce schéma pour initialiser notre objet FreeCAD.

Dans FreeCAD, commencez par démarrer un nouveau projet. Maintenant, choisissez l'option de menu Fichier > Importer.

Maintenant, nous avons besoin de plusieurs éléments supplémentaires pour la paroi du tube. L'axe doit être retiré, tout comme les lignes (précédemment pointillées) indiquant les bords circulaires. La partie basse de la section du tube sera aussi effacée, ne laissant que la partie haute du tube, prête à subir une rotation. Dans l'atelier Draft, examinez la vue combinée à votre gauche et vous verrez chaque ligne individuelle issue du fichier DXF, qui peut être effacée, déplacée ou modifiée, suivant le besoin.

When we are satisfied, as before, we will need to combine the collection of Lines into a single Wire object with the “join objects” tool in the modification toolbar (whose icon is the blue up arrow). Select all segments, either in the combo view or in the drawing itself - holding down the Ctrl-key to select multiple objects - and use the join tool. In the combo view, we will see the four segments disappear, to be replaced by a single Wire object. To create the actual 3D tube, let us move to the Part workbench. Now choose the “Rotate object” tool from the 3D toolbar. Be sure to select the X axis to rotate around, since the tube object is symmetrical about this horizontal axis. Also, activate the “Solid object” checkbox. This will allow us to use this part as a complete object further on, and to make holes in it to allow branching with the lateral piece of pipe.

Quand nous serons satisfaits, comme précédemment, nous devrons combiner la collection de Lignes en un seul objet Wire avec l'outil « Joindre les objets » de la barre de modification (dont l'icône est la flèche bleue vers le haut). Sélectionnez tous les segments, soit dans la vue combinée, soit sur le dessin lui-même - en continuant à appuyer sur la touche Ctrl pour sélectionner plusieurs objets - et utilisez l'outil Joindre. Dans la vue combinée, nous verrons les quatre segments disparaître, remplacés par un seul objet Wire.

Pour créer le vrai tube 3D, déplacez-vous dans l'atelier Part ; maintenant, choisissez l'outil « Révolutionner une forme » dans la barre d'outils 3D.

Assurez-vous de sélectionner l'axe X pour tourner autour, car l'objet tube est symétrique par rapport à l'axe horizontal. De même, activez la case « Créer solide ». Ceci nous permettra d'utiliser ensuite cette pièce comme un objet complet et de faire des trous dedans pour permettre le branchement du morceau de tube latéral.

Adding a lateral piece of pipe in a Y-junction We are now going to add a small piece of pipe, with inner diameter 20 mm and outer 26 mm, attacking our existing tube at an angle of 45 degrees. The axis of the new pipe will intersect our existing axis at 100 mm along its length. There are several ways of creating this new piece of pipe. We could proceed as before, drawing the outline with Line segments and then rotate the piece to create a 3D revolution solid. This can be created aligned with one of the standard axes, for example the Y axis, and then moved into position as required. However, since the shape of the new piece of pipe is rather straightforward, it may be easier to use pre-existing primitive shapes to form it.

Ajouter un morceau de tube latéral à une jonction en Y

Nous allons maintenant ajouter une petite pièce de tube, d'un diamètre intérieur de 20 mm, et de 26 mm à l'extérieur, attaquant le tube existant avec un angle de 45°. L'axe du nouveau tube coupera notre axe existant à 100 mm de longueur.

Il y a plusieurs façons de créer la nouvelle pièce. Nous pouvons faire comme précédemment, en dessinant la forme avec l'outil Lignes, puis en faisant tourner la pièce pour créer un solide de révolution en 3D. Ceci peut être créé dans l'alignement d'un des axes standard, par exemple l'axe Y, puis déplacé dans la position demandée. Cependant, comme la forme de la nouvelle pièce de tube est plutôt simple, il est peut-être plus facile d'utiliser une des formes de primitives pré-existantes pour le construire.

Let us begin by hiding the existing tube. This is done by going to the Combo view on the left, selecting the Revolve object, and hitting the space key on the keyboard. It will not remove the tube from our project, but simply make it invisible - thus making the construction of the smaller tube easier to visualize. Now, using the Primitives toolbar visible in the Part workbench, let us create two cylinders. For the time being, they will both appear in the same position, as “Cylinder” and “Cylinder001”. Default characteristics are a radius of 2 mm and height of 10 mm. Now, using the Combo view on the left, choose the first Cylinder and go to the bottom tab marked “Data”. Here, change the radius to 13 mm and the height to 100 mm. This will be the solid material for our new tube.

Commençons par cacher le tube existant. Ceci est fait en allant dans la vue combinée à gauche, en sélectionnant l'objet Revolve et en appuyant sur la barre d'espace du clavier. Cela ne supprime pas le tube du projet mais le rend simplement invisible - rendant ainsi meilleure la visualisation du petit tube à construire.

Maintenant, en utilisant le barre d'outils Primitives visible dans l'atelier Part, créons deux cylindres. Pour le moment, ils vont apparaître à la même place, comme « Cylindre » et « Cylindre001 ». Les caractéristiques par défaut sont un rayon de 2 mm et une hauteur de 10 mm.

Puis, en utilisant la vue combinée à gauche, choisissons le premier cylindre et allons dans la partie basse marquée « Données ». Ici, changez le rayon pour 13 mm et la hauteur pour 100 mm. Ce sera la partie solide de notre nouveau tube.

Choose the second Cylinder, and do the same, giving it radius 10 mm and height 104 mm. This is the shape we will cut out from the first cylinder, making it hollow. However, as in the part created in the last article of this series, both cylinders end at the same Z-coordinate. This means FreeCAD can have difficulties calculating exactly where the cutout is to end. To make things more clear, let us move the second cylinder downwards by 2 mm, making it protrude slightly from each end of the first cylinder. This is done by editing Placement > Position > z in the same tab, and giving it negative value -2 mm. We will now use the second cylinder to cut a hole in the first. In the Combo view, choose in sequence the first cylinder, then the second, holding down the Ctrl-key when choosing the second object. Then, choose menu option Part > Boolean > Cut, and the two cylinders should be combined into a single hollow tube using Constructive Solid Geometry. We are ready to assemble the two parts of our project. Go back to the Combo view, choose the Revolution object - the main tube - and press the space key. Both objects should become visible at once, with a bit of zooming. However, the new Cut object is still vertical and needs to be tilted to 45 degrees, while the larger Revolution object has been placed at some distance from the coordinate system’s origin for some reason, perhaps related to the use of a DXF file to import its basic shape.

Choisissez le second cylindre et faites de même, en lui attribuant un rayon de 10 mm et une hauteur de 104 mm. Ce sera la forme que nous découperons dans le premier cylindre, pour le rendre creux. Cependant, comme pour la pièce créée dans l'article précédent de la série, les deux cylindres ont la même coordonnée z à un bout. Cela signifie que FreeCAD aura du mal à calculer exactement où la découpe se termine. Pour clarifier les choses, déplaçons le second cylindre de 2 mm vers le bas, le faisant légèrement dépasser à chaque extrémité du premier cylindre. Ceci est fait en éditant Placement > Position > z dans le même onglet et lui donnant une valeur négative de -2 mm.

Nous utiliserons maintenant le second cylindre pour percer le premier. Dans la vue combinée, choisissez séquentiellement, d'abord le premier cylindre, puis, en tenant la touche Ctrl appuyée, le second objet. Ensuite, choisissez l'option de menu Pièce > Opération booléenne > Soustraction et les deux cylindres seront combinés en un seul tube creux par l'utilisation de la Géométrie Constructive des Solides (CSG).

Nous somme prêts à assembler les deux pièces. De retour dans la vue combinée, choisissez l'objet de révolution - le tube principal - et appuyez sur la barre d'espace. Les deux objets sont visibles en même temps, en agrandissant un peu. Cependant, le nouvel objet Cut est encore vertical et il a besoin d'être incliné à 45°, tandis que l'objet de révolution, plus gros, a été placé à quelque distance de l'origine des coordonnées du système pour une raison quelconque, peut-être en lien avec l'utilisation du fichier DXF pour importer la forme de base.

To tilt the Cut object, go to the Combo view, select this object, choose the Data tab as before, and unscroll Placement. We need to change the Axis values to [0.00, 1.00, 0.00] since we will be rotating around the Y axis, and then change Angle to -45 degrees to tilt the Cut object backwards to our left. Now select the Revolution object, and modify Placement > Position > x value until the two parts are assembled in their correct position. I needed to specify -200 mm for this to happen. We still have a couple of problems, however. The small pipe is protruding through the wall of the main tube, but it is not yet cutting a hole in that wall. On the other hand, there is a piece of the small pipe within the large one that also needs to be cut off. The easiest solution for the first bit is simply to undo our boolean cut operation by simply clicking on the Cut object in Combo view, and deleting it. We should now have three objects in our project: the Revolve object representing the large tube, Cylinder as the outer shape of the small pipe, and Cylinder001 the inner shape of the cutout. The two Cylinder objects will need to be rotated once more to -45 degrees along the Y axis, since the rotation we had applied previously concerned the combined Cut object which we have since erased.

Pour incliner l'objet Cut, allez sur la vue combinée, sélectionnez l'objet, choisissez l'onglet Données comme précédemment et déroulez Placement. Nous devons changer les valeurs Axis (axe) pour [0.00, 1.00, 0.00], car nous devons tourner autour de l'axe Y, epuis changez l'angle pour -45 degrés pour que l'objet bascule vers l'arrière sur notre gauche.

Maintenant, sélectionnez l'objet Revolve et modifiez la valeur par Placement > Postion > x jusqu'à ce que les deux pièces soient assemblées dans leur position correcte. J'ai dû spécifier -200 mm pour que ça arrive.

Cependant, nous avons encore deux problèmes. Le petit tuyau traverse la paroi du tube principal, mais il ne perce pas encore de trou dans celle-ci. D'autre part, il y a un morceau du petit tuyau dans le grand qui doit aussi être supprimé.

Pour le premier point, la façon la plus facile est de simplement annuler l'opération soustraction en cliquant sur l'objet Cut dans la vue combinée et en l'effaçant. Vous devriez alors avoir trois objets dans votre projet : l'objet Revolve qui représente le gros tube, Cylindre, la forme extérieure du petit tube, et Cylindre001, la forme intérieure du découpage. Les deux objets Cylindre devront à nouveau être tournés de -45 degrés autour de l'axe Y, car la rotation avait été appliquée précédemment à l'objet combiné Cut que nous avons effacé.

Now, add a third Cylinder object - labelled Cylinder002 - to represent the interior of the large tube. It should have radius 20 mm, height 124 mm, be rotated on Axis [0.00, 1.00, 0.00] (the Y axis) by +90 degrees, and then placed to the left by 92 mm by changing Position > x value to -92 . Finally, we can join the two external objects, Revolve and Cylinder, in a single Fusion object: choose Revolve, then Cylinder with the Ctrl-key pressed, and finally menu option Part > Boolean > Union. This should create a new object called “Fusion”. Now, do the same with Cylinder001 and Cylinder002, creating “Fusion001”. At this point, we should see only the two Fusion objects, one representing the material we are adding to our project, and the second representing the cutout or material we will be subtracting. Now choose these two objects in order: Fusion, then Fusion001, and choose Part > Boolean > Cut. We should end up with our final, finished tube Y-union. We can note the shape of the union between the two tubes.

Maintenant, ajoutez un troisième objet Cylindre, appelé Cylindre002, pour représenter l'intérieur du gros tube. Il devrait avoir un rayon de 20 mm, 124 mm de hauteur, être tourné de +90 degrés sur l'axe y - Axis [0.00, 1.00, 0.00] - et ensuite décalé sur la gauche en modifiant la valeur dans Position > x pour -92 mm.

Enfin, nous pouvons joindre les deux objets externes, Revolve et Cylindre, dans un objet Fusion unique : choisissez Revolve, puis, en appuyant sur la touche Ctrl, Cylindre, et finissez avec l'option de menu Pièce > Opération booléenne > Fusion. Ceci devrait créer un objet appelé « Fusion ». Maintenant, faites de même avec Cylindre001 et Cylindre002, pour créer « Fusion001 ». Arrivé à ce point, vous ne devriez voir que deux opjets Fusion, l'un représentant la matériau que nous avons ajouté au projet et le second représentant la découpe ou l'élément que nous soustrairons. Maintenant, sélectionnez ces deux objets dans l'ordre : Fusion puis Fusion001 et choisissez Pièce > Opération booléenne > Soustraction. Nous devrions découvrir terminé notre tube de jonction en Y final. Nous pouvons noter la forme de l'union entre les deux tubes.

This technique of combining all the bits of our project that add material into a single Fusion object, and all cutouts into another before making the final Cut, can come in useful when designing parts with complex CSG geometries. The general workflow is similar to that used in Sketchup, which should mean making the transition from one program to the other is rather painless. Once completed, our object can be cut open as needed to examine the interior geometry and the section of each piece, for instance to make sure there is enough material to support any structural or pressure stresses that the finished part may encounter. This cutting open is left as an exercise to the reader. Hint: try Part > Boolean > Intersection with another object.

Cette technique de combinaison de tous les bouts de notre projet qui ajoutent du matériau en un objet Fusion unique, et de tous les évidements dans un autre avant de faire le découpage final, peut s'avérer utile lors de la conception de pièces avec des géométries CSG complexes. La succession générale des tâches est similaire à celle dans SketchUp, ce qui signifierait que le passage d'un programme à l'autre peut se faire sans peine.

Une fois terminé, notre objet peut être découpé au besoin pour examiner la géométrie intérieure et la section de chaque pièce, par exemple pour s'assurer qu'il y a assez de matière pour supporter toute contrainte de structure ou de pression que la pièce finie pourrait rencontrer. Cet écorché est laissé au lecteur à titre d'exercice. Indication : essayez Pièce > Opération booléenne > Intersection avec un autre objet.

What next? In this article on using FreeCAD, we used several techniques to create a complex 3D object, representing a Y-junction between two pipes of different diameters. The Revolution tool was used to create the form of a tube in 3D, from a plane section of the tube wall. The Cylinder primitive was used to create the form of the small pipe attached to the main tube, and then to create cutouts to empty out both forms. In the next part of the series, we will investigate the use of sketches to implement constraints on segment placing.

Et ensuite ?

Dans cet article sur l'utilisation de FreeCAD, nous avons utilisé plusieurs techniques pour créer un objet 3D complexe, représentant une jonction en Y entre deux tubes de diamètres différents. l'outil Revolutionner a été utilisé pour créer la forme du tube en 3D, à partir d'une section plane représentant la paroi du tube. La primitive Cylindre a été utilisée pour créer la forme du petit tuyau attaché au gros tube, puis pour créer les évidements pour creuser les deux formes. Dans l'article suivant de cette série, nous étudierons l'utilisation des maquettes pour implémenter des contraintes sur le placement des segments.

issue122/freecad.txt · Dernière modification : 2017/07/15 17:54 de auntiee