issue123:freecad
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue123:freecad [2017/08/08 13:42] – d52fr | issue123:freecad [2017/08/10 16:56] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 5: | Ligne 5: | ||
Users of traditional CAD software such as AutoCAD or LibreCAD are well accustomed to two sets of techniques that help draw complex shapes from individual elementary shapes such as lines or arcs. The first set of techniques is the different ways in which an elementary shape can be defined in these applications. For instance, a straight-line segment may be defined by indicating both ends of the segment. But it could also be defined as the tangent to a circle at a certain point, and with a specific length. A further possibility is to define a line segment as being parallel to a previous segment of the same length and offset to a specific distance. As for circles, they may be defined from a center and a radius, or from three points that are not on the same straight line, and so forth.** | Users of traditional CAD software such as AutoCAD or LibreCAD are well accustomed to two sets of techniques that help draw complex shapes from individual elementary shapes such as lines or arcs. The first set of techniques is the different ways in which an elementary shape can be defined in these applications. For instance, a straight-line segment may be defined by indicating both ends of the segment. But it could also be defined as the tangent to a circle at a certain point, and with a specific length. A further possibility is to define a line segment as being parallel to a previous segment of the same length and offset to a specific distance. As for circles, they may be defined from a center and a radius, or from three points that are not on the same straight line, and so forth.** | ||
- | 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, | + | 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, |
Dans ce numéro, nous reviendrons aux bases et examinerons comment des contraintes peuvent être utilisées pour dessiner des formes planes complexes, qui peuvent ensuite être utilisées comme bases pour créer des figures en 3D. | Dans ce numéro, nous reviendrons aux bases et examinerons comment des contraintes peuvent être utilisées pour dessiner des formes planes complexes, qui peuvent ensuite être utilisées comme bases pour créer des figures en 3D. | ||
- | Les utilisateurs de logiciels traditionnels de CAO tels que AutoCAD ou LibreCAD sont bien habitués aux deux jeux de techniques qui aident à la création des formes complexes à partir de formes élémentaires indépendantes telles que des lignes et des arcs. Le premier jeu de techniques | + | Les utilisateurs de logiciels traditionnels de CAO tels qu'AutoCAD ou LibreCAD sont bien habitués aux deux jeux de techniques qui aident à la création des formes complexes à partir de formes élémentaires indépendantes telles que des lignes et des arcs. Le premier jeu de techniques |
**A second set of techniques that may be considered quite basic in traditional applications is the use of layers. In a program such as LibreCAD, default line width, color and style (dashed, dotted, ...) may be defined for each layer. A handy technique is thus to place the main elements of each drawing in one layer, while another is used to indicate dimensions, and a third to draw auxiliary items to help construction. When exporting the drawing, individual layers may be hidden with a single mouse click. | **A second set of techniques that may be considered quite basic in traditional applications is the use of layers. In a program such as LibreCAD, default line width, color and style (dashed, dotted, ...) may be defined for each layer. A handy technique is thus to place the main elements of each drawing in one layer, while another is used to indicate dimensions, and a third to draw auxiliary items to help construction. When exporting the drawing, individual layers may be hidden with a single mouse click. | ||
At this point in time, the use of such techniques is perhaps not as easily visible in FreeCAD version 0.15 as could be desired. As has been pointed out in a previous part of this series, this application is known to still be very much in development, | At this point in time, the use of such techniques is perhaps not as easily visible in FreeCAD version 0.15 as could be desired. As has been pointed out in a previous part of this series, this application is known to still be very much in development, | ||
+ | |||
+ | Un second ensemble de techniques qui peut être considéré comme vraiment basique dans les applications traditionnelles est l' | ||
+ | |||
+ | À l' | ||
**An example | **An example | ||
Ligne 24: | Ligne 28: | ||
We can then create a second - main - layer, and draw the segments and arcs of the final part. Selecting snap-to-intersection instead of the more usual snap-to-grid allows us to carefully terminate each element precisely at the intersections between lines and circles.** | We can then create a second - main - layer, and draw the segments and arcs of the final part. Selecting snap-to-intersection instead of the more usual snap-to-grid allows us to carefully terminate each element precisely at the intersections between lines and circles.** | ||
+ | |||
+ | Un exemple | ||
+ | |||
+ | Pour visualiser le problème, commençons par dessiner une simple pièce plate, avec une géométrie similaire à celle utilisée dans un embiellage de moteur. Cette pièce est faite essentiellement de deux anneaux, chacun à une extrémité, | ||
+ | |||
+ | Pour dessiner cette pièce de manière traditionnelle, | ||
+ | |||
+ | Une fois les cercles définis, le bord extérieur des bras peut être positionné (en rouge). La façon la plus facile de le faire dans une application traditionnelle de CAO est de spécifier un segment de ligne tangent aux deux cercles rouges, un pour le haut, l' | ||
+ | |||
+ | Nous pouvons ensuite créer un second calque, le principal, et dessiner les segments et les arcs de la pièce finale. En sélectionnant l' | ||
**On to FreeCAD | **On to FreeCAD | ||
Ligne 30: | Ligne 44: | ||
Once editing the new Sketch, we can begin by changing the default grid size from 10 to 5mm, since the dimensions of our part are all multiples of 5mm. Let us draw the two circles that define the left ring of our part, with respective radii of 20 and 25mm. It is interesting to note how the shape of the mouse pointer changes when creating a new point. In a general situation, the shape is a red circle, with the new point’s coordinates in blue beside it. However, if we click on an existing point, a red dot shows up beside the circle. If we click in this situation, we can choose to link both points. This is ideal when we are drawing two circles with the same center. If, later on, we move one of the center vertices, both will move at the same time - and both circles will be displaced an equal distance.** | Once editing the new Sketch, we can begin by changing the default grid size from 10 to 5mm, since the dimensions of our part are all multiples of 5mm. Let us draw the two circles that define the left ring of our part, with respective radii of 20 and 25mm. It is interesting to note how the shape of the mouse pointer changes when creating a new point. In a general situation, the shape is a red circle, with the new point’s coordinates in blue beside it. However, if we click on an existing point, a red dot shows up beside the circle. If we click in this situation, we can choose to link both points. This is ideal when we are drawing two circles with the same center. If, later on, we move one of the center vertices, both will move at the same time - and both circles will be displaced an equal distance.** | ||
+ | |||
+ | Sur FreeCAD | ||
+ | |||
+ | Pour créer la même pièce sur FreeCAD, commençons par créer un nouveau projet. Maintenant, nous pourrions procéder comme dans les épisodes précédents, | ||
+ | |||
+ | Une fois le nouveau Sketch édité, nous pouvons commencer par changer la taille par défaut de la grille de 10 à 5 mm car les dimensions de notre pièce sont toutes des multiples de 5 mm. Dessinons les deux cercles qui définissent l' | ||
**Other options include placing the new point on a segment of an arc, thus linking the point to the arc. If we then displace one of the two objects, the movement of the other will equally be constrained. Likewise, when a line segment is drawn and one of the vertices has already been placed, a horizontal or a vertical constraint can be placed on the segment by placing the second vertex when the mouse cursor contains the corresponding red horizontal or vertical bar. | **Other options include placing the new point on a segment of an arc, thus linking the point to the arc. If we then displace one of the two objects, the movement of the other will equally be constrained. Likewise, when a line segment is drawn and one of the vertices has already been placed, a horizontal or a vertical constraint can be placed on the segment by placing the second vertex when the mouse cursor contains the corresponding red horizontal or vertical bar. | ||
Ligne 36: | Ligne 56: | ||
Once selected, each element can be moved around using the mouse. This is fine for the time being, but will introduce a difficulty when the connecting segments are placed to create the connecting rod itself: altering the position of a segment may very well end up by moving one of the circles that is connected to it, thus making sure the two elements remain in connection. We do not want this to happen; on the contrary, we want the circles to determine the position of the segments. So let us place a constraint on the position of each of our circles. Click on the center of the circles - which should be a single round dot - and then use the constraint toolbar to choose the “lock” constraint which has an icon shaped, rather appropriately, | Once selected, each element can be moved around using the mouse. This is fine for the time being, but will introduce a difficulty when the connecting segments are placed to create the connecting rod itself: altering the position of a segment may very well end up by moving one of the circles that is connected to it, thus making sure the two elements remain in connection. We do not want this to happen; on the contrary, we want the circles to determine the position of the segments. So let us place a constraint on the position of each of our circles. Click on the center of the circles - which should be a single round dot - and then use the constraint toolbar to choose the “lock” constraint which has an icon shaped, rather appropriately, | ||
+ | |||
+ | Les autres options comprennent le placement du nouveau point sur un segment d'un arc, reliant ainsi le point à l'arc. Si, ensuite, nous déplaçons un des deux objets, le mouvement de l' | ||
+ | |||
+ | Une fois les deux cercles créés, nous pouvons inspecter le nombre d' | ||
+ | |||
+ | Une fois choisi, chaque élément peut être ajusté en utilisant la souris. C'est bien pour le moment, mais cela introduira une difficulté quand les segments connectés seront mis en place pour créer la bielle elle-même : la modification de la position d'un segment peut très bien se terminer par le déplacement d'un des cercles auquel il est relié, s' | ||
**Let us continue by drawing the remaining circles, and locking them into place. We should now see four constraints, | **Let us continue by drawing the remaining circles, and locking them into place. We should now see four constraints, | ||
Ligne 42: | Ligne 68: | ||
We are now ready to place the connecting segments on our - now immobile - circles. Start by drawing a line segment from one of the external circles, to the other. By carefully placing the mouse, we should be able to constrain the segment’s vertices so that each remain on a circle - this is the symbol of a red arc with a dot in its center. However, it should rapidly become clear that this segment is not yet necessarily tangent to each circle. To impose this new set of constraints, | We are now ready to place the connecting segments on our - now immobile - circles. Start by drawing a line segment from one of the external circles, to the other. By carefully placing the mouse, we should be able to constrain the segment’s vertices so that each remain on a circle - this is the symbol of a red arc with a dot in its center. However, it should rapidly become clear that this segment is not yet necessarily tangent to each circle. To impose this new set of constraints, | ||
+ | |||
+ | Continuons en dessinant les autres cercles et en les verrouillant en place. Nous devrions voir maintenant quatre contraintes, | ||
+ | |||
+ | Nous avons contraint (fixé) la position du centre de chaque cercle. Cependant les rayons ne sont pas encore contraints et pourraient être modifiés quand les segments de liaison seront ajoutés. Pour fixer leur longueur, sélectionnez tour à tour chaque cercle et choisissez la contrainte « Fixer le rayon », un cercle rouge avec un trait dedans, dans la barre d' | ||
+ | |||
+ | Nous sommes maintenant prêts pour mettre les segments de liaison en position sur nos cercles - immobilisés maintenant. Commencez par dessiner un segment de ligne depuis un cercle extérieur vers l' | ||
**The final result, with all four segments placed and the elements completely constrained, | **The final result, with all four segments placed and the elements completely constrained, | ||
Ligne 50: | Ligne 82: | ||
What we have obtained so far is, in fact, just the auxiliary, constructive aides to help us place our final arcs and segments. It would be nice to see them in a different color and style, to help us distinguish between helper traces and elements belonging to the final drawing. There are two ways of going about this. The first is to exit Sketch edition. By clicking once on the Sketch, we can proceed down to the “Property” window, and change both “Line Color” and “Draw Style” for all lines in the Sketch in a single action. | What we have obtained so far is, in fact, just the auxiliary, constructive aides to help us place our final arcs and segments. It would be nice to see them in a different color and style, to help us distinguish between helper traces and elements belonging to the final drawing. There are two ways of going about this. The first is to exit Sketch edition. By clicking once on the Sketch, we can proceed down to the “Property” window, and change both “Line Color” and “Draw Style” for all lines in the Sketch in a single action. | ||
+ | |||
Then, we can proceed to the “Draft” workbench. Once here, we can use the drawing tools from the Draft toolbar (with yellow/ | Then, we can proceed to the “Draft” workbench. Once here, we can use the drawing tools from the Draft toolbar (with yellow/ | ||
+ | |||
+ | Le résultat final, avec les quatre segments en place et les éléments complètement contraints, devrait ressembler à ce qui est présenté ci-dessous. | ||
+ | |||
+ | Jusqu' | ||
+ | |||
+ | Construire la forme finale | ||
+ | |||
+ | Ce que nous avons obtenu jusque-là ne sont, en fait, que des aides auxiliaires, | ||
+ | |||
+ | Ensuite, nous pouvons poursuivre dans l' | ||
**Intersections between Sketch elements can be made easily detectable if a point is placed at each intersection from within the Sketch. To do so, create a point using the tools with the icon with the red dot. When placing the point, snap to one of the elements creating the intersection, | **Intersections between Sketch elements can be made easily detectable if a point is placed at each intersection from within the Sketch. To do so, create a point using the tools with the icon with the red dot. When placing the point, snap to one of the elements creating the intersection, | ||
Ligne 57: | Ligne 100: | ||
A second way of drawing the final shape of our part is to do it directly inside the Sketch. Go back into editing the Sketch object (double-click on the object), selecting all the lines and switch them all to “Construction mode” using tool . This will change their color to blue - and make them disappear from the Sketch when this is not being viewed from within edition mode. We can then proceed by creating the points at intersections, | A second way of drawing the final shape of our part is to do it directly inside the Sketch. Go back into editing the Sketch object (double-click on the object), selecting all the lines and switch them all to “Construction mode” using tool . This will change their color to blue - and make them disappear from the Sketch when this is not being viewed from within edition mode. We can then proceed by creating the points at intersections, | ||
+ | |||
+ | Les intersections entre les éléments de Sketch peuvent être facilement détectées si un point est placé à chaque intersection dans le Sketch. Pour ce faire, créez un point en utilisant l' | ||
+ | |||
+ | Une fois créés les points de l' | ||
+ | |||
+ | Une seconde manière de dessiner la forme finale de notre pièce est de la réaliser directement à l' | ||
**At this point, we can use the Sketch object to print a diagram in two dimensions. However, we cannot use it directly to create a three-dimensional part. To do so, we must begin be going to workbench Draft, and there convert the Sketch object into a collection of drawing elements using the appropriate conversion tool: . | **At this point, we can use the Sketch object to print a diagram in two dimensions. However, we cannot use it directly to create a three-dimensional part. To do so, we must begin be going to workbench Draft, and there convert the Sketch object into a collection of drawing elements using the appropriate conversion tool: . | ||
Ligne 65: | Ligne 114: | ||
In this article on using FreeCAD, we created a Sketch object, to place individual drawing elements such as lines, arcs and points, in a precise relationship to each other using constraints. We noted the use of Construction mode elements within the Sketch object, to aid construction of the complete diagram while not appearing in the final drawing. In the next part of the series, we will change scale altogether and work on an architectural project.** | In this article on using FreeCAD, we created a Sketch object, to place individual drawing elements such as lines, arcs and points, in a precise relationship to each other using constraints. We noted the use of Construction mode elements within the Sketch object, to aid construction of the complete diagram while not appearing in the final drawing. In the next part of the series, we will change scale altogether and work on an architectural project.** | ||
+ | |||
+ | À ce stade, nous pouvons utiliser l' | ||
+ | |||
+ | Une fois ceci fait, nous pouvons aller dans l' | ||
+ | |||
+ | Et ensuite ? | ||
+ | |||
+ | Dans cet article sur l' | ||
+ | |||
issue123/freecad.txt · Dernière modification : 2017/08/10 16:56 de andre_domenech