Hi, this is my blog, and also a guestbook. I publish stuff I do from time to time. Be welcome and feel at home, have a coffee and don't hesitate to drop me a line or two. All languages are highly welcome, especially the most exotic ones (nederlands, bij voorbeeld...).

You are currently viewing only posts tagged as cad in this guestblog.

Click here to go back the blog home page, or browse by tag: sketches, freecad, opensource, linux, works, architecture, projects, 3d, blender, detail, talks, inthepress, animations, opensurce, firefoxos, bede, idsampa, photo, gaming, wordpress, webdesign, Architecture, trilhas, orange, cooking, or search the 2016, 2015, 2014, 2013, 2012, 2011, 2010, 2009, 2008, .

in categories  freecad  opensource  permalink:  398   posted on 31.08.2017 3:42
From Yorik

FreeCAD Arch development news - August 2017

Time for our monthly development report, explaining a bit of what I did this month. Thanks again to everybody who help me on Patreon, each month we're getting higher! If you don't know about it yet, you can help me to spend more time working on FreeCAD by sponsoring me with any amount you want on Patreon. Some of you have asked me if it was possible to give me some money directly via PayPal, well it sure is! My PP email is yorik (at) uncreated (dot) net.


This month however I will have much fewer to share than usual. There are two main reasons to this, one is that I've been doing a lot of bugfixing, which is too boring to talk about here. It is boring to do too, of course. Any coder will tell you that it is much more fun to develop new features than fix bugs. However, they are very important. The stability of an application depends heavily of the relentless testing, identifying and fixing of bugs.

I saw where FreeCAD comes from, and when you compare it with FreeCAD as it is today, even with all the remaining bugs and problems it has, the evolution of its stability has been phenomenal. All thanks to this: tiny bugfix after tiny bugfix...

There is a story I always like to tell about bugs. We architects are usually very sensitive about errors. Doing a mistake is a terrible thing for an architect, and results in huge blame, shame, guilt. You always try to show that you know everything. As you can imagine, this also comes with a strong tendency to hide the dirt under the carpet.

When I began to work with Jürgen and Werner on FreeCAD, it is one of the first things that surprised me much: How these guys treated their own errors as a normal thing, a bug. Bugs happen. You are human, you make mistakes, the same way as you breathe or eat. It wouldn't make sense to feel guilty for this. Since then, I always try to treat architecture work like that too: Consider your mistakes as a normal part of what you produce, try to make them appear (unit tests for architecture?) so they can be processed and fixed.

Jürgen and Werner and all other FreeCAD developers, if you guys read this, thanks! I am learning a lot with all of you.

Draft Scale UI

One of the things I did that was really sorely needed is a better User Interface for the Draft tool, that was really clumsy (you needed to "indicate" graphically the scale factor). Now there is a simple, proper dialog to scale things up/down, which allows you also to choose the result: Scale the original objects or produce a Draft Clone (where the scale can be changed later).


The other reason why this report will be less interesting this month is that the construction of our WikiLab project has started yesterday, so I simply had less time to work on new FreeCAD stuff. There has been quite a lot of work to do these last weeks to have all the construction documents ready before construction start, and the approval process ended up not being as smooth as we thought either (it is actually not entirely finished...).

But all this is also not work for nothing. The main issue with approval is, as you might imagine, fire resistence. Our WikiLab is made of wood, which burns. The risk for human beings is extremely low (the room is very small, only holds a few people, is escaped very easily, nobody will sleep there, etc), and the OSB panels we are using already have a slower buring rate because the glue they are made with acts as a fire retardant, but the problem is that there is as of today very little official record of all this. People in charge of approval basically want to see a document that guarantees them that such wall will hold a certain time under fire. These documents don't exist yet, because people rarely build walls with OSB panels, so panels manufacturers have little interes to pay for the research and fire tests needed to obtain such guarantees. Plus, these tests are very specific, so in our case a fire test would be valid only if it was made with the exact same wall composition as we are using.

This is a well-known problem when using experimental systems. Convincing authorities is very hard. But that is also where this process is interesting and useful, when done, we will have created a precedent, which will lower the difficulty for all subsequent ones, because they'll be able to refer to this one.

Coin-based views

The work on the WikiLab construction documents also allowed me to play further with another idea I had: The 3D view of FreeCAD is pretty nice: It is anti-aliased, line style, width, thickness, color, transparency are configurable by object, it has a nice support for fonts, and even things like transparent textures. So instead of the heavy ans slow workflow needed to produce "traditional" 2D views with the Drawing or TechDraw workbenches, you could simply grab a nice view of your 3D window.

So far these cannot be exported "as is" to vectorial 2D. Exporting a 3D view to PDF is supported by the Coin3D engine (which powers the 3D view of FreeCAD), but the result is often buggy, the engine struggles at rendering some complex 3D situations to PDF.

However, exporting a 3D view to bitmap formats usually works very well. Most architects who will read this might dismay in horror at the idea of exporting architecture work as a non-vectorial format, but there are many "but" here.

First, it makes sense of course to export your work in a CAD format, such as DXF or DWG if others need to work with it. But a PDF? Will anyone ever import a PDF to work on it in a CAD program? That would be pure masochism, there wouldn't be much you could do with it. Also, when working in an open-source way, or any case where your base files are more easily acessible to others, and are in an open format, all this discussion looses a lot of its meaning... If a person can get a FreeCAD file, why would that person need a PDF file

The next advantage of a vector-based format such as PDF is the reduced filesize. However, this is true for basic line-based work, but as soon as you use more fancy things such as transparency or textures or gradients, most CAD systems will turn that into bitmap anyway, so much for the file size. And large complex areas filled with one color can often be smaller in size in bitmap than vector format, where havy triangulation is needed (which by the way often stays visible in the PDF file). So there is not much difference at the end.

The third advantage of vector-based files is that you can zoom in and things continue to look sharp (this is certainly only useful for on-screen viewing, has any of you ever printed a PDF file at higher scale than 1x?). But this is just a matter of resolution, just save an image with enough resolution to be well readable when zoomed a lot, and this problem disappears. Plus, even if your image is embedded in a PDF file, zomming is blind-fast compared to zooming vector-based PDF files.

In the last years I've used bitmap files more and more to show traditional CAD work like floor plans. You can do all kinds of fancy things in Photoshop Gimp, and if you manage your layers well, it is totally manageable to reimport a layer from your CAD/BIM app when something changes in the project.

So I used this a lot in these construction documents. By using Working Plane Proxies you can easily configure views that you can recall anytime, so it is easy to produce a new image that is identical of the last one when the project has changed. And the Tools->Save image dialog of FreeCAD allows you to save an image with a very high resolution, which gives a very sharp result.

There are sill issues to solve, such as calculating the resulting scale, or ensuring that texts and dimensions have coherent and consequent size across different views, but that shouldn't be hard to solve.

Of course this is not the holy grail. There is still a series of situations where you'll need vector-based output. But when you try to show a project in different ways, like we did here, it might become a lot more convenient.

Arch Grid

The only real new feature I've been working on this month is the Arch Grid, that I just merged. A tool to construct a grid object, like you do in a spreadsheet: define columns and rows, change their sizes, and merge cells together.

This object can then be used to perform a series of other operations with Arch objects, for example spread objects on its vertices, face centers or edge midpoints, or use it as a base for windows, instead of a sketch, or for any other kind of situation such as constructing railings.

Download that test file here (you might need to wait a bit, because I just committed the change)

That's it for this month I'm afraid, sorry I couldn't do more, next month will likely be like this one too as we will be building the WikiLab, but you can count on me to share all I can during the construction. Almost all our wooden part are cut and ready to be assembled, the masonry base is being built now, and the assembly is scheduled to start on september 12th. If you are in São Paulo at that moment, don't miss the opportunity to participate!

Thanks again to everybody who is helping this adventure to come true, each month a step closer to a full, feature-rich open-source BIM application!

in categories  freecad  opensource  permalink:  396   posted on 21.08.2017 18:12
From Yorik

About parametric IFC files

The title of this article sucks, I know, couldn't think of anything better...

This is a concept I wanted to play with since a long time, and last month I was finally able to setup a proof of concept. The only missing part was to write an article explaining it, so here it goes.

For who is not familiar with the BIM or parametric 3D world, IFC is a file format used to exchange BIM data. BIM stands for Building Information Modeling, and is basically "3D parametric modeling for the construction industry".

There has been quite a fuss for a long time on the internet about this. "IFC is not parametric", you'll read around. "So it cannot be used to transmit model intelligence", Revit users (and specially sellers) will tell you. This always annoyed me... After all a file, that is stored on your computer, is a "dead" thing. It cannot perform computations, it's just a storage for data, so how could it be intelligent? There is no such thing as an "intelligent file format" except maybe in the mouth of some astute marketing gurus...

The "intelligence" doesn't lie in the file. It is the application that does intelligent things with the data it finds in the file. Also consider what a parametric object is. A parametric box, for example, would have 3 parameters: Length, width and height. A program would then construct a box geometry from these 3 parameters. The 3 parameters are everything that is needed for the program to construct the box. If you save these 3 parameters to a file, when reading the file back, the same program will be able to reconstruct the box, just knowing its length, width and height.

I'm using in this text words like "parameters" or "attributes" or "properties" more or less indifferently. It means basically, a piece of data (number, text, whatever) that is attached to an object, for example the length of our box.

This idea comes from an old discussion I once had with Inkscape people. Inkscape uses the very well-known and very standardized SVG format, which is readable by a huge amount of applications, including almost all web browsers. The SVG specification is something tighly maintained and controlled by the same consortium that maintains HTML and almost all the web standards.

However, Inkscape needs to save things in its files that are not part of the standard SVG specifications. They do this by writing standard SVG files, but adding custom properties to standard objects, which is something the SVG specification allows.

So Inkscape, when reading that file, will see the custom properties, and be able to use them the way they are meant to, while other applications will simply ignore those properties, and will only consider the standard parts.

An example of that is the "star" tool of Inkscape. The star object created by this tool is parametric, that is, if you edit the star after you created it, you will still be able to modify the number of spikes, the radius, etc. If you save the file, and reopen it, you are still able to change the number of spikes.

If you open that same file with any other SVG application that is not Inkscape, they will show the star correctly, but won't be able to edit it. Inside the file, the object is a standard SVG path object like this (the data inside the d parameter are point coordinates with instructions such as Movement or Line) :

<path d="M 100,100 L 90,75 L 100,95...">

This is standard stuff, readable by any SVG app. Inkscape adds its own attributes like this:

<path inkscape:type="star" inkscape:sides="5" inkscape:cx="90" inkscape:cy="95" d="M 100,100 L 90,75 L 100,95...">

"inkscap:sides" or "inkscape:type" are additional parameters that only inkscape will see when reading the file. Inkscape wil then know that this path is actually a star, and will be able to re-generate a different path data if you edit the star.

It was thought right from the start that applications might want to add such custom content to their SVG files, and therefore the SVG specification provides this nice namespace system where you can write your custom additions by preceding them with a name that identifies your application (inkscape: in this case), which turns it easy for you, the Inkscape developer, to identify Inkscape-specific content in the file. If you use such namespaces, the SVG specification even forces you to add a line like this in your file:


So other developers, when reading your file, when they see your inkscape: attributes, will not need to google for it, they will be able to go right to a page where you have carefully documented it all... Isn't that nice?

So basically here we are: the same concept can be applied to IFC. IFC supports adding custom properties to any object. Let's say you have an application that draws chocolate walls (yes, it's a BIM app for cake makers). You could make your application save your cake as an IFC file, and store its walls as standard IFC walls. But you would add a special property, for example: chocolate_type="milk chocolate". Your cake would still open in Revit, but only your app will see and read and use the chocolate_type property and will be able to recreate the cake faithfully and parametrically (you will be able to change the chocolate type after loading the file).

So I added this to FreeCAD, as a very simple proof of concept. There is now an option in Edit -> Preferences -> Import/Export -> IFC named "Export full FreeCAD parametric model". When you switch it on, when exporting to IFC, the resulting file, instead of being formatted like this:

IFCWALL (made from extrusion)
 ->   EXTRUSION (made by extruding a base polygon 2m high)
  ->      BASE POLYGON

Now contains additional properties like this:

IFCWALL (made from extrusion, and using 'FreeCAD' property set)
 ->   EXTRUSION (made by extruding a base polygon 2m high)
  ->      BASE POLYGON
  ->      PROPERTY ObjectType="Arch.Wall"
  ->      PROPERTY Width="20cm"
  ->      PROPERTY Length="200cm"
  ->      PROPERTY Height="200cm"

See the full IFC file here, and the originating FreeCAD file here

The IFC importer of FreeCAD has also been adapted so when reading that file back in FreeCAD, you obtain faithful, 100% identical parametric objects as when you exported it. In fact, when FreeCAD finds an object inside an IFC file that has a "FreeCAD" property set, it will simply skip all the rest and reconstruct the object only from the contents of the property set.

But other applications, unaware of the FreeCAD contents, will still see the "standard" definition:

So far this is just a proof of concept. There are many property types of FreeCAD that are not yet supported. But it would not be much work to extend the system to support them all.

Now I can hear the arguments against all this gathering in your head. What's the point, if other apps won't be able to do anything of that shit? What if the other app modifies the standard IFC content, but leaves the FreeCAD property set intact? FreeCAD will ignore the modified version. Etc, etc. The counterarguments are many.

However, the discussion has shifted. What if such "extra" parameters/properties/attributes were clearly documented somewhere? What if, for example, Revit would export its walls with a defined set of properties that would allow it to recreate the wall 100% as it was before exporting? We could make FreeCAD see, use and modify those properties too. Or, even better, have a common definition that says "all walls must have length, width and height properties". That actually exists up to some very basic point in IFC, you can add a "standard wall property set" to walls, that contains such generic properties that should be common to all walls. I have never seen that system being used very much yet, though.

So is the problem not in defining things correctly, instead of blaming IFC for not being technically fit to the task? The model works well for SVG, it would be really worth trying...

Jon Mirtschin, the famous IFC guru behind GeometryGym, experimented a lot recently with similar concepts. The difference with his approach is that he found a way to bind properties to certain values in the IFC file. Simplifying a lot, his file looks like this:

IFCWALL (made from extrusion)
 ->   EXTRUSION (made by extruding a base polygon by the value of "Height")
  ->      BASE POLYGON
  ->      PROPERTY Height="2m"

So the relationship between the extrusion value and the Height property is written in the file. This is obviously a much more interesting solution freedom-wise. Everything is stored inside the file. You can invent any kind of parametric relationship like this. And when you remember that GeometryGym is developed principally for Grasshopper, where you could read that file and reconstruct any kind of wild, crazy relationships written in the file (for example: The height of the wall equals to half the width of the whole facade, minus the height of the front door), this makes a lot of sense.

Image source

But the question remains: What would Revit do with a file that contains a definition like: "The height of the wall equals to half the width of the whole facade, minus the height of the front door". I think that's something where both approaches meet the same issue: Sooner or later, some of the parametric content will be discarded by some application, that will say "Here we don't construct walls like that. We don't allow this".

But my point in this article was to show this: Not only IFC can perfectly well contain parametric objects, it can even as Jon's example shows, contain your wildest parametric dreams, actually probably far beyond any other proprietary file format out there can do. Implementing parametric relationships in the IFC file format is something that has been researched for quite some time already, and there are other further plans too.

An IFC file that can do the full round-trip (be exported from your application and reimported with 100% faithfulness and all its "intelligence") is totally possible, that's now clear and proved. The remaining problem is actually not a technical issue, but much more a communication issue.

What if the consortium behind the IFC format would issue a chart, with things like "The parametric properties that a wall should have", or force you, if you add custom properties, to provide an URL where you explain it all, like SVG does? These things would not make the problem solved tomorrow, but would allow to progressively structurate and consolidate parametric IFC files, that could progressively become fully editable by more and more applications.

in categories  freecad  opensource  permalink:  389   posted on 01.08.2017 20:19
From Yorik

FreeCAD Arch development news - July 2017

WTF, July development news in August, I hear you yelling (it's not only me!) But there was some last minute topic I really wanted to complete to include in this report... But now that it is complete, I think it deserves another post on its own, so I'll only mention it here briefly. It will be worth it, I swear

First off, I'd like to thank once again everybody who is contributing to my Patreon campaign and through there helping me to spend more time working on FreeCAD. This month I passed over USD 500/month, which becomes pretty important. In Brazil, where I live, the "official" salary of an architect (that is, recommended by the national council of architects) is around USD 2500/month. In reality, only some architects working in public institutions earn that much, in the private sector the usual salary is about half that amount. To put things in context, the 10% bar, that is, the salary you must earn to be in the richest 10% in Brazil is around USD 1100. So my 500/month begin to represent some consequent weight (it's almost a teacher salary). Yeah, these things make you think a LOT about what value is. And for who.

I started this Patreon campaign not really knowing where it would go and if it would allow for something serious, but now I begin to really believe it can change a lot. Working half-time as an architect and half-time as a FreeCAD coder is an idea I'm growing really fond of...

But enough about me, there is quite a lot to tell this month.

Parametric IFC

This is the big thing I wanted to merge before writing this report. I'll post something more detailed soon, but the idea is basically to export all the parameters of FreeCAD objects to IFC. So when reimporting that IFC file in FreeCAD, parametric objects are fully and faithfully restored. The idea is to show/prove that yes, IFC is totally adapted for parametric design. More on that very soon.


So the big thing I have been working on these last months is now merged in FreeCAD. I have been posting about it in the previous report already. It is an algorithm that organizes shapes to fit into a containing shape. This is useful in CNC operations, when, for example, you want to cut out a series of wooden pieces out of a wood panel, and want to stack all these pieces the best possible way on your panel.

There is now a nesting tool in FreeCAD, located in the Arch workbench, under the panel tools:

The system is simple, you launch the tool, select the containing object, then add the objects to be placed inside. Tune some parameters if needed, and launch the calculation. It is currently not much optimized and quite slow. When the calculation has finished, you can see a preview of the result, and if you apply that result, the object get moved and rotated to their preview position.

The next two features I'll add are support for margins (you usually don't want te pieces to touch, but leave a certain margin between them) and allow for non-rectangular container, so for example you could reuse scrap material easily. Then it'll be time to attack some optimization.

The nesting algorithm itself is separated from the tool above, so it could be used differently by other tools and workbenches. And also, it can be recoded in C++, which should make it run a lot faster. That will be done too later on.

New axis behaviour

I also introduced several changes to the Arch Axis system. There was already a way to make a series of structural objects spread over the crossing points of different axes, but it was not very easy to find and weird to use. I believe the new system is much cleaner and powerful. It basically works like this now:

  • The old Axis System tool is still there, it has simply been renamed to Axis. It has a different icon ( ) and it still does what it did before, that is, it creates a 1-direction series of axes. For example, all the A, B, C axes.
  • That tool has also gained a couple of extra features: You can now give it a series of labels, one for each axis, that can be displayed next to each axis (you can fine-tune the position). And you can turn the bubble off. This allows to use the axis for many different scenarios, such as indicating levels.

  • There is now a new Arch tool, called Axis System that now really does what the icon means: Organize several axes series into one system. It can take two or three axes objects (you can edit that by double-clicking the axis system in the tree). Its function is basically to calculate the intersection points between all the axes.

  • Not only structures, but all Arch objets can now be spread along axes or axes systems. For that, they gained a new Axis property. By setting this property, you can make your object be duplicated automatically. The rule is as follows:

    • If the Axis property points to an axis system, the object will be duplicated on each intersection point of the axes in the system
    • If the Axis property points to a single axis, the object will be duplicated once on each axis
    • Otherwise, if the Axis property points to any Shape-based object, the object is duplicated on each vertex of that shape.

    Now I think the situation is much cleaner, it's much easier to first create your axis systems properly, then make your other arch objects make use of it, and change/undo all this whenever needed. Also,by using any other shape as an axis system, many wilder possibilities become possible, such as using a sketch to drive the position of Arch objects, etc.

Working Plane Proxy enghancements

The Draft Working Plane tool is something you use constantly and everywhere when working with Arch. It is one of these tools that grew more and more complex over time, and that is now quite a powerful behemoth... For who is not used to Draft/Arch, it is responsible for setting a 2D plane where all the subsequent Draft and Arch operations will take place. The location of this working plane is represented by the Draft grid, that shows the position and orientation of the plane, and also gives a visual interval (the grid size), which you can also snap to.

The current possibilities are fair already, you can set that working plane quickly to one of the origin planes (top, front, side) or select a face and make the working plane adopt that face orientation and position.

Now I added a new Working Plane Proxy tool in Draft, that stores the position of the current working plane. It is represented on screen by a small widget (the size is customizable).

When selecting this widget and pressing the working plane button, the working plane will return to the location/orientation of the widget. You can even move and rotate the widget by conventional ways (it has a Placement).

The idea is that you can now save important working plane positions in your document, precisely, without the need to have "real" geometry there.

This proxy object also has two more interesting features: a Restore View property, that will, when restoring the working plane to the proxy position, also restore the camera position. So you can use the proxy object to store not only the position of the working plane, but also the view angle. You can change/store the current view anytime to a proxy object, by right-clicking it in the tree.

The other feature is a Restore State property that, when restoring the working plane, will also restore the visible/invisible state of all document objects (the ones that were present in the document when storing those states, that is). Here too, you can store the current state anytime by right-clicking the object.

With these two features, we are paving the way for a more conventional BIM environment, where you can switch from working on one floor to another floor, and all your environment (working plane, view orientation, visible objects) will change accordingly.

Next thing I'll look at is how to tie that to Floor objects, but these floors need a good refactoring first...

Rebar / non DAG workaround

The recent GSOC work on Arch rebars (I strongly suggest you to have a look at the impressive work being done by Amritpal, our GSOC student, and several members of the community around, the image above is taken from there) also gave us the opportunity to tackle a long-lasting inherent design problem of the Arch workbench, the famous non-DAG bug. DAG stands for direct acyclic graph. It describes a type of graph or tree which all flows in the same direction, where it is forbidden to go backwards. The relationships between objects in a FreeCAD document is a DAG.

That means the dependency chain between FreeCAD objects must always flow in the same direction: You can object C that depends on object B that depends on object A, but you cannot have object A that depends on object B that in turn depends on object A. That would be a cyclic dependency (you cannot know which one comes first, A or B) and is forbidden in FreeCAD (if you find yourself in such a situation, FreeCAD will print non-DAG error messages and refuse to process anythingmore until you fix the problem).

Two Arch objects were constantly creating non-DAG situations: Windows and Rebars. The window, for example, often depends on its host wall (in order to know on which face it lies) and the wall also depends on the window to know how to drill the opening where the window is placed. The workarounds I had imagined until now to circumvent the problem were really not very satisfactory (for example create a second wall, so the base wall and the wall with the opening were two different objects).

With the Rebar, we now experimented a new idea that seems to solve the problem for good. It is not the "parent" object that knows which "children" it holds anymore. It is the child that knows which "parent" it belongs to, and the parent is not dependent on the child anymore.

That introduces a bit more complex system: The wall doesn't know which window is part of itself anymore, so when updating its geometry, it now has to "scan" the scene to find the windows it must use to drill openings. But this is a very ponctual and unperceptible slowdown, and I think totally worth the much cleaner situation and the vanishing of the dreaded non-DAG problem.

The Rebar object already uses the new system, and it seems to work very well, so I'll adapt the window to use the same system in the coming days.

Cabinet design

Another talk I had with a FreeCAD user (that will soon become a more stucturated plan) lead me to this interesting experiment, where you take a simple Part Box, and use it as a "driver" shape for inner objects, like the panels and doors of a cupboard. This is an interesting workflow, and I liked to be able to work with simple boxes, that contain their own more detailed components.

The test file is here if you want to have a look at how it works.

I already had other discussions before about furniture/cabinet design with Regis and others, it would be a good time to think about a proper workbench for it.

Talking about Regis, one of the most knowledgeable Arch/BIM FreeCAD users around, have a look at the impressive series of videos he has been producing lately about BIM work in FreeCAD...

Arch space bounds

I also added UI controls to edit the boundary objects of Arch Spaces. Spaces can be based on a solid object (their shape is therefore the shape of the solid object), or a set of boundary faces (the shape of the space is therefore the bounding box of all these faces, subtracted by the volumes - or half-spaces - behind those faces), or a mix of both (the shape of the space is the shape of the base solid, subtracted by the half-spaces behind the boundary faces).

There was until now no way to edit the list of boundary faces without using the python console, this is now solved.

That's it for now, sorry about posting late! Still a lot that I wanted to do this month that will be for the next month, but step by step we're getting there. Thanks for reading, thanks to everybody who help me to make this come true, and as always, comments are welcome!

in categories  freecad  opensource  permalink:  372   posted on 29.06.2017 20:08
From Yorik

FreeCAD Arch development news - June 2017

Hi all,

This is time for a new review of what has been going on in Arch development this month. Quite a lot actually, it's exciting that several things I've been working on during the last couple of months begin to flourish into pretty interesting and usable features.

There is another interesting thing happening, is a very good synergy between the WikiLab project I'm working on now, which you must grow tired of hearing about, and FreeCAD developement. FreeCAD fuels the project development, which in turns fuels FreeCAD with bugfixes and new features. Me and other FreeCAD community members are really keen to pursue and extend that synergy further with other projects.

As always, don't forget you can help me spending more time on FreeCAD, by sponsoring me via my Patreon campaign. As a side note, that campaign is really taking flight, sooner than I had expected, I'm highly overdue to update the campaign page, and add some whistles and bells such as goals and rewards.

As a possible reward, I am thinking about doing some short videos, explaining in detail specific feature of the Arch workbench, and more generally, doing BIM with FreeCAD. For example, one about walls, one about working with imported dwg files, things like that. These videos would be, in a first time, available to Patreon supporters only, as a kind of present to thank them, and then, after a couple of months, added on youtube for everybody. What do you think? Good idea? Lousy idea?

So enough of this, here is the real stuff:


If you are following the progresses of our WikiLab project, you might have seen that the crowdfunding campaign ended successfully, and we are now getting started. The wood panels have been ordered already, the final cutting sheets are being made, and the cutting should begin next week. This will take roughly two months, during which we will contract a constructor to build the foundation and base walls, and hopefully everything will be ready to build the WikiHouse-based part, at the end of August, during the university holidays, and just before the rainy season.

On the image above is a first "rib" we've been mounting this month, as a kind of proof-of-feasability, and to boost the crowdfunding campaign too. It went amazingly well, this element was built in about 2 hours by 5 people, it is very easy to understand and build, and the solidity is really impressive.

I'm also starting to write a manual (in portuguese) that willbe the actual construction document. No plans and sections in this project!

There are still several details to solve, some of them have been already discussed and solved on the WikiHouse community slack, which is a really cool way to solve these issues collaboratively, something we've been doing with OpeningDesign for quite some time already

Last month I also had an online conversation with Harry Knight from the WikiHouse Foundation, and wrote an article on Medium.com about our project. Check it up!

We are also studying small changes and improvements to the design, such as holders for shelf supports, and ventilation holes at the top, that can be closed with 3D-printed custom lids.

Draft Label

This is a new feature I've been working on, inspired by Revit's tag objects. In Revit, you have different types of tags, that you can attach to an existing object. That tag will then automatically display a certain information about the attached object. For example, material tags will show the material of the object, door tags will show the door number, etc.

In FreeCAD I decided to go for a bit more generic approach: There is a new generic Draft Label object, which is made of a piece of text and a two-segment line, which can have an arrow at its end. The text can be made to display some property from the attached object. At the moment only a small list of properties are available, and can be selected from a drop-down box, but the system is very extensible and you could have those Labels display just any kind of information that can be retrieved from the base object.

As always, this is only the first, rough version, it works, but over time and use it will certainly refine ito something more solid and powerful. It should also gain additional feature so it can be used for all the Revit scenarios: show component numbers, space tags, etc. All these should be displayable in a distinct manner (in a rounded rectangular frame, in a circle, etc...)

Shuttleworth Foundation

The other big news of this month, is that I've been elected for a Shuttleworth Foundation Flash Grant! Thanks to OpenSourceEcology fellows, who indicated me! I still don't have fully formed plans for what to do with the money, but a couple of things I definitely want to do: 1) Help founding the wikilab project above (that is done already), 2) Turn the FreeCAD manual into a printed book. Most of the work is done already, it still needs a professional editor review, then it can be printed and sold, which nowadays is very easy thanks to sites like lulu.com. And 3) extend what I'm doing with the money from my Patreon campaign, spend more time coding for FreeCAD. I would be able to work half-time on FreeCAD for a coupe of months, I'm trying to see how to set that up now. As a point 4), I might have more/better ideas later on, still thinking about it.

GSOC / Rebar

This year, FreeCAD has received four student projects for the Google Summer of Code. For who doesn't know, it is a program by Google to sponsor students to work on open-source projects during the (northern hemisphere) summer months. We are now approximately at the middle of the coding period, and our 4 students are doing great!

I am myself mentoring one of these projects, together with Bernd, which is Amritpal Singh's proposal to extend the Reinforcement bar tools in FreeCAD's Arch module. So far so (very) good, Amritpal is surprising us with the quality of his code, which you can already test if using a development version of FreeCAD: Just install the Reinforcement addon via the addons manager, and on next run, the Arch workbench will detect it and add its tools under its current Rebar tool.

The objective of Amritpal's work is to extend the User Interface around the Rebar tool, to add it a series of tailored dialogs to create specific types of reinforcement bars, such as straight bars, U-shaped bars, stirrups, etc. All this UI work integrates with the current Rebar object, which is kept as the overall, can-do-everything Rebar object. The different dialogs help the user to create and edit these rebars in a more friendly way, but doesn't remove anything of the power of the base rebar object, which is simply made of a profile, an extrusion path, and a series of placements, and can therefore represent any kind of rebar we can think of.

Everybody wins with this approach: The normal user, who just wants a clear and easy way to add reinforcement bars, and the power user, for who these dialogs are not enough and who wants to tweak or script these rebars in any way possible.


Here is the best part, in my opinion. I'm working (it's not finished yet, but working already) on an algorithm to perform bin packing in FreeCAD. It is an operation that consists in placing/packing different shapes inside a container (the bin), so it uses as little space as possible. The immediate output, obviously, is toproduce cut sheets for WikiHouse-style constructions, like this:

Interestingly, this is a subject that renders a lot of theory (lots of research papers on the net), but few open-source applications. The only "readable" ones I found were SVGNest and the WikiHouse plugin for SketchUp. None of them is usable directly in FreeCAD (different coding language, too tied into their host system, etc), but they provided precious resource to understand how such an algorithm should work.

They both use the same concept, which is the no-fit polygon. The idea is more or less this: You place a first piece inside the container. Then, for each other piece, you try to "rotate" it around the already placed piece(s). You are basically trying to place the new piece as close as possible to the ones already there. By doing this, you end up defining a "no-go" zone, that is, a zone where our piece cannot go otherwise it would overlap the already placed pieces. By subtracting that zone from the container area, you obtain an "available zone" where the new piece can be placed. You then place the piece at the leftmost available position in that zone, try again with different rotations of the piece, measure the results, and keep the one that occupies the smallest space.

The above concept is working already. It takes a lot of time now, it still needs a lot of optimization. But the concept seems solid. Later on, I will try to implement a genetic algorithm which would run several passes, swapping the order of some pieces, and keeping the best solution. There is a lot of space for improvements.

In the coming days/weeks I should have a basic implementation ready in FreeCAD, so we can start playing!


The nesting system described above is made to work with any shape or feature of FreeCAD. You select a series of flat objects, and another flat object as the container, and the algorithm will return a series of placement transformations, that you can apply to the object to have them packed into the space defined by the container shape. So this will work with any Part-based object.

However, the main interest for me is to use this with Arch Panel objects, for constructions such as our WikiHouse-based project above. These panels, at the moment, already have several features that will be useful for this kind of use, such as the Panel Cut feature that produces a flat view of a Panel, to be placed on a Panel sheet, you see that everything is ready for the nesting, we already have both the shapes and the container.

I already added a couple of useful features such as individual margin settings for each Panel Cut (the minimal distance it must keep with other pieces on the sheet), and the ability to render a Panel Cut either as a Wire or a Face. I also added a way to define and represent wood fiber orientation on a Panel Sheet:

This, allied with a way to restrict possible orientations of a piece on the sheet, will allow to have the nesting algorithm respect the fiber orientation when placing the pieces. There are also other features to come, such as the possibility to use any shape as the container (at the moment it is restricted to rectangular shapes), and I believe we will have a pretty powerful and flexible system.

Then the last operation needed in order to make FreeCAD produce WikiHouse components entirely, is to generate Path objects from the Panel Sheets, a task that has been already worked on extensively by Sliptonic (check this video where he explains it all).

That's it for this month I guess, as always,all comments and ideas are welcome, be it by posting on Patreon, on my blog, or on the FreeCAD forum!

in categories  freecad  opensource  permalink:  361   posted on 28.05.2017 24:18
From Yorik

FreeCAD Arch development news - May 2017

So here we are for our monthly report of what has been going on on the FreeCAD front this month. As usual, I will mostly talk about what I have been doing myself, but don't forget that many people are working on FreeCAD, so there is always much more happening than what I talk about in these notes.

To resume quickly, Werner has been busy working on the whole FreeCAD, as usual, but specially enhancing several issues in the tree view, making selection of large objects much faster, added several FEM tools, and fixed hundreds of other things. Looo has started merging core stuff from his Python3 branch into master (step by step, we will get there), WandererFan made a big update to TechDraw, Abdullah worked on better exceptions handling, and Realthunder is pursuing his work on PathArea, a set of tools inside the Path workbench, that work a bit differently than the others (they rely more on shapes).

But there is much more. For a deeper look at what has been worked on recently by me and others, check the commits log on github. Also, don't forget that more and more is happening outside the strict circle of FreeCAD source code, since it becomes more and more convenient to plug external workbenches into your existing FreeCAD installation. By the way, one of these external workbenches that becomes more and more interesting for BIM work, is Flamingo Tools. Check it if you haven't yet (look at the very professional pdf files in the "tutorials" folder)

So below are the highlights of what I have been doing recently. I also fixed a lot of small issues, but that are not worth mentioning here.

Don't forget you can help me spend more time on FreeCAD by collaborating to my Patreon campaign. This campaign is beginning to grow to impressive levels (special thanks to AlephObjects!) and I might soon have more impressive news to reveal! So next month I'll start improving it a bit, add goals and maybe rewards. I have a couple of ideas already. Don't worry, all of you early backers will automatically qualify for the whole suite


The most important feature I've been working on this month is a new Multi-Materials system. The idea is simple: Arch objects (and already some other FreeCAD objects, such as FEM) already have a Material property. If you give an Arch object a material, it will take the color of that material. Scripts and macros can already use the information contained in that material, for example the density, but so far that is all it does.

Arch objects can now, instead of a Material, take a Multimaterial. The multimaterial simply holds a list of materials, each with a given thickness:

This can already be used in Walls, Panels and Windows. Walls and Panels will use this to construct multi-layer walls and panels, and windows will use this to give a different material to each window part (frame, panels, etc). These objects all become multi-solid, and will contain a same number of solids and materials. With this, the paradigm change of the Arch workbench to multi-solid is now complete: Before, Arch objects were made of exactly one solid. Now, Arch objects can be made of one or more solids.

So far intersections of these multi-layer walls are not done automatically, I am still investigating the best way to achieve that...

Snapping and Working Plane improvements

With other users we were recently looking at Microstation's AccuDraw system. If you ever used Microstation, that is one of its most interesting features. Everytime you click a point to draw a shape (polyline, etc), you have an incredible amount of options available. The snapping system in Dratft/Arch is very much inspired from it, but there are still a couple of interesting features missing:

One first improvement is a new button in the task panel to realign the Draft working Plane while drawing a Wire/Polyline, along the latest segment drawn. This gives you a series of new alignment options and works very much like AccuDraw.

There are also a couple of new tools to place the Working Plane accurately: The Working Plane button now also works with 3 vertices selected, instead of a face, there is a new tool to place a Working Plane proxy in the document, that has the effect to save a working plane position. At any moment later, you can simply reset the working pane to that saved position.

Finally, I have added a couple of convenient macros to the Macros repository (remember that with FreeCAD v0.17 you can now install any of these macros directly from the Addons Manager): A first one rotates the view so it faces the current working plane perpendicularly, which basically allows Draft to behave like the Sketcher when drawing in a certain plane, and another that does the contrary: It moves the working plane so its center is exactly at the center of the current view. This is useful when you are drawing far from the working plane origin, and therefore you are out of the grid limits.


Another area I've been pretty busy this month, is not fully FreeCAD. It is our WikiLab project. By the way, I will have a chat online with people from the WikiHouse Foundation on youtube, on monday 29th. If this subject interests you, be sure to join us! I also recently wrote an article about the project for the WikiHouse website that you might like.

The project crowdfunding is also coming dangerously close to its end, if you have a couple of Reals to spare, please consider helping it, the experience gathered with it will be precious for everybody...

We also started cutting a couple of test pieces like these:

This was basically to calibrate the machine. One of the partners of the project is 123painéis, that is where the cutting (and part of the assembly too) is done. But it also served to test if OSB panels would work well, and I can tell you they work amazingly well. I was afraid the cut would be a bit rough, but the cut is just perfect, and the finish is very nice.

"Enough of that!" will you tell me. "What relation with FreeCAD does this have!" Well, a lot actually. To begin with, the project is entirely developed on FreeCD. Also, I did a lot of coding for the Path workbench which was a sponsored job, made with Brad Collette (sliptonic in the FreeCAD world) and Daniel Falck. But at that time, I didn't know much about CNC manufacturing. Many ideas were implemented under their guidance, but, I must admit it with great shame, without fully knowing what I was doing. Now that I'm going through the whole process, everything is making sense and clicking into place.

Also a lot of subjects, that I was aware already, such as tolerance, dogbones, nesting, etc. now required some thought from me. This didn't result into actual coding, but rather on design strategies. FreeCAD proves to be an amazing tool to work with these panel constructions, you can take high advantage of parametric objects. To give you a small example, all the holes are parametric. Changing a hole (adding dogbones) requires you to only change one hole to adapt the whole project.

Be sure to check the main work file if you want to have a better look. All the project development is done in FreeCAD, the full model is also available here

All the generation of DXF cut profiles is automatic. The only missing part is automatic nesting, which is not easy. The only open-source app I found that can do nesting is SVGNest, unfortunately its code is very hard to adapt to FreeCAD. I'm currently studying it to try to understand how the algorithm works, and maybe try to rebuild it in FreeCAD.

Next step will be to generate the GCode directly from FreeCAD.

Start center redesign

I am also working on a new version of the Start Center:

It has several tabs, and will be vey configurable. You can play with it here, and discuss it on the forum if you have ideas.

Todo list

I will finish with adding here a couple of ideas I had while talking with other users, that I'm currently working on or will attack one way or another in the coming weeks:

  • Add a "snap between 2 points" mode. That could be easily done with the new teporary snap points feature added last month:
  • Add a "snap from" mode that allows you to snap to a certain distance from a point
  • Add a system to check if addons need another addon or a specific python module
  • Add a way to check if an update is available for a given addon
  • Add a series of intelligent 2D BIM-oriented objects in Draft/Arch: Section marks (if possible placed automatically on TechDraw sheets), parking slots, vegetation symbols, etc...
  • Add a kind of magic leader/tag object that can display automatically some info about its target object, such as material, name, size, etc... Similar to the series of tag objects in Revit.
  • Adopt a wider concept for Arch Floors, that would embrace a much wider scope than simply floors, but could be used to gather other Arch objects in any kind of situation, not only per floor. It should also be based on App::Part to benefit from its nice handling capabilities (it can be moved like if it was one single object).

in categories  freecad  opensource  permalink:  337   posted on 22.04.2017 19:16
From Yorik

FreeCAD Arch development news - april 2017


This is a short report of what I've been doing this month regarding the development of the Arch Workbench of FreeCAD.

At the beginning of this year I was complaining that the economical crisis in Brazil was making things hard here, and guess what, now we have so much work coming in that it got hard to find time for FreeCAD! This is something normal when you are working free-lance, it is always a roller coaster, but now thanks to my Patreon campaign there is a growing piece of stability in the balance, I need to find better ways to equalize everything. But it is really thrilling.

Also since a couple of months I got a major contribution from AlephObjects, the makers of the famous Lulzbot 3D printers. They are sponsoring not only me but a wide selection of people and open-source projects related to 3D and 3D printing (they are a major contributor to Blender). These guys are carrying on their shoulders a pretty big part of the open-source 3D world!

It would really be great to see more companies involved in supporting open-source projects development. For a company, supporting a project or a developer is a rather small investment, and is a much, much cheaper and interesting way to spend money than paying expensive monthly licenses to a software company just to be able to use their software.

By supporting the development of an open-source project, even with a small amount of money, a company would probably already have a big say in the development and be able to obtain features they need way faster than waiting for a software company to decide to implement them. Also, unlike when you are renting a software license, development and formation go hand in hand. Software companies might offer training programs, but it is always a short-term thing, while getting involved in an open-source project creates a much deeper, long-lasting and sustainable relationship between the company and the software, where training and learning and new features/versions is not just a service you buy once (and everybody who worked in a company knows that both these things wear off quite fast), but a permanent feature.

Okay that was my little minute of publicity, if you are a company, be as cool as AlephObjects, sponsor me!

Now back to real news. This month I have been working mostly on small things, bug fixing, and small user experience improvements throughout FreeCAD.

New snap mode

Several applications (AutoCAD-based apps, Sketchup) have this "hold" system where you hover the mouse over a point for a certain time, then the software "remembers" that point and offers you new snap locations for it. Call me crazy, but I always got a bit annoyed with the fact that you have to wait a second or so with your mouse stopped, in the middle of a fast operation like drawing a polyline.

So I thought, why not let the user insert those hold points manually, wherever and whenever (s)he wants? It is now implemented, and it works pretty well: Press Q anytime, while drawing, to add such a hold point. New snap locations will become available orthogonally to that point, and at their crossings if you have more than one. This is really fast, and can easily be extended further.


Support for materials and colors in DAE and OBJ import and export

This was a long-time issue, but it's finally done. When importing DAE and OBJ files (using the Arch OBJ importer), object color and transparency will be correctly rendered in FreeCAD.

When exporting to these formats, if the object has a material attached to it (currently only Arch and FEM objects can have a material), color and transparency will be taken form the material. If not, they will be taken from the object itself.


This makes exporting your architecture models to Blender for rendering much more comfortable, since all materials will be already there in Blender (same material/color in FreeCAD will create a same material entry in the OBJ or DAE file, and therefore in Blender).

Panels and Path

@sliptonic recently released an impressive video showing how the Path module could use the Arch Panels objects. We worked further on this, and added a series of improvements that pave the road to be able to comfortably build a model such as a wikihouse in FreeCAD, and be able to create, fine-tune and export g-code directly from it.

Misc FreeCAD-wide improvements

Small things have been fixed such as bugs in the DXF importer, small improvements to the object link dialog, the ability to define which wire of a window will cut the hole in its host wall, and bugs in the scaling of TechDraw views.

A couple of Arch utility tools, as well as the new Sketchfab exporter, have also been moved out of the FreeCAD source code, and are now in a new, separate WebTools. This will allow to bundle in that workbench a series of additional python modules related to web operations, that would be annoying to bundle in FreeCAD itself. This will make it much easier to install, and thanks to the new built-in Addons manager in FreeCAD, installing external workbenches has now become a piece of cake.


I also developed a new addon workbench to use CAD Exchanger to add support to several new file formats such as Rhino's .3DM or ACIS .SAT (which allows you to export Revit families to FreeCAD!). CAD Exchanger is a paid application, but I believe there could be a good synergy there, especially if they support more commercial file formats (also dreaming of decent 3D DWG support? Lobby them!), that are beyond the reach of an open-source project. And paying for a plugin to add commercial formats support to our favorite open-source app is something I would have no problem with, certainly I'm not the only one. Let's hope this synergy will flourish.


Major features


I have a large list of major features that I want to implement in FreeCAD and Arch, I've been talking about most of them in the previous development news, but these are all issues that require a lot of thinking, for example xrefs or walls. Very often I get comments like, why don't you make it work like in Revit (or ArchiCAD, or -name your favorite software here-). The thing is, you can rush and implement an interface quite quickly. But the really important part is not what the user sees or does, it's the underlying structure. If you design some user interface on top of a badly designed data structure, sooner or later you will get yourself limited by the limitations of your data structure. And it will be very hard to get around it if you designed a user interface already. But when you have a well designed structure, adding a good user interface on top of it is easy.

We had this discussion recently about the reinforcing bars tool in FreeCAD. It needs a better interface, that is obvious, but, more important, the reinforcing bar system behind it must be robust and flexible enough to be able to support any kind of crazy situations such as, for example, non-uniform (spline-based) curved walls. If we don't have that, sooner or later our model will fail to address a certain issue.

Then when we have such a powerful system, designing a user interface on top of it, which allows you to, for example, click a column and automatically place a series of reinforcing bars by just specifying a couple of parameters in a nice dialog box is much easier. And if you need a case that the dialog box cannot do, the underlying model can do it. You can still write a small python script that will solve the problem.

That development philosophy is at the deep roots of FreeCAD. Often newcomers complain about the lack of user-friendliness of the FreeCAD interface. But we use to think that there is a right order in software design: First make sure your base structures are powerful and flexible, then design the interface for it.

The interesting aspect is that I think we are entering a kind of new epoch in FreeCAD. Many parts of it are now pretty robust, flexible and stable. And there is a series of new developers coming in, interested in working on the interface side of things. This is also a very precise and long-term work, there is no magical solution, UI-wise. Everything is a question of testing, seeing what works best and what users like (an indication that it works well), and refining.

By the way, have you seen the revamped icons that @agryson has been working on? Also, don't forget that FreeCAD also support color and icon themes, thanks to the hard work of @wmayer and @pablogil...


Sorry for that long diversion, but there is quite some time I wanted to explain better that thing, "why FreeCAD still hasn't a better user interface". We'll get there, but first things first.

About the other major features I am still exploring and didn't find a good attack path yet:

  • Xrefs: I think we are close to something there (see the discussion ). I was first thinking to start with something hybrid with different "modes" where you can either make it insert, in the current document, a full copy of all the objects of the references document, with all its properties, or just a "condensed" view of those objects, but the digital project approach is totally doable and seems much more interesting.

  • Walls: Two things are becoming highly necessary: Support for more complex, multi-layer walls, and a more powerful system to join walls. Note that both these things are possible and working already, but the system is still a bit cumberstone. Multilayer walls is the easiest one to solve, what we need there is probably a kind of "super-wall" object, that would hold the different wall layers. The auto-joining is a more delicate issue. Currently, joining two walls makes them turn into one. But that's not cool, we need to be able to still manipulate these walls independently. Most apps do tricks to make them look like they are joined, but they are still independent objects. But I still didn't find a good idea to do that in FreeCAD.

  • Types: As I was writing in an earlier post, In Revit the concept of individual object almost doesn't exist. Everything is part of families (communism?). In FreeCAD, the individual object is king. Relationships exist between one and another, but the concept of a "family" is very shallow. However, working with families and types in Revit is really good. I'd like to introduce that more in the Arch workbench, and make objects more dependent on some more general definitions. However, how to do that without loosing the precious individuality, which gives a lot of freedom that Revit doesn't have? No clear idea yet.


Sorry for that long read once again, hope you enjoyed, and I'll try to find ways to manage my time better next month! Don't forget you can help me to spend more time working on FreeCAD by sponsoring me on Patreon.

Also, have a look on our ongoing wikihouse-based project in Brasil, be sure to have a look at the FreeCAD files!


FYI, the image above has been heavily reworked in inkscape, but the sheet is originally exported from FreeCAD.

in categories  freecad  opensource  permalink:  325   posted on 19.03.2017 23:27
From Yorik

Revit and FreeCAD

Last couple of weeks I've had the opportunity to do some work in Revit. This was highly welcome as my knowledge of that application was becoming rather obsolete. Having a fresh, new look on it brought me a lot of new ideas, reinforced some ideas I already had, and changed a couple of old perceptions too. So I cannot resist the temptation to do a little comparison between Revit and FreeCAD.

For who is not used to this blog, you must be warned that I am one of the developers of FreeCAD, and therefore my opinions here cannot be anything else than strongly biased. But for the sake of the exercise, I'll do my best to keep as neutral as possible, and look only at the technical side (I won't mention all the open source side of things).

The most important point I think, is that both pieces of software are surprisingly more similar than we use to think. Working in your spare time on a small open source project, and getting bashed all over the internet about how perfect Revit is, you end up thinking your humble work is phenomenally behind what thousands of Autodesk programmers can produce. It turns out that's a pretty wrong perception, I think. Both have their strengths and weaknesses, but FreeCAD comes out surprisingly well compared to Revit, and is actually better in many areas.

I'll start with what is similar in both apps. Both are fundamentally based on constrained sketches, that is, 2D shapes where you can put constraints (radius, length, etc), that you extrude to form 3D objects. Other extruded 2D shapes can then be used in boolean operations (union or subtractions) to produce the final object. So, very fundamentally, the modelling process in Revit is not very different than FreeCAD. In both apps, you'll find these profiles everywhere, underneath almost any object.

Both applications use reference planes to draw onto. In FreeCAD, there are several modalities depending on the workbench, but the concept is the same: You define a work plane, which is a plane in the 3D space, then you draw your 2D shapes on that plane, then you extrude.

The higher-level objects, like walls, structures, windows, etc... are in both applications convenience wrappers around these basic modelling tools. It would be a hassle to have to draw every outline of every wall you need in your project, so the wall tool does that for you, you just need to draw the baseline of the wall, and the whole modelling operation (make the 2D contour + extrusion) is performed automatically for you, and performed again every time you change something to the wall definition.

All the rest, that makes a full BIM application, is basically extensions around this modelling "core". It also surprised me how little the Revit core has been modified over the years. All the new features of these recent years are in that area around the core, not the core itself. This is not necessarily a bad thing, when you think of it, BIM work is composed of a very big part of theses things that are not solely 3D modelling.

The bad sides of both applications are also surprisingly similar, and, even more surprising to me, equal in number and annoyance. In FreeCAD, due to its young age, and the fact that there is too little work spent on the BIM module (don't forget you can help me to remedy the problem!), all kinds of shortcomings, limitations and incomplete features cross your path all the time. Fortunately you can work around these most of the time, and your ability to find and use these workarounds grows with your FreeCAD experience, up to a point that it doesn't annoy you anymore. That typically happens with all FreeCAD developers, so it's important that new users report the problems they encounter.

In Revit, my impression is that you basically encounter the same amount of annoyance. My even deeper impression (a secret I won't hesitate to reveal to you now, exclusively!) is that in the perfect world of Revit, where "everything works", so to speak, programmers are extremely reticent to add anything that could "stain" that perfect model. So all kind of external, hybrid, workaround features are vetoed or minimally implemented because they couldn't avoid, but highly discouraged.

But, more useful than the rant, I also made a list of points that I found good in both applications, with the obvious idea to gather things to improve in FreeCAD.

Revit strengths

  • The workflow is totally adapted to architecture. This is really a joy to work with. All these little annoying tasks you have to fill your day with, put annotations, make a list of this or that, have some kind of automatic tool. Revit has few tools and buttons, but all of them are a typical architect's task. I don't think any other BIM app offers so much comfort to the architect. No wonder once you begin to use it, you are hooked.
  • Autocad-like output: What comes out of the 2D views is really a perfect AutoCAD-like output. With lines, hatches, everything. And you can draw on top of it, which allows people new to Revit but used to AutoCAD to hack their way our of problems very easily, at the cost of infuriating Revit pros around, maybe, but at least you can get the job done even if you are new to it.
  • Hundreds of auto 2D objects: I guess that's the most valuable thing Autodesk has added around the Revit core: All the whistles and bells that you used to do manually in AutoCAD, are now smartly handled by some automatic tool: Automatic leaders that pick a value of what they are showing. Automatic tables that gather all the notes found in a view. Automatic section marks that update with the page number the section is in, etc.
  • Autocad hatching and "syntax" everywhere: The 2D output of Revit is ready to be worked on further and natively in AutoCAD. I don't think any other BIM app produces so nicely editable DWG files.
  • Ease to work in 2D views: Revit is made mostly to work in 2D views. Many tools are in fact only available in 2D views. But one has to admit they are very comfortable to work with. The hidden lines system is mostly cumberstone in the 3D view, but it takes all its meaning in 2D. You really work on a 3D model like if it was a 2D drawing.
  • Ease to manage objects by category: The categories of Revit objects (families and types) are very strict. Objects that don't fit in these categories (for example imported objects) are almost useless in Revit. However, this has its advantages too, all the "siblings" relationships that exist, for example, between several types of the same family, or under a same category, are pretty powerful. In Revit, designing object categories is almost more important than desinging individual objects themselves.
  • Fast 2D views: Revit pseudo-experts out there will quickly tell you that it's because Revit is a database, doesn't generate its 2D views, and (insert commercial bla-bla shit here), but the fact stays, screen views must be generated, and hidden geometry must be calculated. When an object changes, all the views where it appears must be updated. And this is really fast in Revit.

FreeCAD strengths

  • The workflow is not specifically adapted to architecture: This is the exact opposite of Revit's first strength. FreeCAD is a generic application, and not a specialized one. This will give you less comfort, but bring a wide series of tools, workflows, solutions or ideas coming from other areas (mechanical engineering, etc). There is always a wide series of possible ways to achieve something, so you (almost) never find yourself in a "this cannot be done" situation. Also, being not specific to architecture, FreeCAD can easily be used by people who are not architects, to design buildings or parts of buildings, their own house for example.
  • Modelling is very powerful and free: Modelling capabilities in Revit are limited. In no time you find yourself in front of something very hard or impossible to model. In FreeCAD it's really hard to find something you can't model, and if so, it's easy to use geometry modelled in other applications.
  • A complete tree: Revit doesn't show you each and every object in its tree view / project browser. FreeCAD does. That has a lot of advantages.
  • FreeCAD can work much more easily with dumb or bad geometry: In Revit, for an object to be workable with, it must comply with many rules dictated by the general structure of the modelling core. Basically, it must be an extrusion, its base 2D shape must be translatable to Revit's 2D system. Otherwise you can do very little. FreeCAD on the other hand can even work with mesh data and use that in BIM workflow. An important consequence is that importing stuff from IFC integrates much more seamlessly in FreeCAD, while in Revit it's a very delicate matter.
  • Freedom to organize model as one wishes: In FreeCAD you have many ways to group objects together, and group these groups inside other structures. So you have a very big freedom to organize your model as you like. If you don't want to use the levels/floors system, no problem. If you have something that's not exactly a building, together with your building, it's easy to create a specific structure for it. It makes you also think about how to organize yourself, which is good.
  • Ease to work in 3D view: As much as the 2D views of Revit are comfortable to work with, the 3D view is not. The 3D view of FreeCAD is really a joy to work with, comparatively. You can easily hide/unhide or temporarily change the display style of individual objects, select part of objects, and visualize well all the reference and work planes. Here, you can really work in the 3D view.
  • Ease to work with other kind of data from other people: Revit can, with many limitations, work with IFC and DWG files, and you'd better keep them as linked (unmodificable) files, not try to import their geometry to do something meaningful with it. In FreeCAD, on the other hand, it is pretty easy to turn anything into a valid FreeCAD (and therefore BIM) object: IFC or DWG objects, but even mesh objects from Sketchup or Blender.
  • Happy mix of imperial and metric units: There is no such thing as a template in FreeCAD. You could work on a model in centimeters, hand it over to someone in the US who will see everything expressed in inches. Internally, FreeCAD draws everything in millimeters, always. Only what you see on screen is expressed in the unit of your choice. You can also always insert values in any unit, no matter what the current scheme is, or even mix units in a same expression.
  • Easy to manage objects one by one: Contrarily to Revit, where the power lies in categories of objects, the focus in FreeCAD is on the individual object. It is easy to turn individual things off (and turn them back on afterwards), modify a single instance of something without the need to refer to categories or families. You can easily recreate a similar workflow as families, by basing several objects on the same one (clones), but this doesn't tie the clones to their "master". You can give them another master anytime, or grow something else on top of them, using the "family" only as a base. You can do all that in Revit as well, of course, but I find it already much more flexible in FreeCAD.
  • 2D modeling tools are more powerful: Hard to believe, but it's true. Have a look at what is possible with the Sketcher, there is already much more than what Revit offers.
  • Proper MDI: Working with multiple documents in Revit is still pretty cumberstone, to say the least. Why the hell must a reference be unlinked when you open another document containing it too? FreeCAD has a standard, normal way to work with multiple documents, they can all be openend in parallel, you can display them all together, etc.

So no more shame, let's claim it loud, yes, FreeCAD is as good as Revit! "As good as" doesn't means "the same", though, and their philosophy and workflows are very different. Revit will give you more comfort and speed, FreeCAD will give you more freedom. I don't know if we'll ever reach the comfort level of Revit (I'm not convinced that it wouldn't force us into options that would harm the freedom side), but on the question of speed, there is still a lot to be done, no doubt we'll still see huge improvements in that regard.

I took note of a series of small things I'll try to fix or add in FreeCAD, but also identified these more generic areas that I'll try to improve in FreeCAD:

  • References: At the moment there is no reference system in FreeCAD that allows you to split your work in several files. This is a huge question, that has complex implications in FreeCAD's internals, and that the PartDesign people is already on their way to solve. However, we might start experimenting with something directly usable in BIM workflows.
  • TAB key cycles through snaps: I find that pretty good in Revit. Currently, in FreeCAD, only the "closest" snap location is kept. We need instead to keep all of the snap locations in a certain radius, order them somehow, and allow to hit a key to take the next one on the list.
  • Remember last "hold" snap point: When hovering the mouse without moving for a certain time, that point should be remembered. Then, additional snap locations should become available on horizontal and vertical lines passing through that hold point. This needs a little more thinking to define more exactly what these additional snap location should be.
  • Wall layers: In FreeCAD, wall layers can already be made by basing several walls on a same baseline. but this should be developed further so the handling of these walls becomes more user-friendly. Perhaps a new multi-layer wall object, that would include and manage the individual parts. This needs more thinking as well.
  • Walls joining: Currently there is no automatic wall joining in FreeCAD. You have to join walls manually, by adding one as a sub wall of another. I'm not sure I like Revit's way too much, because you cannot see clearly where one wall ends and the other begins. You cannot see in Revit what will be exported to IFC, for example. But nevertheless, when you have multilayer walls, it becomes very convenient to have proper wall joining based on materials. Here again, we need a better plan to know how to achieve the goal.
  • Hi-res system: The Arch Equipment currently has a system to display a high-resolution mesh instead of its shape. This high-resolution mesh can then be used when exporting to mesh formats such as OBJ. This system should be extended so it supports a higher-resolution shape as well, and applied to all Arch objects (ex: brick wall, or wikihouse panel compounds). There is a basic version working already.
  • Better support of IFC properties: Currently all IFC properties found for an IFC object are stored in a simple dictionary (property sets are discarded), and the contents of that dictionary gets saved to IFC properties when exporting to IFC. We need something more complex, that keeps track of which property belongs to which set, and the ability to modify and save that structure back faithfully when exporting to IFC. I'm already working on this too.
  • New DXF export: The current DXF exporter is still based on the old python library, we need to recode a new, faster one in C++ like we did for the importer.

With OpeningDesign we are also trying to build a "best practices" manual to transfer data between FreeCAD and Revit (and hopefully other software in the future).

PS - Half the stuff on the images in this post was done by Ryan

in categories  freecad  opensource  permalink:  323   posted on 16.03.2017 3:05
From Yorik

FreeCAD Arch development news - March 2017

I'll start adding a date to these "Arch development news", it will be easy to look back and motivate me to write them more regularly. A monthly report seems good I think, no?

Hi all,

Long time I didn't write, but that doesn't mean things have been quiet down here, it's actually more the contrary. To begin with, I've had the opportunity to do a job with Revit. There was a long time that I didn't really use Revit intensively, so this was a great opportunity to get back on track with it. I gathered a lot of observations, ideas, and things that compare quite favourably to FreeCAD (favourably for FreeCAD of course ). This is too long to put here, but I have written another post specifically about that, that I'll publish later this week.

I also collected a long list of Revit rants, but since a lot of people are doing that all over the net already, my article will rather concentrate on the positive points I found in both apps.

Now the ideal would be to get an ArchiCAD job! Anyone has an ArchiCAD job for me?

I've otherwise been working on a couple of own projects directly in FreeCAD, and implemented a couple of new features o the way:

Add-ons manager

This is not only mine but a real teamwork. Finally we have a simple but functional tool inside FreeCAD to install external workbenches and macros. No more need to go to the web, download and install, all this is done directly from within FreeCAD. Installing workbenches will still require you to restart FreeCAD, and it's currently still not very enjoyable to browse and explore available addons, but we're working on it.

Hi-res mode

In Revit, objects can display 3 levels of complexity: coarse, medium and fine. For each of these levels, you can define geometry that must appear or not. So for example, you can have a sink object that is made of a box and a more detailed curved geometry. Then you set the box to only appear in coarse mode, and the other geometry to appear in medium and fine.

In FreeCAD I now implemented a similar concept. It is still in test, so it might change depending on what people think of it and how it resists day-to-day use. Basically, each Arch object now has a new "Hi Res" property which is a link that can point to another object. They now also have a "Hi Res" display mode. If you set the display mode of the object to "Hi Res", and the object has its Hi Res property set, the geometry of the HiRes object is displayed, instead of its own. This happens entirely at the 3D view level, so the Arch object keeps its own shape. It only displays another. But selection still works, inside the 3D view you don't see that it's not the real shape of the Arch object.

Of course so far other tools and workbenches (TechDraw, etc) are unaware of this, and will continue to look for the objects shape. But if the system works well, it will be easy to simply use the Hi Res shape instead, if present.

So this is not Revit's (or ArchiCAD's) coarse/medium/fine system, but it seems to me that the cases where you really need three different levels are rare... And if three, why not four then. This systems seems much more flexible to me, you can basically use any shape/object (meshes too) as hi-res version of another, with all the possibilities and flexibility that this offers. And, if we need a third mode in the future, most of the work will be done already, it won't be much work to add it.

In the image above, the concrete blocks are the Hi-res version of the walls, and the wooden panels, with all their cuts, too. Check the whole file too (you will need a very recent version of FreeCAD).

There is a discussion thread about this feature on the forum, all ideas are welcome!

External references

This system has another aim too: It paves the road for a pretty powerful external reference system we're currently thinking about (discussion thread here: Everybody used to Autodesk applications knows the X-Ref system: You have a file, and you embed it into another file. However, if you know this, you probably also know the bad side: If you embed a couple of heavy files, your "master" files becomes quickly unbearably slow. People coming from the mech engineering world, and software like Solidworks or Catia know another way: You cannot simply embed any file into any other. You need to prepare the base file somehow, either by organizing your objects inside somehow or by saving it under another file type, the methods differ.

But this could give way to an amazing idea, that Jürgen (FreeCAD's idealist and godfather) emitted several years ago already, and that is not even ours, since it has for example been implemented in Digital Project. Anyway, in the software world, as in all the culture world, nothing is really only your idea. It's always something that travels... Okay okay, the amazing idea: When embedding a file, instead of bringing the whole contents into the host file, you would only bring a lightweight version, or a "ghost" of it. In FreeCAD terms, that would mean only importing the OpenInventor representation of the objects contained in the file, which is what the 3D view of FreeCAD is made of. In other terms, you would bring only the 3D representation, not the BRep geometry.

Without the BRep geometry, you can go very far. The 3D view of FreeCAD can display several millions of polygons without problems on an average system, and keep everything pretty fluid. In the case of BIM, this could probably allow to display huge and complex buildings with all their details. All the heavy calculations would be left in the embedded file, and not be used in the host file.

But the OpenInventor representation is currently not stored in FreeCAD files (it is calculated by the engine on-the-fly). We need to find a way to store it, so another file could just load that representation, and nothing else, without the need to calculate it.

The easiest way seems to be the PartDesign way: You place all your geometry inside a "body" object, which stores a copy of the OpenInventor representation of its contents. When you load the file from somewhere else, you could just load that representation, and you would get a lightweight copy of the body contents.

Of course. that's the plan with PartDesign. But on the Arch side, we have an opportunity to do some testing quicker than there, firstly because Arch is programmed in Python, which makes it much easier to experiment, and secondly because less people are using it, so we need to be less careful, it's not such a big problem if we suddenly break something. And it happens a lot in FreeCAD, that some features are tested and tuned in Python first, and then some day become fast, rock-solid C++ features.

So that's the plan, and the Hi-Res system was a first step in playing with these concepts, now the way is open to try to play with external files too.

SketchFab exporter

Do you know SketchFab? It is a platform where you can upload 3D models and view them inside a web browser, without flash or any other plugin (it uses webGL which is now built in all major browsers). SketchFab has free and paid accounts, and although the platform is not open-source, the team behind it is very friendly to open-source projects (some people behind it actually come from the Blender community). I begin to use SketchFab more and more, because it is very easy to show models and ideas to clients with it, without having to make them install software.

So this week I [coded an exporter] for it, which now lives in the Web workbench of FreeCAD. All it requires is to create an account on SketchFab, select the objects to upload, give a name and a description, and press a button. SketchFab has a pretty good built-in scene and material editor that allows you to fine-tune your model afterwards.

The exporter offers your several formats to export to, the one that works best for BIM models is the OBJ + MTL, because it will carry better materials info, but there is one mode that is particularly interesting which is the .iv (OpenInventor) mode, that literally sends to SketchFab a copy of the 3D view of FreeCAD, which gives very nice results:

So this could become a very good way to showcase your FreeCAD models to people who don't have FreeCAD.

Working Plane and View Style fixes

Recently I had to work with models with a lot of non-orthogonal planes to work in. It is always when you have to eat your own dogfood that you become painfully aware of the shortcomings. Switching workplanes is very quick already, select a face, press "WP" and it's done, but there were two problems: first there is no way to set your view perpendicularly to the current working plane, which is often useful, and, if you choose one of the ortho planes (XY, XZ or YZ) very far from the model origin point, you won't see the grid.

So one thing I added is a checkbox in the "Select Plane" dialog to recenter the grid to the center of the current view. And another little utility is a macro to Align the view to the currnt working plane. If you install that macro (which is now easy with the addons manager!) and give it a keyboard shortcut, the workflow becomes very good: Select a face, press WP, then press the key you used as a shortcut for the macro, and you find yourself looking perpendicularly to your working plane. If you have the Snap to Working plane button on, then you are really working in a perfect 2D environment, like in the Sketcher.

The different Draw Styles of the FreeCAD 3D view have also received keyboard shortcuts, and Werner added two more modes. One of them, named "shadeless", gives actually very nice "hidden lines" aspect, you would almost think you're in Revit!

Don't forget you can help me spending more time working on FreeCAD, by sponsoring me on Patreon. Every dollar is a little more time I can dedicate to it!

As the tradition dictates, I put a couple of images of what I'm working on at the moment:

in categories  freecad  opensource  permalink:  317   posted on 26.01.2017 22:15
From Yorik

FreeCAD Arch development news

A long time I didn't post here. Writing regularly on a blog proves more difficult than I thought. I have this blog since a long time, but never really tried tomconstrain myself to write regularly. You look elsewhere a little bit, and when you get back to it, two months have gone by...

Since this post is aimed principally at informing my Patreons of what I am doing with their money, I'll start by saying thank you again, the last year has been a terrible economical crisis here in Brazil, and the last months have been awful, we thought seriously we'd need to close our architecture office. Fortunately things seem to slowly get back on track... Anyway, thanks to your support, even in the direst hours, I could still reserve a little time for FreeCAD, that is really very cool.

So the main happening, on my side, was without a doubt the new Panel tools I've been working on, that now allow to create Wikihouse-like projects fully in FreeCAD.

Arch Panel objects have been enhanced so they can now 1) have a tag, 2) output a 2D view of themselves, in the XY (ground) plane, including the tag, and 3) a panel sheet object can gather and assemble different of those outputs, and 4) you can export these panel sheets to DXF, with a result that is identical to the ones produced by the Wikihouse project.

By the way, the above image is a screenshot from LibreCAD, which started as a fork of QCAD, but now the two projects have evolved in very different ways, QCAD has become quite powerful, while LibreCAD stayed more simple. However, LibreCAD has recently added DWG support, which was entirely coded from scratch by Rallaz, one of their code warriors. This is truly impressive, given that the DWG format is proprietary, undocumented, kept as secret as possible by Autodesk, and even more, it changes radically each year. At FreeCAD we gave up a long time ago... Kudos LibreCAD heroes!

Getting back to wikihouse, once you have a set of profiles for your panels, it is now pretty easy to build complex wikihouse models, then quickly output the cut sheets for everything, no matter how they are assembled in the model.

There is much room for improvement of course, and we didn't even touch the possibilities offered by the Path workbench yet. However, I thought this is a safe and comfortable in-between step, the DXF output allows to check the results before preparing the actual cut, and it mimics the current Wikihouse workflow.

Another small feature, that was in the works since long, is an AutoGroup feature (it only works in Draft and Arch at the moment). With it, you can basically get the kind of workflow you have in your favorite BIM app: Switch to third floor, and begin to work on third floor. In FreeCAD, you would hide all floors except the third, then enable autogroup on the third floor, and there you are.

On other fronts, there is much going on, as always, in FreeCAD. Werner has made a ton of fixes and reinforcements here and there, as usual (for who doesn't know, he is the unsung true hero of FreeCAD, everybody is an amateur compared to him), Ickby is working on several ground improvements to the general document structure, and, last but not least, Abdullah has coded the one feature we were all waiting for but were too afraid to code, B-Spline support in the sketcher.

I also fixed a series of smaller bugs (these little things we never talk about, but that, when accumulated, really build the stability of an application), while working with Ryan on one of our Revit/FreeCAD experiments. I'll finish with a couple of screenshots of the FreeCAD work I've been doing there. All of this now exports perfectly to IFC, and imports (more or less) perfectly in Revit.

in categories  freecad  opensource  talks  permalink:  309   posted on 20.12.2016 19:39
From Yorik
The talk about FreeCAD & BIM I gave at LGM in London this year

in categories  freecad  opensource  permalink:  297   posted on 26.11.2016 17:45
From Yorik

FreeCAD Arch development news

There is quite some time I don't write about Arch development, so here goes a little overview of what's been going on during the last weeks. As always, I'll be describing mostly what I've been doing myself, but many other people are very actively working on FreeCAD too, much more is going on. The best way to keep updated is to keep an eye on the Features Announcements section of the FreeCAD forum. Here is what's been going on on my side since my last post in mid october:


The Schedule tool has been completely rewritten. This is something I wanted to do since a long time, but it takes that time to figure out what to do and how to do it. The schedule tool is now basically an "extractor". You fill a table with a series of lines, each line will be a query to be executed on the model, and the data obtained from the query placed in a line of a resulting spreadsheet. You can for example count objects of a certain type, or measure lengths, areas, or extract values of properties. Everything is explained in the docs above.

When your resulting spreadsheet is ready, you can for example export it as a .csv file, and link that csv file into a spreadsheet application like LibreOffice. You obtain then a "source" sheet from where you can link quantities to a main spreadsheet. Whenever you export the .csv file again, the spreadsheet gets updated automatically.

So basically I gave up (for now) trying to build a full, final document directly in FreeCAD. You really need a much more flexible and powerful spreadsheet application than we have in FreeCAD. Rather, the schedule tool now concentrates on doing its task well and easily: gather quantities from the model. What you do with these quantities, it's now very easy to do outside FreeCAD.

Of course there is a lot of space for improvements, for example we'll at some point need to categorize and sort the data (imagine for example, gathering all the windows and group them by their size and type), but the tool should now be flexible enough to do that.

Structural nodes

The Structure tool already had structural nodes since a long time. It is basically a property that holds a series of 3D points. These points could define a line or a polyline. This is used to represent the axis, or median fiber of a structural element. The nodes are recalculated automatically when the shape changes, but you can also set them manually. The line or polyline can then be shown or hidden.

This is a first (but important) step on the road to export FreeCAD models as analytic models. You need to be able to represent your whole structure as a big wireframe.

There were some utility tools missing, which have now been added. For example, Slabs can have their nodes represent not a polyline but a surface. And there are now tools to join and trim nodes from different structural elements so you can now achieve pretty clean wireframe models from your Arch structures, with just a few clicks.

Next steps will be to try to export this to software able to do something with such models. So far, on the open-source side I only know 2D analysis apps like PyBar and FTool. There are a couple of older 3D ones on sourceforge but I haven't met anyone who usses them. Another possible output is of course the IFC Structural Analysis MVD.


The Panel tool also received upgrades. It is now possible to make wavy or corrugated panels, typically used for roofs. Users on the forum suggested we also add a way to build sandwich panels, typically formed by two metallic skins, and a layer of insulation material inbetween. This kind of panel is already possible to do, by making several panel objects from the same profile, and giving them different offset and thickness values. However, these sandwich panels often have a different profile for the top and bottom metal sheets. So the middle layer doesn't have a uniform thickness. There are also corrugated profiles that are more complex, with different wave heights or "peaks". So the whole panel tool must yet be extended to support these cases. So far I had no good idea on how to do that efficiently, but that's on our TODO list.


The TechDraw workbench, for who doesn't know it yet, is the successor of Drawing. It has more or less the same functionality as Drawing has, plus most of the stuff of the Drawing Dimensioning addon, and more advanced features such as the ability to move views graphically on the page. So far the special Draft and Arch tools that could display Draft objects and Arch Section plane contents were not available in TechDraw. This is now solved, and TechDraw can be used fully to produce 2D drawings of your models.


Another side thing I've been working on is the code documentation. Apart from our wiki documentation, which is hand-written by community members, and is mostly for FreeCAD users, there is also a documentation made specifically for people interested in programming, which describes in detail how FreeCAD is programmed, and which classes, functions and tools are available to you as a programmer (both C++ and Python). This documentation is not fully hand-written, but extracted automatically from the FreeCAD source code, by a tool called doxygen. Doxygen "reads" the code, and builds a map of the source code and all its different modules, classes, functions, etc. It also reads code comments, which are pieces of texts that developers place in their code, to help people who read that code to understand what does what. Good code always has a lot of those comments. Doxygen also reads these comments and includes them into the documentation.

So far, the whole FreeCAD code documentation extracted by Doxygen weighted more than 2Gb, which makes it too heavy to place on the FreeCAD web server. The default "theme" used by Doxygen is also rather ugly.

I'm now working on producing a thinner version of that documentation, that could fit on the server, and a better them that makes it blend into the rest of our web environment.

Good code documentation that is clean and pleasurable to read is very important to help new people interested in programming for FreeCAD, so it's worth spending a bit of time on it.

Sun diagram

The Arch Site has also received a new feature: By filling a couple of properties such as Latitude and Longitude, it can now display a solar diagram. That diagram can be scaled, oriented and centered on a specific point in the model, and of course turned on/off. So far it is just visual, you cannot do anything else with it than just looking at it. But in the future much more could be done with it. A first step I'll try to reach is enabling shadow studies.

Coin3D, the library that is used to manage the FreeCAD 3D view, is able to display shadows. So far I'm meeting some technical difficulties to make this handily and gracefully switchable on/off, but no doubt sooner or later we'll have a solution at hand.

in categories  freecad  permalink:  294   posted on 18.11.2016 19:50
From Yorik
More plumbing in FreeCAD... This is how it gets rendered in TechDraw

in categories  freecad  permalink:  293   posted on 18.11.2016 19:46
From Yorik

Solar diagrams in FreeCAD

New feature in FreeCAD: Arch Sites can now display a solar diagram:

More info at http://forum.freecadweb.org/viewtopic.php?f=23&p=145036#p145036

in categories  freecad  opensource  permalink:  290   posted on 02.11.2016 23:34
From Yorik
New opening symbols for Arch doors/windows in FreeCAD


in categories  freecad  permalink:  287   posted on 02.11.2016 14:47
From Yorik
FreeCAD Arch support in TechDraw at work...

in categories  freecad  opensource  permalink:  277   posted on 16.10.2016 20:59
From Yorik

#FreeCAD BIM development news

Here goes a little report from the FreeCAD front, showing a couple of things I've been working on in the last weeks.


As a follow-up of this post, several new features have been added to the Arch Site object. The most important is that the Site is now a Part object, which means it has a shape. Before, it was only a group, it had no "physical" existence in the 3D world. It now behaves like other Arch objects, that is, it has a base property (which is here called "Terrain"), that contains a base terrain object, that, at the moment, must an open Part object. Later on it will be extended to also accept meshes.

Then you have two additional properties, "Additions" and "Subtractions", same as other Arch objects. These are set by double-clicking the Site object in the tree view. With these, you can add solid objects as subtractions and additions.

When adding these objects, the result you get is this:

The difference with other Arch objects is that the site is always an open surface. It is not a solid. Other BIM apps usually require you to model a piece of solid to be the terrain, but I find that weird and arbitrary, most (all?) ways to obtain terrain data (GIS data, on-site measurements, etc) will give you only surface data. Why would the BIM app need a solid? Besides, in the long run, no doubt FreeCAD will gain tools for heavy civil engineering like roads and tunnels. These people certainly won't be satisfied with a simple block of uniform terrain. We'll need to be able to represent different geological layers. So sooner or later the solid representation would need to be changed.

It seems a safer bet to me to start slowly, and consider, for now, terrains as surfaces. Note that it is totally possible to interact with solids. In the images above, the red and blue shapes that get added/subtracted are solids. The result is a surface, but the Site object keeps track of the volumes of earth being excavated and filled in two separate properties (Addition Volume and Subtraction Volume). Additional properties will give you the terrain real area, the area of the projection on the XY (horizontal) plane, and the length of the perimeter.


I also did some more work on spaces. Basically, they received a couple of new properties such as vertical area, perimeter and a series of properties related to space use (number of people, energy consumption, etc) that will be needed for GBXML export. Note also that Equipment objects can now also have energy consumption defined, and you can have the consumption of spaces automatically calculated by summing the consumption of equipment inside it.

I also worked further on the GBXML exporter itself, but met a temporary showstopper. To test GBXML output, we need an application that can import GBXML and, preferably, do something with it. As far as I know, the only one avaialble that is open-source and runs on Linux is OpenStudio, which by the way seems a really nice thing. It is a bit hard to find the source code of OpenStudio, but it is on github. Problem: OpenStudio uses libraries about 2 years old (boost mainly) and doesn't run on modern Linux systems (their officially supported platform is an Ubuntu from 2012...) So I'm now busy trying to make OpenStudio work on my machine, which requires a ton of small fixes and is not a very easy task for a C++ ignorant. We could of course ask for help to the OpenStudio people, but the project has 691 open issues, I don't think we have a lot of chances to be heard.

If you read this and have some good knowledge of boost, I'd be very grateful for a little help!

About GBXML export from FreeCAD, it seems to me that the whole idea (looking at sketchup videos) of working with GBXML is to work with spaces. Spaces are the building blocks of a GBXML file. They have a series of properties, and each of their surfaces also has different properties such as material, orientation and what there is behind (exterior, ground or another space).

At the moment, spaces in FreeCAD are just containers for equipments, and carry information such as area. They can also be defined by boundary elements such as walls. But to make them work for GBXML, we'll need more, for example the ability to define a material for each surface, and also know if another space is behind a specific surface.

This would basically require spaces to touch each other, and not stop at walls like they do now. This might actually be easier for space calculations too. My idea at the moment is simply to make spaces behave differently when a wall or slab is used as boundary. Instead of stopping at the wall face, it would go up to the wall "midplane" (which will now need to be calculated). This way, any space would know 1) which material each surface is made of, by querying the material of the wall, and 2) which space is behind, by querying the wall for other attached spaces. All this should stay optinal of course, so you can still use spaces to calculate the "inner" area of a room.

Structural nodes

As discussed several times with Bernd, the official civil engineer of FreeCAD and one of the masterminds behind the FEM workbench, it is important to be able to extract an analytic model from structural elements in FreeCAD. Since quite some time, Arch structure elements have a "Nodes" property, which contains a list of 3D points. These form a linear sequence, that represents a structural line for the element. These nodes are calculated automatically, but can now also be edited manually, the same way as you can edit Draft objects. You can also easily make the nodes of several elements coincide, so it is now very easy to obtain analytic models like this:

Note that the slab, on top of the beam, can have its nodes form a plane instead of a line. This will later on be added to walls too.

We are not sure how/where to export these models yet, I'll try to start with IFC, which supports such analytic representations. Later on, we'll see...


Panels also received a little upgrade that I needed for a project: The ability to represent corrugated panels like these:

For this, a couple of new properties have been added to panels, where you can specify the type, direction, height and length of the waves. The rest continues to behave like before, so you just need to draw a 2D object, then press the Panel button to turn this 2D object into a panel.


Arch Windows could already have 3 kinds of components: frames, glass panels and solid panels. There is now a fourth: louvres. So now windows can also be used not only to make doors and windows, but also different kinds of shading devices.

To add louvred panels to a window, all that is needed is to edit the window by double-clicking it in the tree view, selecting a component, and changing its type to louvre. Two new window properties, Louvre Width and Louvre Spacing, will control the size and spacing of the louvre elements.

in categories  freecad  permalink:  275   posted on 12.10.2016 22:08
From Yorik
Electric design in FreeCAD...

in categories  freecad  opensource  permalink:  274   posted on 03.10.2016 24:31
From Yorik

Working with GIS, terrains and #FreeCAD

Or, how to build a precise 3D terrain from any place of the world.

Again not much visually significant FreeCAD development to show this week, so here is another interesting subject, that I started looking at in an earlier post.

We architects should really begin to learn about GIS.

GIS stands for Geographic information system and begins to be more and more used by administrations around the world, specially cities, to manage their physical area and infrastucture in all their complexities.

Also, it is becoming more and more their preferred way to deliver data that you need to use when doing a project on a certain plot of terrain in that city. Before, you would go to the city council, and ask for the data they have on a specific plot. In the old times, they would give you a photocopy of a piece of some plan, and a form filled with some additional information. In the recent years, most of them had switched to CAD systems and gave you DWG files to work with.

Now, DWG files are being abandoned worldwide, and, together with the better integration of the different services that compose a city council, they are adopting GIS systems. So we'd better learn how it works.

It is actually far better than before. GIS is a bit like CAD, but adapted for working with terrains, maps and geographic data. GIS files are usually made of layers, like a CAD file, but layers can contain vectorial data, like CAD, or bitmap (that they call raster) images. The most important feature, though, is that everything is georeferenced, which means that any point has a precise, exact position on earth. So you can join all kinds of data coming from all kinds of sources in a same file, everything will stack exactly on top of each other. In GIS you never move anything.

The amount of data that you can find online, already properly formatted, that you can simply drag and drop in your GIS application, to build beautiful maps with a huge quantity of layers is really impressive. In this article, I'll use data from my hometown, Brussels, and the city I live in now, São Paulo. Both have a public GIS website from where you can download data. I'll also take elevation maps directly from the NASA website. I'll use the most well-known, open-source, multiplatform GIS app available, called QGIS. I recommend you to install it, I bet very soon a GIS tool will be part of any architect's toolbox. Fianlyl, we'll export our map to a DXF file so we can build architecture projects on it, and build a 3D terrain model in FreeCAD. After installing, check the "Plugins" menu of QGIS, it has an amazing collection of useful plugins, a favorite being the openlayer plugin, which lets you work on top of an OpenStretMap layer, which is an excellent way to start a new work in QGIS.

Obtaining GIS data from the São Paulo city council is easy. Head to their GIS portal, zoom to the neighborhood of your choice, click the "Download" button in the left toolbar, and select the type of data you wish to download. Be sure to select "shapefiles" data type, which is the most common GIS format.

Brussels also has a similar geodata portal, a little bit more complex to navigate, but allow to download the same kind of data. However, they also have a much simpler download app which lets you easily specify the dataset you want to download and get the same shapefiles.

There is also one precious type of data available on the NASA website: Elevation maps. Several times in the history, they have covered the world with a satellite able to find map the elevation of any point on earth (apparently with very simple techniques like sending a wave signal and measuring the time it takes to bounce back). The latest data, collected with the ASTER satellite in 2009, has a 30x30m resolution of the whole earth, and is available freely on the NASA Echo Reverb website. The data comes in a special kind of bitmap image format called GeoTIFF which is basically a greyscale TIFF image with floating-point values (unlimited number of grey shades) and it is, of course, georeferenced.

Downloading data from there is however a bit more complex:

  1. egister a new account (it looks commercial, but ASTER data is free)
  2. Log in
  3. Zoom on the map
  4. Draw a rectangle
  5. In the list below, mark "ASTER Global Digital Elevation Model V002"
  6. Click Search for Granules
  7. In the next screen, under Granules you will get one (or more) zip files like ASTGTM2_S24W047.zip. Add them to the cart
  8. Click view items in cart. You will get all the zips you added, plus a "ASTER Global Digital Elevation Model V002" that you don't need to worry about
  9. Click "order" (it definitely doesn't look like it, but it's free)
  10. Accept all the requirements and click "submit order"
  11. You will get an email with a download link. Normally it's immediate, but one time I had to wait an hour or two.
  12. Unzip, and unzip another zip inside, there is your geotiff

Once we have all this data unzipped, we can just drag-and-drop the geotiffs and the shapefiles from the Browser Panel of QGIS into a fresh, blank document. Right-clicking on each new layer in the Layers Panel will allow to change visual properties such as color and transparency.

One very important note: Projecting coordinates onto the earth is a very complex business (think that the earth is not even completely spherical!). As a result, there are hundreds of different projection methods. You will quickly see that a shapefile is actually several files. One of these files defines the projection method. On the GIS portals above they usually inform which projection system they use for their data. In this case, Brussels uses Belgian Lambert 1972 projection, and São Paulo uses SAD69/96 UTM 23S. So make sure, when you insert a new layer, that it uses the correct projection. You can check or change by right-clicking a layer and "Set Layer CRS".

Above is Brussels central area buildings layer with the corresponding GeoTIFF image in the background. Generating contour lines from a GeoTIFF image involves two steps: Cropping (the area of the GeoTIFF is usually way too large for what we need) and generating the contour lines. Both operations are available from menu Raster -> Extraction. When using the Contour tool, be sure to turn "Attribute generation" on. This will, together with the contour lines, build a table and store the elevation of each line. This will be useful when we'll recreate a 3D model.

Our map is now complete, and if we right-click the contours layer, and check the attributes, we see our elevations list:

Before exporting to DXF, we need to perform one last step. The DXF exporter of QGIS will only export vector layers with the same projection system. However, the contours have taken the same projection system as the GeoTIFF, which are not Belgian Lambert. We then need to convert first. This is done by saving the contours layer (right-click it -> Save as) with the Belgian Lambert 72 projection system. Once that is done, we can discard the old one, and save to DXF via File -> DXF export. Make sure you mark the "Export features intersecting the current map extent" option, otherwise you'll be exporting the whole city, which will be quite huge.

We can then open our file in our vavorite DXF application(such as QCAD and do the necessary cleaning, remove stuff we don't need, etc. Both DXF files exported with Lambert or SAD69 will produce files in meters, I don't know if it is the case with any projection system, you'd better verify if using another system.

Unfortunately this DXF contains only 2D data. If you check the "Elevation" property of the terrain polylines, they are all zero. However, GDAL, the processing engine behind QGIS, is able to produce such a 3D DXF file from a contour shapefile with an "ELEV" attribute as we've taken care to do. Open a shell window in the folder that contains your contours file, and run a command like:

ogr2ogr -f "dxf" contours-lambert.dxf contours-lambert.shp -zfield ELEV

Changing "contours-lambert" by the name you used to save the contour file. You will see that a DXF file has been added. I wish someone would produce a plugin to do this from inside QGIS!

The new DXF file has the exact same coordinates as the previous one, so you can just import it in the former one, everything should just click into place (Any problem, open it in a separate tab and use the "Copy with basepoint" function of your CAD app and copy/paste the curves from/to the same point such as 0,0). Make sure to leave the 3D curves in their separate layer, so we can isolate them later to build the terrain.

It's now time to open the DXF file in FreeCAD. Make sure the "group objects by layer" option is turned on in the DXF preferences so we get all our curves as one object:

To build a nice BSpline surface from our curves can be easily done from the python console (at the moment there is no GUI tool for it). First we need to turn our curved into a points cloud by activating the "Points" workbench and using the "Points -> Convert to Points..." menu item, with a rather large value, like 5 or 10. After that, issuing these commands in the python console will create the BSpline surface (change the getObject("Points") with yours if your points cloud object is not named "Points"):

import Part,ReverseEngineering
obj = FreeCAD.ActiveDocument.getObject("Points")

This might take a little while. Use lower values than 16 to get a coarser but faster result, or higher to get a finer result. But you'll get a nice 3D surface built from the curves. This surface can then be measured, cropped, turned into a solid, etc.. with precise calculations.

in categories  freecad  opensource  permalink:  269   posted on 25.09.2016 23:43
From Yorik

Working with terrain in #FreeCAD

Since I have not much new FreeCAD-related development to show this week, I'll showcase an existing feature that has been around for some time, which is an external workbench named geodata, programmed by the long-time FreeCAD community member and guru Microelly2.

That workbench is part of the FreeCAD addons collection, which is a collection of additional workbenches that are not part of the core FreeCAD package but, since they are programmed entirely in Python and therefore don't need to be compiled, can be easily added to an existing FreeCAD installation. The FreeCAD addons repo linked above also provides a macro, which, once run inside FreeCAD, gives you an easy graphical installer that allows you to install, update or remove any of those additional workbenches. Click the link above and you'll get all the necessary instructions.

Also, this year was the first participation of FreeCAD to the Google Summer of Code. We got one student, Mandeep, who worked on building a more solid plugins installer for FreeCAD, capable of installing these workbenches but also all the macros found on the wiki. The work is not finished yet, but no doubt in the near future we will finally have a decent way to install all these additional features in FreeCAD.

Microelly2's geodata workbench basically allows you to fetch terrain data from the net, basically roads and building data from openstreetmap and terrain height data from both openstreetmap (but it doesn't always have accurate data) and NASA's SRTM data.

The procedure to get a piece of terrain with its height data in FreeCAD is quite simple:

  1. Install the geodata workbench and restart FreeCAD
  2. Switch to the geodata workbench
  3. Get the exact coordinates of the center of the zone you wish to import. You can do that simply by zooming in openstreetmap or in google maps, and you will see the coordinates in the URL bar of your browser
  4. In FreeCAD, menu GeoData -> Import OSM Map, fill in the coordinates. Leave "process elevation data" off. Buildings and roads are imported
  5. Click menu GeoData->Import OSM Heights and/or GeoData -> Import SRTM Heights to import height data from these two sources (use the same coordinates).

When done, you will get a piece of terrain with the roads and buildings, and the two terrain data (the SRTM data comes as a points cloud):

There will still be a bit of work necessary to turn this into data you can work with, but it's already a huge part of the work done.

The reason why I got interested in terrain data this week is aalso because I'm working on extending the Arch Site tool. Currently it is a simple container (it's actually simply a FreeCAD group with a couple of additional properties), but the idea is to turn it into something useful to:

  • Hold and process terrain data coming in various forms, such as meshes
  • Be able to get basic properties such as perimeter length or area
  • Be able to subtract or add volumes to it

A made already a couple of experiments to see how far that is possible, and it actually works surprisingly well. In the image below, a mesh was quickly made in Blender, imported and scaled in FreeCAD, then turned into an open Part shape (a shell). Doing boolean operations with shells gives a lot of interesting possibilities, and it's totally possible to keep the terrain surface "open" (no need to add an artificial thickness to it), and be able to subtract or add solids to/from it. Of course the volumes of earth that need to be added/removed are therefore easily computable.

I still need to solve a couple of minor issues, then all this should be in the FreeCAD code pretty soon.

in categories  freecad  opensource  permalink:  262   posted on 17.09.2016 22:23
From Yorik

#FreeCAD news and Arch workflow

So, let's continue to post more often about FreeCAD. I'm beginning to organize a bit better, gathering screenshots and ideas during the week, so I'll try to keep this going. This week has seen many improvements, specially because we've been doing intense FreeCAD work with OpeningDesign. Like everytime you make intense use of FreeCAD or any other app, you spot a lot of smaller bugs and repetitive annoyances. But a look a the commits log will inform you that many of those have already been fixed on the way.

The above image shows one of these jobs, more about it below

Generally speaking, working with FreeCAD is becoming very stable. Drafting and modelling is very straightforward already, and the workflow even begins to become fast. The biggest bottleneck I encountered during this week is using the Drawing workbench to build 2D sheets of the model. This is mostly due to the limitations of Qt's SVG engine, which doesn't support the full SVG specification, and many features like clipping, multiline texts or hatches are not supported by the Drawing viewer. When exporting your final Drawing sheet to SVG, however, and opening it in a better SVG-supporting application such as Inkscape, Firefox or Chrome, the result is very good. But it is annoying to have to work in the Drawing module without seeing the actual result (that's actually the main reason why there is a "preview in browser" button in Drawing).

But, bearing with these difficulties, it is already totally possible to produce this kind of result:

This is about to change, however, with the new TechDraw workbench that is currently already available in development versions of FreeCAD (refer to previous posts to obtain one). TechDraw is not based directly on SVG anymore, but on the more generic graphics engine of Qt. The final SVG sheet that it produces is built from it, at the moment you export, but what you see while you are working is not the SVG data itself anymore. This might seem more complex (it is, actually), but opens up a huge array of possibilities. Most of the limitations above don't exist anymore in TechDraw.

Of the two main tools that we use in architectural and BIM work to build 2D sheets, which are the Draft view and the SectionPlane view (which is also built with the Drawing Draft tool), so far only the Draft view has been implemented in TechDraw, once the Section View tool is implemented too we can think of abandoning the Drawing for good.

I'll describe a bit more of the workflow used in the jobs illustrated in this post. Almost everything was done directly in FreeCAD. The only pieces done outside were the cleaning of the existing floor plan, that we got in DWG form, in DraftSight, and the preparing of the Drawing template, and a couple of SVG objects to be placed directly on it, in Inkscape. All the rest is pure FreeCAD.

The basic workflow was this:

  1. Clean of unnecessary stuff in the DWG file, reduce number of layers, export it to DXF (in DraftSight)
  2. Import the DXF file in FreeCAD
  3. Draw a couple of lines and wires on top of the walls and columns of the existing floor plan (You can draw walls and structural elements directly, but I like to draw the baselines myself, to make sure they are where I want them, and I find the Draft tools much more convenient to draw stuff).
  4. Turn all your lines and wires to walls or structures (this whole thing is actually almost as fast as drawing them directly)
  5. Adjust thickness, height, alignment, etc... of walls and structures
  6. Put everything in groups. For me a huge power of FreeCAD over other BIM applications is the free grouping possibilities. By creating groups, and groups inside groups, you are basically organizing your data the way you want. No limitations, no rigid building/foor structure to follow. All the separation of, for example, the existing walls, the new walls and the walls to be demolished is simply done with groups.
  7. Add doors and windows. In most cases I didn't use the "in-wall" capability of windows, I made the openings first by subtracting a volume, then made the doors outside of any wall, and simply cloned them and moved them to their final places. This is bit slower, but makes your geometry much more failsafe, since windows are a delicate matter and still have bugs here and there.
  8. Add annotations, linework, texts, dimensions, in 2D, directly in the model (in the future, we hope to do most of this directly in TechDraw, but at the moment this "old-school" workflow is solid and works well. Again, separate annotations in groups, depending on the subject.
  9. Add one or more Section Planes to define plans and sections you'll need. If you grouped your objects well, you will only have one or two groups to add to the section plane as "seen objects". It is best to leave all the 2D geometry and annotations out, and have section planes only see 3D objects (being Arch or not).
  10. Prepare a Drawing template in Inkscape
  11. Create a new sheet in FreeCAD's Drawing workbench, give it our template, and start adding our stuff there, by using the Draft View tool, either with section planes selected (for cut or viewed 3D geometry), or groups containing linework, texts and dimensions (for 2D and annotations). This will allow you to create only a few Drawing views, so it keeps manageable.
  12. The clip tool of the Drawing workbench is annoying to use (it draws a big black rectangle on the sheet, which is not exported fortunately), so it's best to think about your layout beforehand, and model only what will appear on the sheet.
  13. Use the Drawing symbol and annotation tools to add stuff (logos, titles, etc) directly on the sheet.
  14. Export to SVG, open in Inkscape, there you have a chance to do more last-minute fixes if needed, and save as PDF. It is possible to export a PDF directly from FreeCAD, but opening it in another app is good to make sure everything is OK.
  15. Finally, in order to export to IFC, gather the arch objects inside a Building, export, and you are done. It is always a good idea to verify the exported IFC file in another IFC viewer application to make sure everything is there an dat the right place. A quick fix for buggy objects is to force them to export to Brep (there is a command for that in Arch -> Utilities).

Interesting detail, the small city map in the images above, is taken directly from OpenStreetMap. There you have a "share" button that exports to SVG. You can then open that in Inkscape, rework it a bit if you like (change some colors and linetypes, etc), save it and place it directly on your Drawing sheet.

Of course this workflow above is somewhat distant than what you are used to with commercial BIM applications. But things are improving, and also this is not necessarily something negative. It also gives you a lot more freedom, and the mix of 2D and 3D that FreeCAD offers, that you had in the old times of AutoCAD or in apps like Rhino is something I find much valuable.

Don't forget that almost all the work of OpeningDesign is open, so all the files from the examples above are available online.

Finally, a word about two features I added this week, one is a new display mode for walls, which shows them in wireframe, but with the bottom face hatched, which makes it very nice to work in plan view

Right now it's still in testing, to see how useful it is and how well it behaves, but if it works well it should be extended to support different patterns (taken from the material, for example), and to extend this to structural objects too.

And finally, another feature is a new addition to the structural precast concrete presets, a stairs element:

in categories  freecad  opensource  permalink:  258   posted on 11.09.2016 21:16
From Yorik

Bits of #FreeCAD

As I (more or less) decided last week, I'll try to post here more often about FreeCAD. There is not much new this week (at least from my part, other have been busy!), but nevertheless a couple of things are worth mentioning.

For who is new to this open-source thing, you must know that all the developement is open. You can check what is being done at any moment, all the discussion about anything going on is always public (you are very welcome to participate), and you can also get yourself a development version to try new things for yourself. There is also a bug tracker where you can report bugs, and also follow the resolution of a certain bug.

Development versions are built manually by kind community members from time to time, using the latest code, and can usually be installed side-by-side with stable versions of FreeCAD. So you can test, and if there are too many bugs (unusual, but it can happen), oyu can always get back to use the stable release. Since the development goes very fast, I really encourage you to try the latest development build available for your platform.

For the adventurous, of course, it is always possible to grab the source code and compile FreeCAD yourself. This allows you to use the latest features immediately. Compiling requires a bit of work on Windows and Mac, but on Linux it is pretty easy.

Among what I I have been doing this week, are a couple of bugfixes, and a couple of improvements in two specific areas:

IFC import

One of the msot interesting improvements is the ability to import 2D objects that are "attached" to 3D objects in IFC files. In IFC, each "building object" (that is, each descendent of the IfcProduct class, which is the "master" class of all specific building objects, like IfcWall or IfcBeam) can have a series of representations. The most commonly used representation type is the "body", which is the 3D representation of an object. But they can also have additional representations, such as "footprint" or "axis". The footprint representation is used, for example, by Revit to add door opening symbols:

FreeCAD cannow import these additional representations. At the moment, since we stil ldon't have a good way to do these door openings in FreeCAD, the imported footprint are added as separate 2D objects. But this gives us a couple of ideas and adding proper support for these opening symbols is on my todo list.

Another thing being worked on is to improve the transfer of IFC files between FreeCAD and Revit. Opening a file produced by one app on the other already works quite well, with the OpeningDesign folks we begin to get quite a bit of experience in that area. The main problem is to turn the objects exported by FreeCAD into usable data in Revit. Revit is very picky about what kind of data can be editable and become a family. It relies on a lot of features that don't exist (yet) in FreeCAD, such as common object types and material layers. This is a complex area, not very well documented, that you must explore step by step.

We are trying to document our findings in a public repository, don't hesitate to come and give us a hand.

Among the improvements to the IFC importer of FreeCAD I did this week, is a better rendering of extruded objects, and a better search for materials attached to an object (that can sometimes be buried under layers and layers of "material layer sets").

Arch object properties

I also went forward on extending the Arch (BIM) objects of FreeCAD with more properties useful for quantity retrieval. All Arch objects now have new Vertical Area and Horizontal Area properties that are calculated automatically when the shape of the object changes. Vertical Area is the sum of the areas of all the vertical faces of the object, which can be useful to calculate for example the area of concrete forms. In the case of walls, divinding that area by 2 gives you the vertical area of the wall as we usually need (because each "pane" of the wall has two faces, but we usually want only one side). This might seem clumsy, having to divide by 2, but calculating the vertical area this way is very solid. Any kind of crazy shape of wall, with no matter how many unconventional openings, will yield correct area values. I thought about dividing this value by 2 always, in case of walls, but that would make the walls behave differently than other Arch objects, which could induce errors too.

But there is still room for discussion of course. More than anything, it will need some testing.

The horizontal area is the area of the object when projected vertically onto the ground plane. So to get the area of form of a beam, you would simply add its vertical and horizontal areas.

Roof objects also have two additional properties, Ridge Length and Border Length. Border length is the sum of the lengths of all the border (or "open") edges of the roof, while ridge length is the sum of the lengths of the inner edges (ridges and hips). This will make it easy, when calculaying quantities, to know how much ridge cover element you need, or how much water drain.

Finally, I also added a new utility tool that simply shows/hides all the invisible subcomponents of an Arch object, such as openings. This makes it easy to select them, for example to move or modify them.

in categories  freecad  opensource  permalink:  256   posted on 02.09.2016 20:34
From Yorik

Patreon and more #FreeCAD development news

Last week, encouraged by several comments on the FreeCAD forum, I decided to open an account on Patreon. Often people are asking how they could contribute to FreeCAD with money, and I thought: Why not? If I could get paid for a certain amount of hours, that's a certain amount of hours I could dedicate permanently to FreeCAD. At the moment I work on it when time permits, which can vary a lot.

The patreon campaign is starting well. Several people sponsored me already. So I thought a first thing I could do to give a form of "thank you" is to get back at posting more often about FreeCAD here.

So I'll start that today, by writing about what's going on with FreeCAD development. As I suppose everybody knows, The 0.16 version of FreeCAD has been out in april this year. Since then, many things have been done, and the next version will feature massive changes. Unfortunately I haven't got time to write much about it, but this is about to change!

Here are two things that are currently available in the 0.17 development version:

PartDesign Next

Probably the most sorely missed feature in FreeCAD is a way to work with Assemblies. Jürgen, the father of FreeCAD, started to work on assemblies a long time ago. However, he didn't have more time to work on that, and his work has been left half-done. In the meantime, we gained a workaround, the Assembly2 workbench,which can now be easily installed with our addons installer macro and for many FreeCAD users, has been doing the job perfectly.

Jürgen's assembly workbench, though, required some heavy changes to the FreeCAD core, and specially to the PartDesign workbench. This i sthe main reason why it stayed behind and was very hard to push forward to merge in to FreeCAD. A courageous team of developers, among which ickby, blobfish/tanderson, Fat-Zer, DeepSOIC, the new FreeCAD warriors, took on them to separate the core + PartDesign changes from the assembly itself. This took a very long time, but was finally done, and is the base of what we ended up calling PartDesignNext.

Along the way, more functionality was added too, inspired by another FreeCAD addon workbench, WorkFeature, like a series of helper objects that can be used as bases for sketches and other PartDesign operations. This also helps working around another long-time problem of FreeCAD, topological naming (for which there have actually been some impressive progressesrecently).

In this new PartDesign, Any PartDesign operation, such as creating new sketches, or creating solids out of them, now happens inside a body. A new body will be created if none is present in the document. You can have several PartDesign objects inside a same body. Inside the body, you can also add several helper planes or lines, which can be used to align or construct other parts. You can now also link edges from other objects inside a sketch.

This forum post explains it all.

The result of all this has now been merged, and is available in 0.17 development versions. The road is now clear to work on full assembly funcionality, and work has already started in that way. But the new PartDesign already opens up a lot of possibilities, and working with multi-solid objects is now really good.


For who is following the FreeCAD progresses since a long time, do you remember the work of Luke Parry on upgrading the Drawing workbench? Unfortunately Luke went on other projects and his work stayed where it was. A year later, Ian Rees started a funding experiment similar to this Patreon one, and worked further on it. Once again, the work was stopped because Ian went on to other things. Right after that, fortunately we got a new addon called Drawing Dimensioning which already pushed things a ot forward by bringing a series of on-drawing tools such as dimensions, symbols and annotations.

Finally this year, Wanderefan gave the final effort, and brought all this work to a mergeable state, and it is now included in version 0.17 under a new name, TechDraw. This is to not break the current Drawing workbench, which will still be useful until TechDraw is fully ready. TechDraw is basically th same as the Drawing workbench, but with a series of improvements such as the ability to move views graphically, place dimensions directly on the sheet, or fill areas with hatches.

More things are coming there too, like section tools.

There are also more big changes under the hood, such as the use of VTK, which will first be used with FEM but might prove useful for a qualtity of other areas.

But there is much more to come. FreeCAD is being ported to new verisons of Qt (Qt5) and Python (python3). Most of the work is done, and we might soon see that included. However each of these big changes brings a fair share of unstability, which is normal, and therefore requires some time between each merge for the dust to settle. So we will probably need some time before things have stabilized sufficiently to do a new release.

As I hope you can perceive, the development team has grown a lot, and things are going at higher speed now. Exciting times ahead!

in categories  freecad  opensource  permalink:  255   posted on 31.08.2016 4:09
From Yorik
New rewritten Arch Schedule tool in FreeCAD,

Check the full docs here.

in categories  freecad  opensource  permalink:  252   posted on 20.08.2016 16:19
From Yorik
Plumbing desing in FreeCAD...

The whole functionality is now implemented, and is described here in detail.

in categories  freecad  talks  opensource  permalink:  204   posted on 24.02.2016 23:11
From Yorik

FreeCAD Arch Workbench presentation

A video presentation of the Arch workbench of FreeCAD that I did last week at ODC2016PN

in categories  freecad  opensurce  talks  permalink:  159   posted on 22.11.2015 14:43
From Yorik

Conférences #FreeCAD à Toulouse

Voici les slides de mes deux présentations de FreeCAD à Toulouse ce weekend:

- "Architecture et logiciels libres" à l'école d'architecture de Toulouse, vendredi: http://yorik.uncreated.net/archive/talks/architecture-libre-2015.pdf

- "FreeCAD: Une plateformededesign hackable" au Bazar du libre, samedi: http://yorik.uncreated.net/archive/talks/freecad-capitoledulibre-2015.pdf

in categories  freecad  talks  opensource  permalink:  153   posted on 22.10.2015 15:57
From Yorik

Palestra e oficina sobre o FreeCAD no SEMCITEC Guarulhos

Aqui estão os slides da palestra de hoje: http://yorik.uncreated.net/archive/talks/freecad-semcitec-2015.pdf (pdf) e http://yorik.uncreated.net/archive/talks/freecad-semcitec-2015.odp (odp), e o arquivo do FreeCAD usado durante a oficina (peça de lego): http://yorik.uncreated.net/scripts/lego.fcstd

in categories  blender  opensource  freecad  permalink:  107   posted on 09.09.2015 15:37
From Yorik

About FreeCAD, Svertchok and Blender

Commenting post 106: Yes, nikitron is the Svertchok master

I think I can reply here too... This would be very hard... Although the geometry algorithms of Svertchok probably could be adapted to work in FreeCAD, the problem is the nodes system. There is no such system in FreeCAD at the moment (some people are interested in creating one, though, but so far nobody came up with actual coding).

Personally, I think it would be a lot of work to do that, and even more work to maintain two different versions in sync after that, for not much advantage. In FreeCAD, it would benefit almost only architecture. The other engineering disciplines would have little use for something like that. While in Blender, it benefits other peopleinterested in generating algorithm-based geometry too.

Also, Blender is based on a very flexible, free-form mesh system, while FreeCAD uses much more rigid brep solid geometry. You would cut some freedom of Svertchok if it had to be adapted to work with solids only.

The key of working with architecture in FreeCAD (I need to write more about that), I think, is to not consider solely FreeCAD as your modeling/authoring tool. We take always great care of that with the Arch workbench, that you are able to work with mesh data imported from other apps like Blender or Sketchup, which are fast, free-form mesh modelers, where you are not bound to physical limitations, and your creativity is not limited by stupid BIM tools... It is the work of the BIM tool to bow to your creativity, not the contrary.

I don't think any BIM app out there has the same capability as FreeCAD to bring mesh data all the way up to valid BIM objects. Think of a mix between Revit and Rhino (which has excellent mesh-to-solid converison tools). You can really take the Blender monkey head mesh, and turn it into a valid wall object in FreeCAD, if your meshes are clean solids (no face superposition, no manifold edges), no further work is needed.

So for me, the real powerful place to have Svertchok is in Blender, where you can make it do almost anything, and explore forms without constraints. Then you have a little work, which is unavoidable when you have that freedom, to rationalize those forms, extrude faces into solid stuff, etc. Then, you import it into FreeCAD, convert everything to BIM objects, and that's it. This would of course be more comfortable with a tool like Svertchok directly inside FreeCAD, but at the cost of a portion of your freedom.

This focus we put on keeping FreeCAD and specially the Arch workbench as open as possible to all kinds of data input, explains partly why its own creation tools (wall, window, etc) have a lower priority (at least for me), and therefore are not as developed as one would wish yet. But I think this is the correct order: First we must make sure the model is open to maximum freedom. This is something very precious, and very opposite to more capable BIM apps like Revit. Then we think to the ease of use of the creation tools. If we were to do the contrary, the decisions we would take with the creation tools would sooner or later shave off some of that freedom.

Of course that doesn't mean we cannot have powerful creation tools like Revit! Certainly we'll get there at some point in time. But since our resources are limited (very few people working on the Arch workbench), it inevitably goes slow and one has to carefully think of priorities.

If you think of the Unix philosophy of "instead of one all-in-one app, rather many simple tools, each doing one task well", this Blender->FreeCAD scheme fits in pretty well. Never we'll have in FreeCAD mesh modeling tools of the quality of Blender. And it would be very hard for Blender to gain the technical and precision tools that FreeCAD now has. For me the path is clear: We need both.

in categories  freecad  opensource  permalink:  96   posted on 03.09.2015 17:51
From Yorik

About FreeCAD, architecture and workflows

Quite some time I didn't post about FreeCAD, but it doesn't mean things have been dead there. One of the important things we've been busy with in the past weeks is the transfer of the FreeCAD code and release files to GitHub. Sourceforge, where all this was hosted before, is unfortunately giving worrying signs of deprecation, many projects are fleeing like rats, and so did we...

The move to github

It's sad because SourceForge, in its glorious days, has been an amazing incubator for open-source projects, it gave a very powerful platform where you could host not only your code, but everything that goes around (website, user forums, anything) with a very liberal "we provide the space, do what you want with it" philosophy. Over the years, the platform has been sold and re-sold from one company to another, each one cutting further into that spirit and adding more aggressive marketing and advertising, until we came to the bloat it is today, with adware bundled into downloadable files, the whole platform minimally maintained and prone to huge failures, etc.

Of course nothing guarantees that the same thing won't happen with github. But at least our whole stuff is now more portable, and we can hop again much more easily if needed. Until we get a proper structure ourselves, obviously.

So from now on, watch this space, this is where you can download new releases of FreeCAD from. Specially the Windows pre-release is now updated pretty often thanks to sgrogan who does all the work.

Architecture workflow and 2D

Another thing I've started to work on, is to recode the DXF importer. Until now, we were using a DXF import structure inherited from Blender, which is coded in python, and another, different one, for export. Although it works pretty reliably, there are annoying problems, namely the different license, that forced us to not bundle the code with FreeCAD anymore, but to offer it through a separate, complicated additional download, and the fact that it is very slow, which makes the import of big files almost impossible.

This lead me to a reflection about the paper of 2D workflows in a modern BIM-based workflow. Altough we all wish that everything would be done with BIM, the reality around us is that BIM workflows are only used until a certain point of the project, and then the development invariably switches to 2D, for several reasons, the most common being that if one of the actors of the project still works in 2D, it basically forces all the others to switch to it too.

There are other reasons, some actually good ones, for example the fact that drawing details is actually less work in 2D than 3D, for the same result, or that construction drawings are usually made of much more symbols and indications than geometry itself.

This is a typical architecture construction document (the very final one, that goes to the construction site and is used by builders):

This is the part of it that is actual geometry (walls, columns, slabs, etc), that is, what is going to be built. Such data is easy to extract from a BIM model:

This is the part of it that is made of symbols, annotations, indications, etc, that is, things that won't be built themselves, but indicate how to build. Such information can be stored into a BIM model, and be extracted, but usually, in order to compose a nice, readable drawing, and not an unreadable mess, you'll still need to do a lot of 2D work manually:

So if we agree that we will still need to do 2D for some time, be it only to be able to process and incorporate the huge DWG files that your HVAC engineer sends you, I decided to try to make things a bit better in FreeCAD.

A first step is to redo a proper DXF importer. If you read this blog already, you probably know my position about DWG (basically that it is way too much work to support to be realistic, it would take ALL our time and resource, for a more than feeble result that would never be good enough, and, besides, that a DXF file is a reliable, 1 to 1 mirror of a same DWG file), so I'll concentrate on DXF and leave the conversion to/from DWG aside. FreeCAD does it automatically, if a conversion utility is installed.

I started using the dxf import/export structure from HeeksCAD whih is very simple, very fast and easy to use and extend. This is already working in the current development code (only accessible from python at the moment), and gives very promising results (30Mb files swallowed in a couple of seconds, instead of 20 minutes with the old importer).

The main problem with these 2D CAD files is what will need to be addressed next: They are made of thousands of little, dumb entities (lines, arcs, etc). FreeCAD objects are complex, intelligent structures, and it is simply not realistic to create one of these objects for each DXF entity. It would clog FreeCAD completely ater a couple of hundreds. If we group them together, however, FreeCAD can manage huge sets without problems.

Grouping geometry into compound objects is already possible. What is still needed is the ability to do so for non-geometric objects (texts, dimensions, etc), and extend the current 2D tools so they are able to work on these compound objects too. This will also make working with the Draft module a bit more like the Sketcher.

This will not turn FreeCAD into an AutoCAD clone, if that's what you are thinking. Nobody here is interested in spending all his time in doing that, besides, the world is already full of AutoCAD clones. What I'm looking for is the point that lies in the middle of the distance between full BIM workflow (the ideal) and full-2D workflow (often the sad reality). Will this be enough? I don't know, we'll see when we get there, but I think it's doable, which is far more important.

The future might bring some good things too on the LibreCAD side, if this matter interests you, I suggest you keep an eye on this, and encourage them to go further in this direction.


In the Arch workbench itself, things have improved too. There is now proper Materials suppport, which makes use of the generic Materials structure of FreeCAD, so Arch materials can be shared with the other Materials-aware workbenches (currently only FEM). Materials are stored in a separate structure in a FreeCAD document, and are then referenced by the different objects. Colors specified in materials will override object colors.

These materials are also already imported and exported to IFC, but still not with all their properties. The way IFC defines materials is a bit weird, and we must still experiment more there.

I also recently added a couple of enhancements to the IFC importer, which is now able to correctly import and export cloned Arch objects, which, in IFC, are objects that share a same geometry. In Revit, they come up as many objects using a same family.

Finally, a new Schedule tool has been added, that allows to automatically generate quantities lists and, in the future, other kinds of schedules, such as areas lists, doors schedules, etc. It is still very preliminar, but the foundations are there.

I also started experimenting with tools to support file versioning systems, such as Git or Bimserver. I'm not sure yet where this will go, but the whole idea is to experiment to find good solutions.


The FEM boys have also been very busy recently, have a look at the FEM section of the forum, if interested. The time is close when this can begin to connect to BIM.

That's it for now, keep an eye on the forum if you want to know more...

in categories  freecad  opensource  architecture  permalink:  95   posted on 16.08.2015 23:43
From Yorik

Preço de software BIM no Brasil

Abaixo está uma tabela com preços de software BIM para arquitetura. Incluí aqui somente software que tem suporte ao formato IFC (tanto leitura como gravação). Sem isso, acho que concordamos que não podemos chamar algo de BIM. Também retirei as soluções restritas a um certo tipo de construção (como DDS-CAD). As aplicações abaixo são as que sobraram, que permitem modelar a principio qualquer tipo de projeto, com qualquer técnica constutiva, gerar desenhos 2D, e importar/exportar modelos com outro software BIM usando o formato IFC.

Note que a maioria das empresas que desenvolvem esses softwares não divulgam os preços, o que está indicado abaixo, quando não informado no site, foi conseguido com usuários, em forums, e pode estar um pouco aproximativo.

Também tem algumas diferenças entre o que está vendido para o preço indicado, mas normalmente significa: o preço de uma primeira instalação, sem limite de uso, mas sem atualizações incluídas.

Não farei aqui comparativo qualitativo entre todos eles (num outro post talvez?), mas tem diferenças muito grandes. Aconselho analisar bem…

Software Preço Observações
Revit R$ 20 853,27 Vende direto no site da Autodesk. Existe uma versão LT mas que não vendem no Brasil.
ArchiCAD R$ 24 951,90 Não vende diretamente no Brasil. Este é o preço na Europa. Tem uma versão “solo” para metade do preço.
AllPlan R$ 23 195,70 Não vende diretamente no Brasil, este é o preço na Europa.
Digital project R$ 30 000,00+ Não vende diretamente no Brasil nem online. Preço não divulgado, mas bem acima dos R$ 30 000.
Vectorworks R$ 9 037,35 Não vende diretamente no Brasil, este é o preço nos USA.
Microstation Architecture R$ 24 273,70 Não vende diretamente no Brasil. Preço do antigo microstation + triforma, agora vendido como um software só (Bentley architecture)
4M IDEA PRO R$ 1 044,65 Vende direto do site da 4MSA.
Softtech Spirit R$ 21 667,30 Não vende diretamente no Brasil nem online.
RhinoBIM R$ 6 582,11 Vende direto do site. Preço do Rhino + RhinoBIM.
Sketchup PRO R$ 2 437,82 Vende direto no site.
FreeCAD Gratuito Software livre.
ProgeCAD Architecture R$ 6 149,00 Vende direto no site.
VisualARQ R$ 5 189,07 Vende direito no site. Preço do Rhino + VisualARQ.

in categories  talks  opensource  freecad  permalink:  82   posted on 07.07.2015 15:33
From Yorik

Palestras no FISL

Temos duas palestras no FISL este ano! Ambas sbado, dia 11/07, na sala 41A:

FreeCAD - Uma plataforma de design hackevel as 11h, essa ser feita s por mim

link da palestra: http://schedule.fisl16.softwarelivre.org/#/talk/220
link dos slides: http://yorik.uncreated.net/archive/talks/freecad-fisl16.pdf

O dia-a-dia de um estdio de arquitetura livre as 16h, por Mara e eu.

link da palestra: http://schedule.fisl16.softwarelivre.org/#/talk/239
link dos slides: http://yorik.uncreated.net/archive/talks/uncreated-fisl16.pdf

Nos vemos la!

in categories  freecad  opensource  permalink:  76   posted on 28.06.2015 19:34
From Yorik


A couple of FreeCAD architecture/BIM related questions that I get often:

Is FreeCAD ready enough to do serious BIM work?

This is a very complex question, and the answer could be yes or no, depending on what's important to you.

It of course also depends on what is BIM for you, because clearly enough, there isn't a universal consensus about this. I'll explain it in my own terms: BIM is above anything else, the "meaning" that you give to a 3D model.

That is an architect's point of view of course, other areas will have other opinions and needs. What differentiates a BIM model from any "agnostic" 3D model, is that elements are not bare geometrical elements, but they carry a whole layer of meaning. For example, a wall is not just a rectangular shape, it is a wall, which means, for example, that it has a material, and it separates two different spaces, and many more implications. Same for all other elements of a BIM model. They all carry a layer of "meaning".

You often hear saying that "Only Revit or ArchiCAD are true BIM applications". If you believe that, of course, FreeCAD will never be ready to do serious BIM work for you. But if you consider BIM as I explained above, a large quantity of applications could do BIM. If you were able to add that layer of information on top of SketchUp models, for example, you would be able to do BIM in SketchUp (there are many plugins trying at that, by the way). As many say, in BIM, the "I" (information) is the key.

The people behind the IFC format spent a great deal of effort in trying to organize these meanings, and to catalog the different components of a building. You quickly find flaws and things that don't work perfectly, but it has the great merit to exist, and we certainly must not consider it as a finished format, but as a constant work-in-progress. Defining a building in a text-based computer format is no simple task.

What the Arch module of FreeCAD does, actually, is to allow you to add this layer of meaning to your models. It is not fundamentally made to offer you modeling tools (although they already work more or less well), rather to allow you to model with other FreeCAD tools, or even with other applications such as Blender or SketchUp, and add BIM meaning on top of it. It generally follows IFC definitions, while trying to stay as broad as possible too. For example, all structural objects in FreeCAD are gathered under a generic structural element. That you can further define as a beam, a column, a slab, if you want to, but you can also keep generic. The idea is to allow you to define your own meaning. You could have a project with a structural element that is not a beam nor a column (yes, that's you, Zaha Hadid, you avid reader of this blog). In FreeCAD we want to allow that as much as possible.

This actually gives you powers unavailable in other BIM apps, any object can become a valid, meaningful BIM object. You can take the Blender monkeyhead object, import it to FreeCAD, and turn it into a wall. It will behave exactly like any other wall, with the same properties.

However, many people already use commercial BIM software, like Revit or ArchiCAD. They will often compare FreeCAD to their usual software, and in 99% of the cases, find that FreeCAD doesn't offer the same level of comfort, and therefore deem FreeCAD unfit for the job.

This is a recurrent issue with all open-source tools, when they get compared to similar commercial solutions, not only FreeCAD.

Open-source software doesn't have the same goals as commercial software, and they don't fight in the same category either. Commercial software is expensive, and counts on hundreds of full-time developers. Open-source software counts on a handful of part-time voluntary developers. Obviously, there are things in terms of polishing, of agreement and comfort for the end-user, that take an absurd amount of work to achieve, and that are not a priority for open-source developers, that prefer to spend their available time on things like efficiency and stability.

On a more general level, extracting yourself from your comfort zone will always require a somewhat painful effort, being for an open-source solution or not.

But you must also consider the other side: Open-source software like FreeCAD also gives you advantages unavailable with commercial solutions: The file format of FreeCAD is open (it is actually a zip file), your data is never lost or prisonner. If someday you don't use FreeCAD anymore, it will always be possible to extract all the data from the files and convert it to something else. The development of the application is also something you can have a say in. If you find a bug, and can narrow it down to the exact steps that make it happen, chances are very high to see it fixed in no time. Try that with Revit There is also the fact that it doesn't cost you anything, I probably don't need to remind you how much costs a Revit license... And finally, as explained above, the most important point for me, in FreeCAD we have a space to define our tools, our workflow, the way we want it. Not the way a billionaire multinational firm tells us...

If you reformulate the question in: Is FreeCAD capable of delivering valid BIM models, openable in other IFC-aware applications, the answer is definitely yes.

Be prepared to a bit of effort, though, and to have to find workarounds for the features still missing in FreeCAD. But the community is there to help...

How to start with FreeCAD?

If you are ready to try, you will quickly find that FreeCAD has a rather steep learning curve. There are two big reasons to this: The complexity of the tasks it can perform, and the lack of tutorials and documentation oriented to beginners.

FreeCAD is nowadays catering for a very wide range of users: mechanical engineers, architects, home-3D-manufacturers, civil engineers, electronic engineers, and many more. Each of these specialities require specific tools. So the application has become huge and complex. We recently counted that the FreeCAD source code contains almost 500 icons. Not each icons is a tool, of course, but nevertheless that tells you something about the complexity. Another problem is that each of these specialities has its own jargon, its own terms to designate stuff, so FreeCAD is full of unusual wording and concepts.

So one of the biggest difficulty you'll meet when discovering FreeCAD, is to understand what are the tools you need, where they are, and how they work.

The main concept you need to cope with is how the FreeCAD interface is divided in workbenches. Workbenches are collections of tools aimed at a specific task or family of tasks. For example, there is a "Ship" workbench that contains tools to work on ship hulls, an "Arch" module to work on architectural models, etc.

When changing of workbench, you are just changing the tools displayed to you in the FreeCAD interface. The 3D document and the objects you're working on, stay the same. You can do an operation on one object with one workbench, then another operation with another workbench.

There are more generic workbenches (Part, that contains generic 3D tools such as boolean unions and subtractions, or Draft, which contains basic 2D tools such as line or circle), and more specific ones. Usually, you will never have enough with just one workbench. You will need tools from different workbenches.

The FreeCAD wiki has a pretty complete documentation about all those workbenches, what they do, what tools they contain:


There is also a page that shows (almost) all the tools at once:


A first thing you might want to do, is to browse through that documentation, and see what does what, and what is located where. Specially, find the most generic ones, that everyone needs, for exampe basic 2D tools like Line, Rectangle, or common operations like Move or Rotate, or 3D operations like Extrude, Union or Subtract. Once you have a good picture in mind of where are the tools you need, you will find that a very big part of the difficulty has been overcome.

Once you know your tools, FreeCAD offers you many way to change the contents of your workbenches and add tools from other workbenches, so your speed and efficiency will better over time.

The second problem, the lack of tutorials for beginners, is only apparent. Certainly you will not find many on the FreeCAD official website, or on the forum. The place you need to look to is youtube.

Many members of the FreeCAD community are prolific video publishers, and a simple search for "FreeCAD" on youtube will give you many hours of learning material, some of very high quality:


Some users even started to build collections:


You will notice, however, that very few of those videos are generic introductions, most are about a specific tool, subject or workbench. But this one, made by Bejant, a long-time FreeCAD veteran, is a very good overview of how FreeCAD works:


You might e saddened by the fact that most videos are dealing with FreeCAD in a generic way, and not centered on architectural work. At the moment this is true, unfortunately, but it might also be an opportunity to rethink your approach to BIM modelling, and consider it in a more generic way...

We also have an in-depth, written tutorial about the Arch module. However it is more made to walk you through all the functionality of the workbench, rather than actually teach you stuff step-by-step. Consider reading it rather than trying to reproduce it closely:


Once you begin to put your hands in FreeCAD, you'll certainly meet specific problems: How do I do this, how do I do that. That is when you'll discover the true power of the FreeCAD community. Most of these questions, if precisely formulated, will receive numerous, fast and deep answers on the forum (make sure you do some search to see if your question hasn't been answered before):


in categories  talks  freecad  opensource  blender  permalink:  37   posted on 21.03.2015 23:46
From Yorik

My FreeCAD talk at FOSDEM 2015

This is a video recording of the talk I did at FOSDEM this year. The pdf slides are here. Enjoy!

FreeCAD talk at FOSDEM 2015 from Yorik van Havre on Vimeo

in categories  freecad  opensource  permalink:  22   posted on 10.02.2015 15:15
From Yorik

FreeCAD, Architecture and future

There is quite some time I didn't write here about FreeCAD and the development of the Architecture module. This doesn't mean it has stopped, but rather that I have temporarily been busy with another project: The Path module, plus there has been my FOSDEM talk, and finally we're on the verge of releasing version 0.15 of FreeCAD (scheduled for end of february). Now all these things are more or less behind my back, and I'll be able to get back to Arch development.

The Path module

Just a word about this new module, that is still under heavy development, but that is already stable enough for you to test (currently you still need to compile it yourself). This module is aimed mainly at producing GCode, which is a common language used by professional-grade cutting machines. Unlike 3D printers, these machines can produce objects from a wide variety of materials, such as wood, metal, etc.

These machines work mainly by moving a rotating tool, that looks a bit like a drill, around a piece of material, which carves the material and produces the final piece. The path that the tool must follow, along with other settings such as speed, must be furnished to the machine, through GCode language.

The module in its current state provides a solid base to import, display, handle and export these toolpaths to GCode. On top of this, several scripts are being developed to automate the generation of toolpath from FreeCAD objects, or convert the output/input to/from different dialects of GCode.

There is still a lot of work to do on the Path module, but we prepared all the terrain for that work to be easy, as it can be done almost fully in python.

The importance of this module for architectural work might not be obvious at first sight, but I believe it might become fundamental in the future. There are more and more experiments around the world which begin more and more to rely on machining (for ex the wikihouse, popup house, or Greg Lynn's robotic experiments). All other engineering specialties are or already have shifted from drawing to direct design-to-machine processes. Only us from the construction field are still busy with paper drawings.

There are of course a lot of spectacular predictments such as gigantic construction robots (check the cool models) or more recently 3D-printed buildings, but these are still very heavy and inflexible ideas. It is far more probable that the real revolution won't come from these but from much easier and already existing workflows such as having all the pieces of a building prefabricated and in-factory partial assemblies. This will require from architects a much higher level of control over fabrication processes, and possibly a drift from pure design to also the design of the manufacturing process.

Of course, probably some new in-between industry could appear and take place there, that would take the architect's design and generate the manufacturing processes from it. But is that a good thing? Is it really the way we want the profession to evolve, do we want to be pushed still more out of the game, to just do a job that is everyday more futile and useless?

These are very theoretical questions of course, but probably you begin to see where this whole area of machining, and the unique opportunity that FreeCAD offers to mix it with architectural work could be interesting and beneficial to architecture.

In the current Arch module, as I wrote in an earlier post, we already started implementing some tools that might in the future bridge the gap and permit architects to fully control the manufacturing process of the pieces they design. This is a fascinating new area, and I certainly plan to work a lot more on it in the future.

The development of this module was also a first experiment of sponsored development (members of the CAM community gathered to sponsor the development), and I believe it was pretty satisfactory for everybody involved. The development went very fast, and, although it didn't result in a "finished work" (that concept doesn't really exist in open-source software anyway), it provided a strong base to further development.

This module will be merged into the official FreeCAD source code after the 0.15 release, which should happen by the end of this month.


I was also invited to the FOSDEM this year, to give a talk about FreeCAD. The whole event was extremely cool, I'd highly recommend you to try to go to it one day if you are interested in open-source software. It was literally packed with people, talks, events and of course, waffles and beer!

I enjoyed a lot talking about FreeCAD, and apparently people liked the talk. The slides are available here, the video recording will be made available later by the FOSDEM people, I'll post it here when it is online.

The Arch workbench

In the coming weeks we'll release the version 0.15 of FreeCAD, and the first thing that will be merged immediately after, is a modified IFC exporter, based on the reunified version of IfcOpenShell that is being prepared right now. During the last year, IfcOpenShell development has been split into two branches, one "stable" and the other where we experimented with advanced python interface and export capabilities. These two branches are finally being merged into one single powerful version that combines the strengths of both. With this done, we will have a solid base to develop further a couple of concepts that we've been discussing with the IfcOpenShell people, basically recreate "intelligence" from IFC contents.

There is currently (as ever, actually) a lot of discussion on the net about the IFC format, and the high level of dissatisfaction that architects experience when dealing with it. The main cause for that sentiment is that IFC is a "dumb" format, that represents static objects, and discards all the higher-level "intelligence" that modern BIM software such as Revit and ArchiCAD give to users.

Our idea is that 95% of that "intelligence" is made of very simple concepts (for example, a wall "knows" its baseline, it is not only a cubic shape, so with that baseline and a couple of parameters such as width and height, you can recreate the wall), and these can very well, in a way or another, be saved in IFC files.

The main problem is that IFC files must be produced with great care, and read back into BIM applications with the same care. This is not often found among commercial BIM solutions, as their vendors have more advantage in trying to make their users stick to their own proprietary formats.

In the open-source world, however, we don't have that necessity, and IFC seems therefore absolutely interesting to us. It is open, doesn't follow what a specific vendor wants, and being able to use these 95% seems already a pretty good goal to me. We can care about the remaining 5% at another time.

Concretely, this involves being able to extract all the geometrical construction of an object from an IFC file, as to reconstruct it in FreeCAD the way it has been encoded, and also export all this construction back when exporting files.

The latter step is already implemented pretty far, and if you export a FreeCAD file where you modelled all the objects yourself with FreeCAD tools to IFC, most of it wil open in Revit as editable families. However, reimporting back in FreeCAD will currently loose modelling history, and therefore on a new export the IFC file will contain only uneditable objects. This is the main problem I'll attack.

Visual experiments

I've also been experimenting with a couple of visual goodies. One is a way to display sections in the 3D views. Coin3D, the library we use to manage the FreeCAD 3D views, already offers a simple mechanism to hide a part of the scene, but there was the problem that you can see the inner faces of objects (since in the 3D view all objects are represented as meshes). This is not very realistic for architectural objects, which are always solid.

A sketchup method gave me a good idea: combine Coin3D's clipping with a single-face lighting, so the inner faces of objects receive no light, and appear therefore as pure black. This gives pretty good results:

I'll try to add this system to Arch section plane objects, so with the switch of a button you can turn that kind of display on/off.

Another test I did recently was with shadows. To my big surprise, I discovered that Coin3D supports bitmap shadows. You need decent 3D hardware, but it works very well. In the next weeks/months I'll try to integrate this further in FreeCAD.

The 0.15 release

FreeCAD is now in "feature freeze" mode, where nothing new is added, only bugs fixed. There is no exact release date, but we plan to do it before the end of the month. The release notes are not complete yet, but will give you a rough idea of what to expect in thisnew version, in case oyu didn't try it yet. Don't forget that if you are using Ubuntu, the FreeCAD community maintains a PPA that updates automatically everyday, so you can enjoy a bleeding edge version fresh with the latest developments.

There is still some work to do on the translations, so if you want to give us a little help there, this will be much appreciated!

in categories  talks  opensource  inthepress  freecad  permalink:  14   posted on 01.02.2015 10:36
From Yorik
This is the pdf file of my FreeCAD talk of yesterday at the FOSDEM in Brussels. As soon as I get my hands on the video, I'll share it here too. Enjoy!

in categories  freecad  opensource  permalink:  156   posted on 13.09.2014 17:57
From Yorik

About panels and blocks - new elements for FreeCAD

I've more or less recently been working on two new features for the Architecture workbench of FreeCAD: Panels and furniture. None of these is in what we could call a finished state, but I thought it would be interesting to share some of the process here.

Panels are a new type of object, that inherits all the properties of other architectural objects, such as additions and subtractions or nomenclature (description, tag, etc...). They are based on a 2D profile, which can be made with any of the FreeCAD tools (draft, sketch, etc) or imported from a 2D drawing. They are primarily made for panel constructions such as the wikihouse or pop-up house projects. But like the rest of the Arch workbench tools, the idea is to stay very generic, and to offer a general-purpose tool that can be used in any situation where such a flat object based on a 2D contour might be used.

Currently the tool only offers a simple 3D object, but the complete plan is to offer a full workflow, from design to the output of sheets to be fed to the cutting machine. But I'm still unsure of how all all this must click together. What is the best path to work with these objects? Would you take pre-cut pieces from a base sheet, like plastic airplane models or wooden dinosaurs, then mount them in 3D? Or is it best to draw the pieces directly at their location? But wouldn't that require a way too precise knowledge of your available elements dimensions?

Certainly this will require a bit of practice to sort out. Try to work with the tool the way it currently is, see what are the best paths, experiment. If you are interested in helping with that, there is a dedicated thread on the FreeCAD forum, where you are welcome to propose ideas.

I should also of course contact the wikihouse developers, who might have some more ideas over the question. My first idea had been to try to convert their sketchup models automatically, but this will be harder than it seems, since in sketchup the different parts don't carry enough information to easily determine which faces forms the profile of the object. But that question is not closed yet, we might still figure out an efficient way to achieve that.

On the image above, you can see on the right a model imported directly from one of the wikihouse sketchup models (converted to .dae), and the corresponding cut sheets imported as .dxf. The dxf files made available on the wikihouse site seem to have a weird formatting that FreeCAD doesn't read well, so I opened and resaved it in LibreCAD, then FreeCAD opened it correctly. Then, it's just a matter of selecting all the profiles and pressing the Panel button. The profiles that have holes can be done in two different ways: either making a panel, extruding the hole, then subtracting, or, better, first turning both the profile and the hole into a single sketch with the Draft2Sketch tool, then creating the panel. The thick object on the left is a panel made of several layers, which works the same way as walls: you build several panel objects from the same profile, and give each of them a different offset value.

Currently such multilayer objects have few tools supporting them, but the idea in the future is to make them always behave as one.

Furniture is a trickier subject, although of less importance. The big problem we have here is availability. We all agree that the best would be to have nice, solid-based models like you have in Revit or ArchiCAD, that you can for example find on http://www.bimobject.com. The problem is, both use specific file formats (rfa for revit and gdl for archicad) that are hard or impossible to parse and import in FreeCAD. Some of these sites propose IFC versions, but in 99% of the cases, the IFC version is a degraded faceted version of the model, that lost all its solid information. Creating a model with these objects in Revit or ArchiCAD and exporting it to IFC almost always also results in these pieces of furniture being faceted.

There is one solution for revit families, though, that is not very practical but works: Export them as .sat files, then convert them to a format that FreeCAD likes (.stp or even better, .brep) with the cad exchanger application, which is (currently) free for personal use. That app is developed by Roman Lygin, one of the founding developers of OpenCasCade, FreeCAD's geometry kernel.

Objects obtained from that method are pretty nice and behave perfectly when projected in 2D:

There is another problem, which is that pieces of furniture can be really very complex, if they are modelled faithfully. Which adds a lot of weight to your model, for something that is not essential to the building. So I also looked at another solution: meshes. Meshes are lightweight, you can literally stuff your FreeCAD model with hundreds of them, without caring much about the complexity, and without loosing much performance.

If you look on the web, you will find a lot of 3D models of furniture. A really awful lot. In fact, just looking on the sketchup 3d warehouse, probable the biggest one, you will probably find exactly the piece you want. The problem, of course, is that almost all of these models are meshes, and they vary a lot in terms of quality and complexity. This goes to the point that you will rarely find a furniture model that will convert cleanly to a solid-based object. there is also the problem that curves in meshes are faceted, so their aspect is not very good when projected in 2D.

Finally there is the fact that furniture, as well as other kinds of objects in an architectural document, are often best represented symbolically instead of accurately. For example, when you show the plan view of a washing machine, you won't want to represent all the buttons and controls, otherwise your drawing will become pretty complex to read. Some applications, such as ArchiCAD and many others, solve that problem by allowing the user to define custom 2D representations for a 3D object, for example its top view, or its front view. These representations are then used when creating 2D drawings.

This is an interesting idea, and it would allow the best of both worlds: Being able to pick any mesh you like on the net and use it as a piece of furniture in FreeCAD, and also have these objects coherently represented when creating 2D views of your models.

Of course having to draw 2D views of furniture yourself would be a lot of work, so I also came up with a simple method to create those views automatically from meshes. This method is very brutal and slow, but has the advantage to not depend much on the quality of the mesh: It projects all the facets of the mesh on a plane, remove the facets that point to the wrong side, then unions all these facets into one big flat face. This way you easily - although not quickly nor necessarily beautifully - create contour views of your meshes, with the big advantage that these contours are shapes, so they behave very well when your model is projected on a 2D drawing:

In the arch utilities menu, there is a new command that allows to create these 3 views from a selected mesh.

The new arch furniture object currently implemented in FreeCAD (that is called arch equipment, because it is also aimed at making other kinds of standalone objects such as sinks, light fixtures, etc) is therefore a hybrid. It can be a shape or a mesh, depending on the object you base the furniture object upon, and has 3 slots for 3 additional shapes, for XY, XZ or YZ views. It also has a couple of additional non-geometric properties such as model, url, etc that are convenient for this kind of objects. Currently these 2D views must still be added manually to the furniture object (via python).

Of course nothing would prevent you from furnishing your own 2D views instead of these automatic ones. I'm not sure how far that will prove practical on the long run, but we'll see! If ArchiCAD users do it, why not us!

Anyway, I hope this is a good way to start attacking the problem, leaving the maximum of freedom to the user, which is one of the base concepts of the arch module. Currently mesh-based equipment objects are not treated yet when projected on a Drawing sheet, but that will be taken care of next. Like most of the things we're implementing in FreeCAD, it starts rough, then gets refined along the way, in no small part thanks to the interaction and feedback with users. Check the FreeCAD forum if you are interested in helping!

in categories  freecad  opensource  permalink:  125   posted on 15.08.2014 23:43
From Yorik

DXF export of FreeCAD Drawing pages

I just upgraded the code that exports Drawing pages in FreeCAD, and it works now much better, and much more the way you would expect: Mount your page fully in FreeCAD, then export it to DXF or DWG with the press of a button.

Before, doing this would export the SVG code from the Drawing page, open it in a new FreeCAD document so it got converted to FreeCAD geometry, then export it back to DXF. It gave a lot of errors and was very slow. Now the whole system is based on templates (you need a DXF template corresponding to the SVG template you use in FreeCAD), and the views that appear on the Drawing pages also output their own DXF code.

Of course things are still far from perfect, there is still no support for paper space and many other features, but it is already handy. The template is exported at 1:1 scale, and each view becomes a block, scaled by the same factor as in the Drawing page. So, scaling everything back to 1:1 is very easy too. In the image below I just scaled everything up, exploded, and modified the Standard dimension and text styles, 5 minutes work:

The two default templates of FreeCAD (A3 and A4) already have a DXF version, so you can test this immediately if you use a development version of FreeCAD. Not all views placed on the page will be guaranteed to work yet, but at least everything that is based on geometry, plus Annotations and a couple of Draft objects such as dimensions works.

The model in the first screenshot is my current IFC test house, I'll blog more about it later...


in categories  freecad  opensource  permalink:  116   posted on 09.08.2014 3:50
From Yorik

A bit of FreeCAD BIM work

This afternoon I did some BIM work in FreeCAD for a house project I'm doing with Ryan. We're using this as a test platform for IFC roundtripping between Revit and FreeCAD. So far the results are mixed, lots of information get lost on the way obviously, but on the other hand I'm secretly pretty happy to see FreeCAD capable of communicating fluently with Revit already.

We already identified many bottlenecks, a major one being how FreeCAD imports IFC files, it basically transforms everything into dumb solids, which, when exported back to IFC, become faceted Breps, which Revit treats as non-editable. FreeCAD's native Arch objects, on the other hand, are in most case built of standard extrusions, and therefore stay editable in Revit. Thomas from ifcopenshell, which is the IFC importer/exporter we use in FreeCAD, is also thinking about the problem, no doubt we'll come with a solution any day soon.

In the meantime, modeling directly in FreeCAD, although slow (way slower than I would do in Blender), is already pretty reliable (not a single crash, everything nicely undoable, modifiable, fixable, etc) and enjoyable (fairly easy to look at your model the way you want to see it). It's not something I do often, I prefer the speed of Blender to raise the geometry, then I use FreeCAD to turn it into serious stuff, but here I specifically wanted to use the native Arch objects.

The speed of the workflow is of course a delicate matter, that can't be solved overnight, but now that we reached a certain maturity and stability with the Arch module, it'll be the time to begin to study more efficient ways to use it.

in categories  freecad  permalink:  110   posted on 05.08.2014 20:36
From Yorik

FreeCAD Spaces

I just finished to give a bit of polish to the Arch Space tool of FreeCAD. Until now it was a barely geometric entity, that represents a closed space. You can define it by building it from an existing solid shape, or from selected boundaries (walls, floors, whatever).

Now I added a bit of visual goodness. The Space object has gained a label, which is nicely configurable. You can make it display arbitrary text, but also automatic things like the object's name, the floor area, or other properties such as tags. You can also tweak all the usual things such as font, size, alignment, etc. The first line can also be displayed in a different font size, and you can place the label anywhere, visually, with the Draft Edit tool. If you show the floor area, the new units system is taken into account and the area is shown in your preferred unit.

On the image above, all the texts with area underneath are automatically generated that way.

Space objects also gained some slots to specify material finishings for floor, walls and ceiling. These are not used for anything else than storing your own text entries at the moment, but no doubt we'll find some better use for them later...

in categories  freecad  opensource  permalink:  80   posted on 21.07.2014 23:07
From Yorik

FreeCAD release 0.14

This is certainly a bit overdue, since the official launch already happened more than two weeks ago, but at last,here it goes: The 0.14 version of FreeCAD has been released! It happened a long, long time after 0.13, about one year and a half, but we're decided to not let that happen again next time, and will try our best to stick to 3 to 6 month release cycles from now on.

To know what changed in this release, read the full Release notes, which will explain everything in detail. Also have a look at the Arch tutorial if you haven't yet, it explains pretty much how the whole Arch module works.

From my point of view, that is, the point of view of an architect, FreeCAD is slowly becoming a solid, decent BIM authoring tool. We now have solid and trustable IFC import in FreeCAD, if IfcOpenShell is installed. If IfcOpenShell is not present, the old IFC python parser we had in version 0.13 is used, but that parser is now so weak that we'll probably remove it in next versions, because it is not useful anymore.

IfcOpenShell is also preparing a new version, which is already supported in this release, and allows to export FreeCAD models to IFC. Since the beauty of the IFC format is in its concept, that, is, the complex "grammar" by which you describe a building in code, the whole operation to export anything to IFC is a big and delicate work, that involves many conceptual decisions. This is a subject which will certainly span over several releases.

The Architecture workbench of FreeCAD, which is where most of the architecture and BIM-related tools are, is also evolving and maturing slowly. Nobody creates a BIM application from scratch, and these things take time to build, evaluate, and see how it works best. Nevertheless, some of these tools, namely the older ones like wall or structure, are now becoming pretty robust, and using them as building blocks for BIM models is becoming quite enjoyable and efficient.

Nowadays, I use FreeCAD in all of my projects. There are several scenarios for which it already occupies a big place, namely importing and converting blender models to solid geometry, and exporting 2D views (sections, plans and elevations). Blender continues to by my modeler of choice in the first phases of the project. Nothing beats the modelling speed and the freedom you get from it. A bit like sketchup, with the fundamental difference that, apart from blender being open-source and running fully and natively on my Linux machine (sketchup works, but not with all its functionality and plugins), blender offers you a much, much better control over the topology of your geometry than sketchup, which actually tries to hide it from you.

This allows you to build models that are easily "freecad-ready": clean meshes, with no overlapping, no manifold edges, that get converted to solids in FreeCAD without errors. The old dream of turning your sketchy model into a BIM model is becoming very real.

Of course there is fundamentally a difference of philosophy between what you do when you build a sketchy model, when you are trying to compose an architecture project, and when you are building a BIM model, where you know what you are building, and you are mainly adjusting things. No matter how perfectly you build your model in the preliminary phases, there will simply be things you don't pay attention to at that stage. So the process will necessarily involve modifications and "redo it the proper way this time" iterations. This is often where you get your feet trapped in the wheels with parametric modeling. So I'm more and more in favor of a simpler, more clearly-labelled and well constructed approach, where instead of nesting many levels of parametric objects, you prefer a clear human-readable organization, based on grouping objects and labeling them correctly. This will certainly be the main path I'll base my workflow on in the near future.

So, happily we now have this 0.14 release out of the way and can concentrate on new stuff. My main target for next release will of course be IFC export, but there is a lot more on the way. For now, enjoy the new release!


Windows version
Mac version
Ubuntu PPA
Source code

in categories  freecad  opensource  permalink:  40   posted on 29.04.2014 2:57
From Yorik

FreeCAD and IFC: sticking to standards

After my last post about IFC support in FreeCAD, I worked a bit further in order to make the test house behave better when imported into other IFC-capable applications. This is basically the first steps of FreeCAD into the big boys playground. I already leaned a few tricks on the way, that are worth sharing here.

The first thing to know, is that the IFC format is complex, and there are usually many ways to achieve something, and things can become very, very complicated. So I started with the easiest path (the idea is to go the more complex ways later on), which is exporting all the geometry as faceted objects. This is obviousy not excellent, since the objects are reduced to a bunch of faces, and become very hard or impossible to edit. But, this method has the merit to just export anything, without errors (as long as there are no curves, that's for later).

The first test I did was also reimport the IFC test house in freecad. So far so good, all the objects are recreated correctly. Only problem, as stated above, they became dumb shapes, and lost their parametric behaviour.

A second step I did then, is to use the most basic and most used modeling mechanism of IFC: extrusions. Instead of defining an object by its faces, you define a base loop (polyline), and an extrusion vector (direction and length). Several FreeCAD objects are now exported that way when you do an IFC export. At the moment, though, this mechanism is only used in "clean" cases (objects that have no addition or no subtraction, and where the extrusion is in the Z direction). Of course, later on, we need to dissociate these additions and subtractions, so this extrusion mechanism will catch more and more cases.

A second application that is now my favorite test platform, is ifc++. It is an opensource, multiplatform IFC library and viewer, and it is also, thanks to Bernd, the first good, native IFC viewer we have on the Linux platform.

After IfcOpenShell, FreeCAD's IFC engine, which is really rock-solid and can swallow all kinds of wierdly-formatted IFC files, Ifc++ is the second best IFC engine I used in these tests. It sometimes displays some errors, but rarely refuses to render something and is pretty tolerant of bad formatting. It is interesting to notice that, while commercial IFC vendors try to stick as most as possible to the standards, and will just yell at you when you come with your not-totally-up-to-the-standards IFC file, these two open-source apps are way more tolerant, and try as best as they can to handle your errors.

After that I tried to import our test house in two of the big players, Revit and ArchiCAD. Results were not very good at first, but this made me discover several interesting things:

  • When you define a polyline to be used as the base profile of an extrusion, this polyline must lie on the XY plane. It is the extruded object that you then move to its correct position.
  • Windows can only be children of walls if they are children of an opening object which is in turn child of the wall. No way to make a window a child of a wall without the opening object. So for now, they are exported as "stand-alone" windows, which seems to satisfy everybody so far...
  • Windows, apparenlty, cannot be children of structural objects. Only walls...
  • The primary way to define a relationship between two architectural objects, in IFC, is to make them children of the same "gathering" object, such as a storey. This is enough for most software.
  • One object having different representations is interpreted differently depending on the software, but this is not made to add several shapes to an object, although it seems to work (Revit complains).

After a lot of corrections, our test house now opens correctly in Revit and ArchiCAD:

The roadmap now is to add the following features:

  • Fix extrusion orientations (currently only vertical extrusions (along Z axis) work
  • Extrusions of circles (partially done already)
  • Extrusions of ellipses
  • Extrusions of complex polylines (with arcs inside)
  • Breps solids with curved surfaces
  • Subtractions and openings
  • Boolean additions
  • Axes, and additional properties such as heights and widths
  • Colors

After that I think we can say we'll have decent IFC export from FreeCAD, and probably as good as many others...

in categories  freecad  opensource  permalink:  37   posted on 15.04.2014 17:41
From Yorik

IFC support in FreeCAD

We have recently reached a very important point with the Architecture module of FreeCAD: Import and export of IFC files. The support to IFC is not fully compliant yet, but I believe it is stable enough so I can talk about it here.

The IFC format is a very important foundation of any decent BIM workflow. It is basically the one and only proper exchange format we have between all the BIM-capable applications out there, such as Revit, AllPlan or ArchiCAD. IFC is an extension of the STEP format, which is very widely used in mechanical engineering, and also an ISO standard. It is also not a closed format, owned by a single company, but open, human-readable, and maintained by a consortium. This only is a tremendous change compared to older 2D formats such as DWG, that are closed, encrypted, undocumented and proprietary. As a result, implementing DWG support is an almost impossible task for an open-source project, while the IFC format is well documented, the documentation is publicly available, and there are many examples available to programmers. There is even a huge guidebook that explains in details how things must be implemented. All this makes IFC support much easier to implement.

If you read BIM blogs on the internet, you will notice that many people speak against IFC. It is hard, however, to not see a direct relation between these negative opinions and Revit. Revit has a very "everything into one model, one application" ideology, and many of its users see IFC as "too dumb", unable to carry the complex relationships and parametric tissue present in a Revit model.

This is certainly true, although with each new version of the IFC format, its authors try to address more of these parametric relationships. But fundamentally, the purpose of IFC is to describe a building, not the software tools you used to design it. This is at the same time a weakness and a strength, in my opinion. And you have nowadays many voices raising against relying on too complex parametric chains and going back to more simple, easily understandable model structures.

This also speaks of another important point of a modern BIM workflow: collaboration. IFC is not meant to be a format for archiects, but a format for the whole construction family, including engineers and constructors. They will use your IFC files in a very different way as you. You might want to keep your complex relationships so you can import your IFC back into your application, and everything connects, but they will do very different things with it. Engineers will use it as a guide, and sometimes rebuild some sections of it, and constructors will want to extract quantities from it, and won't be interested in how you designed it. For them, there is even a side-format called COBIE which presents the contents of an IFC model as a big spreadsheet...

So thinking of your model as "easy to exchange" with others is a very good way to look at the problem in my opinion, and in that scope, IFC is much, much more interesting. If you model objects that are easy to identify (correctly named and placed in a coherent hierarchy) and easy to modify (which often means: delete and redo it from scratch) by others, the limitations of IFC become totally supportable. And the advantages are huge.

Implementation in FreeCAD

The IFC import/export mechanism in FreeCAD relies on one amazing piece of software called IfcOpenShell. IfcOpenShell is a reader/writer for IFC files, built upon OpenCasCade, the same geometry kernel as we use in FreeCAD. The consequence of this is that both applications communicate extremely well, and the import and export of geometry is very reliable and relatively fast already.

IfcOpenShell has been supporting reading of IFC files for quite some time, but in its latest development version, it now also allows writing. This is now supported in FreeCAD too, and if you can compile FreeCAD and IfcOpenShell yourself, in order to benefit from the latest developments of both applications, you already have full IFC import and export. If not you'll need a little of patience, until these come to a proper release.

When importing an IFC file into FreeCAD, IfcOpenShell will get all the entities derived from the IfcProduct class. That involves basically all building elements, such as walls, windows, roofs, etc. and extract their shape. When a corresponding Arch object exists, for example a wall, such object is created, and the shape is attributed. If no corresponding Arch object exists, for example a piece of furniture, a standard Part object is created. This ensures you that all building products present in the IFC file are imported, even if there is no corresponding Arch object.

At the moment, the shape of the object comes already fully computed, with its openings, subtractions, etc. In the future, we'll work together with the IfcOpenShell developers to get more interesting behaviour, such as having the openings as separate parameters, or retrieving the baselines of the walls.

When exporting an IFC file from FreeCAD, there are currently still a couple of limitations: only Arch objects can be exported, and they can contain no curves. Other than that, any shape is correctly exported,and it's thrilling to see your wildest FreeCAD designs faithfully exported to such a "serious" format as IFC! It is best to have alreay a building + floor(s) structure in FreeCAD to export, but if none is there a default one is created for you.

The biggest task that awaits us now is complying to standards. IFC specification is very complex, and there are a lot of little particularities that such or such application will read or not read. So this will require heavy testing, and help from everybody who wants to see this going further. Several members of the FreeCAD community are already doing some heavy testing, don't hesitate to join us!

As a starter, I mounted a little test file in FreeCAD. This file also serves to demonstrate other features of FreeCAD and the Arch workbench, such as extracting 2D views and calculating quantities. Consider it as a "FreeCAD BIM test":

Get the FreeCAD file from here, and the exported IFC file here. There is also a list of exported objects for you to compare with. I'll add it to the FreeCAD example files later.

If you want to help with testing, a first thing you might want to do is try the IFC file in your BIM application, and head to the FreeCAD forum to report your results! IfcOpenShell also has a test file here.

in categories  freecad  opensource  permalink:  27   posted on 14.03.2014 17:57
From Yorik

FreeCAD Architecture tutorial

This is a copy of this original article I wrote on the FreeCAD wiki, about doing BIM modeling with FreeCAD,that I copied it here for archiving purposes. I advise you to read the original article, the quality is much better.


Arch tutorial 00.jpg

This tutorial aims at giving you the basics to work with the Arch Workbench. I will try to make it simple enough so you don't need any previous experience with FreeCAD, but having some experience with 3D or BIM applications will be useful. In any case, you should be prepared to look for yourself for further information about how FreeCAD works on the FreeCAD documentation wiki. The Getting started page is a must read, if you have no previous experience with FreeCAD. Also check our tutorials section, and on youtube you will also find a lot more of FreeCAD tutorials.

The purpose of the Arch Workbench is to offer a complete BIM workflow inside FreeCAD. As it is still under development, don't expect to find here the same tools and level of completion as grown-up commercial alternatives such as Revit or ArchiCAD, but on the other hand, FreeCAD being used in a much bigger scope than these applications, the Arch Workbench greatly benefits from the other disciplines FreeCAD caters to, and offers some features rarely seen in traditional BIM applications.

Here are, for example, a couple of interesting features of FreeCAD's Arch Workbench that you'll hardly find in other BIM apps:

  • Architectural objects are always solids. From FreeCAD's strong mechanical background, we learned the importance of always working with solid objects. This ensures a much more error-free workflow, and very reliable boolean operations. Since cutting through 3D objects with a 2D plane, in order to extract sections, is also a boolean operation, you can immediately see the importance of this point.
  • Architectural objects can always have any shape. No restrictions. Walls don't need to be vertical, slabs don't need to look like slab. Any solid object can always become any architectural object. Very complex things, usually hard to define in other BIM applications, like a floor slab curving up and becoming a wall (yes Zaha Hadid, it's you we're talking about), present no particular problem at all in FreeCAD.
  • The whole power of FreeCAD is at your fingertips. You can design architectural objects with any other tool of FreeCAD, such as the PartDesign Workbench, and when they are ready, convert them to architectural objects. They will still retain their full modeling history, and continue totally editable. The Arch Workbench also inherits much of the Draft Workbench functionality, such as snapping and working planes.
  • The Arch Workbench is very mesh-friendly. You can easily design an architectural model in a mesh-based application such as Blender or SketchUp and import it in FreeCAD. If you took care of the quality of your model and its objects are non-manifold solid shapes, turning them into architectural objects only requires the press of a button.

At the time I'm writing this, though, the Arch Workbench, as the rest of FreeCAD, suffers some limitations. Most are being worked on, though, and will disappear in the future.

  • FreeCAD is no 2D application. It is made for 3D. There is a reasonable set of tools for drawing and editing 2D objects with the Draft Workbench and Sketcher Workbench, but it is not made for handling very large (and sometimes badly drawn) 2D CAD files. You can usually successfully import 2D files, but don't expect very high performance if you want to keep working on them in 2D. You have been warned.
  • No materials support. FreeCAD will have a complete Material system, able to define very complex materials, with all the goodies you can expect (custom properties, material families, rendering and visual aspect properties, etc), and the Arch Workbench will of course use it when it is ready.
  • Very preliminary IFC support. You can already import IFC files, quite reliably, provided IfcOpenShell is installed on your system, but exporting is still not officially supported. This is worked on both by the FreeCAD and IfcOpenShell developers, and in the future we can expect full-powered IFC support.
  • Most Arch tools are still in development. That means that automatic "wizard" tools that create complex geometry automatically, such as Arch Roof or Arch Stairs can only produce certain types of objects, and other tools that have presets, such as Arch Structure or Arch Window only have a couple of basic presets. This will of course grow over time.
  • Relations between objects in FreeCAD are still not officially available. These, for example the relation between a window and its host wall, are currently implemented in the Arch Workbench with temporary (and therefore somewhat limited) methods. Many new possibilities will arise when this feature will be fully available.
  • Units are being implemented in FreeCAD, which will allow you to work with any unit you wish (even imperial units, you guys from the USA can be eternally grateful for this to Jrgen, FreeCAD's godfather and dictator). But at the moment the implementation is not complete, and the Arch workbench still doesn't support them. You must consider it "unit-less".

FreeCAD version 0.14 required

This tutorial was written using FreeCAD version 0.14. You will need at least this version number in order to follow it. Earlier versions might not contain all the needed tools,or they could lack options presented here.

Typical workflows

The Arch Workbench is mainly made for two kinds of workflows:

  • Build your model with a faster, mesh-based application such as Blender or SketchUp, and import them in FreeCAD in order to extract plans and section views. FreeCAD being made for precision modeling, at a much higher level than what we usually need in architectural modeling, building your models directly in FreeCAD can be heavy and slow. For this reason, such a workflow has big advantages. I described it in this article on my blog. If you care to model correctly and precisely (clean, solid, non-manifold meshes), this workflow gives you the same performance and precision level as the other.
  • Build your model directly in FreeCAD. That is what I will showcase in this tutorial. We will use mostly three workbenches: Arch, of course, but also Draft, whose tools are all included in Arch, so there is no need to switch workbenches, and Sketcher. Conveniently, you can do as I usually so, which is to create a custom toolbar in your Arch workbench, with Tools -> Customize, and add the tools from the sketcher that you use often. This is my "customized" Arch workbench

Arch tutorial 01.jpg

In this tutorial, we will model the house in 3D, based on the 2D drawings we'll download from the net, and extract from it 2D documents, such as plans, elevations and sections.


Instead of creating a project from scratch, Let's take an example project to model, it will save us time. I chose this wonderful house by the famous architect Vilanova Artigas (see a series of pictures by Pedro Kok), because it is close to where I live, it is simple, it's a wonderful example of the amazing modernist architecture of So Paulo (it is even for sale if you have "a few" Reals to spend), and dwg drawings are easily available.

We will use the 2D DWG drawings obtained from the link above (you need to register to download, but it's free) as a base to build our model. So the first thing you'll want to do is to download the file, unzip it, and open the DWG file inside with a dwg application such as DraftSight. Alternatively, you can convert it to DXF with a free autility such as the Teigha File Converter. If you have the Teigha converter installed (and its path set in the Arch preferences settings), FreeCAD is also able to import DWG files directly. But since these files can sometimes being of bad quality and very heavy, it's usually better open it first with a 2D CAD application and do some cleaning.

Here, I removed all the detail drawings, all the titleblocks and page layouts, did a "clean" ("purge" in AutoCAD slang) to remove all unused entities, reorganized the sections at a logical location in relation to the plan view, and moved everything to the (0,0) point. After that, our file can be opened quite efficiently in FreeCAD. Check the different options available in Edit -> Preferences -> Draft -> Import/Export, they can affect how (and how quickly) DXF/DWG files are imported.

This is how the file looks after being opened in FreeCAD. I also changed the thickness of the walls (the contents of the "muros" group), and flipped a couple of doors that were imported with wrong X scale, with the Draft Scale tool:

Arch tutorial 02.jpg

The DXF importer (which also takes care of DWG files, since when importing DWG files, they are simpl converted to DXF first), groups the imported objects by layer. There is no layer in FreeCAD, but there are groups. Groups offer a similar way to organize the objects of your files, but don't have specific properties, like AutoCAD layers, that apply to their contents. But they can be placed inside other groups, which is very handy. The first thing we might want to do here, is to create a new group (in the tree view, right-click on the document icon, add a group, right click on it to rename it as "base 2D plans", and drag and drop all the other objects into it.

Building the walls

Like most Arch objects, walls can be built upon a big variety of other objects: lines, wires (polylines), sketches, faces or solid (or even on nothing at all, in which case they are defined by height, width and length). The resulting geometry of the wall depends on that base geometry, and the properties you fill in, such as width and height. As you might guess, a wall based on a line will use that line as its alignment line, while a wall based on a face will use that face as its base footprint, and a wall based on a solid will simply adopt the shape of that solid. This allows about any shape imaginable to become a wall.

There are different possible strategies to build walls in FreeCAD. One might want to build a complete "floor plan" with the sketcher, and build one, big, wall object from it. This technique works, but you can only give one thickness for all the walls of the project. Or, you can build each piece of wall from separate line segments. Or, this is what we will do here, a mix of both: We will build a couple of wires on top of the imported plan, one for each type of wall:

Arch tutorial 03.jpg

As you see, I've drawn in red the lines that will become concrete walls (a pictures search of the house can help you to see the different wall types), the green ones are the exterior brick walls, and the blue ones will become the inner walls. I passed the lines through the doors, because doors will be inserted in the walls later, and will create their openings automatically. Walls can also be aligned left, right or centrally on their baseline, so it doesn't matter which side you draw the baseline. I also took care on avoiding intersections as much as I could, because our model will be cleaner that way. But we'll take care of intersections later.

When this is done, place all those lines in a new group if you want, select each line one by one, and press the Arch Wall tool to build a wall from each of them. You can also select several lines at once. After doing that, and correcting widths (exterior walls are 25cm wide, inner walls are 15cm wide) and some alignments, we have our walls ready:

Arch tutorial 04.jpg

We could also have built our walls from scratch. If you press the Arch Wall button with no object selected, you will be able to click two points on the screen to draw a wall. But under the hood, the wall tool will actually draw a line and build a wall on it. In this case, I found it more didactic to show you how things work.

Did you notice that I took great care not to cross the walls? this will save us some headache later, for example if we export our work to other applications, that might not like it. I have only one intersection, where I was too lazy to draw two small line segments, and drew one big wire crossing another. This must be fixed. Fortunately, all Arch objects have a great feature: you can add one to another. Doing that will unite their geometries, but they are still editable independently after. To add one of our crossing walls to the other, just select one, CTRL + select the other, and press the Arch Add tool:

Arch tutorial 05.jpg

On the left is are the two intersecting walls, on the right the result after adding one to the other.

An important note about parametric objects

Something is important to consider already. As you can see, in FreeCAD, everything is parametric: Our new "united" wall is made from two walls, each based on a baseline. When you expand them in the tree view, you can see all that chain of dependencies. As you can imagine, this little game can quickly become very complex. Furthermore, if you already know how to work with the sketcher, you might have wanted to draw the baselines with constrained sketches. This whole complexity has a cost: it raises exponentially the number of calculations that FreeCAD has to perform to keep your model geometry up to date. So, think about it, don't add unnecessary complexity when you don't need it. Keep a good balance between simple and complex objects, and keep these for the cases where you really need them.

For example, I could have drawn all my baselines above without caring about what crosses what, and fix things with the Arch Add tool later. But I would have raised much the complexity of my model, for no gain at all. Better make them correct right from the start, and keeping them as very simple pieces of geometry.

Now that our walls are okay, we need to raise their height, until they intersect the roof. Then, since the wall object still cannot be cut automatically by roofs (this will happen some day, though), we will build a "dummy" object, that follows the shape of the roof, to be subtracted from our walls.

First, by looking at our 2D drawings, we can see that the highest point of the roof is 5.6m above the ground. So let's give all our walls a height of 6m, so we make sure they will be cut by our dummy roof volume. Why 6m and not 5.6m? You may ask. Well, if you already worked with boolean operations (additions, subtractions, intersections), you must already know that these operations usually don't like much "face-on-face" situations. They prefer clearly, frankly intersecting objects. So by doing this, we keep on the safe side.

To raise the height of our walls, simply select all of them (don't forget the one we added to the other) in the tree view, and change the value of their "height" property.

Before making our roof and cutting the walls, let's make the remaining objects that will need to be cut: The walls of the above studio, and the columns. The walls of the studio are made the same way as we did, on the superior floor plan, but they will be raised up to level 2.6m. So we will give them the needed height so their top is at 6m too, that is, 3.4m. Once this is done, let's move our walls up by 2.6m: Select them both, put yourself in frontal view (View -> Standard Views -> Front), press the Draft Move button, select a first point, then enter 0, 2.6, 0 as coordinates, and press enter. Your objects now have jumped 2.6m high:

Arch tutorial 06.jpg

About coordinates

The Draft objects, and most Arch objects too, obey to a Draft system called working planes. This system defines a 2D plane where next operations will take place. If you don't specify any, that working plane adapts itself to the current view. This is why we switched to frontal view, and you see that we indicated a movement in X of 0 and in Y of 2.6. We could also have forced the working plane to stay on the ground, by using the Draft SelectPlane tool. Then, we would have entered a movement of X of 0, Y of 0 and Z of 2.6.

Now let's move our walls horizontally, to their correct location. Since we have points to snap to, this is easier: Select both walls, press the Draft Move tool, and move them from one point to the other:

Arch tutorial 07.jpg

Finally, I changed the color of some walls to a brick-like color (so it's easier to differentiate), and made a small correction: Some walls don't go up to the roof, but stop at a height of 2.60m. I corrected the height of those walls.

Raising the structure

Now, since we'll have to cut our walls with a subtraction volume, we might as well see if there aren't other objects that will need to be cut that way. There are, some of the columns. This is a good opportunity to introduce a second arch object: the Arch Structure. Structure objects behave more or less like walls, but they aren't made to follow a baseline. Rather, their prefer to work from a profile, that gets extruded (along a profile line or not). Any flat object can be a profile for a structure, with only one requirement: they must form a closed shape.

For our columns, we will use another strategy than with the walls. Instead of "drawing" on top of the 2D plans, we will directly use objects from it: the circles that represent the columns in the plan view. In theory, we could just select one of them, and press the Arch Structure button. However, if we do that, we produce an "empty" structural object. This is because you can never be too sure at how well objects were drawn in the DWG file, and often they are not closed shapes. So, before turning them into actual columns, let's turn them into faces, by using the Draft Upgrade tool twice on them. The first time to convert them into closed wires (polylines), the second time to convert those wires into faces. That second step is not mandatory, but, if you have a face, you are 100% sure that it is closed (otherwise a face cannot be made).

After we have converted all our columns to faces, we can use the Arch Structure tool on them, and adjust the height (some have 6m, other only 2.25m height):

Arch tutorial 08.jpg

On the image above, you can see two columns that are still as they were in the DWG file, two that were upgraded to faces, and two that were turned into structural objects, and their height set to 6m and 2.25m.

Note that those different Arch objects (walls, structures, and all the others we'll discover) all share a lot of things between them (for example all can be added one to another, like we already saw with walls, and any of them can be converted to another). So it's more a matter of taste, we could have made our columns with the wall tool too, and converted them if needed. In fact, some of our walls are concrete walls, we might want to convert them to structures later.


Now it is time to build our subtraction volume. The easiest way will be to draw its profile on top of the section view. Then, we will rotate it and place it at its correct position. See why I placed the sections and elevations like that before beginning? It will be very handy for drawing stuff there, then moving it to its correct position on the model.

Let's draw a volume, bigger than the roof, that will be subtracted from our walls. To do that, I drew two lines on top of the base of the roof, then extended them a bit further with the Draft Trimex tool. Then, I drew a wire, snapping on these lines, and going well above our 6 meters. I also drew a blue line on the ground level (0.00), that will be or rotation axis.

Arch tutorial 09.jpg

Now is the tricky part: We will use the Draft Rotate tool to rotate our profile 90 degrees up, in the right position to be extruded. To do that, we must first change the working plane to the YZ plane. Once this is done, the rotation will happen in that plane. But if we do like we did a bit earlier, and set our view to side view, it will be hard to see and select our profile, and to know where is the basepoint around which it must rotate, right? Then we must set the working plane manually: Press the Draft SelectPlane button (it is in the "tasks" tab of the tree view), and set it to YZ (which is the "side" plane). Once you set the working plane manually, like that, it won't change depending on your view. You can now rotate your view until you have a good view of all the things you must select. To switch the working plane back to "automatic" mode later, press the Draft SelectPlane button again and set it to "None".

Now the rotation will be easy to do: Select the profile, press the Draft Rotate button, click on a point of the blue line, enter 0 as start angle, and 90 as rotation:

Arch tutorial 10.jpg

Now all we need to do it to move the profile a bit closer to the model (set the working plane to XY if needed), and extrude it. This can be done either with the Part Extrude tool, or Draft Trimex, which also has the special hidden power to extrude faces. Make sure your extrusion is larger than all the walls it will be subtracted from, to avoid face-on-face situations:

Arch tutorial 11.jpg

Now, here comes into action the contrary of the Arch Add tool: Arch Remove. As you might have guessed, it also makes an object a child of another, but its shape is subtracted from the host object, instead of being united. So now things are simple: Select the volume to subtract (I renamed it as "Roof volume to subtract" in the tree view so it is easy to spot), CTRL + select a wall, and press the Arch Remove button. You'll see that, after the subtraction happened, the volume to subtract disappeared from both the 3D view and the tree view. That is because it has been marked as child of the wall, and "swallowed" by that wall. Select the wall, expand it in the tree view, there is our volume.

Now, select the volume in the tree vieew, CTRL + select the next wall, press Arch Remove. Repeat for the next walls until you have everything properly cut:

Arch tutorial 12.jpg

Remember that for both Arch Add and Arch Remove, the order you select the objects is important. The host is always the last one, like in "Remove X from Y" or "Add X to Y"

A note about additions and subtractions

Arch objects that support such additions and subtractions (all of them except the "visual" helper objects such as the axes) keep track of such objects by having two properties, respectively "Additions" and "Subtractions", that contains a list of links to other objects to be subtracted or added. A same object can be in thr lists of several other objects, as it is the case of our subtraction volume here. Each of the fathers will want to swallow it in the tree view, though, so it will usually "live" in the last one. But you can always edit those lists for any object, by double-clicking it in the tree view, which in FreeCAD enters edit mode. Pressing the escape key exits edit mode.

Making the roofs

Now, all we have to do to complete the structure, is to make the roof and the smaller inner slabs. Again, the easiest way is to draw their profiles on top of the section, with the Draft Wire tool. Here I drew 3 profiles on top of each other (I moved them apart in the image below so you see better). The green one will be used for the lateral borders of the roof slab, then the blue one for the side parts, and the red ones for the central part, that sits above the bathroom block:

Arch tutorial 13.jpg

Then, we must repeat the rotation operation above, to rotate the objects in a vertical position, then move them at their correct places, and copy some of them that will need to be extruded twice, with the Draft Move tool, with the ALT key pressed, which creates copies instead of moving the actual object. I also added two more profiles for the side walls of the bathroom opening.

Arch tutorial 14.jpg

When everything is in place, it's just a matter of using the Draft Trimex tool to extrude, then convert them to Arch Structure objects.

Arch tutorial 15.jpg

After that, we can see some problems arising: two of the columns on the right are too short (they should go up to the roof), and there is a gap between the slab and the walls of the studio on the far right (the 2.60 level symbol on the section view was obviously wrong). Thanks to the parametric objects, all this is very easy to solve: For the columns, just change their height to 6m, fish your roof subtraction volume from the tree view, and subtract it to the columns. For the walls, it's even easier: move them a bit down. Since the subtraction volume continues at the same place, the wall geometry will adapt automatically.

Now one last thing must be fixed, there is a small slab in the bathroom, that intersects some walls. Let's fix that by creating a new subtraction volume, and subtract it from those walls. Another feature of the Draft Trimex tool, that we use to extrude stuff, is that it can also extrude one single face of an existing object. This creates a new, separate object, so there is no risk to "harm" the other object. So we can select the base face of the small slab (look at it from beneath the model, you'll see it), then press the Draft Trimex button, and extrude it up to well above the roofs. Then, subtract it from the two inner bathroom walls with the Arch Remove tool:

Arch tutorial 16.jpg

Floors, stairs and chimney

Now, our structure is complete, we just have a couple of smaller objects to do.

The chimney

Let's start with the chimney. Now you already know how it works, right? Draw a couple of closed wires, move them up at their correct height with the Draft Move tool, extrude them with the Draft Trimex tool, turn the bigger one into a structure, and subtract the smaller ones. Notice how the chimney tube wasn't drawn on the plan view, but I found its position by dragging blue lines from the section views.

Arch tutorial 17.jpg

The floors

The floors are not well represented in the base drawings. When looking at the sections, you cannot know where and how thick the floor slabs are. So I will suppose that the walls are sitting on top of foundation blocks, at level 0.00, and that there are floor slabs, also sitting on those blocks, 15cm thick. So the floor slabs don't run under the walls, but around them. We could do that by creating a big rectangular slab then subtracting the walls, but remember, subtraction operations cost us. Better do it in smaller pieces, it will be "cheaper" in terms of calculation, and also if we do it intelligently, room by room, these will also be useful to calculate floor areas later:

Arch tutorial 18.jpg

Once the wires are drawn, just turn them into structures, and give them a height of 0.15:

Arch tutorial 19.jpg

The stairs

Now the stairs. Met the next of the Arch tools, the Arch Stairs. This tool is still in a very early stage of development, at the time I'm writing, so don't expect too much of it. But it is already pretty useful to make simple, straight stairs. One concept is important to know, the stairs tool is thought to build stairs from a flat floor up to a wall. In other words, when viewed from the top, the stairs object occupies exactly the space that it occupies on the plan view, so the last riser is not drawn (but it is of course taken into account when calculating heights).

In this case, I preferred to build the stairs on the section view, because we'll need many measurements that are easier to get from that view. Here, I drew a couple of red guidelines, then two blue lines that will be the base of our two pieces of stairs, and two green closed wires, that will form the missing parts. Now select the first blue line, press the Arch Stairs tool, set the number of steps to 5, the height to 0.875,the width to 1.30, the structure type to "massive" and the structure thickness to 0.12. Repeat for the other piece.

Then, extrude both green wires by 1.30, and rotate and move them to the right position:

Arch tutorial 20.jpg

On the elevation view, draw (then rotate) the border:

Arch tutorial 21.jpg

Then move everything into place:

Arch tutorial 22.jpg

Don't forget also to cut the column that crosses the stairs, because in BIM it's always bad to have intersecting objects. We are building like in the real world, remember, where solid objects cannot intersect. Here, I didn't want to subtract the column directly from the stairs (otherwise the column object would be swallowed by the stairs object in the tree view, and I didn't like that), so I took the face on which the column was built, and extruded it again. This new extrusion was then subtracted from the stairs.

Right! All the hard work is now done, let's go on with the very hard work!

Doors and windows

Arch Windows are pretty complex objects. They are used to make all kinds of "inserted" objects, such as windows or doors. Yes, in FreeCAD, doors are just a special kind of window. In real life too, if you think of it, no? The Arch Window tool can still be a bit hard to use today, but consider this as a tradeoff, as it was built for maximum power. Almost any kind of window your imagination can produce can be done with it. But as the tool will gain more presets, this situation will certainly become better in the future.

The Arch Window object works like this: It is based on a 2D layout (any 2D object, but preferably a sketch, that contains closed wires (polylines). These wires define the different parts of the window: outer frames, inner frames, glass panels, solid panels, etc. The window objects then has a property that stores what to do with each of these wires: extrude it, place it at a certain offset, etc. Finally, a window can be inserted into a host object such as a wall or structure, and it will automatically create a hole in it. That hole will be calculated by extruding the biggest wire found in the 2D layout.

There are two ways to create such objects in FreeCAD: By using a preset, or drawing the window layout from scratch. We'll look at both methods here. But remember that the preset method does nothing else than creating the layout object and defining the necessary extrusions for you.

Using presets

When pressing the Arch Window tool with no object selected, you are invited either to pick a 2D layout, or to use one of the presets. Let's use the "Simple Door" preset to place the main entrance door of our model. Give it a width of 1m, a height of 2.45m, a W1 size of 0.15m, and leave the other parameters to 0.05m. Then click the lower left corner of the wall, and your new door is created:

Arch tutorial 23.jpg

You will notice that your new door won't appear in the tree view. That is because, by snapping to a wall, we indicated that wall as its host object. Consequently, it has been "swallowed" by the wall. But a right click on it -> Go to selection will find it in the tree.

In this case, as our window is not inserted in any wall (the opening was there already), we might as well detach our window from its host wall. This is done by double-clicking the host wall in the tree view to enter its edit mode. There, you will see the window in its "Subtractions" group. Simply select the window there, press the "remove element" button, then "OK". Our window has now been removed from its host wall, and lies at the bottom of the tree view.

We have a second door, exactly the same as this one, a bit on the left. Instead of creating a new door from scratch, we have two ways to make a copy of the previous one: By using the Draft Move tool, with the ALT key pressed, which, as you already know, copies an object instead of moving it. Or, even better, we can use the Draft Clone tool. The clone tool produces a "clone" of a selected object, that you can move around, but that retains the shape of the original object. If the original object changes, the clone changes too.

So all we need to do now is select the door, press the Draft Clone tool, then move the clone to its correct position with the Draft Move tool.

Organizing your model

Arch tutorial 24.jpg

Now would be a good time to do a bit of housecleaning. Since we already have two windows, it is a good moment to do some cleaning in the tree view: Create a new group, rename it to "windows", and drop the 2 windows in it. I also recommend you to separate other elements that way, such as the walls and structures. Since you can also create groups inside groups, you can organize further, for example by placing all elements that form the roof into a separate group, so it is easy to turn on and off (turning a group visible or invisible does the same with all objects inside).

The Arch Workbench has some additional tools to organize your model: the Arch Site, Arch Building and Arch Floor. Those 3 objects are based on the standard FreeCAD group, so they behave exactly like groups, but they have a couple of additional properties. For example, floors have the ability to set and manage the height of the contained walls and structure, and when they are moved, all their contents are moved too.

But here, since we have only one building with only one (and a half) floor, there is no real need to use such objects, so let's stick with simple groups.

Now, let's get back to work. Turn off the roof group, so we can see better inside, and switch the Display Mode of the floor objects to Wireframe (or use the Draft ToggleDisplayMode tool) so we can still snap to them, but we can see the plan view underneath. But you can also turn off the floors completely, then place your doors at level 0, then raise them of 15cm with the Draft Move tool.

Let's place the interior doors. Use the "Simple Door" preset again, make doors of 1.00m and 0.70m wide x 2.10m high, with W1 size of 0.1m. Make sure you snap to the correct wall when you place them, so they automatically create a hole in that wall. If it is hard to place them correctly, you can place them at an easier location (at the corner of the wall, for example, then move them. The "hole" will move together.

If by mistake you hosted a window in the wrong wall, it is easy to fix: Remove the window from the "Subtraction" group of the host wall in edit mode, as we saw above, then add it to the "Subtraction" group of the correct wall, by the same method, or, simply, using the Arch Remove tool.

A little work later, all our doors are there:

Arch tutorial 25.jpg

After a closer look at the elevation view, I now detected another error: The top of the brick walls is not as 2.60m, but 17.5cm lower, that is, 2.425m. Fortunately, windows based on presets have a facility: You can alter their general dimensions (width and height) from their properties. So let's change their height to 2.425 - 0.15, that is, 2.275. The second window, as it is a clone of the first one, will adapt too. This is basically where the true magic of parametric design appears.

Now we can look at the really interesting stuff: How to design your own custom windows.

Creating custom windows

As I explained above, Arch Window objects are created from 2D layouts, made of closed elements (wires (polylines), circles, rectangles, anything). Since Draft objects cannot hold more than one of these elements, the preferred tool to draw window layouts is the Sketcher. Unfortunately, with the sketcher, it is not possible to snap to external objects like with the Draft workbench, which would be useful here, since our elevations are drawn already. Fortunately, a tool exists to convert Draft objects to a sketch: The Draft To Sketch tool.

So, let's start by building our first window layout. I drew it on the elevation, using several rectangles: One for the outer line, and 4 for the inner lines. I stopped before the door, because, remember, our door already has a frame there:

Arch tutorial 26.jpg

Then, select all the rectangles, and press the Draft To Sketch button (and delete the rectangles, because this tool doesn't delete the original objects, in case something goes wrong). Then, with the new sketch selected, press the Arch Window tool:

Arch tutorial 27.jpg

The tool will detect that the layout has one outer wire and several inner wires, and automatically proposes you a default configuration: One frame, made by subtracting the inner wires from the outer one, extruded by 1m. Let's change that, by entering the window's edit mode, by double-clicking on it in the tree view:

You will see a "Default" component, that has been created automatically by the Window tool, that uses the 5 wires (always subtracting the other ones from the biggest one), and has an extrusion value of 1. Let's change its extrusion value to 0.1, to match what we used in the doors.

Then, let's add 4 new glass panels, each using a single wire, and give them an extrusion of 0.01, and an offset of 0.05, so they are placed at the middle of the frame. This will be how your window looks like when you are finished:

Arch tutorial 28.jpg

I suppose now you must have understood the power of this system: Any combination of frames and panels of any shape is possible. If you can draw it in 2D, it can exist as a full valid 3D object.

Now, let's draw the other pieces, then we'll move everything into place together. But first. we'll need to do some corrections to the base 2D drawing, because some lines are clearly missing, where the windows meet the stairs. We can fix that by offsetting the stairs line by 2.5cm with the Draft Offset tool (with ALT pressed of course, to copy our lines instead of moving them). Now we can draw our layout, with wires, then convert them to a sketch, then making a window of it.

After doing that a couple of times (I made it in 4 separate pieces, but it's up to you to decide), we have our facade complete:

Arch tutorial 29.jpg

Now, as before, it's just a matter of rotating the pieces, and moving them to their correct position:

Arch tutorial 30.jpg

Last missing piece, there is a segment of wall that didn't appear on the plan view, that we need to add. We have several options for that, I chose to draw a line on the ground plane, then move it up to the correct height, then create a wall from it. Then, we also need to fish up our roof subtraction volume (it must have stayed in the last column), then subtract it. Now this side of the building is ready:

Arch tutorial 31.jpg

Ready? Not quite. Look at the image above, we did our doors with a 5cm frame, remember (it was the default from the preset). But the other windows have 2.5cm frames. This needs to be fixed.

Editing windows

We already saw how to build and update window components, via the window's edit mode, but we can also edit the underlying sketch. Preset windows are not different than custom windows, the Arch Window tool only created the underlying sketch fo you. Select our door object (the original, not the copy, remember, we made a clone), and expand it in the tree view. There is our sketch. Double-click it to enter edit mode.

the Sketcher Workbench is an extremely powerful tool. It doesn't have some of the Draft conveniences, such as snapping or working planes, but it has many other advantages. In FreeCAD you will frequently use one or another depending on the need. The most important feature of the sketcher is constraints. Constraints allow you to automatically fix the position of some elements relative to others. For example, you can force a segment to always be vertical, or to always be at a certain distance to another.

When we edit our door sketch, we can see that it is made on a fully constrained sketch:

Arch tutorial 32.jpg

Now all we need to do is edit the 5cm distances between the outer line and the inner line, by double-clicking them, and changing their value to 2.5cm (Remember, the units are still not fully functional at the time I'm writing this). After clicking the "OK" button, our door (and its clone) have been updated.

Working without 2D support

Until now our work has been relatively easy, because we had the underlying 2D drawings to base our work upon. But now, we must do the opposite facade and the glass atrium, and things are getting more complicated: The opposite facade drawing has a lot of wrong things, doesn't represent the atrium at all, and we have simply no drawing for the inner walls of the atrium. So we will need to invent a couple of things ourselves. Be sure to have a look at reference pictures to figure out how things are made. Or do it as you wish!

One thing we can already do: duplicate the complicated stairs window with the Draft Move tool, because it is equal on both sides:

Arch tutorial 33.jpg

Note that here, I preferred to duplicate with the Draft Move tool instead of using a clone, because the clone currently doesn't support different colors inside objects. The difference is that the clone is a copy of the final shape of the original object, while if you copy an object, you create a new object and give it all the same properties as the original one (therefore, also its base sketch and its window components definition, which are both stored as properties).

Now we must attack the parts that are not drawn anywhere. Let's start with the glass wall between the sitting room and the atrium. It'll be easier to draw it on the elevation view, because we'll get the correct height of the roof. Once you are in plan view, you can rotate the view from the menu View -> Standard Views -> Rotate left or right, until you get a comfortable view to work, like this:

Arch tutorial 34.jpg

Note how on the image above, I made a line from the model to the left section, to get the exact width of the window. Then, I reproduced that width on the elevation view and divided it into 4 pieces. Then I built one main window piece, plus 4 additional windows for the sliding doors. The sketcher sometimes has difficulties with overlapping wires, that's why I preferred to keep them separated like this:

Arch tutorial 35.jpg

After the necessary rotations, everything clicks perfectly into place:

Arch tutorial 36.jpg

We still need some corner piece there. A little useful trick with the Draft SelectPlane tool, if you have a face selected when you press the button, the working plane matches this face (at least its position, and if the face is rectangular, it also tries to match its axes). This is useful to draw 2D objects directly on the model, such as here, we can draw a rectangle to be extruded directly at its correct position:

Arch tutorial 37.jpg

Then let's do the two remaining pieces. One is easy, it is a copy of what's on the other side, so we can simply use the 2D drawing:

Arch tutorial 38.jpg

The other one is a bit tricky, by looking at the pictures, we see that it has many vertical divisions, like the stairs windows. By chance (or very good design from Vilanova Artigas), the width of our window, of 4.50m, is exactly the same as the stairs window, so we can use the exact same division: 15 pieces of 30cm. Here I used the Draft Array tool to copy over the two lines 15 times,and drew rectangles on top of them:

Arch tutorial 39.jpg

Once this is done, we can create our window with the same method we already know. Another small useful trick, in case you haven't found it yourself already: When editing a window, if you change the name of a component, it actually creates a duplicate of it. So to create the 15 inner glass panels, instead of clicking 15 times the "add" button and fill 15 times the data, you can just keep editing one, and change its name and wire, it will create a copy each time.

After the window is rotated and moved into place, the atrium is complete:

Arch tutorial 40.jpg

Edits and fixes

Now when we look at our back elevation, and compare it with the plan, we see that there are some differences that need to be fixed. Namely, the bedroom windows are smaller than I first thought, and we'll need to add some more walls. In order to do that properly, some floors need to be cut:

Arch tutorial 41.jpg

We have of course several ways to do that, making a subtraction volume would be an easy way, but it would add unnecessary complexity to the model. Better to edit the base wire of each floors. This is where the Draft Edit mode comes into action. By expanding these floors in the tree view, then making their base wire visible, we can then double-click them to enter edit mode. There, we can move their points, or add or remove points. With this,editing our floor plates becomes easy.

Arch tutorial 42.jpg

After some more sweat (the person who made those drawings obviously became pretty lazy when did this last elevation, much is drawn wrong), we finally have our complete house:

Arch tutorial 43.jpg

Note the chimney tube, which is made from a circle I used to make a hole in the chimney block, that I extruded, then converted into a tube with the Part Offset tool.

Problems in objects

Sometimes an object you made can have problems. For example, the object it was based onto has been deleted, and the object can therefore not recalculate its shape. These are usually shown to you by a little red sign on their icon, and/or a warning in the output window. There is no generic recipe to fix these problems, because they can have many origins. But, the easiest way to solve them is often to delete them, and, if you didn't delete their base objects, recreate them.


Now, after all the hard work we passed through to build this model, comes the reward: What can we do with it? Basically, this is the big advantage of working with BIM, all our traditional architectural needs, such as 2d drawings (plans, sections, etc), renderings, and calculations (bills of quantities, etc) can all be extracted from the model. And, even better, regenerated every time the model changes. I'll show you here how to obtain these different documents.


Before starting to export stuff, one consideration is interesting to do: As you saw, our model is becoming increasingly complex, with a lot of relationships between objects. This can make subsequent calculation operations, such as cutting through the model, heavy. One quick way to magically "simplify" drastically your model, is to remove all of this complexity, by exporting it to the STEP format. That format will preserve all your geometry, but will discard all the relationships and parametric constructions, keeping only the final shape. When reimporting that STEP file into FreeCAD, you will get a model that has no relationship, and a much smaller file size. Think of it as an "output" file, that you can regenerate anytime from your "master" file:

Arch tutorial 44.jpg

Exporting to IFC and other applications

Arch tutorial 45.jpg

One of the very fundamental things you need when working with BIM is to be able to import and export IFC files. This is still a work in progress in FreeCAD. IFC format is already supported, and importing IFC files into FreeCAD is already pretty reliable. Exporting is still experimental, though, and has currently many limitations. However, things are bettering and we should get proper IFC export very soon.

IFC export requires very little setup, once the necessary software libraries are installed. You only need to recreate the building structure, which is needed in all IFC files, by adding an Arch Building to your file, then an Arch Floor, then moving all the groups of objects that compose your model in it. Make sure you leave your construction geometry (all the 2D stuff we've been drawing) out of it to avoid making your IFC file unnecessarily heavy.

Another thing to set, is to check the "Role" property of structural elements. Since IFC has no "generic" structural element, like FreeCAD, we need to assign them roles (column, beam, etc...) so the exporter knows what element to create in the IFC file.

In this case, we need our whole architectural system, so the IFC exporter can know if an object must be exported as a wall or a column, so we are using our "master" model, not our "output" model.

Once this is done, simply select your building object, and choose the "Industry Foundation Classes" format. Exporting to non-BIM applications, such as Sketchup is also easy, you have several export formats at your disposal, such as Collada, STEP, IGES ou OBJ.


FreeCAD also features a rendering module, the Raytracing Workbench. That workbench currently supports two render engines, PovRay and LuxRender. Since FreeCAD is not designed for image rendering, the features that the Raytracing workbench offer to you are somewhat limited. The best course of action when you want to do proper rendering, is to export your model to a mesh-based format such as OBJ or STL, and open it in an application more suited to rendering, such as blender. The image below has been rendered with blender's cycles engine:

Arch tutorial 47.jpg

But, for a quick rendering, the Raytracing workbench can already do a good job, with the advantage of being very easy to setup, thanks to its templates system. This is a rendering of our model fully made within FreeCAD, with the Luxrender engine, using the "indoor" template.

Arch tutorial 48.jpg

The Raytracing workbench still offers you very limited control over materials, but lighting and environments are defined in templates, so they can be fully customized.

2D drawings

Certainly the most important use of BIM is to produce 2D drawings automatically. This is done in FreeCAD with the Arch SectionPlane tool. This tool allows you to place a section plane object in the 3D view, that you can orient to produce plans, sections and elevations. Section planes must know what objects they must consider, so once you have created one, you must add objects to it with the Arch Add tool. You can add individual objects, or, more conveniently, a group, a floor or a whole building. This allows you to easily change the scope of a certain section plane later, by adding or removing objects to/from that group. Any change to these objects gets reflected in the views produced by the section plane.

The section plane automatically produces cut views of the objects it intersects. In other words, to produce views instead of sections, you just need to place the section plane outside of your objects.

Arch tutorial 49.jpg

The section planes can produce two different outputs: shape objects, that live in the same document as your 3D model, or drawing views, that are made to use on a drawing sheet produced by the Drawing workbench. Each of these behave differently, and has its own advantages.

Shape views

This output is produced by using the Draft Shape2DView tool with a section plane selected. You produce a 2D view of the model directly in the 3D space, like on the image above. The main advantage here is that you can work on them using the Draft tools (or any other standard tool of FreeCAD), so you can add texts, dimensions, symbols, etc:

Arch tutorial 50.jpg

On the image above, two Shape2D views have been produced for each section, one showing everything, the other showing only the cut lines. This allows us to give it a different line weight, and turn hatching on. Then, dimensions, texts and symbols have been added, and a couple of DXF blocks have been imported to represent the furniture. These views are then easy to export to DXF or DWG, and open in your favorite 2D CAD application, such as LibreCAD or DraftSight, where you can work further on them:

Arch tutorial 51.jpg

Note that some features are still not supported by the DXF/DWG exporter so the result in your 2D application might differ a bit. For example, in the image above, I had to redo the hatching, and correct the position of some dimension texts. If you place your objects in different groups in FreeCAD, these become layers in your 2D CAD application.

Drawing views

The other kind of output that can be produced from section planes is a Drawing view. These are produced by using the Draft Drawing tool with a section plane selected. This method has one big limitation compared to the previous one: you have limited possibilities to edit the results, and at the moment, things like dimensioning or hatching are still not natively supported.

On the other hand, the final output being easier to manipulate, and the graphical possibilities of the SVG format being huge, in the future, undoubtedly this will be the preferred method. At the moment, though, you'll get better results using the previous one.

Arch tutorial 52.jpg

On the image above, the geometry is the direct output of the section plane, but some other Draft objects have been added, such as dimensions and hatched polygons, and another view object with same scale and offset values has been produced from them with the Draft Drawing tool. In the future, such operations will be done directly on the Drawing page, leaving your model totally clean.

Quantities extraction

This is another very important task to be performed on BIM models. In FreeCAD, things look good right from the start, since the OpenCasCade kernel of FreeCAD already takes care of calculating lengths, areas and volumes for all the shapes it produces. Since all Arch objects are solids, you are always guaranteed to be able to obtain a volume from them.

Using spreadsheets

There is a brand-new workbench in FreeCAD, the Spreadsheet Workbench, that is the perfect tool for collecting such information about our model. It can count objects of a certain name or a certain type, or display a specific properties of those objects. The spreadsheet workbench features two objects: The spreadsheet object is a simple spreadsheet container, that you can edit, and place values inside the cells, but has no automation. The cell controller, on the other hand, is an object that you must insert in a spreadsheet, that controls a series of cells of its host spreadsheet, filling them according to what you specify. This, provided that you organized your model well, allows you to easily retrieve individual values:

Arch tutorial 53.jpg

Note that the spreadsheet workbench is still very new, and like everything very new, still contains many bugs and limitations. But for simple summaries like this, it already works well. The resulting spreadsheet can then be exported to a CSV file, which can be imported in any spreadsheet application.

The survey mode

Another way to survey your model and extract values, is to use the Arch Survey mode. In this mode, you can click on points, edges, faces or double-click to select whole objects, and you get altitude, length, area or volume values, shown on the model, printed on the FreeCAD output window, and copied to the clipboard, so you can easily pick and paste values in another opened application

Arch tutorial 54.jpg


I hope this gives you a good overview of the available tools, be sure to refer to the Arch Workbench and Draft Workbench documentation for more (there are more tools that I didn't mention here), and, more generally, to the rest of the FreeCAD documentation. Pay a visit to the forum too, many problems can usually be solved there in no time, and follow my blog for news about he Arch workbench development.

The file created during this tutorial can be found here

in categories  freecad  opensource  permalink:  24   posted on 11.02.2014 19:26
From Yorik

Quantity survey in FreeCAD

Today a friend quantity surveyor gave me this idea, that resulted in this quickly made but, I think, fast and useful tool, now available from the Arch workbench:

The idea is simple: you press the tool, then you pick edges, faces or whole objects (by double-clicking them). Each time, a label is added, a line is printed in the output window, and the numeric value is copied to the clipboard, so you can paste it in a spreadsheet. The quantity registered is a length, an area or a volume, depending on what you selected. The value is rounded according to the Draft dimension precision preference.

To finish, double-click on no object or click the toolbar button again. All the labels are then removed.

This does the job that other tools do (info macros, etc...) but I wanted something really fast and simple and adapted for quantity surveying, so you can easily select graphically the measurements you need, and keep your spreadsheet open and quickly fill the values.


in categories  freecad  opensource  permalink:  20   posted on 07.02.2014 14:10
From Yorik

IFC browser in FreeCAD

A little addition for FreeCAD, is this IFC browser (Find it under the Arch->Utilities menu). It simply allows you to read the contents of an IFC file in an easier way than a text editor. This is above all useful for testing purposes, when you want to chack if some object was imported or exported correctly...

The code doesn't rely on FreeCAD, so it can easily be turned into an external application.

in categories  freecad  opensource  permalink:  19   posted on 06.02.2014 19:01
From Yorik

FreeCAD Parts library

There is a little side-project to FreeCAD, which aims at collecting reusable objects under a creative commons license, that we are currently hosting at https://github.com/yorikvanhavre/FreeCAD-library . It features a small browser integrated into FreeCAD, but can also be used with other applications, since all objects are also stored as STEP files.

It currently doesn't contain a lot of objects, but it grows slowly. If you wish to contribute with some objects, look at the readme file on the repository above for instructions.


in categories  architecture  projects  freecad  permalink:  386   posted on 11.12.2013 18:09
From Yorik

Florianopolis Mercado Pblico competition

This is a competition project for the public market of Florianpolis, Brazil. The program asked for a solution to cover the central open space of the market, an historical building located in the center of the city. Unfortunately (but quite expected) our proposal didn't win (winners here), but who has a sharp eye can see we made it to the final designs somehow

Our proposal is inspired by theater scenography, with a visual identity that is very different from the surrounding architecture, so it becomes unique and significant, and also achieves the reversibility and retractablility required by the project.

Composed by 30 mobile metallic panels (each one 4.30m by 8.15m) connected by a central metallic structure, it is thought as a decentralized roofing system, where each part can be moved manually, individually or in trios, by the market vendors.

Each part can be activated by individual crank systems, and can be elevated at an angle between 25 to almost 90 degrees. Between these two, any position is possible, resulting in a rich diversity of combinations, light and shadow situations and ventilation behaviours.

The manual operation is possible through a system of counterweights, placed in the central part of the structure, which allow a person of normal weight to operate it with relative facility. A pair of locks allows to fix each panel in a certain position and turn it resistant to winds.

When all the 30 panels are down, they cover almost 100% of the central open area.

Total water-tightness is not an objective of this proposal. The draining of rainwater is made from the central part of the new structure, while the panels extend above the existing roof, without touching it. This way, while gathering its own water, the roof leaves small vertical openings at its border, between the panels, and between the roof and the accesses. These openings allow a basic quantity of natural light to get through, even when the roof is fully closed.

When fully open, the roof keeps the central space totally open in almost all of its area. To take advantage of the constant and random play of light and shadow that the metallic panels can provide, we decided not to use any transparent part.

This way, with the movement of the panels, each market vendor becomes an active creator of the everyday variation of visual atmosphere that the new roof will provide on the public market.

Full competition panels are available here, and the FreeCAD file here.

in categories  freecad  permalink:  369   posted on 13.11.2013 22:35
From Yorik

FreeCAD Draft dimensions recoded

I just recoded the whole Draft dimension object, and it now behaves pretty well in non-horizontal planes. It also gained new arrow types, and several new properties to adjust their looks. Aditionally, the angular dimensions can now be placed on drawing sheets. Might not be 100% bug-free yet, but most usual cases should now work fine.

in categories  freecad  opensource  permalink:  346   posted on 11.10.2013 19:35
From Yorik

Towards multilayer walls in FreeCAD

I think I found a quite elegant solution for multilayer walls. It is by no means a complete feature, but I think it gives us a very interesting start on the topic.

Basically I added an "Offset" property to walls, so they can be offsetted from their baseline. With this, several walls can be based on the same baseline, resulting in a multilayer wall:

A window can be added as usual, drawn on one of the faces of any of the "sibling" walls:

Upon creation, the window not only creates a hole in its base wall, but also in all the sibling walls (= walls based on the same baseline)

There are of course different issues to solve later such as what happens when a wall intersects a multi-wall, but for that we need more complete materials support, because everything will be decided depending on the material. I will also make the hole system better, allowing the user to add a custom shape to define the hole, so one can do more complex things such as having a different hole size for each of the layers of a multilayer wall.

in categories  freecad  opensource  permalink:  325   posted on 13.09.2013 20:03
From Yorik

FreeCAD Arch module development news

It's been a long time I didn't post any update about the Arch module here, but that doesn't mean nothing has happened! It has been about 8 months now since FreeCAD's release 0.13, and release 0.14 should happen around the end of the year. It depends mainly on Jrgen's Assembly module, which now is being contributed to not only by Jrgen himself but also several other people (the branch can already be compiled and tested, if you are brave enough).

On my side, I've been working mainly on 3 things: 1) a couple of improvements to the Draft module, so it becomes easier to use for pure 2D (remember, not the focus, etc, etc... but can be useful here and there anyway), and I plan to add a coule of more tools so you can have a basic autocad workflow there. 2) the spreadsheet module and 3) new Arch objects.

What is implemented so far, besides what I showed in this post about 2D workflow in FreeCAD is this:

Draft hatching

The Draft module now brings basic hatching in the 3D view:

Draft objects have received a "Pattern" property, which list the 5 default patterns of the Draft module (more to come) plus any custom pattern you might have installed via the Draft preferences. Those patterns are simple svg files, that are turned into transparent textures and applied to the object. If these svg files contain <pattern> attributes, those are used when placing the Draft objects on a Drawing sheet, so the pattern you set in the 3D view gets printed too.

There are still opengl-related problems (the visual artifact you can see on the screenshot), which also appear in other areas of FreeCAD that use transparent textures, that we must fix at some point, but it begins to look good, and making such svg patterns is very easy, so it can be easily extended.

The spreadsheet module

A new workbench is born, with a new object: the spreadsheet:

It is a very simple object, that lives inside the FreeCAD document, and can hold cell contents (a1="yorik", b2="1.93m etc...). It has a simple parser that can evaluate expressions like "=b3*5", like it is commonly used in spreadsheet applications. That object can also be used as a pure python object, with no relationship to FreeCAD.

When editing a spreadsheet object, a spreadsheet view opens, like shown on the screenshot above. Every change you made is saved on the fly, so when finished, you just close the tab.

That spreadsheet object is very simple, very dumb, and is intended that way. We won't recreate a spreadsheet application here, the idea is just to be able to handle spreadsheet data (and save it inside a FreeCAD file).

Another object provided by the spreadsheet module is a cell controller. A cell controller is an object meant to be nested inside a spreadsheet object, and takes control over a series of cells, filling them automatically with values. These values can be taken from the FreeCAD document, and can cover a wide range of uses such as counting objects of a certain type or getting a certain property from certain objects. In the screenshot below, one cell controller extracts the name of all shape-based objects of the document, the other extracts their volume.

The spreadsheet module was coded in python (my very feeble C++ superpowers, as always...) , but a courageous FreeCAD user has already undertaken to convert it to C++, so it becomes more stable, faster, and last but not least, usable by non-python workbenches of FreeCAD.

Arch structural profiles

The structural element of the Arch module has also received some work. The can now have an automatic profile from a simple mouse click (most standard steel beams profiles are there, courageously encoded by the FreeCAD community):

Those structural elements can now also take a wire as extrusion path:

Arch space

A new long-awaited object has appeared in the Arch module: the space.

It works like this: A space always encompasses a solid volume. You can define it from an existing volume, or from bordering faces, or both combined. If you define it only from bordering faces, it is calculated by taking the bounding volume of all those faces, and subtracting what's behind the faces. So we make sure to always have a solid volume. It can also display the floor area (using the "detailed" dislay mode), by taking an horizontal section of the space at its center of mass.

You can also build walls from space faces:

I am not sure this is so useful as it looks, but many people requested to be able to do that, "model with spaces"... To me it looks more like an academic dream, but I'll be happy to be proved wrong.

Arch stairs

Stairs have also been born:

Currently you cannot do very complex stairs, only straight stairs work, but they can already be based on a line, or on nothing at all, in which case you define all parameters numerically. If you use a line as a guide, that line can also be non-horizontal, then it is used to also define the slope. Many properties are already working, such as defining the thickness and nosing of threads, and the structure, that can be massive (concrete) or made of stringers:

I plan of course to add more complex stairs type, but then we will be entering deep and horrible math calculations, from which nobody has ever come back alive...

That's all for now I'm afraid, hope you liked, check the FreeCAD page for ways to be kept informed (google+, facebook, etc) about what happens in the FreeCAD world. And drop on our cool and friendly forum for deeper talk!

in categories  freecad  opensource  permalink:  321   posted on 06.09.2013 15:37
From Yorik

FreeCAD 2D import

I made recently a couple of improvements to the Draft module of FreeCAD to ease the dwg import -> rework -> svg export workflow. This came after soem frustration with DraftSight, which doesn't print linewidths correctly when you are using layers to define linewidths, instead of old-fashioned colors and ctb files.

In FreeCAD, on the other hand, we now have quite precise control over that, and dxf/dwg import is becoming quite reliable. If - this is very important - your drawing is clean and well made (no overlapping lines, few layers, as many polylines as possible), there is almost no work needed in FreeCAD to render quite nice drawings. Basically, everything depends on the quality of your drawing. Bad drawing, bad performance in FreeCAD.

The following example is a sample of a plan I've been doing of an existing building, drawn in DraftSight:

That drawing has less than 10 layers, and all the walls (white lines) are polylines. To quickly make polylines in draftsight (and autocad), and close them where possible, isolate your layer, enter pe (Polyedit), m (multiple), select everything, enter, then j (join).

If you have the Teigha File Converter installed on your machine, you can now configure the path to its executable in the Draft preferences, and have FreeCAD import DWG files directly (it will internally convert them to DXF then import them with the standard dxf importer). If you did what I explained (clean, organized drawing), the import is fast and efficient (no error):

You have several options in the Draft preferences (this is the default). I added a new option to create Draft clones from dxf blocks, which reduces the filesize of the resulting FcStd file to almost the same as the input dxf file, and facilitates handling, because all clones use the same base shape. The base shape itself (the block definition) is there, but hidden.

Since imported objects are grouped by layer, although FreeCAD groups have no controls like autocad layers, it is easy to select all the contents of a group (right-clicking on them, in the Draft module, there is an option to select the contents), and change properties such as linewidth or draw style (hidden, dashdot, etc):

I also modified the Draft-to-Drawing tool so you can now use it on groups. So selecting the 6 groups in this drawing and pressing the Draft Drawing tool immediately places everything on a sheet, but creates only 6 view objects in the Drawing page, which makes it very easy to place them properly on the page, and set things like linewidth:

Since I made sure walls were closed polylines, they are imported as filled objects (faces). If you leave them in "Flat lines" display mode, these faces can be colored or hatched:

There is a new system to show hatching directly in the 3D view, but it is still buggy. On the Drawing page, on the other hand, it already works pretty well. It doesn't appear in the Drawing viewer (a limitation Qt), but if you press the "view in browser" button, the page is opened in the FreeCAD browser, which is based on webkit, which is among the best svg viewers available. There, the rendering is just perfect:

From there, all we need to do is export the page to a svg file, open it in inkscape to make a pdf file. FreeCAD also has a print dialog to print a pdf from the Drawing page, but it uses your system's pdf printer. Inkscape, however, is really the state of the art in that matter, and makes 100% perfect pdf prints.

Obviously you will stil find glitches, bugs and problems here and there, FreeCAD is still in early development after all, but we are slowly arriving to some usable-in-production state. Even using FreeCAD as a 2D CAD application like Autocad or Draftsight is not - and probably will never be - the focus, that doesn't mean that doing 2D with it will be bad or impossible. My aim is - like, i hope, most architects - to free myself of 2D drafting, as much as possible, but at the same time I know we'll still need to live with 2D for a long time, and maybe if we can reduce that 2D work to something minimal, then it can fit perfectly within FreeCAD's possibilities...

I also did some work on the Arch module, other post to come soon...

in categories  freecad  opensource  permalink:  206   posted on 07.02.2013 18:47
From Yorik

FreeCAD plans

The 0.13 release of FreeCAD is being prepared and is almost ready (we are now uploading sources everywhere and building packages), so this is a good time to plan a little bit what I will be working on next...

  • Switch our wiki, mantis and phpbb to self-hosted
  • Try to achieve python3 compatibility, so we can have blender-in-freecad or freecad-in-blender again (basically import freecad files in blender and vice-versa)
  • Try to make standard icons use the current qt theme

Draft module
  • Separate upgrade and downgrade tools into smaller parts, to make them more extensible / configurable, and easier to fix bugs
  • Make upgrade and downgrade available in scripts (put them in Draft.py)
  • Turn the Draft snap icons into FreeCAD commands
  • Redo the dimension tools, simplify them (solve the orientation hell), use a placement, see if it is possible to base their coin node on Lukes sketcher dim node

Arch module
  • Better IFC import, get rid of internal parser if possible (keep it as a separate option), try to support IFC objects subcomponents (base polyline, separate shape representations, openings) if available
  • Better struct tool, allow placement, to choose base profile, etc
  • Add IFC export (add python bindings to IfcOpenShells exporter)
  • Add materials
  • Explore the concept of space, an empty volume limited by walls, floors, ceilings or anything else. Ideally have a two-way link between the space and its bordering elements (a space is defined by its borders, but changing the dimensions of a space could or should move its borders... seems difficult to achieve)
  • Explore the concept of floors, basically be able to calculate floor areas of a project. Maybe relate to spaces, but spaces might not always have a floor area...
  • Explore the concept of multilayer objects, typically walls. Many complications arise, such as capping, corners and openings...

More about what I plan for walls here

Spreadsheet module
  • Basic spreadsheet object
  • Basic spreadsheet viewer
  • Basic spreadsheet view (group of cells)

Drawing module
  • Allow the webkit viewer to draw a page background when viewing an svg file
  • Try to use the webkit viewer instead of the qsvg viewer. AFAICS main thing needed is signal-slot to update the contents.

If you want to keep updated with what I do there, check my assigned issues on the issue tracker

in categories  freecad  opensource  blender  permalink:  180   posted on 26.11.2012 20:37
From Yorik

FreeCAD Arch module how-to

In this article I'll try to describe you the new Arch module, that will be available in the soon-to-be-released version 0.13 of FreeCAD. I built a small model with it, in order to walk through the different components and tools currently available.

This project is based on a Blender model that I made during the first phase of the project. FreeCAD is a very precise tool, where things such as modifying objects takes much time. For that reason, when what you want is speed, you are definitely better with a faster, free-form modeler such as blender or sketchup. Nowadays, once you built a very imprecise model, it is fairly easy to make things straight and with the right dimensions in Blender, thanks to the very good snapping tools. You just need to build a couple of reference edges, that set things like external dimensions, roof height, and you can snap all your building to them.

Importing a blender model into FreeCAD is extremely reliable. You have several "transport" formats available (OBJ, STL, DAE), but i always prefer the OBJ format, because it is human-readable, it is well implemented in both Blender and FreeCAD, and it allows fairly complex concepts such as NGons (DAE relies on external components in both applications, and STL reduces everything to the most basic entities). All you need to do is select your objects to be exported in Blender, export to an OBJ file (a corresponding materials file will be created, but that one is not used by FreeCAD), and open it in FreeCAD. Due to the Z/Y orientation of OBJ files (the Z is not pointing "up" but "towards you"), you may need to give all imported objects a 90 rotation on X axis, with their placement property.

Once this is done, you can use that mesh as a base to build your model. You could transform your blender objects directly into Arch objects (Creating a wall or structure with a mesh selected automatically turns it into a wall or structure, provided it is solid an dnon-manifold), but in this case I wasn't too sure about the thickness of my blender walls, and I prefered to start from scratch. I started by drawign some guidelines, mostly to have something to snap to later on.

After that I used the wall tool on my line segments, mostly to check if all worked ok, and to see which wall I would align externally, and which one centrally.

I added two axes systems, and a column. By adding axes systems to a structural element, you turn it into an array. If you add one axes system, the structural element gets copied once on each line. If you add two systems, it gets copied on each itersection of the two systems. That is what I used here to place the columns at the appropriate locations.

Finally, I joined all my base lines with the upgrade tool into two objects, one for exterior walls and one for interior walls (they would have different thicknesses and alignment), and converted them into sketches. Then, I adjusted all the internal lines of the sketches, and rebuilt two new walls on top of them. By adding one wall to the other, you make them union (but they are kept as separated objects in the objects hierarchy). This is the big advantage of parametric modeling, all is undoable, modificable.

I then began to work on the bae slab, which in this case is pretty complex, features many different levels, stairs, etc. I basically worked by laying draft wires, then extruding them and turning them into structural elements. I also placed a couple of helper dimensions, to help me figure out how I would do the stairs.

The stairs are pretty simple, once I calculated the size of one element, I just duplicated it a couple of times.

I then added the windows and doors. Both windows and doors are made with the same window tool (after all, a door is only a special case of a window). If you have a face selected when you press the window tool, it enters in sketch mode, allowing you to draw the window directly on the wall. You can use all the sketcher tools such as importing external edges from the wall to place your window accurately. By default, if you draw your window with two closed wires, one inside the other, when you close the sketch, a defualt window will be created by extruding both wires and subtracting the inner one. But you can make about any combination you want, and the different components (the extrusion depth, which wire must be subtracted, etc) is all configurable in the window's edit mode. Just remember to always draw closed, non-overlapping wires.

Doors are made exactly the same way, only the base of the interior rectangle is aligned with the base of the exterior rectangle (the vertical distance between the two edges is 0).

Here I also added the brise-soleils by making a rectangle, another one smaller by offsetting the first one, then subtracting it from the first one, then extruding, the using the Draft array tool to make the serie of 8 brises.

I also made two beams, with a structural element to which I added one of the axes systems, and then added a roof slab, by extruding a rectangle, then adding a small wall on its border. The wall is then added to the slab.

I then added all the objects of the model to a floor object, which will be easier to make sections, since you can assign one floor object to a section, and it will automatically cut through everything that is inside the floor.

Time for a fist test of a plan view, by adding a horizontal section plane object:

I finally added the big window on the front, by building a rectangular block first, which would give me a face to support the window. I then built a sketch on it, with one exterior rectangle and several inner rectangles. As soon as you exit the sketch, the window is created.

The house is now complete, we can add a couple of other section planes, to make sections and elevations.

And here is the final result on the Drawing sheet, I used the wireframe rendering for plans and sections, and the solid rendering for elevations. You will of course see imperfectiosn here and there, but remember that the development of the Arch module is a work in progress, and it will still take a lot of time before things are perfect. Anyway, I think this already begins to give us a good base.

From our section planes, we can also extract flat shapes directly in the document, by making Shape2Dview objects with them selected. I made two for each section, one showing everything, and one (with thicker line) showing only the cut lines.

These flat objects export very wall to DXF, with absolute precision. You can then use them to build more complex 2D drawings.

That's about it, in the Arch module you will also find a couple of other helper tools, mainly made to help you to convert meshes to arch objects (split meshes, detect non-manifold ones, etc), and a roof tool, which is still pretty experimental, but already works fine for simple roofs. Remember that all this is still being developed, so don't expect to find the same workflow as in commercial applications. You will likely need to go back, try other methods, etc... several times during your work. But I hope I could demonstrate that the foundations are there, and that FreeCAD can begin to have its place in a productive workflow.

The final FreeCAD file can be downloaded here, but remember that until version 0.13 is released, you will need a development version to be able to open the file.

And don't forget, FreeCAD has a lot of documentation and a very cool community that can help you to get on tracks with it...

in categories  freecad  opensource  permalink:  158   posted on 03.09.2012 23:17
From Yorik

Latest developments of the FreeCAD Arch module

This is a small sneak preview of what is possible with the 0.13 version, to be released very soon (you can already test by installing a development version). This is nothing comparable to commercial solutions yet, but it already allows to do some useful work:

It is now quite easy to import mesh objects from Blender or other mesh-based application. If they are closed, solid, non-manifold and have their normals correctly pointing outwards, they convert to Arch objects without problems. The procedure is simple: Select an object in Blender, export it to .obj, import it in FreeCAD, give its placement a rotation of 90 on the X axis (because obj format inverts Y and Z axes). Select it in FreeCAD, separate it if needed (Arch -> Split Mesh) then press the "Wall" button and that's it, it is now a wall, with all its properties.

There are now several graphical goodies to make your 3D workspace more interesting: axes systems, different linewidths, different linestyles, smart grouping, etc. FreeCAD is now becoming more stable everyday, and you can begin to work comfortably with a reasonable number of objects, and keep things fast.

The Arch section plane object now has more powers, it can not only put 2D views on a drawing sheet, like before, but you can also create a real-scale 2D view of its objects right in the 3D document, with the Draft 2DView tool. The advantage is that you can then export the 2D view to DXF with absolute precision. The Draft 2DView tool also allows to show only cut lines, so you can build nice sections, easy to export to your favorite 2D CAD application.

That's it for now (I have a longer article in preparation), probably there won't be any significant changes until the 0.13 release, but there are many ideas ready to be added just after.

in categories  freecad  opensource  linux  permalink:  157   posted on 02.09.2012 21:06
From Yorik

Handling IFC files on Linux

Working with IFC files on a linux system is still not something easy, but there are already a couple of things you can do:

1. Add a MIME type

To have .ifc files recognized, add a file named "application-x-extension-ifc.xml" to ~/.local/share/mime/packages (or /usr/share/mime/packages for system-wide) with this content:

<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
	<mime-type type="application/x-extension-ifc">
		<sub-class-of type="text/plain"/>
		<comment>Industry Foundation Classes</comment>
		<glob pattern="*.ifc"/>

Then run "update-mime-database ~/.local/share/mime" to update your mimetypes database.

2. Add an icon

Grab an icon from here, and save it as ~/.icons/x-extension-ifc.png (or /usr/share/icons/x-extension-ifc.png for system-wide). Now your file manager should display IFC files a bit more nicely:

3. Open IFC files

There are currently no applications that can save ifc files (might change sooner than you think, however), but there are already a couple of solutions to open them. The following example is taken from the buildingSmart examples page ((Duplex model):

FreeCAD: Can open IFC file with its internal parser (not all entiites are supported and, starting from version 0.13 (to be released soon), is able to use IfcOpenShell if it is installed on your system, and with it, can import the whole contents of an IFC file:

OpenIfcTools: Has a javawebstart viewer, simple but very good for quickly inspecting IFC files:

Blender: Can also open ifc files when IfcOpenShell and its blender importer addon are installed. Although it uses the same IFC import engine, the file import operation is much faster than FreeCAD, because the mesh data that blender uses is much quicker to construct than FreeCAD's more complex parametric objects:

BimServer: The BimServer is a multiplatform server application, made to share, review and maintain IFC-based projects. It has several interesting functionalities such as conversion to/from several other formats, cobie support, revision control, etc... It has also a WebGL viewer program for it (called BimSurfer), which can render a the project in WebGL (3D inside your web browser):

5. Save IFC files

This is not yet possible, but Thomas Krijnen, the guy behind IfcOpenShell is working on it, so very likely Blender and FreeCAD will be able to output IFC files in some near future.

in categories  freecad  opensource  talks  permalink:  156   posted on 31.08.2012 23:42
From Yorik

Minha Palestra do FreeCAD no youtube

O pessoal do FISL gravou a palestra sobre FreeCAD que fiz no FISL13. Aqui est integralmente, for your viewing pleasure:

in categories  freecad  permalink:  142   posted on 10.08.2012 1:03
From Yorik

More work on FreeCAD

These days I had less time to work on FreeCAD, but I've been working a bit to solidify the Arch module, and refined a bit the 2D export. There are now 2 modes, solid, which uses the Arch vector renderer, and wireframe, which uses the standard Drawing module algorithms. That last mode now also draws sections with thicker lines (settable in the Arch preferences), and can also show the hidden part, behind the cutting plane.

in categories  freecad  opensource  inthepress  talks  permalink:  140   posted on 01.08.2012 18:33
From Yorik

FreeCAD and the FISL

Mara and me are back from the FISL. I've been presenting FreeCAD there (pdf of my talk here - in portuguese), and we also gave a Blender workshop.

The FreeCAD talk has been good, about half the room was filled, which is much more than I expected, CAD being a subject that fundamentally doesn't interest many people (and the fact that I had been assigned to one of the big rooms ) and nobody left the room during the talk, which is a good sign too. I kept talking with several people after the talk, got a couple of interesting feedbacks about the talk, a news article, and generally speaking got quite happy of how things went. Almost nobody in the room had heard or used FreeCAD before.

Of course there is still not much to show, no way to make a big show that will make people move to FreeCAD immediately, but it's a start. In any case, it's cool to have FreeCAD represented and featured among well-known projects such as ubuntu and firefox. I had hoped to find people interested in participating to the project, though, but I suppose that is something that cannot be forced.

Here are a couple of pictures of the event:

And one of the talk posted by www.baguete.com.br:

in categories  freecad  blender  opensource  permalink:  128   posted on 23.07.2012 20:59
From Yorik

FISL talks

This week I'll be giving a freecad talk (wednesday, 16h) (pdf) and a blender workshop (friday, 17h) (pdf) at the FISL in Porto Alegre. I'll post my impressions after the show here, and try to grab the video if it's filmed. See you there!

in categories  freecad  permalink:  124   posted on 17.07.2012 18:36
From Yorik
Whole morning working in freecad without one single crash, we're already doing better than autocad, aren't we?

Edit: End of the day, still no crash!

in categories  opensource  freecad  linux  blender  permalink:  96   posted on 04.06.2012 21:06
From Yorik

Python for architects - Part 1: Introduction

This is a serie of 3 tutorials for architects who wish to use opensource 3D tools (mainly Blender and FreeCAD more effectively, or simply who are curious about programming, and would like a gentle introduction. This is the first tutorial, presenting python in a general way. Read also the second part: about Blender. The third part (about FreeCAD) is yet to be written.

Why would I need to program? You might ask. There are a couple of reaons:

  • We architects are too dependents on big firms (Autodesk, Graphisoft, etc). They decide which tools, formats and standards we will use, and their decisions are in most cases dictated by commercial interests. We should be able to reflect and decide ourselves about how we want our work to be done, and have the power to craft our own tools if theirs are not good for us. Well, fear no more, yes we can!
  • Python is already included in many tools you know (or not): Blender, FreeCAD, Maya, Rhino, OpenOffice, and the crazy python fans everywhere even went much further, and you can now also use python in AutoCAD, 3ds Max or Revit, or Softimage. It also powers a very big part of Linux software. Python is everywhere. If you know one or another of those applications already, most of the work is already done. You'll just need a bit of python "sauce" to pilot them the same way as you already do with the mouse...
  • It is much easier than you would think. I'll try to demonstrate this below.

Why python?

Python is a programming language. It is free, open-source, multiplatform (Windows, Mac, Linux and many others), and it has several features that make it very different than other common programming languages, and very accessible to new users like yourself:

  • Python is a language described by its conceptors as "made for human beings", and is very easy to learn and understand. And even so (or, maybe, because of it), python is one of the most powerful languages available, principally because it can be (and is) extended almost infinitely, and is very, very widely used by people who are no computer scientists and never studied programming, like me.
  • It is interpreted, that is, unlike most other programming languages, it can be executed on-the-fly, as you write it. This has tremendous advantages for newcomers, for example it notifies you almost immediately when you make an error. You can start with very little knowledge, trying stuff, and in many cases it will teach you how to correct things and what to do next.
  • It can be embedded in other programs to be used as scripting language. Blender and FreeCAD have an embedded Python interpreter, so you can write Python code in them, that will manipulate parts of those programs, for example to create geometry. This is extremely powerful, because instead of just clicking a button labeled "create sphere", that a programmer has placed there for you, you have the freedom to create easily your own tool to create exactly the geometry you want.
  • It is extensible, you can easily plug new modules in your Python installation and extend its functionality. For example, you have modules that allow Python to read and write jpg images, to communicate with twitter, to schedule tasks to be performed by your operating system, etc. The list is endless. All this is easy to combine together, and use the power of one inside the other. For example, you can send tweets from blender, or create an openoffice sheet inside FreeCAD. You can even do incredible things such as running FreeCAD inside Blender (since FreeCAD is itself a python module too) and maybe the contrary too in the future...

So, hands on! Be aware that what will come next is a very simple introduction, by no means a complete python course. But my hope is that after that you'll get enough basics to explore deeper into the Blender and FreeCAD mechanisms, which will be in parts II and III of this tutorials serie.


Installing python present no difficulty at all, if you are on Linux there are 99% of chances that it is installed already, since it powers many parts of your system (try running "python" from a terminal to check), otherwise just install it from your system's package manager. On Windows and Mac, just download and install the latest version from the official python website. If you have Blender or FreeCAD installed, they already include an embedded python version, and you don't need to install anything.

When installing python, you might be able to choose between several versions. At the time of writing, the globally considered "stable" version is 2.7, but the latest version available is 3.2. I advise you to install the 3.2, or any higher version available. This tutorial is based on 3.2, but normally everything will work just the same with any other version.

The interpreter

Usually, when writing computer programs, you simply open a text editor (such as notepad on Windows) or a special programming environment which is in most case a text editor with several tools around it, write your program, then compile it (that means basically convert it into an executable application) and run it. Most of the time you made errors while writing, so your program won't work, and you will get an error message telling you what went wrong. Then you go back to your text editor, correct the mistakes, run again, and so on until your program works fine.

That whole process, in Python, can be done transparently inside the Python interpreter. The interpreter is a Python window with a command prompt, where you can simply type Python code, that will be executed on-the-fly, without the need to do anything else.

When Python is installed on your computer you will have a Python interpreter in your start menu (usually labelled "Python" or "Python console"). On linux and mac, you can also simply run "python" from a terminal window. Or, simply fire up Blender or FreeCAD, which both have an included python interpreter (also called "python console"). Below are images showing a standalone python console, and the python consoles embedded in FreeCAD and Blender:

The interpreter shows the Python version, then a >>> symbol, which is the command prompt, that is, where you enter Python code. Writing code in the interpreter is simple: one line is one instruction. When you press Enter, your line of code will be executed (after being instantly and invisibly compiled). For example, try writing this:


print is a special Python keyword that means, obviously, to print something on the screen. It is called a function, which means basically "it does something". Like in most programming languages, functions such as this one use parenthesis () that signify "do it with the contents of the parenthesis". So here the whole line means means "print the contents of the parenthesis". When you press Enter, the operation is executed, and the message "hello" is printed. If you make an error, for example let's write:


Python will tell us that it doesn't know what hello is: "NameError: name 'hello' is not defined".

The " characters specify that the content is a string, which is simply, in programming jargon, a piece of text. Without the ", the print command believed hello was not a piece of text but another special Python keyword. I'll explain better below. The important thing is, you immediately get notified that you made an error. By pressing the up arrow, you can go back to the last command you wrote and correct it.

The Python interpreter also has a built-in help system. Try typing:


It will tell us that help is a function, and needs to be used with parenthesis. For example, let's say we don't understand what went wrong with our print hello command above, we want specific information about the print command:


You'll get a long and complete description of everything the print command can do. Press "Q" to exit the help message.

Now we dominate totally our interpreter (yes, there is no more to know than that), we can begin with serious stuff.


Of course, printing "hello" is not very interesting. More interesting is printing stuff you don't know before, or let Python find for you. That's where the concept of variable comes in. A variable is simply a value that you store under a name. For example, type this:

a = "hello"

I guess you understood what happened, we "saved" the string "hello" under the name a. Now, a is not an unknown name anymore! We can use it anywhere, for example in the print command. We can use any name we want, just respecting simple rules, like not using spaces or punctuation. For example, we could very well write:

hello = "my own version of hello"

See? now hello is not an undefined word anymore. What if, by terrible bad luck, we choosed a name that already exists in Python? Let's say we want to store our string under the name "print":

print = "hello"

Python is very intelligent and will tell us that this is not possible. It has some "reserved" keywords that cannot be modified. But our own variables can be modified anytime, that's exactly why they are called variables, the contents can vary. For example:

myVariable = "hello"
myVariable = "good bye"

We changed the value of myVariable. We can also copy variables:

var1 = "hello"
var2 = var1

Note that it is interesting to give good names to your variables, because when you'll write long programs, after a while you won't remember what your variable named "a" is for. But if you named it for example myWelcomeMessage, you'll remember easily what it is used for when you'll see it.


Of course you must know that programming is useful to treat all kind of data, and especially numbers, not only text strings. One thing is important, Python must know what kind of data it is dealing with. We saw in our print hello example, that the print command recognized our "hello" string. That is because by using the "", we told specifically the print command that what it would come next is a text string.

We can always check what data type is the contents of a variable with the special Python keyword type:

myVar = "hello"

It will tell us the contents of myVar is 'str', or string in Python jargon. We have also other basic types of data, such as integer and float numbers:

firstNumber = 10
secondNumber = 20
print(firstNumber + secondNumber)

This is already much more interesting, isn't it? Now we already have a powerful calculator! Look well at how it worked, Python knows that 10 and 20 are integer numbers. So they are stored as "int", and Python can do with them everything it can do with integers. Look at the results of this:

firstNumber = "10"
secondNumber = "20"
print(firstNumber + secondNumber)

See? We forced Python to consider that our two variables are not numbers but mere pieces of text. Python can add two pieces of text together, but it won't try to find out any sum. But we were talking about integer numbers. There are also float numbers. The difference is that integer numbers don't have decimal part, while foat numbers can have a decimal part:

var1 = 13
var2 = 15.65
print("var1 is of type ", type(var1))
print("var2 is of type ", type(var2))

Int and Floats can be mixed together without problem:

total = var1 + var2

Of course the total has decimals, right? Then Python automatically decided that the result is a float. In several cases such as this one, Python automatically decides what type to give to something. In other cases it doesn't. For example:

varA = "hello 123"
varB = 456
print(varA + varB)

This will give us an error, varA is a string and varB is an int, and Python doesn't know what to do. But we can force Python to convert between types:

varA = "hello"
varB = 123
print(varA + str(varB))

Now both are strings, the operation works! Note that we "stringified" varB at the time of printing, but we didn't change varB itself. If we wanted to turn varB permanently into a string, we would need to do this:

varB = str(varB)

We can also use int() and float() to convert to int and float if we want:

varA = "123"

Note on Python commands

You must have noticed that in this section we used the print command in several ways. We printed variables, sums, several things separated by commas, and even the result of other Python command such as type(). Maybe you also saw that doing those two commands:


have exactly the same result. That is because we are in the interpreter, and everything is automatically printed on screen. When we'll write more complex programs that run outside the interpreter, they won't print automatically everything on screen, (in fact, maybe they won't even have a screen to print to, if they run inside another application) so we'll need to use the print command. But from now on, let's stop using it here, it'll go faster. So we can simply write:

myVar = "hello friends"

Another cosmetic detail, you can insert blank spaces where you want, just to make your code easier to read. It's a matter of taste, python doesn't consider whitespaces (unless they are inside a string, of course, otherwise how would you print whole sentences?). For example, these two lines of code are totally identical to python:

print ( type ( varA + varB ) )


Another interesting data type is lists. A list is simply a list of other data. The same way as we define a text string by using " ", we define lists by using [ ]:

myList = [1,2,3]
myOtherList = ["Bart", "Frank", "Bob"]
myMixedList = ["hello", 345, 34.567]

You see that it can contain any type of data. Lists are very useful because you can group variables together. You can then do all kind of things within that groups, for example counting them:


or retrieving one item of a list:

myName = myOtherList[0]
myFriendsName = myOtherList[1]

You see that while the len() command returns the total number of items in a list, their "position" in the list begins with 0. The first item in a list is always at position 0, so in our myOtherList, "Bob" will be at position 2. We can do much more stuff with lists such as you can read here, such as sorting contents, removing or adding elements.

A funny and interesting thing for you: a text string is actually, internally, a list of characters! Try doing this:

myvar = "hello"

Usually all you can do with lists can also be done with strings. In fact both lists and strings are sequences of elements, and you can do much more with sequences, as we'll see further on.

Outside strings, ints, floats and lists, there are more built-in data types, such as dictionnaries, or you can even create your own data types with classes. Like everything in Python, the basics are small, but it is often extensible as far as your imagination allows.

Indentation & blocks

One big cool use of lists is also browsing through them and do something with each item. For example look at this:

alldaltons = ["Joe", "William", "Jack", "Averell"]
for dalton in alldaltons:
   print (dalton + " Dalton")

We iterated (programming jargon again!) through our list with the "for ... in ..." command and did something with each of the items. Note the special syntax: the for command terminates with : which indicates that what will comes after will be a block of one of more commands. Immediately after you enter the command line ending with :, the command prompt will change to ... which means Python knows that a :-ended line has happened and that what will come next will be part of it.

How will Python know how many of the next lines will be to be executed inside the for...in operation? For that, Python uses indentation. That is, your next lines won't begin immediately. You will begin them with a blank space, or several blank spaces, or a tab, or several tabs. Other programming languages use other methods, like putting everythin inside parenthesis, etc. As long as you write your next lines with the same indentation, they will be considered part of the same for-in block. If you begin one line with 2 spaces and the next one with 4, there will be an error. When you finished, just write another line without indentation, or simply press Enter to come back from the for-in block

Indentation is cool because if you make big ones (for example use tabs instead of spaces because it's larger), when you write a big program you'll have a clear view of what is executed inside what. We'll see that many other commands than for-in can have indented blocks of code too.

For-in commands can be used for many things that must be done more than once. It can for example be combined with the range() command:

serie = range(1,11)
total = 0
print ("sum")
for number in serie:
   print (number)
   total = total + number
print ("----")
print (total)

Or more complex things like this:

alldaltons = ["Joe", "William", "Jack", "Averell"]
for n in range(4):
   print (alldaltons[n], " is Dalton number ", n)

You see that the range() command also has that strange particularity that it begins with 0 (if you don't specify the starting number) and that its last number will be one less than the ending number you specify. That is, of course, so it works well with other Python commands. For example:

alldaltons = ["Joe", "William", "Jack", "Averell"]
total = len(alldaltons)
for n in range(total):
   print (alldaltons[n])

Another interesting use of indented blocks is with the if command. If executes a code block only if a certain condition is met, for example:

alldaltons = ["Joe", "William", "Jack", "Averell"]
if "Joe" in alldaltons:
   print ("We found that Dalton!!!")

Of course this will always print the sentence, because the stuff after "if" is always true ("Joe" is indeed foundin the allDaltons list), but try replacing the second line by:

if "Lucky Luke" in alldaltons:

Then the result of that line is false, and nothing is printed. We can also specify an else: statement:

alldaltons = ["Joe", "William", "Jack", "Averell"]
if "Lucky Luke" in alldaltons:
   print ("We found that Dalton!!!")
   print ( "Such Dalton doesn't exist!" )


The standard Python commands are not many. In current version of Python there are about 30, and we already know several of them (print(), len(), type(), etc...). But imagine if we could invent our own commands? Well, we can, and it's extremely easy. In fact, most the additional modules that you can plug into your Python installation do just that, they add commands that you can use. A custom command in Python is called a function and is made like this:

def square(myValue):
    print ( str(myValue)+" square meters" )

print ( square(45) )

Extremely simple: the def() command defines a new function. You give it a name, and inside the parenthesis you define arguments that we'll use in our function. Arguments are data that will be passed to the function. For example, look at the len() command. If you just write len() alone, Python will tell you it needs an argument. That is, you want len() of something, right? Then, for example, you'll write len(myList) and you'll get the length of myList. Well, myList is an argument that you pass to the len() function. The len() function is defined in such a way that it knows what to do with what is passed to it. Same as we did here.

The "myValue" name can be anything, and it will be used only inside the function. It is just a name you give to the argument so you can do something with it, but it also serves so the function knows how many arguments to expect. For example, if you do this:

print ( square(45,34) )

There will be an error. Our function was programmed to receive just one argument, but it received two, 45 and 34. We could instead do something like this:

def sum(val1,val2):
   total = val1 + val2
   return ( total )

myTotal = sum(45,34)

We made a function that receives two arguments, sums them, and returns that value. Returning something is very useful, because we can do something with the result, such as store it in the myTotal variable. Of course, since we are in the interpreter and everything is printed, doing:


will print the result on the screen, but outside the interpreter, since there is no more print command inside the function, nothing would appear on the screen. You would need to do:

print (sum(45,34))

to have something printed.


Now that we have a good idea of how Python works, we'll need one last thing: How to work with files and modules.

Until now, we wrote Python instructions line by line in the interpreter, right? What if we could write several lines together, and have them executed all at once? It would certainly be handier for doing more complex things. And we could save our work too. Well, that too, is extremely easy. Simply open a text editor (such as the windows notepad, or gedit on ubuntu), and write all your Python lines, the same way as you write them in the interpreter, with indentations, etc. Then, save that file somewhere, with a .py extension instead of the usual .txt. That's it, you have a complete Python program. Of course, there are much better and much more comfortable editors than notepad (try notepad++ for example), but it is just to show you that a Python program is nothing else than a text file. Also note that on windows, python already comes with an editor named "IDLE", which is also a very comfortable way to write python code.

To make Python execute that program, there are hundreds of ways. In windows, simply right-click your file, open it with Python, and execute it. But you can also execute it from the Python interpreter itself. For this, the interpreter must find your .py file. The easiest way is to place your .py file in a place where python will search by default, such as the folder from where you started the python interpreter. On linux, by default it is your user home directory, on windows it is the folder where you installed python. If you use FreeCAD, you can simply place your .py file in the macros folder.

Here is a simple trick to find, from inside the python console, what is the current directory, which will be a good place to save our script (I'll explain later):

import os

Then, let's fire our text editor, and write the following text:

def sum(a,b):
    return (a + b)

print( "test.py succesfully loaded" )

and we save it as test.py in the directory found above. Now, let's start our python console, and, write:

import test

without the .py extension. This will simply execute the contents of the file, line by line, just as if we had written it in the interpreter. The sum function will be created, and the message will be printed. There is one big difference: the import command is made not only to execute programs written in files, like ours, but also to load the functions inside, so they become available in the interpreter. In python, that kind of files, made to be imported into other files instead of being simply executed, are called modules.

Normally when we write a sum() function directly in the interpreter, we execute it simply like that:


Like we did earlier. When we import a module containing our sum() function, the syntax is a bit different. We do:


That is, the module is imported as a "container", and all its functions are inside. This is extremely useful, because we can import a lot of modules, and keep everything well organized. So, basically, everywhere you see something.somethingElse, with a dot in between, that means somethingElse is inside something. Now you should understand better what we did with our "os" module above. The os module is a standard module of python, and contains operating system-related functions, and a submodule (simply a module inside a module) named "path" which contains tools to work with files and folders.

We can also throw out the test part, and import our sum() function directly into the main interpreter space, like this:

from test import *

Basically all modules behave like that. You import a module, then you can use its functions like that: module.function(argument). Almost all modules do that: they define functions, new data types and classes that you can use in the interpreter or in your own Python modules, because nothing prevents you to import modules inside your module!

One last extremely useful thing. How do we know what modules we have, what functions are inside and how to use them (that is, what kind of arguments they need)? We saw already that Python has a help() function. Doing:


Will give us a list of all available modules. We can now type q to get out of the interactive help, and import any of them. We can even browse their content with the dir() command:

import math

We'll see all the functions contained in the math module, as well as strange stuff named __doc__, __file__, __name__. The __doc__ is extremely useful, it is a documentation text. Every function of (well-made) modules has a __doc__ that explains how to use it. For example, we see that there is a sin function inside the math module. Want to know how to use it?

print ( math.sin.__doc__ )

which is a simpler version than:


And finally one last little goodie: When we work on programming a new module, we often want to test it. So once we wrote a little piece of module, in a python interpreter, we do something like this, to test our new code:

import myModule

But what if we see that myTestFunction() doesn't work correctly? We go back to our editor and modifiy it. Then, instead of closing and reopening the python interpreter, we can simply update the module like this:



By now, you should have a broad idea of how things are programmed in python. As you see, it's basically a matter of writing text files containing your python instructions, and have these files (modules) imported in your favorite application, and executed for example when the user pushes a button. How to achieve that depends from the application, that's what we'll explore in the next parts of this tutorials serie...

In the meantime, if you would like to know more about the basics of python, there are many, many tutorials on the internet. I selected a couple of good, simple and easy ones here. For more advanced ones, just google for "python tutorial", and you'll find plenty, including one from the official python website.

There are also many very complete PDF ebooks:

I hope you liked, if anything is unclear, please tell me by posting a comment below, so I can make it evolve into something better!

To be continued! Read the second part: about Blender.

in categories  freecad  opensource  permalink:  92   posted on 01.06.2012 16:49
From Yorik

FreeCAD Arch module development status

There is quite some time I didn't write about what's going on with the FreeCAD Arch module development, so here it goes. Keep in mind that all this is still in heavy development, so it will only be available in next release (unless you use a development version of course!) and it still has many bugs. Even so, I think there is some interesting stuff to show...

The first main improvement is not in the Arch module itself but in the Draft module. The whole snapping system has been fully redone, and now features proper and extensible API and interface, clear icons, and a control toolbar. The Draft snap system is used by all Draft commands and by the Arch Wall tool, which is at the moment the only tool which has a drawing system.

The Arch Wall tool has been redone too. You have now 2 ways to make a wall: Either by selecting a 2D shape (wire, sketch, etc...) and pressing the Wall button, in which case the new wall will take the selected object as baseline, or without anything selected. In the latter case, you enter a wall drawing mode, where walls can be drawn as easily as lines.

Walls also have a new way to connect to each other, and will now auto-connect when you snap to an existing wall segment. This is done in 2 manners: If both wall segments have same width, height and alignment, the baseline of the new segment is simply added to the base sketch of the existing segment. If not, then the new wall receives its own base sketch, and it is added to the existing wall as addition.

The window tool has also been completely redone. Windows can now only be created on top of an existing 2D object (draft or sketch). Which leads to the extremely intuitive new way to make windows in FreeCAD: Draw them directly on the walls!

The technique is simple, you must simply draw a sketch with a serie of closed wires. Then these wires can be used to define window parts (frames, panels, etc...). When pressing the window button, a default window is created, with a default window part, by subtracting the inner wires from the biggest one. you can then edit these window parts, add new ones, etc... By double-clicking the window object in the tree.

The windows also automatically create a hole in the walls they are inserted in. To insert a window in a wall, select the window and the wall, and press the Arch Subtract button. If you create a window with another window selected, you'll create a clone of that window, which can be moved and inserted in other walls, but keeps the same shape of the base one.

Another new tool that has been added is the Arch Roof tool. It works only with a face selected. It then creates a sloped roof on top of that face. You can change the slope angle in its properties. It is still bery basic, all panes have the same angle, and it fails in many complex cases such as angles different than 90, but for most roofs it already works pretty well:

The Arch group objects (floor, building, site) are also being reworked, and are now based on FreeCAD group objects, which means you can drag&drop to/from them in the tree.

And finally, I also did some further work in the Vector renderer and the Drawing module. The vector renderer is getting more stable, and is now able to work with rather complex models without errors (although it is beginning to be slow... It might be time to redo it in C++ soon). The Drawing workbench also has a new clip object, which can be used to clip a Drawing view to a certain rectangle.

We're now slowly going towards next release, so I think most of my efforts until then will go into bugfixing rather than adding new features. Anyway, I believe we're kind of reaching a state where it begins to be possible to do quite complex architecture models already. I'll try to post some examples soon...

in categories  freecad  permalink:  76   posted on 16.05.2012 20:51
From Yorik

Clipping planes on FreeCAD drawing sheets

I added a new object type for the Drawing module of FreeCAD. It is a clip plane object, it behaves like a group, you can place it inside a page (which happens by default when pressing the button), and add view objects to it by dragging them in the tree view. It has X, Y, Width and Height properties so you can define the viewport precisely, and a "show frame" property which can be used to see a red border around the frame, useful to place it correctly.

The clip object then simply clips all the view objects contained in it, without any further transformation.

The bottom view shows the 3D view with a wall and a section plane object, the top right window shows the current Qt-based Drawing viewer. Due to the internal limitations of the Qt svg engine, it cannot represent the svg clip object correctly. But the webkit viewer (left image), which will be used by default once we find time to do so, shows it correctly, as well as other svg applications.

in categories  freecad  permalink:  74   posted on 14.05.2012 1:24
From Yorik
Experimenting with roof-generation scripts in FreeCAD...

in categories  freecad  opensource  permalink:  54   posted on 03.04.2012 21:21
From Yorik

Vector renderer for FreeCAD

The OpenCasCade kernel of FreeCAD already provides a way to project 3d objects on a 2d plane. That is what we use now in the Drawing module. But it does it by calculating the shown and hidden segments of the object's edges, and can only output a bunch of lines. Nice for simple views, but not enough for architecture documents, where we want to be able to "paint" our 2d areas with solid or hatch fills.

So I ended up writing a complete new vector rendering module, inspired by earlier experiments for blender such as Pantograph or VRM. Both are based on the Painter algorithm, which is a way to render objects by depth order, so the upper objects hide the lower ones.

SVG works exactly that way, so it is totally appropriate. The big problem is to sort the faces of 3D objects by their depth in relation to the point of view. It may look simple, but it is a quite complex problem, you cannot simply consider the faces centerpoint, you need to do a serie of tests to know which face is closer. Finally, I found this article that explains step-by-step several tests to do. I implemented this in a new module and it works already fairly good and fast:

The Arch section plane already uses it by default:

Of course this is still preliminar work and will probably fail in many complex cases, but I'm already pretty happy to have the main algorithm working.

Preliminary sections support is also working:

in categories  freecad  linux  opensource  permalink:  44   posted on 21.03.2012 3:20
From Yorik

FreeCAD thumbnailer for KDE

After the tumbler plugin, here is now a KDE plugin (for the dolphin file manager) that will show thumbnails for FreeCAD .Fcstd files. Enjoy!


in categories  linux  freecad  opensource  permalink:  37   posted on 15.03.2012 20:38
From Yorik

FreeCAD plugin for tumbler

Tumbler is a rather new thumbnailing system developed by the people at xfce. It is used by thunar and marlinn file managers. I just made a plugin for tumbler that allows it to display thumbnails for FreeCAD files (provided you enabled thumbnails in the FreeCAD preferences).

Get the code here: https://github.com/yorikvanhavre/tumbler-fcstd-thumbnailer.

I plan to include this in the FreeCAD sources or the tumbler sources, depending if the xfce devs find it useful

in categories  freecad  permalink:  26   posted on 28.02.2012 13:55
From Yorik

in categories  freecad  opensource  permalink:  17   posted on 15.01.2012 22:29
From Yorik

IfcOpenShell and FreeCAD to work with BRep solids

With Thomas Krijnen, the guy behind IfcOpenShell, we've been playing with importing BRep files, the native OpenCasCade geometry format, from IfcOpenShell to FreeCAD. This gives truly spectacular results, FreeCAD being able to import a whole IFC file as Part solids, thus skipping the whole Mesh-to-Solid operation.

This is of course just a very early step in making the imported IFC files into something usable "architecture-wise", but it is an important one. Part shapes are the true main building block in all FreeCAD, and being able to import data in its native format is of a considerable importance to maintain a good data integrity. I also think it is a significant step in the OCC-based ecosystem...

in categories  freecad  opensource  permalink:  15   posted on 12.01.2012 15:36
From Yorik
follow-up to post 13...

The Structure elements can now be based on 2 axes systems. In edit mode, you can add axes system to a structure element. When you have 2 or more axes systems, the structual elements are placed on every intersection point. Currently only takes the 2 first axes into account...

in categories  freecad  opensource  permalink:  13   posted on 10.01.2012 21:29
From Yorik

Axes systems in FreeCAD

I more or less finished an axes system for the Arch module. It is a simple, 1-dimension axes system. You can specify the length of the axes, the size of the numbering bubble, and the numbering style (1,2,3,... or A,B,C, etc. Several styles available) directly via the properties. Then, via edit mode (double-clicking on the object in the Tree view), you can refine the whole axes sequence, by adding and removing axes, and changing the interval distance and angle of each axis. They are also movable and rotationable, so you can create very complex axes systems, which are totally snappable, including to the intersections.

Later on I plan to use them for laying out the levels of a multi-floor construction too, creating true 3-dimension systems, and find a way to have structural elements bound to them, so you can parametrically stretch buildings only by modifying their axes systems.

in categories  freecad  opensource  permalink:  1   posted on 02.01.2012 22:44
From Yorik

Scale feature in FreeCAD Draft

I changed a bit the current scale tool in the Draft module. It now uses a parametric object instead of modifying the base object. The parametric object allows you to change the scale factor afterwards. The old behaviour is still available to python scripting, though.

in categories  freecad  opensource  permalink:  182   posted on 30.12.2011 2:29
From Yorik

Editable titleblocks in FreeCAD

Lots of new features are arriving after the 0.12 release. I just implemented editable titleblocks:

More here.

in categories  linux  freecad  blender  architecture  opensource  permalink:  97   posted on 22.09.2011 16:52
From Yorik

Linux for architects

This is a little introduction to Linux for you architects who have never tried it, but would like to know what's all the fuss about it and if it is really usable for working with architecture. If you know Linux already, I'm sure you'll find a lot of missing info in this text and find it maybe a bit too enthusiastic, but we are whowe are, aren't we...

This article is a sequel of another short article I wrote back in 2009 to present some tools available to architects on the Linux platform.

Just a small note, What it is exactly?

Actually it's wrong to call Linux Linux. Linux systems are not all-in-one, monolithic things like Windows, but rather a complex assemblage of software pieces, Linux being only the base block.

Linux is based on Unix, its predecessor, and follows a basic Unix philosophy: Rather than having one huge all-in-one application that does 1001 tricks, have 1001 small applications that do each one one simple task, but do it well.

Most of the other pieces come from a project called GNU, that's why those systems are usually called GNU/Linux and not just Linux. But let's make it simple and continue to call it Linux.

Of course make those thousands of small applications all work seamlessly is not a small work, but fortunately it has been done a lot of times already. This is where comes what we call a Linux distribution, which is a complete operating system, based on GNU/Linux, made of hundreds of little pieces, all working in a big symphony. Ubuntu is one of the most famous Linux distributions.

First things first, Why Linux Is For You

  • Linux is free. This means not only that you don't pay anything, but also that you are free to do what you want with it: download it, distribute it, share it on bitTorrent, (you caneven sell it), without having to do anything or report to anyone. Like GNU people use to say, it's free like freedom, not free like free beer
  • Much more important than being free, it will stay free forever. Like most free software, its code carries a license that prevents it from being bought by a firm and stop being free.
  • Your distribution doesn't only provide you with the Linuxoperating system, but with almost any piece of software that runs on Linux. As a consequence, all your applications can be installed easily from your distribution's servers, and your whole computer, not only the operating system but ALL yourinstalled applications, are updated automatically.
  • Linux inherits another very important thing from Unix: The rock-solid built-in protection of networking, files, processes and users. As a consequence, Linux is almost invulnerable to viruses (there is no Linux virus known today) and easily protected against network intrusions.
  • Linux and most free applications that runs on it are programmed and maintained by people who have no commercial reasons to do it. They do what they think is best, not what they think will sell better. Your software will never force you to buy a new computer (Linux and most free software run fine on very old hardware) or a new plugin, and software evolves extremely fast (new features land on your system almost every single day).
  • People who make free software are extremely social. You find them easily, talk to them, discuss, share ideas, and easily get involved in directions your favorite application is taking. All happens through forums, email discussions, chat rooms or facebook pages. If you miss some feature and you can convince people of the importance of your claim, chances are high that someone will implement it.
  • Linux can safely be installed side-to-side with another operating system such as Windows. A menu will then appear, at boot time, to allow you to choose which system to boot to.

The Bad

Of course nothing comes without disvantages. Here are a few issues you might expect:
  • Bleeding-edge new hardware might not be totally supported yet. Nobody has commercial urge to make Linux work for your particular hardware, so you usually have to wait until some Linux programmer will get one for him, be annoyed be the fact it isn't supported, and remedy the situation. It's always a good idea to test before installing or investigate before buying.
  • Windows software doesn't run on Linux systems. You will need to get used to other applications. But most of the usual ones have one or many excellent or even much better alternatives in Linux, and nowadays more and more applications such as Google Chrome, Firefox or Open Office can run on both Windows and Linux. Some more specialized commercial-grade applications such as engineering applications still don't have a Linux alternative, though. You will sometimes need to do some homework and find workarounds to palliate to that situation.
  • There is no firm behind Linux. Nobody to call, nobody to complain to. Although some firms may offer you tech support, you are on your own in most cases. But fortunately most answers are very easy to find on the internet, a simple search like "How to resize a picture in Ubuntu" will usually give you an easy and immediate answer.

So what does it look like?

If you managed to read until now, you must be a bit curious to see what it looks like, right? I gathered here a couple of screenshots from the most common distributions:

Below is the latest version of Ubuntu, probably the most famous of all Linux distributions, and one of the most friendly to new users. In this version, Ubuntu introduced a new way to navigate through your files and applications, called Unity, which is the vertical bar containing icons on the left:

Another very good distribution is LinuxMint. Linux Mint is based on Ubuntu, so it inherits all the qualities of its father. But its developers put a special effort into style and design, so Linux Mint is often the favorite distribution used by artists:

This is another of the most famous ones among new users, called Fedora. Fedora is derived from a famous commercial Linux system called Red Hat, and it inherits from it a great deal of novelty and power. Fedora is usually liked because it brings bleeding-edge features faster than the others:

But most Linux systems are deeply customizable, and you can usually make your desktop look like your wildest dreams. Here is, for example, a screenshot of my own desktop:

How to get it

Most Linux distributions have a great feature: The installation CD is also a Live CD, that allows you to run your Linux system entirely from the CD, without installing anything. This is a great way to test, to see if it runs well, and if you like it at all, without risking to do any harm to your current system. The proceeding is very simple:
  • Download an .iso CD image from one of the distribution sites indicated above. Sometimes they have several flavours, such as 32bits or 64bits. Choose one that suits your computer. Since a full CD image is a big file (700Mb), Most of them allow you to download it via bitTorrent if you prefer. Some even provide DVD versions, which include more pre-installed applications.
  • Burn that image on a blank CD. Be careful, burning an image is not the same thing as copying a file on a CD. Simply copying the .iso file on the CD won't work, you must either right-click on the .iso file and select a "burn this image to disc" option, or open your disk burning software and find the "burn disc image" option. When your disk is burned, it will contain several files, not the .iso file.
  • Now place your fresh CD in your CD drive, and reboot your computer. On some systems, you must allow your computer to boot the CD before booting the Hard drive, this is usually done by pressing a key (F2, F12) during the first seconds after powering up and selecting your CD drive in a list.
  • Your new operating system will now boot. Remember that nothing is copied to your computer, so you can play safely with everything, there is no risk to harm anything. Just remove the CD and reboot, and you'll be back to your original operating system. But remember too that nothing you do while you are running from the CD will be saved, so you will loose any work you do during that time.
  • Most Linux distributions, when running from the CD, will have an "Install to Hard Drive", icon, which you can use when you are ready to install. You will then be taken to a step-by-step install procedure.
Now where are the file explorer, the internet explorer, the windows messenger, the acrobat reader, photoshop, skype, notepad, word, excel? Well, almost none of those are there, but all have at least one equivalent. Explore the menus and you will find everything in no time. And if something is missing, it can easily be installed by the system itself.

This is, for example, the Ubuntu software center, from where you install just about anything:

Okay, after all this bla-bla, what about doing architecture work?

The problem you'll encounter with Linux is that none of your usual architecture software will work. No Autocad, no Revit, no Archicad, no Vectorworks, no 3DS Max, no V-Ray. Those are all windows-only (some run on Mac too), and it's very unlikely that their developers will want to spend time in doing a Linux version in the near future.

So, how bad exactly is the situation?

Actually it is not bad at all, but you will need to learn to use new software, there is no way to avoid that part. Apart from that, it is actually possible to work without any problem.
In the 2D CAD field, we have a couple of options now. Some are totally free, like QCad,Cademia or the new and promising LibreCAD. Those, since they are maintained and developed by a community, might lack some commercial features like DWG format compatibility. This is LibreCAD:

We also have several commercial applications, which are not free, but run natively on Linux, and have all the features that you would expect from a commercial application, such as DWG compatibility and technical support, like Ares Commander and BricsCAD. Here is BricsCAD:

And, since a couple of months, we now have a free AND commercial application called DraftSight. DraftSight, although owned by a company, is distributed for free, and supports DWG format natively:

Here unfortunately things are less easy. There is at the moment no ready solution, but there are several efforts going in that direction, so the future is promising. One of these efforts is an application called FreeCAD to which I have the honor to contribute with coding in my spare time. FreeCAD is a full modern parametric modeler, and although very young, it already has a lot of interesting functionality for doing architecture, such as a 2D drawing module, usual 3D tools such as extrusion and booleans, and a 3D-to-2D module. A real BIM module is also in development.

I write a lot about FreeCAD on this blog...
In the area of 3D rendering, things are not only better but state-of-the-art, thanks to an amazing piece of software called Blender. Blender runs on windows too, so chances are high that you heard about it already. Blender is for me the best general-use 3D application available today. Better than 3DS Max, better than Maya. It is faster, smaller, and made by 3D users instead of made by Autodesk. Blender can do everything that those 2 applications can do, and has several external renderers available.

The only drawback of blender is that it can be hard to learn if you are much used to another 3D application. But I warned you about that already...

In fact, I use Blender so much that it is now not only what I use to do rendering, but also to compose architecture:

I also write a lot about Blender, there are also many tutorials on the homepage of this site.

But there is something I didn't tell you yet. Remember I told Windows applications don't run on Linux, right? Well it's not totally true. There is a little gem of a software, called Wine, which allows to run Windows applications on a Linux system. It won't work with all applications, and many will run with problems. But one of the applications that runs almost perfectly is Sketchup! Installing Windows applications with Wine is nowadays almost as easy as installing them on Windows, and they integrate seamlessly on your desktop (But of course it is never as comfortable and fast as running a native Linux application). The Wine website has a list of windows software that runs with it, with ratings, comments and notes.
What would be of us architects without photoshop, right? The most famous Linux photoshop-like application is called Gimp, and, although many purists will argue that it lacks some or another indispensable photoshop option, is an excellent and very mature application, totally able to perform all the tasks architects usually require from photoshop, and, thanks to the typical friendliness to extension and customization found in most Linux applications, you can extend it into a very powerful digital painting platform.

To give you an idea, this is the kind of drawing that you can achieve with gimp only:

But a lot of digital artists use Linux nowadays, so there are many more interesting tools available, like MyPaint or Krita. Another must-have Linux application is inkscape, which is a vectorial drawing application, similar to Corel Draw or Illustrator. It is commonly used for drawing diagrams, icons and vector artwork, but is perfect for mounting more complex presentation sheets.

Also worth noting, many of those applications also run on windows, so it's a good place to try.

Are there architects out there who use Linux?

Because of all the little problems but mostly because it is not very well known, very few architects use Linux at this time. But things are changing fast... Here is a list of interesting people who share tips, techniques and resources about the subject: Enjoy!

in categories  freecad  opensource  permalink:  77   posted on 22.09.2011 16:50
From Yorik

Draft objects are now usable with PartDesign module

Now Draft objects can be drawn on any existing face. If the working plane was not set manually, the face on which you begin to draw will automatically determinate the working plane. If you draw closed shapes, they can be used for Pads and Pockets too.

in categories  freecad  opensource  permalink:  147   posted on 22.08.2011 16:48
From Yorik

FreeCAD Arch module: working on top of sketches

I just made a couple of improvements so walls can be automatically built on top of complex sketches. This way, it is now possible to build your whole floor plan from one sketch, having it completely constrained...

After you build a sketch, just press the Wall button and that's it!

in categories  freecad  opensource  permalink:  132   posted on 28.07.2011 3:18
From Yorik

The FreeCAD Arch module, development news

I recently made a bit of progress on the Arch module front. Things are still far from efficiently usable, but there are already a couple of easy operations that can be done, and several of the tools have been refined. We now have two basic architecture components (Wall and Structure) and containers (Cell, Floor, Building an Site), plus two tools to simply add or remove components to/from a container. This is temporary, that operation is planned to be done by dragging and dropping directly in the tree view later.

The wall and structure tools are most useful when used with a selected object such as a line or open wire, for a wall, or a closed shape, for a structure. But they can also be invoked without any selected object, in that case the wall is built on a default line that can be edited and extended, and the structure is a simple cubic element. They can also be based not only on a wire, but also on a face or a solid. Of course a face only allows to specify an extrusion heigth (no width and length) and a solid doesn't allow you to teak anything. But in the future when walls will grow more complex and orient how they look in 2D be able to make any solid shape behave like a wall will be very useful.

I also built a temporary system to export 2D data from blender to FreeCAD, while there is no dxf exporter available for blender 2.5x. There is also a new "group layers into compounds" option to the Draft dxf preferences, which, instead of importing every single dxf entity, groups objects from same layers into compounds, which turns the import and 3D view operation blind fast.

Another area where I put some effort recently is in the blender to freecad workflow. There is nothing better in the world to conceive architecture than blender. Think of the flow and easiness of sketchup but with the power of 3ds max. But blender works in meshes, which is at the same time annoying and the key for its success. Meshes are very simple (too simple), but because of that, very flexible and fast.

FreeCAD imports blender meshes very easily. Until now I haven't seen that operation fail once. Just export them as .obj from blender, and import that .obj file in FreeCAD, thats it. Remember that the obj format has the annoying particularity to invert Y and Z axes.

Mara and me are currently working on a project that is totally developed on blender. This is the project in blender, so you can evaluate the complexity:

And the same project, exported and imported in FreeCAD:

Everything is there, precisely. The file in that state is available here, in case you want to have a look. In spite of the complexity, the 3D display of FreeCAD is totally able to handle that amount of data fluidly. The big hiccup is when you are getting a lot of separate objects in the document, but I'll come to that later.

I also drew a base plan in draftsight (on top of an exported 2D view, with the tools I mentioned earlier. That plan was saved in dxf and imported back in FreeCAD:

I then positioned and rotated that plan to fit perfectly under the mesh model. Since both were extracted from the same model originally, the coincidence is perfect. I did it that way and not the other way round so next time I import the meshes from blender they will fit right into place.

Then come the interesting bits. I first added a tool that splits a mesh into separated components. When you model in blender, it is often more convenient to group several objects into one. For example, here, each building block is one blender object. This allows you, in blender, to keep everything under one local coordinates system. But you must also take care of keeping different part dissociate (use the Y key a lot), this makes it easier, for example to select all pillars inside the buiding. And finally, you must also take care of creatign as little non-manifold pieces as possible. Non-manifolds cannot become solids, which is very important later. Use a lot Ctrl+Shift+Alt+M in Blender to highlight non-manifold edges.

The split tool in FreeCAD also highlights non-manifold components, painting them in red:

Then it's easy to temporarily turn off the non manifold components, and concentrate only on the important parts:

Then there is another tool to convert selected meshes into solids:

This tool is based on a macro that has been on the wiki since a while, based on Werner's mesh-to-part conversion work. The big thing is that it joins coplanar faces, simplifying tremendously the geometry. But I found out it still behaves bad with very complex meshes, made of a lot of small faces. In case the tool cannot build solids, the bad results are also highlighted, and the mesh is not deleted:

But anyway it doesn't make too much sense to have beams and slabs as one big element, so I'll either remodel that part in Blender or directly in FreeCAD. Once we have or solid Part shapes, converting them into walls or structural elements is a simple press of a button (I pained them in yellow here so it's easier to see):

That's about where we are now. Not much you'll say, but turning "raw" mesh data into parametric objects is a very important piece of the game. Next development steps will include complexifying those objects and giving them additional properties, then I'll start experimenting with automatic sectionning, which will probably be the most spectacular achievement. At the end of the jouney, I plan to obtain that kind of output:

The first one is the dxf plan that I imported in FreeCAD above, the 2 others are sections taken from sketchup. They look quite nice, but they are extremely unusable because of the too high complexity. There are so many lines that it is almost impossible to rework, in any application. But sketchup makes sections for rendering, not for reworking, and I have good hopes to achieve much better results inside FreeCAD, since our objects are not meshes anymore but much optimized solids, and getting precise contours, and distinguish what is cut from what is viewed is very easy.

A final note about complexity, the biggest problem at the moment in FreeCAD is that when dealing with high number objects in your document, things get pretty slow. A 2D plan like the one above, when imported line by line, is almost unworkable. But the complete mesh project from the first image shows that the 3D view is perfectly able to handle a very high amount of data, the tremendous difference shown by my little upgrade to the dxf importer and Jrgen's recent work on the View Providers show that the problem is totally solvable. The key, at Arch module level, seems to be in quickly grouping smaller objects into higher-level containers. I'll also have a look at the FreeCAD zoom system, but there are certainly many things to do to solve that issue.

That's it for now, thanks for reading until here!

in categories  blender  freecad  opensource  permalink:  116   posted on 11.07.2011 20:40
From Yorik

Exporting 2d linework from blender 2.5

Blender 2.5X still does not feature the excellent dxf exporter Migius wrote for blender 2.49, so I mounted this little workaround to be able to export linework from a blender model to a 2D CAD application such as FreeCAD or LibreCAD (or AutoCAD if you really must...).

It is made of two scripts, a blender addon to export and a FreeCAD macro to import. In blender, install the addon the usual way, then use it from the export menu to export the selected meshes. What will be exported is simply all the edges of the selected meshes in a text file, one edge (2 vertices) per line.

Then, place the FreeCAD macro in your macros folder, then run it, select the exported .txt file, and voila, your objects edges get imported, one compound object is created per blender object. You can then select everything and export to dxf if you want.

Here are the two scripts:

The meshes to be exported in blender

The imported linework in FreeCAD

The same linework exported in .dxf fomat and opened in LibreCAD.

in categories  freecad  opensource  permalink:  75   posted on 19.04.2011 22:58
From Yorik

Collada support in FreeCAD

I just found this interesting piece of software called pycollada and used it to make FreeCAD able to import collada files. The support is very basic, only simple geometry is imported. No materials, no components or whatsoever. But it is already pretty handy for a serie of uses. The image below shows an imported collada file generated by the BIMserver (as a little appetizer, waiting for true IFC support)...

in categories  freecad  permalink:  71   posted on 14.04.2011 20:24
From Yorik

FreeCAD t-shirts

I made this design for a FreeCAD t-shirt. If you want yours too, follow the instructions! (No money goes to the FreeCAD project, so do it only for the fun, not to help the project!)

in categories  freecad  opensource  permalink:  64   posted on 05.04.2011 24:15
From Yorik

More FreeCAD dxf export options...

I did some more work on the dxf exporter, now it begins to behave pretty accurately. You can now set an option in the preferences screen, in order to export 3D objects to polyface meshes. This is not the ideal way to export FreeCAD 3D objects, because they will be turned into meshes, so you'll loose important data such as curved surfaces and solid behaviour, but it is the only way to put 3D into a dxf file available to us as long as the ACIS format is kept closed and undocumented.

The other fix I did is to make the way to export 2D Drawing pages to dxf format work better. We now have fairly precise results when exporting such pages. The only thing you need to do is to select a page object, hit File->Export and specify a .dxf filename. There are still some glitches, some objects don't get drawn at the correct scale, etc... But the result is usable already. Below is an example of what you can expect to obtain:

The objects in the FreeCAD viewport

The same objects placed on a Drawing sheet

The sheet exported as dxf and opened in LibreCAD

in categories  freecad  opensource  permalink:  42   posted on 24.02.2011 24:26
From Yorik

Towards an Architecture module in FreeCAD

I began to start on an architecture module for FreeCAD. I saw a lot of extatic tweets about the subject these last days, so I thought everybody would like a little explanation, even if things are still very bare. So far I have an IFC parser (adapted from the work of Marijn van Aerle working, that is now able to parse all my test files without errors. Then there is a second part of the importer which is responsible for creating the corresponding objects in FreeCAD. So far that part is only able to grow simple walls, mainly because that's the only "architectural" object already implemented.

We have had a couple of interesting discussions about how to implement other concepts, and things are beginning to come. We now have a pretty functional wall, that can be based on a line or a wire (a polyline, in OCC jargon), a face or even a solid. It can receive appendices (that get joined to it) and holes (that get subtracted to it), although there is still no UI controls for all that.

There is also a floor object, which at the moment is only a container for walls (or other floors), with the particularity that it can join walls that intersect. In the future of course it'll have other attributions such as cutting plan views, etc).

There were also some talks and discussions about the BIM concepts, etc... But being more a practical person, I prefer experimenting and playing with FreeCAD objects gradually than laying out a big plan conceptual ahead.

For now that's it! More to come...

in categories  freecad  opensource  permalink:  82   posted on 22.02.2011 16:49
From Yorik

Sections coming soon...

in categories  freecad  opensource  permalink:  250   posted on 29.11.2010 22:58
From Yorik

Outputting 2D dxf through FreeCAD itself

Last couple of days Dan Falck and I were chatting about how convenient it would be to be able to output flat, 2D dxf files from any 3D-to-2D process like FreeCAD's drawing module. I've been since then experimenting with that, mainly using Inkscape as a convertor, since FreeCAD outputs 2D drawings in svg format. Inkscape is capable of outputting dxf files, but the quality is not very good.

The other day a much better idea stroke me: The Draft module of FreeCAD is itself capable of reading svg and writing dxf! So I did some new experiments (and a lot of bugfixing) and the result is definitely not that bad.

This is the base file I used for testing:

I then produced a 2D Drawing from the objects in the scene:

This is the scene objects, without passing through the Drawing module, simply exported as svg directly from the 3D scene, then reimported into freecad:

This is the 2D Drawing module output, reimported into FreeCAD:

And this is the same one, exported as dxf (and opened in Caduntu):

Of course the result is stil far from perfect (although much better than last time). The main problem is with the dimensions, which get converted to dummy wires (and have some artifacts too, some bug I must solve). SVG format doesn't support dimension objects. So the thing is, how to do that? Create a new svg tag? I'll have a look around, if other people already thought about that problem...

in categories  freecad  permalink:  198   posted on 20.11.2010 19:40
From Yorik

Another example of FreeCAD 2D drawing

I was showcasing FreeCAD to a friend the other day and we came to mount this nice little drawing. Don't look too close at the project itself since it is more the result of divagations and tests than proper architectural research, but it is a good showcase of what is currently possible:

The FreeCAD 3D view (file available here):

And the resulting svg drawing (file available here):

in categories  freecad  opensource  permalink:  184   posted on 16.11.2010 12:21
From Yorik

Using background images for tracing in FreeCAD

I just implemented this little feature:

Rectangle objects now have a "Texture image" property, where you can choose an image file. That image then gets mapped on the rectangle. You must of course take care of making the rectangle the same proportion as the image. But this way, specially combined with the transparency property, you get a great way of tracing CAD objects over a scanned paper drawing.

in categories  freecad  opensource  permalink:  174   posted on 14.11.2010 16:12
From Yorik

FreeCAD 2D dxf export

FreeCAD can now export a 2D drawing page to dxf. It is preliminar and still buggy but it works:

This is the normal svg output

This is the dxf output. FreeCAD uses inkscape to generate it, so inkscape must be installed on your system. All you need to do is select a Page object and hit the File->Export menu item.

in categories  opensource  freecad  permalink:  125   posted on 16.08.2010 22:46
From Yorik

FreeCAD and SVG output

Putting your drawing on a SVG sheet in FreeCAD is beginning to work well. Here is a recent example:

In FreeCAD:

And the outputted SVG:

It is almost perfect, I still have a small problem regarding texts location (there is a shift between both), and the svg hatches which are not too good and for which I still didn't find a solution.

Download the .fcstd file here and the .svg file here.

in categories  opensource  freecad  blender  permalink:  122   posted on 11.08.2010 14:45
From Yorik

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 n1: move 2 units in x, rotate 15 in y, then create a box, then reapply Rule n1". Then, all the magic is here: You can specify another, different Rule n1. 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=http://free-cad.sf.net>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.

in categories  opensource  freecad  permalink:  120   posted on 09.08.2010 23:06
From Yorik

What's new on the FreeCAD front

There are several cool new things coming to FreeCAD so I decided to show you a bit of what's going on. Most of this stuff will be in the 0.11 release (no release date prevision, it's done when it's done). There is a 0.11 preview installer for windows on the FreeCAD website, otherwise you'll have to wait a bit (or compile FreeCAD yourself if you are brave enough). I'll focus more on the 2D part, since it's what I'm mostly doing there...

The most interesting thing that has been added recently by Werner is python-driven Part objects. Unlike the older python Document objects, where you had to do everything, compute the geometry, and define how that geometry gets displayed in the 3D scene, the new Part python objects automatically display their geometry the "standard FreeCAD way". That allows for extremely simple python objects such as this:
class Line:
    def __init__(self, obj):
        ''' App two point properties '''
        obj.addProperty("App::PropertyVector","p1","myCategory","Start point")
        obj.addProperty("App::PropertyVector","p2","myCategory","End point").p2=FreeCAD.Vector(1,0,0)
        obj.Proxy = self
    def execute(self, obj):
        ''' Print a short message when doing a recomputation, this method is mandatory '''
        obj.Shape = Part.makeLine(obj.p1,obj.p2)
As a result, the 2D drafting module has been completely upgraded to take advantage of this. One of the most useful consequences is that it now has an editmode. But it also allows for several other goodies, such as enter FreeCAD's parametric chain (for example, an object made of the union of two other objects retains the original objects, etc):

Because of this, the use of the Drawing module is now much easier, and you can already output much better sheets:

Another area that is being currently worked on by Jrgen is the Sketcher, which allows you to draw constrained 2D shapes. There is still not much new stuff visible, but it has been almost rewritten from scratch, and is now much more stable and works on all platforms. Now really the sketcher can be used to build geometry.

Of course all this is pretty new and lots of bugs are expected to appear, but we come everyday closer to the day we can start to do serious productive work with FreeCAD. As a sidenote, one of the things we lack badly is bug reporting. If you happen to find a bug, if you make FreeCAD crash and can reproduce the cause of the crash, don't hesitate and add a report to the bug tracker. This is a very important for FreeCAD to reach some stability...

in categories  opensource  freecad  permalink:  64   posted on 29.04.2010 22:18
From Yorik

Playing with FreeCAD...

I just made this little "thing" while searching for a cool new splash screen. I got very impressed by Form:uLA yesterday (specially this work)... Kind of 3D Lebbeus Woods...

The FreeCAD file is here...

in categories  opensource  architecture  freecad  blender  linux  permalink:  40   posted on 28.11.2009 2:25
From Yorik
Actually I really should write a kind of FAQ or article about doing architecture on a Linux platform... Many people are indeed interested by the subject. So, here we go:

My architecture workflow on linux

Actually there is no obvious or productive workflow possible at the moment, due to the lack of good (productive) CAD software on linux. You can do architecture on linux, but you won't have the same level of productivity as if you just draw with your favorite CAD program under windows (I indeed have a dual boot system .

just for the fun, my linux desktop!

That said, if you are willing to move away from the "all-in-one" solutions that big CAD vendors sell, you already can do a very big part of the work with linux software. I myself use blender for about 80% of the conception work, the rest being simple hand sketching. You already have several good scripts to generate plans and sections from your models in blender, and export them to convenient CAD formats like DXF. Search the blender wiki scripts section.

In blender you can do all kinds of useful things like importing your hand-drawn sketches, pieces of 2D CAD plans, model on top of it, etc, for example:

blend file here

The biggest problem is then, when you want to do 2D CAD. There are indeed several solutions, like qcad, autocad under wine, bricascad/intellicad, or long-time linux CAD challengers, like cycas, graphite one or varicad. There are also a number of interesting newcomers, like realCADD or medusa. But none of those solutions are really productive and free at the same time.

What I do most of the time, when I don't need much detailing, is to use several programs, each for doing pieces of the work. This is a typical unix-like approach (use several simple, reusable programs to do separate tasks, instead of having one all-in-one program) that in my opinion could benefit much architecture workflows on linux.

I myself contribute with coding and documentation to a very interesting program (currently) named FreeCAD that could hopefully fit very well in the middle of the workflow, to rework data coming from 3D into precise construction drawings. It is in usable state already, but not for real production.

Note that FreeCAD is not at all aimed at becoming another autocad clone, and 2D drafting is only a temporary use I make of it. The plans for the future of FreeCAD include much more powerful things such as parametric modeling, automatic sectionning, or structural analysis.
Today I still use a mix of other programs, such as autocad, qcad or sketchup. I also use different utilities and convertors to manipulate different file formats, like RealCadd converter or Varicad viewer.

The same way as the data you export from a 3D program to a 2D app, the way the data is formatted is the most important point, not the program you used to make it. If you modeled your building correctly, you will have good 2D data, easy to rework in 2D. The same should apply to 2D data. If you build your technical drawings correctly, they will be easy to export to other programs for presentation work.

The presentation work in itself is also easy to do under linux, there are several programs able to import technical drawings and rework them, my favorite being inkscape:

I also use gimp a lot.

All this works quite well for short or limited architecture projects, like competitions or draft projects, but of course, not so well for more detailed work such as execution drawings. For that, we would need better tools for technical drawing. At the moment I don't know any that is strong enough to allow fast, efficient and beautiful work. But the way we draw architecture is slowly changing too, so maybe new solutions will begin to appear on the linux platform too.

And if you are interested in helping the situation to evolve quicker, there are many great open-source projects out there that could use your efforts, even if you are not a programmer. This is the case of most of the software I showed in this article.
Note: I wrote a sequel to this article, explaining how to get started with Linux...

in categories  opensource  freecad  permalink:  90   posted on 28.11.2009 1:55
From Yorik
New FreeCAD package for 64bit debian/ubuntu
I just packaged the latest version... Still not a fully debian-compliant package, but should install without problems!
Note that the pivy package is now separated and needed too:
Enjoy! Edit: Ubuntu users seem to have a problem installing the python-pivy package, so I made an alternative version here.

in categories  opensource  freecad  blender  permalink:  105   posted on 28.11.2009 1:55
From Yorik

FreeCAD import script for Blender

I just made a new script to import FreeCAD files into Blender. You must have FreeCAD installed for this script to work, and you must configure the path to your freecad.la file at the beginning of the script.
The script can be downladed here: import_freecad.py

Note: at the moment you need a recent SVN version of blender (>2111) to make it work...

in categories  opensource  freecad  permalink:  135   posted on 28.11.2009 1:53
From Yorik

New dimension tool in FreeCAD

A very basic first draft of a dim tool is now available in FreeCAD (in the Draft module). Don't expect much of it, it's pretty simple, has few options and is still buggy, but I'll refine it over time...

Read here how to use.

in categories  opensource  freecad  permalink:  205   posted on 28.11.2009 1:51
From Yorik
New features in FreeCAD

I'll summarize a bit what we've been doing recently. The biggest feature is the big improvements to the Drawing module. Basically you can now export any 2D view of a 3D Part object, on scale, on a svg sheet. It is already very powerful, you have total control from python to the output svg code, so you can tweak, fill, etc.
In the Draft module, we now have dimension objects working well, and they import/export to dxf format. There is also a first step to implementation of blocks, that is, you can create compounds objects by joining any type of geometry with the Upgrade tool, if no "smarter" object can be created. The downgrade tool will in turn explode compound objects.

in categories  opensource  freecad  permalink:  237   posted on 28.11.2009 1:49
From Yorik
FreeCAD with new icons set

Everything is getting prepared for the next debian freeze in november... We are more or less doing our own feature freeze this month, killing bugs and polishing the look. Here goes a preview of the new icon set of the Part module, and a first sneak peak at the splash screen. Enjoy!

in categories  opensource  freecad  permalink:  262   posted on 28.11.2009 1:48
From Yorik
Short instructions for compiling current FreeCAD svn version on ubuntu

Be aware that the svn version is the version we are working on, so it might contain bugs or even fail to compile.

  1. In case of problem, the complete and detailed instructions are here

  2. Install the following packages: build-essential, python, libcoin60-dev, libsoqt4-dev, libxerces-c2-dev, libboost-dev, libboost-date-time-dev, libboost-filesystem-dev, libboost-graph-dev, libboost-iostreams-dev, libboost-program-options-dev, libboost-serialization-dev, libboost-signals-dev, libboost-regex-dev, libgts-dev, libqt4-dev, qt4-dev-tools, python2.5-dev, libcv-dev, libhighgui-dev, python-opencv, libopencascade-dev, python-qt4, libode1-dev, subversion, cmake

  3. Install the pivy package manually from here, because it is still not in ubuntu repository

  4. Get the FreeCAD source, by pasting the following line in a terminal: svn co https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk freecad

  5. After downloading, in the same terminal, issue "cd freecad"
  6. to go to the freecad directory
  7. Issue "cmake ." to create the compilation files

  8. Issue "make" to compile FreeCAD

  9. After compiling, issue "./bin/FreeCAD" to run FreeCAD. You can also create a shortcut to your freecad/bin/FreeCAD file.

  10. All FreeCAD is contained in its source directory, so to uninstall, simply remove that directory.

in categories  freecad  permalink:  12   posted on 28.11.2008 1:31
From Yorik

Yorik's FreeCAD page

This page contains stuff related to FreeCAD. FreeCAD is an open-source engineering platform. It is basically a 3D modeller, with focus on engineering, like Catia or SolidWorks. It is extremely open and versatile, has many interesting features being developed such as parametric modeling, total python access to any part of the program, and a strong BRep-based modeling kernel. Below, you can find my custom linux builds, and samples of my activity on FreeCAD.

Custom Builds

Note: Several of the following package are non-standard and might not work on your system. Before downloading any of them, please check on the main downlaod page if there isn't a more standard package for your system.
These are FreeCAD builds for 64bits debian-based systems (Debian, Ubuntu and derivates). They have all options enabled and have been compiled with standard optimization for 64bit athlon CPU. If you're looking for other platforms, check the official download page .
Note that these builds don't include openCascade neither SoQt4, which are required to make FreeCAD work. These libraries have both recently been made available in debian repositories, and appear in current Debian and Ubuntu package management systems.

freecad_0.9.2646-1_amd64.deb - for debian squeeze - 20.11.2009
freecad_0.9.2646-1karmic_amd64.deb - for ubuntu karmic - 20.11.2009
freecad_0.8.2237-1jaunty1_amd64.deb - for ubuntu jaunty - 12.09.2009 - this package is also on FreeCAD download page
freecad_0.8.2237-1testing1_amd64.deb - for debian squeeze - 12.09.2009 - this package is also on FreeCAD download page
freecad_0.7.2200-1_amd64.deb - for debian squeeze - 03.07.2009
freecad_0.7-2145_amd64.deb - for debian squeeze / ubuntu jaunty - 16.06.2009

Additional libraries

This is the Pivy package, which is needed in latest FreeCAD packages (rev >= 2087):
python-pivy_0.5.0~svn765-2_amd64.deb - 20.11.2009 - for debian squeeze
python-pivy_0.5.0~svn765-karmic2_amd64.deb - 20.11.2009 - for ubuntu karmic
python-pivy_0.5.0-1_amd64.deb - 03.05.2009 - for debian squeeze (freecad < 0.9)
python-pivy_0.5.0-1_amd64.deb - 03.05.2009 - for ubuntu jauny

Note for Ubuntu users: I compiled this version of FreeCAD against OpenCasCade 6.3, which is available as default in debian squeeze/testing. If the version in your ubuntu repositories is 6.2 (before karmic), you will need to download and install manually the 6.3 version. from the debian repository. Since 6.3 has the same dependencies as 6.2, it will be handled just fine by your package manager. You will just need the foundation and modeling libraries here:
libopencascade-modeling-6.3.0 .