Outils pour utilisateurs

Outils du site


issue122:freecad

Ceci est une ancienne révision du document !


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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

issue122/freecad.1499791327.txt.gz · Dernière modification : 2017/07/11 18:42 de d52fr