Arch panel tutorial/fr

Ceci est un cross-post d'untutorial originalement écrit pour Open-Source Ecology.

Presentation de FreeCAD


FreeCAD est un modélisateur 3D paramétrique. La modélisation paramétrique vous permet de modifier facilement votre conception en revenant dans l'historique de votre modèle et en modifiant ses paramètres. FreeCAD est open source (licence LGPL) et très modulaire, permettant une extension et une personnalisation très avancées, notamment grâce à son utilisation intensive du langage Python.


 * FreeCAD website: http://www.freecadweb.org/
 * FreeCAD documentation wiki: http://www.freecadweb.org/wiki/index.php?title=Main_Page
 * FreeCAD workbenches: http://www.freecadweb.org/wiki/index.php?title=Workbench_Concept
 * FreeCAD forum: http://forum.freecadweb.org/
 * Getting started with FreeCAD: http://www.freecadweb.org/wiki/index.php?title=Getting_started
 * Architecture tutorial: http://www.freecadweb.org/wiki/index.php?title=Arch_tutorial

Installation de FreeCAD
Vous avez le choix d'installer la dernière version stable (version 0.16) ou une version de développement (actuellement 0.17). En fait, les versions de développement de FreeCAD sont généralement assez stables, et vous êtes fortement encouragé à essayer une version de développement, sauf si vous avez une raison spécifique de ne pas le faire. Puisque le développement FreeCAD est assez rapide, assurez-vous, si vous téléchargez manuellement, de vérifier de temps en temps et de réinstaller / mettre à jour pour bénéficier des dernières améliorations.


 * Sur Windows: Téléchargez la version la plus récente pour votre version Windows (32 ou 64 bits) à partir de https://github.com/FreeCAD/FreeCAD/releases. Double-cliquez sur le fichier à installer.
 * Sur Mac OS: Téléchargez la version la plus récente sur https://github.com/FreeCAD/FreeCAD/releases. Double-cliquez sur le fichier à installer.
 * Sur Ubuntu: La version de FreeCAD fournie par Ubuntu est généralement obsolète, il est donc conseillé d'utiliser le PPA géré par la communauté FreeCAD à la place. Pour l'installer, ouvrez l'application "Sources logicielles" d'Ubuntu, et ajoutez soit ppa: freecad-maintainers / freecad-stable pour la version stable, soit ppa: freecad-maintainers / freecad-daily pour la version de développement aux sources logicielles.
 * Sur d'autres plateformes: Sur la plupart des distributions Linux classiques (Debian, Fedora, etc.), FreeCAD est inclus dans les dépôts de logiciels officiels. Cependant, il se peut que ce ne soit pas toujours la version la plus à jour. Si la version dont vous avez besoin n'est pas disponible, votre seule option est de compiler vous-même FreeCAD (instructions sur le site FreeCAD)

Contenus optionnels supplémentaires

 * Activation de l'importation / exportation IFC: Pour importer et exporter des projets vers / depuis le format de fichier IFC, FreeCAD s'appuie sur l'importateur IfcOpenShell, que vous devez installer séparément à partir de http://ifcopenshell.org/python.html. Veillez à choisir une version basée sur python2.7, qui est la même version python utilisée par FreeCAD.
 * Drawing dimensioning workbench: Un plan de travail supplémentaire pour FreeCAD, qui offre de nombreux outils pratiques pour ajouter des cotes et des annotations aux feuilles de dessin 2D de FreeCAD: https://github.com/hamish2014/FreeCAD_drawing_dimensioning (Instructions d'installation sur la page Web)
 * Assembly2 workbench: Un workbench supplémentaire pour FreeCAD, qui offre une série d'outils d'assemblage de base: https://github.com/hamish2014/FreeCAD_assembly2 (Instructions d'installation sur la page Web)

Conseils de démarrage rapide
La collection de tutoriels disponibles sur le wiki FreeCAD est encore très éparse. Cependant, de nombreux membres de la communauté FreeCAD utilisent youtube pour publier des didacticiels vidéo. Assurez-vous de rechercher des contenus relatifs à FreeCAD sur youtube, qui est certainement la meilleure source de matériel d'apprentissage.

FreeCAD est une application très technique, et sa courbe d'apprentissage peut être raide. Assurez-vous de compter sur les tutoriels, le wiki de la documentation et n'hésitez pas à poser des questions sur le forum si vous rencontrez un problème spécifique. Les questions clairement énoncées reçoivent généralement des réponses très rapides et très complètes.

Une liste très approximative de choses que vous devez savoir


 * L'interface FreeCAD est divisée en ateliers. Les ateliers sont simplement des collections d'outils (boutons de la barre d'outils et menus) qui sont regroupés, généralement pour une certaine tâche. Lorsque vous passez à un autre atelier, l'interface affiche les outils de ce plan de travail. Mais le contenu de votre document 3D ne change pas. Vous travaillez toujours sur le même document et sur les mêmes objets.


 * FreeCAD is still in development, there are still many bugs, and the application might crash sometimes. Save often, and enable backup files in Edit → Preferences → Document


 * Most objects in FreeCAD are parametric. It means their geometry is created automatically from a series of parameters. These parameters are always editable in the Properties View. They are always divided between the parameters that affect the geometry itself (Data tab) and the parameters that only affect the display of the object (View tab). However, objects created with other applications, and imported into FreeCAD, will usually not be defined by parameters, and are therefore uneditable.


 * Several workbenches (PartDesign and Arch) are made to work only with solid objects, and will refuse to work on objects that are not solid. A good rule of thumb is always try to work with solid objects.


 * Although FreeCAD can import and work with mesh objects (Mesh workbench), it is primarily designed to work with a more advanced object type called brep, that is used by most of its workbenches (Part, PartDesign, Draft, Sketcher, Arch). When importing mesh-based files (.dae, .orb, .stl...) you will usually need to convert these objects to brep before being able to do something interesting with them. Solid-based file formats however (.step, .iges), when imported into FreeCAD, directly produce brep objects. 2D formats (.dxf, .svg) also produce brep contents.


 * FreeCAD has different ways, or modes, to use the mouse buttons. These modes can be set in the preferences or changes on-the-fly by right-clicking on the 3D view background. They are described on http://www.freecadweb.org/wiki/index.php?title=Mouse_Model. The best suited modes for CAD work are CAD or Gestures.

Exercise: modeling a roof panel
To showcase a typical workflow in FreeCAD, let's model a roof panel as described on http://opensourceecology.org/wiki/MicroHouse_4_Roof_-_Module_-_Build_Instructions. To do that,we will start from drawing the different pieces in a 2D constrained sketch, then we will take advantage of the special Arch Window object, which is able to build complex 3D objects from a 2D sketch containing the contours of several pieces. Finally, since what we need is not a window but a roof panel, we will simply convert our window object to another Arch type.

1. Open FreeCAD, then set your preferred units to “imperial”
In menu Edit → Preferences → General → Units

2. Switch to the sketcher workbench and create a new sketch in the XY plane.


Usually, unless there is a specific reason not to do so,you'll always want to start drawing your 2D sketches on the ground plane, around the (0,0) origin point. Then, it is the 3D object generated from that, that will be moved/rotated into position.

3. Draw two rectangles. On each of them, place a vertical constraint of 16 ft and an horizontal constraint of 2 in.


Don't worry about the dimensions your pieces have when you draw them, the constraints will resize them accordingly. To add a dimension constraint (vertical or horizontal), you can either select a line, or two points (with CTRL pressed).

4. Once your two rectangles have the correct size, place a vertical constraint of 0 in between their corner points, and a horizontal constraint of 4 ft.


This ensures that our two rectangles are correctly positioned in relatin to each other.

5. Add the two additional 2 in x 6 in pieces


Add two more rectangles and repeat the process. Note that in the example above, we didn't specify the length of these pieces, but rather placed a distance constraint between their extremities and the long vertical pieces, and we let a small gap of 0.05 inches between them. This is because if we make the rectangles touch each other, FreeCAD might deduce the loops wrongly, and we might get strange results with the Arch window tool. This little trick ensures that each rectangle will be recognized as an independent loop by the Arch window tool.

6. Add the corner reinforcement pieces


Same thing. Make them 6 inches wide, and separated them from other rectangles by 0.05 inches.

=== 7. Draw 7 intermediary reinforcement pieces, set their width to 2 inches, and constrain their left and right endpoints at 0.05 inches of the vertical rectangles (or at 0 inch of the endpoints of the other horizontal rectangles) ===



Depending on your system, FreeCAD might begin to be slow to process new constraints. This is the disadvantage of using constrained objects, they quickly swallow up a lot of system resources. You must always consider if you absolutely need them. You can also delete constraints when they have done their job. These dimensions won't be fixed anymore, but unless you move the pieces around, they won't change. If needed, you can aslo always re-add constraints later.

8. Calculate the spacing between the 7 reinforcement pieces and set vertical constraints between them.
In our case, our total length is 192 inches, minus the two end pieces (2 x 2 inches) and the two corner reinforcements (2 x 6 inches), = 192 – (4 + 12) = 176. Removing the 7 reinforcement pieces ( 7 x 2 ) = 162. Divinding this by 8 gives us the space between each reinforcement: 20.25.



9. Obtaining a fully constrained sketcher
On the right panel, you can see the message “2 degrees of freedom”. This means that our sketch is not fully constrained (it still has two “ways” of being deformed). This is because, although no piece of it can now move in relation to the others, the whole sketch can still move vertically and horizontally. To prevent this, we can simply take one of its corner points, select the origin point of the grid (where the green and red axes intersect) and press the Point Constraint button. This turns our sketch green, meaning it is fully constrained, no part of it can move anymore.



This is actually not absolutely necessary. But it is always better to keep track of the exact position of objects (we are now certain that our corner is at the (0,0) point). In case something goes wrong later, or we need to figure out the position of an object built upon this sketch, this will be useful.

We can now press the “close” button and our base sketch is built:



10. Switch to the Arch workbench and, with the sketch selected, press the “window” button
Our sketch has now vanished and one of its rectangles has been extruded slightly into a solid piece:



Although this seems wrong, it is simply because the Arch Window tool has created a default piece from the biggest loop it could find in the base sketch. We will fix that soon. Also, notice take note that the sketch has not disappeared, it has simply been turned off and “swallowed” by its new parent object. You can still find it in the tree view, by expanding the window object, and turn its display on/off by pressing the SPACE key.

11. Edit the window components by double-clicking it in the tree view


When double-clicking the window, its base sketch becomes visible again, and we get its edit interface: At the left, a list of the loops found in the base sketch, at the right the solid pieces built on it.

Begin with removing the “Default” piece.

Then, select the first loop (Wire0). It will highlight in the 3D view. Press the “Add” button to create a new piece from it. Give it a name, make sure the correct wire is set, and give it a 6 inches extrusion. The offset should stay 0 since we want it placed “on the ground”.

The “Type” value will be used to attribute materials to the window (not implemented yet), so you can currently leave to “Frame”.



Then press the “Create component” button. Sometimes FreeCAD fails to guess correctly the direction of the extrusion, and you must therefore edit your component and change the 6 inches value by -6 inches.

Repeat this for all the needed pieces:



When closing the edit panel we obtain the object above. Note that by default, window objects are represented semi-transparent. Since this will actually not be a window, we can just turn that off by setting its Transparency value to 0 in its View properties.

12. Add the cover panel
We now have our panel frame, but not the base panel itself. To do that, the best way is to open our base sketch, and add a new rectangle. Remember though to not make any of the corners of that rectangle coincident to corners of other rectangles, in order not to confuse our window object, which might require us to redo the whole series of components if the order of the loops would change.

We can therefore constrain this new rectangle 0.05 inches inside the perimeter. This will require us to place 4 new constraints.

We can then edit our window again, and add new components. We can see that a new Wire has been found. This time, we will use it to add a 8mm polycarbonate panel (note that you can mix units without problems in FreeCAD, and write “8mm” as the thickness, even if you are working in inches). We will also give it an offset of 0.05 inches, so it is slightly offsetted from the frame, just for consistency, as all the parts of our object have that offest between them.



We can now create another component based on the same Wire, in order to place another panel on top of our frame. This time, we will give it an offset of 6.05 inches. Our panel is finally complete:



13. Turn the window into another type of Arch component
This is not really necessary at the moment, but it might become important later when we export or work to other construction-oriented applications, for example via IFC, we don't want our panel to be identified as a window.

The Arch workbench of FreeCAD provides an easy way to handle that, which is that any object type can always become another, by being the base of another type. In this case, let's turn our window into a Panel object, simply by selecting the window and pressing the Panel tool.



Notice that the color of the resulting panel has changed, that is because materials support in FreeCAD and the Arch module is still incomplete. When it is finished, this will be properly handled.

14. Duplicating the panel
Our panel can then be duplicated and copied over in several ways, for example by using copy/paste. But a more interesting way is to use the Draft Clone tool (also present on the Arch workbench, like all other Draft tools). The Clone tool keeps the relationship between the base object and its clone, so any modification to the base object will reflect in all its clones.



In the current development version of FreeCAD, clones of Arch objects are now Arch objects themselves too.

15. Rotating and positioning the panels.
While the assembly workbench of FreeCAD is not ready yet, we need to position our pieces manually, either by manipulating their Placement property, or by using the Draft Move and Rotate tools, which are actually only visual ways to modify the Placement of objects.

Both Draft Rotate and Move tools make use of the Draft Snapping system. Different snapping positions (endpoints, midpoints, etc) are available, that can be switched on/off, allowing to perform very precise positionning and rotations.