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 last (eighth) article on using FreeCAD, we used a mesh in combination with other, more standard, FreeCAD tools, to build a 3D representation of a modern building with a lattice roof structure. In this part, we will go from a computer model to the physical world, using a 3D printer to create a physical representation of our construction.
Some notes on 3D printing It will come as no surprise that 3D printing has become something of a fad in the last few years. Starting out as a bit of a hobbyist activity, it has found its practical application in many rather different fields, such as art and crafts, design, engineering, and even some medical fields. Relatively cheap printers that come fully assembled and ready to print are making the technique more accessible to a large variety of users. However, it must be said that 3D printing is not yet quite as mature as traditional printing on flat pieces of paper, and some practical inclination is still very much a necessity for users. Dealing with platform placement calibration, nozzle stoppages, or other mechanical issues, may not be within everybody’s comfort zone. There are many techniques of 3D printing. They are usually seen as some form of additive construction, where the resulting part is built up progressively. This is in contrast to machining - for instance using a computer controlled lathe - where an existing block of material is cut down to the final desired shape by removing excess material. Some materials such as plastics lend themselves best to additive processes, while others such as metals are more often than not best handled with subtractive methods.
Even within the domain of 3D printing, there are many variants. Some of the more expensive, such as sintering, involve heating small particles of the material with a laser to fuse them together and form the object being built. In others, a solution of material is locally heated, transforming the liquid solution into a solid layer. In the vast majority of commercial 3D printers that would be in the price range of the enthusiast or a small business, a plastic extrusion process is used. In this, a plastic filament is slowly extruded through a heated nozzle. The plastic melts when going through the nozzle, and fine points or lines of material are deposited in layers to build up the object from bottom to top. This system has its quirks. The first main point to take into account is that very fine object volumes or parts may not come out as expected. Details of less than 2-3 mm thickness may be very brittle once printed and, in fact, may easily be broken off when removing the printed part from the supporting plate. Naturally, the details depend on the actual printer used, and on the level of detail dialed into the printer. With thinner layers (0.1 mm instead of the more common 0.2 mm), finer details will come out better, but at the expense of a much longer print run. Time spans of 2-3 hours are not uncommon for small objects (1-2 cm tall), and can go up from there for larger objects. The second point is that the upper layers of plastic are laid down on top of the lower layers. However, the plastic is quite liquid when leaving the nozzle, and so needs a stable base to rest on while solidifying. Structures such as overhangs or arches in the model will not come out well, if left unsupported.
Many printer control applications alter our model adding supportive structures. These are printed together with the model itself, and must be removed after printing. In the accompanying image, a model of a wheel rim has been printed. Part of the mat laid down by the printer to fix the part to the supporting plate is still attached to the bottom of the part. The interior of the recess along the rim has been filled in with vertical column-like shapes by the printing software, in an effort to ensure the top edge does not fold down while still hot. These shapes are quite ungainly, but are also thin walls and may easily be pared off with a sharp knife (but do be careful with your fingers). Depending on the shape of the model, cleaning up may be quite involved. In a recent project, a 4×4 link chainmail assembly took one hour of printing time, but then required two hours of manual cleaning up and surfacing. Material loss would also be a concern in an industrial environment: in this case, 3.3 g of the final object required a total of 7.2 g of printed material. A material efficiency of less than 50% can be seen as far from ideal.
Building and printing a simple object The actual details of our workflow can vary, depending on which program set we choose to use. However, the main steps will be as follows: • Build the computer model, using volumes. Thin, flat parts must be rendered as volumes, with a thickness that for best results should not go below 1 mm. In this series, we will naturally use FreeCAD for this stage. However, other options such as Blender are also quite suitable, as long as they can export object meshes in the STL file format. • Use a slicer program to convert the object into a series of flat slices. These slices are then converted into a sequence of G-code commands, that in essence tell the printer to place its head at such-and-such coordinates, and turn the plastic extrusion on and off. A common choice for this stage is Slic3r (http://slic3r.org/ ). • Use a third program to connect to the printer, and actually perform the printing process. Printrun / Pronterface (http://www.pronterface.com ) is a popular choice.
Two file formats form the glue between stages (a) and (b), and between (b) and ©. The STL format previously discussed in parts 7 and 8 of this series is a standard way to transfer our object’s form from the design application to the slicer. Other choices do exist, such as OBJ files, but do seem to be slightly less well supported. G-Code files may be used to transfer data from the slicer to the printer controller, though this step is omitted if the slicer can also act as a printer controller. Applications such as Slic3r can control directly a certain number of printer models, mostly open-source hardware. However, many (commercial) models require their own software for slicing and controlling the printer, which is usually found only for Windows. This may be a point to take into account if or when selecting a printer to purchase. Let us start with a simple truss object, basically a triangular structure of square bars connected with transverse circular bars. The first point we will need to get right is dimensions. Depending on your printer, there will be limits to the overall size of the object to be printed. In this case, I chose to build a piece 120 mm in length, the size of the longest bar. Bar sections were 3 mm square, to make them easy to print. Finally, the circular joints have an internal radius of 3 mm, and 6 mm external. The overall height of this structure is 4.5 mm.
To set up this piece, a traditional CAD procedure would be to draw a flat representation of the external shape, make sure all joints fit by trimming lines as required so that there is no intrusion of one bit into another, and then draw in the circles representing the holes in each joint. Using the more advanced features of modern 2D CAD applications such as LibreCAD, one could easily add some filleting to make joints a tad more robust at the unions between bars and cylinders. To build a 3D model, however, it is more convenient to think in terms of assemblies. I started out immediately in 3D by drawing a cylinder object in the Part workbench of FreeCAD, to represent one of the joints. I then draw a second, taller, cylinder to represent the cutout for the hole, and subtracted both objects to create a hollow cylinder. I then copied and pasted this complete part into the three final positions for the joints. I then created a flat bar of the appropriate section, and then copied, rotated and scaled it into position three times to form the triangular structure. Some care needs to be taken in this assembly, since it is clear some overlapping of parts has occurred. In the real world, the bars would need to abut to the outside surface of the cylinders, and bar extremities would need to be shaped accordingly. As an alternative, vertical slots could be cut into the cylinder walls, and the bar heads left square and slotted into the cylinders.
In the magical world of 3D printing, however, the intrusion of one volume into another may not be a problem. Most printing software can take care of this, so that the plastic material in each volume does not get printed twice over - which would result in a big mess. Instead, software is smart enough to perform a boolean union on all volumes and stitch them together correctly. It must be said, however, that not all printing software is equal in this aspect, and some experimentation may be necessary to find the limits of a particular printer software and hardware combination. Once the external truss had been built up, I wanted to fill in the center with a non-structural mesh. There are several ways of going about this. For instance, one could build a flat volume to fit the empty space, and then cut holes in it to suit. I wanted something a bit more fancy, along the lines of the beehive motives seen in some modern car grills. So I started by building a basic hexagonal shape in the same way I had done the cylindrical joints. I began by drawing a vertical six-sided prism with sides 9 mm long and height 3 mm, then cut out another vertical prism with sides 8 mm long from the center. I then replicated this basic motif to fill the space in a honeycomb structure.
At this point, I had both the external triangle and the inner grille. However, the grill did protrude slightly from the sides of the triangle. So, it was back to the Draft workbench and I drew a rough approximation of the external triangle as a continuous Wire object. This object, extruded upwards, gave me the shape of the internal space, with some overlap with the triangle’s bars. I then defined the grille as the intersection of the first grill and this new volume, which in essence trimmed its shape down to fit within the interior space of the triangle. The final piece is the combination of the external triangle, plus the grill. This assembly is then made into a single object using a boolean union. Once we have our object prepared, the printing process should be rather straightforward. Starting in FreeCAD, select the final part and export it into an STL file with menu option File > Export. From there, either use the Slic3r, or any equivalent slicer software, to slice and print the model. Once finished, the auxiliary mat can be stripped away. Some surface finishing will probably need to be done, specially on the lower side where it has been in contact with the mat.
What next? In this article on using FreeCAD, we explored going from a computer model to something physical, using a 3D printing technique. We went through both some of the strong points of 3D printing, and the weak points. We discussed 3D file formats, we built a model in FreeCAD, and printed it using the Slic3r software. This specific model, built in plastic, would probably have no intrinsic purpose. However, it could be used as a basis for a mold for a metal copy, or simply as teaching material on truss structures and internal stresses within a structural object. In the next part of this series, we will change direction once more and explore some of the uses of copying objects to create a repetitive pattern such as chainmail.