Wikihouse porting tutorial

Work in progress - Do not translate

This tutorial will show you how to convert SketchUp files used by the WikiHouse project to FreeCAD, making use of the Arch Panel tools in FreeCAD. The result is a full copy of the original SketchUp file, except that it has become fully parametric.

Since the Wikihouse project is open by nature, files are easy to find on the project website, but also on the SketchUp 3D Warehouse or in the project's github repositories. The preferred format used by the project is Sketchup, so most of the files you'll find are in that format.

In the following tutorial we used the Chassis file from Wikihouse's Microhouse subproject.

The first thing you will need to do is to open the file in SketchUp and delete everything you don't want to export. We will only export one section of the Microhouse, so everything else must be deleted.



The Wikihouse elements, in SketchUp, are made in a specific way: By adding small "pieces" together in order to create the different components:



This is not how we will proceed in FreeCAD. Since one of the most powerful features of FreeCAD is Constrained Sketches, we'd better take advantage of this, and base all our Wikihouse elements on Sketches. That way, modifying any part can be done in the Sketcher, which is much more comfortable.

In order to turn our SketchUp objects into FreeCAD sketches, which can then be used to create Arch Panel objects, we need to extract one, flat face from each wikihouse piece. The thickness will be re-added later, in FreeCAD, directly in the Arch Panel properties. This way, we will keep it parametric as well. To turn each wikihouse component into a single, flat face, enter each component by double-clicking it, then select each sub-component, and right-click -> Explode, until all sub-components are exploded, and your component is composed only of faces and edges:



Once this is done, select everything in your component, and unselect, by Shift + double-clicking them, each frontal face of your component. Be sure to double-click instead of single-click, because otherwise you will only unselect the face and not its border edges (which we will need to keep as well). After that, we will have unselected everything we want to keep, so we only need to press the delete key. Now our component is only one big flat face.



Repeat this for each component. Since many are duplicated, this is not as huge a task as it looks. Besides, if you are not familiar with the Wikihouse system, this step will give you a pretty good understanding of how it works.

When our piece of house is fully made of flat elements, we can select everything and export it to a .dae file, and then import this file into FreeCAD. Be sure to mark the "triangulate all faces" option in .dae export option.

There is a nasty problem for which I haven't found a better solution: Meshes exported from SketchUp to the .dae format have their faces duplicated. Each face becomes actually two faces. The easiest way I have found so far is to open the exported file in Blender for repair:


 * 1) Open the dae file in Blender (File -> Import -> Collada)
 * 2) Select a component, and hit TAB to enter edit mode
 * 3) Press A to deselect everything, then A again to select everything
 * 4) Press W -> Remove doubles
 * 5) Press TAB to exit edit mode
 * 6) Repeat for all the components
 * 7) Save a new dae file (File -> Export -> Collada)

Note that it might be easier to go by parts and treat + export objects group by group, as we did below, we exported only the first layer, made of yellow elements in SketchUp. These elements will come into FreeCAD as Mesh objects:



The next step is to create wires from each of our meshes. There is a convenient Macro named Macro Extract Wires from Mesh that does just that. Install it (Refer to the Macros page for instructions), then one by one (you can do them all at once, but this macro takes some time), convert all our meshes to wire objects:



We could now already make Arch Panel objects from each of these wire-like objects, simply by selecting them and pressing the Arch Panel button. However, their base shape wouldn't be parametric. We now have several options: We could turn each component into a sketch, using the Draft Draft2Sketch tool, but these will be rather heavy sketches, and might not be very manageable on a slow machine, or we could turn each individual wire (the outline and each hole) of the sketch into a separate sketch. This would allow us, for example, to reuse a typical hole, make it only once, then duplicate it with Draft Clone to make the other holes. This way, you would only need to edit one to edit them all.

The Extract Wires from Mesh macro also sometimes fails in finding closed wires inside a mesh, which will not produce correct Panels. An easy procedure to recompose the wires of a component is this:


 * 1) Select the component, optionally hide everything else to see better
 * 2) Draft Downgrade it. It will be exploded into a series of individual edges
 * 3) Start selecting the holes with Ctrl or by using Shift + B to box-select
 * 4) Press Draft Upgrade to turn back each hole into an individual wire
 * 5) Finally select all the remaining individual edges in the tree, which form the outline, and Draft Upgrade them
 * 6) Select Part->make Compound to join back all these wires into one object
 * 7) Select the compound and press the Arch Panel button



There are many possible strategies here, depending on how editable and precise you need the result. The Arch Panel object needs a base object made of wires. It doesn't matter how this object is made, if it is a single sketch, or, like in the example above, a compound of different sketches or draft object.

It is also possible to do that part later, you could already create Panels from each of the component, and at a later time, change their base object into something more parametric like a sketch or a series of sketches.

Also, make sure you don't redo any duplicated part. Instead, select the Draft Clone tool to duplicate parts based on the same profile, so they will all share one same profile object. Then, since we have the outline at the correct place to use as a guide, it is fairly easy to rotate and move the clone into its correct position with Draft Rotate and Draft Move.

After a while, all our Microhouse section is done.



We can now easily create the cut sheets, which are DXF files that will be sent to the shop that will cut the actual panels.