More on FreeCAD, or Generative Components-like workflow on Linux

I did this interesting little chain yesterday, you might find it interesting. With a bit of trickery, you can really do some interesting parametric-generated architecture design on linux, only with open-source tools. And when I say architecture design, I mean the whole production chain, from conception to paper prints.

If you don't know Generative Components, it's a piece of software made to design architecture compositions based on sets of parameters that you can make evolve to create "beautiful" parametric-looking structures... I recently discovered an amazing application called StructureSynth which does exactly that: create geometry based on parameters and rules.

You design simple rules in a very simple language, such as: "Rule n°1: move 2 units in x, rotate 15° in y, then create a box, then reapply Rule n°1". Then, all the magic is here: You can specify another, different Rule n°1. The program will interpolate both randomly, and create randomic variations:

The version of StructureSynth in the Debian repositories comes with a set of exporters for different renderers such as Sunflow, and Blender, (with the help of a blender import script) which I used here to import the geometry:

The blender import script imported all the geometry as one single object, so I first separated it in original parts (Edit mode, select all, P -> separate all loose parts), then exported it as an .obj file, that < href=>FreeCAD can read. Of course the blender import script could easily be adapted to FreeCAD so we could skip the Blender step, but I found it interesting to show how the geometry passes from one to another without any data loss.

FreeCAD can work with several types of geometry. Our .obj file was imported as Meshes, but much more interesting is to work with bRep objects, which are FreeCAD's "native" object type, and permit much more complex functionality (they have the notion of "solid", so boolean ops work perfectly, they can have real curved surfaces, etc). So I converted my meshes to brep parts with a macro, and added a couple of lines just to show you how 3D and 2D begin to mix well in FreeCAD.

The Draft module in FreeCAD can already give you nice results when putting your scene geometry on a sheet. Of course the Draft module is made for 2D, so you'll notice the 3D parts are not displaying very correctly (face inversions, mostly), but that problem will be addressed soon.

To show you better the possibilities of the Geometry-to-paper process, I did another example. It suffers the same problems as the one above, but the control over display (colors, line width, texts, etc...) begins to be good.

This is a quick structure I did just to play with the process, and here is the SVG output:

SVG files already carry informations such as paper size, and it is as reliable as pdf (you can easily turn them as pdf with apps that support svg such as Inkscape or directly from FreeCAD). At the moment the informations in the template (Project author, etc...) cannot be edited directly from within FreeCAD, so you need to edit your sheet in another app, but that also will probably be addressed one of these days.