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 is still in Beta, but has been gaining acceptance in recent years. Naturally, it is readily available in the Ubuntu repositories. In the fourth 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 this part of the series, we will change scale altogether and work on an architectural project.
Setting up our units The main difference between the small technical parts we have drawn up so far and an architectural project lies in the units used. Small parts tend to be easily measured in millimeters. However, in the case of a building it would make sense to use larger units such as meters (in the metric system). To set up the environment, let us begin by starting up FreeCAD, and choose a new Project. Then go to menu option Edit, and choose Preferences. Within the General pane, choose the Units sub-pane and change “User system” settings from millimeters to meters - or the imperial system if that is your preference.
Though we have changed the main units, the auxiliary grid that comes up to help us place elements will still use the former aperture value between grid lines. Having a 1×1 m grid with lines every millimeter may not be of much use to build a house. So, continue within the Preferences dialog box, and go to the Draft pane. Here, choose the Grids and Spacing sub-pane, and change the value for “Grid spacing”. As a quirk, it may be necessary to save your project, close FreeCAD and open it once more to actually see the grid with its new size. Remember to use the mouse wheel to zoom out to see a sufficiently large amount of the X-Y plane. Remember the visible area is always indicated in the lower right corner of the display.
Using the Arch workbench Let us begin actual design by noting the existence of a specific “Arch” workbench. This toolset has been specifically conceived to draw designs of buildings as a Building Integrated Model, or BIM. In this concept, building elements are labelled as such: walls become a Wall object, openings such as windows or doors become Window objects, and objects such as a Support, a Roof or a complete Building object can be specified using the appropriate toolbar. To begin a new building, one could start in the Draft workbench, by drawing out the general floorplan. Simple lines are sufficient to indicate the position of each wall. For the time being, no mention needs to be made of wall widths and of the placement of openings. For instance, one could draw up the following building, representing a small school module with two classrooms or laboratories, one preparation room between them, and an exterior corridor.
Once the floorplan has been drawn in this fashion, move to the Arch workbench, and select all lines. Then select the Wall tool , and all lines magically become proper Wall objects. A default value of 3m is used for wall heights, and 0.2m for wall thicknesses. To continue, one would need to place openings. To do so, start by creating a Sketch object attached to the corresponding wall object. This Sketch object needs to contain a closed form that represents the shape of the opening. For instance, one could create a simple rectangular window for one of the classrooms. Choose the wall object on which to draw, go to the Sketch workbench, and create a new Sketch object. Using the Sketch constraint system described in the previous part of this series, the four lines that describe the position of the new window can be placed with some precision.
Once finished, close Sketch edition mode, and make sure the new Sketch object is actually associated to and within the Wall object. Then go to the Arch workbench and transform the Sketch into a Window object. Within the Combo View to our left, we should see how the original Wall object (Wall004) has been replaced by a new Wall (Wall006), that contains both the original shape and a new Window object. This latter object in turn contains the Sketch. Each internal object defines the shape of the external one that contains it. The Arch workbench and the BIM approach to building an architectural project has several advantages. One is ease of use, specially when working with a rapid prototyping approach, under which several models may be tested to explore the possibilities of a new site or construction idea, before settling on a particular solution. Just lay down the lines, and build up your walls. A second advantage is that, once the new building’s elements have been defined as such, the information contained within the model can be used to automate calculations, such as surface area or building volume.
On the other hand, this part of the FreeCAD software is possibly the least mature for the time being. As work in progress, developers seem to be exploring the possibilities of the BIM approach, and there are some rough edges. Element placement is still rather fiddly, and much care must be given by the user to place objects correctly within their containing objects. Roof creation is an art by itself. Object conception is made using regular parts that may, or may not, correspond to the real world. For instance, working with a building interior floor that is not completely flat may become a challenge, as may be working with walls that have varying levels of thickness along their length. Solving corner intersections between walls may also become an issue. For this reason, the choice of using the Arch workbench must be left entirely to each individual user. Some people may hate the limits this approach places on their workflow, while others may revel in the ease of creation of modern-looking buildings. In any case, one of the designers of FreeCAD has created a rather good tutorial on its features, that may be of interest as further reading: https://www.freecadweb.org/wiki/Arch_tutorial
A more traditional approach Users who do not need or do not care for the features of BIM may feel more comfortable using the more standard tools in the Draft and Sketch workbenches to draw traditional views of our construction. However, we should always bear in mind that FreeCAD is a 3D-oriented computer design program. For this reason, limiting ourselves to the more traditional conception of architectural drawings - planar projections and perspectives - can certainly work, but we would lose out on the capabilities of visualizing the building in the third dimension that FreeCAD allows us. To see how this could work out, let us project something that would be rather difficult to draw up using the Arch workbench: an arcaded cloister. This is typically a square or rectangular space that consists in a covered walkway surrounding a central open area with vegetation, an arrangement that has been used both in a certain type of Islamic garden (e.g. Patio de los Leones, Alhambra Palace in Granada, Spain) and in Christian churches, both in Romanic and Gothic styles. It is this latter that will inspire us to design the cloister arches, such as those found in Tarragona Cathedral, Catalonia.
Let us begin by drawing a simple Gothic arch. In FreeCAD (bottom left), go to the Draft workbench and set the grid aperture to 500mm. Then go to the Sketcher workbench, and start a new Sketch object. Here, we will probably need to alter the grid aperture a second time, to 0.5 m (same value, different units). We can then begin by drawing the base of our arch, using the grid as a support. Using simple values, I drew two vertical lines 0.5m high and set 1m apart. I was then able to draw the arched top part of our figure. In its most traditional form, this is the combination of two circular arcs. In the figure below, a construction circle has been drawn in blue: centered on the top of the leftmost vertical segment (green point), it passes through the top of the right post, giving it a radius of 1m. Using this circle, draw an arc of a circle from the rightmost post up towards the centerline of the figure (snap to the vertical grid line), giving the right part of the arch. Now draw a similar circle centered on the top of the right post, and draw the left part of the arch.
Once we exit editing mode, we obtain a nice outline of our Gothic arch, which would in the this case be called an equilateral arch. Since real architectural elements have volume, we now need to find a way of transforming this into a volume, keeping as much in character with real Gothic building techniques as possible. However, when one studies carefully the stone parts that go into making up real Gothic arches, one almost always finds that the same profile has been cut all along soft pieces of white sandstone. Therefore, if we can create such a profile and somehow sweep it along our arch outline, we should end up with a perfect three dimensional arch frame. Please do make sure this shape is complete, i.e. that all lines connect well to each other. The penalty for not doing so would be a final arch shape that is built up only in part - with another part missing. I drew my arch sketch (previous page, bottom right) in the XY plane. I will now create a second Sketch object, but at right angles within the XZ plane: the X-axis is in the left-right direction, Y is top-bottom, and Z goes along the arch depth.
Within this new Sketch Please note that the grid dimensions have been changed. We are now working with an aperture of 5 cm, giving an element profile that fits within a 10×20 cm rectangle. Close this second sketch, and we can now proceed to the Part workbench. In this, select the Sweep tool . In this tool, we select one of the sketches as the form to be swept, and the other as the path to sweep it along. However, there are some caveats. The main point is the relative placement of each sketch. Their relative positions will be respected when one is swept along the other. It is best to ensure the swept form is actually placed upon the path before proceeding. In my case, I needed to displace it some 0.5 m leftward of the place where it had been created, in the vicinity of the coordinate system’s origin. For some reason, I also needed to move the second sketch downward a small amount - some 25 mm, presumably to ensure it was not in the vicinity of a connection point between segments of our arch sketch. In this partial view, one can see how the wireframe arch sketch is acting as a support for the second, profile, sketch, as it goes around using the first sketch as its path.
Once the final arch tridimensional shape has been prepared, what we have actually achieved is a computer model of the elegant carved stone frame of the arch. However, this arch would not work well in architecture by itself, but must be part of a wall or a complete structure. To create this wall, I draw a simple rectangle 1.1 m wide by 2.1 m high in the XY plane, overlapping the arch by several centimeters on all sides. I then extruded this flat piece as a rectangular volume - as in Part II of this series, which I then dyed red. The final touch is to make a Pocket indentation in this rectangle, to accommodate our arch. This done by selecting one of the outward faces of the rectangle, and creating a Sketch on this face, with the same shape as our original arch. A copy of the arch sketch could also be made, and then attached to the face of the rectangle. Then use the Pocket tool in the Part design workbench to push the sketch form “inwards”. If sufficient depth is given to it, it will end up by making a hole straight through our rectangle, in the correct shape to place our arch volume in.
The arch Sweep volume and the red Pocket can then be selected, and united into a single Component representing a complete architectural module. This module can then be copied and pasted several times, to form a series of arches. Each element will need to be displaced and perhaps also rotated into its final place, working with the object’s Data pane in the lower left toolbox. This series of arches can be further replicated, until a complete architectural ensemble is formed.
What next? In this article on using FreeCAD, we worked on an architectural project in two different ways. In the first place, we used the Arch workbench to create a modern architectural project, in which supplementary information is given to the computer, so using FreeCAD to create a Building Integrated Model (BIM). Since this approach is in an early stage of development, and is limited to simple forms, we then used a more traditional approach to create volumes in the same way as in previous projects, but on a larger scale. The sweeping technique allowed us to create an element with the shape of an arch by sweeping one sketch (a profile) around another sketch (the outline of an arch). In the next part of this series, we will extend FreeCAD’s possibilities using a little Python programming, to create a helicoidal surface in the shape of a gear wheel.