Here we are for one more monthly report about what happened this month around the development of BIM tools for FreeCAD. This month we are all very happy because finally we were able to finish the release of version 0.18 of FreeCAD. There are installers for all operating systems, Windows, Linux and Mac. If you are still using 0.17, go get yours!
This time there are no backwards compatibility issues between 0.17 and 0.18, as there were between 0.16 and 0.17. Any file saved in 0.18 should still open fine in 0.17, provided, of course, you didn't add 0.18-only features such as sketcher splines. Even so, the file should yield errors but still open in 0.17.
Also, FreeCAD now has a brand-new code of conduct. This might seem superfluous at first sight, because until now there hasn't been any very serious situation in the project, but many of us would like the FreeCAD community to be more inclusive, and this is an important step in that direction.
As always, thanks so much to all of you who help the project in one form or another, being by sponsoring me on Patreon, Liberapay or Paypal, or helping the FreeCAD project directly by participating in coding, writing, translating, helping other users or donating on the project's bountysource account. Every effort helps bringing it a step further!
I've been pretty busy this month fixing a lot of bugs both in 0.18 and master (most important ones get backported to 0.18, we already issued a 0.18.1 one, and there will likely be another one soon), but fortunately there was still time for a series of cool improvements.
So here are the more BIM-oriented happenings of this month. Most of these new changes are now happening in the FreeCAD master branch, which will become 0.19 at some point (there are pre-release packages available already!) Enjoy!
I added two new chapters to the Barcelona pavillion video series: One that shows how to export a model to the IFC file format for opening in other BIM applications, and another that shows a first method to produce 2D views from a model (other methods will follow):
I will add that functionality to TechDraw Arch views too later on, since this seems to work well now and might be a really good way to solve the famous problem of wall joining.
Basically, the idea is that you wouldn't need to join walls anymore. They would be all joined automatically afterwards, when you produce 2D views. If you set the "Join Arch" property of Draft Shape2DViews to True, walls and structures (so far only these two types) will be unioned by material before creating the view, giving quite nice results:
The walls and structure objects themselves are not modified, only the views you produce from them.
I think this might be a very good way to proceed further, as it is really very convenient and flexible to keep different wall segments as separate objects.
The transition to our new vision of IFC support in FreeCAD is well under way. Part of this is the ability for any Arch/BIM object to be of any IFC type, regardless of the method used to construct it. So you can use the wall tool to build a beam, and vice-versa. For any object in your model, you just say what it is, a wall, a column, or simply leave it undefined. It will be exported to IFC as you decided.
The old Ifc Role property will automatically be converted to the new IFC Type property when opening a 0.18 file in 0.19, and version 0.18 also has a hook to automatically convert back to Ifc Role when needed, so this is fully backwards-compatible.
The IFC exporter has been extended to support several useful things:
So far, FreeCAD didn't handle different property sets that contained a property with a same name (for example, some custom property sets added by Revit all contain a property named "Name". This is now solved. As long as they live in a different set, you can have different properties with a same name.
Part of our new IFC infrastructure is a feature coded by Dion Moult, that when you change the IFC type of an Arch/BIM objects, several new properties required by that type get automatically added to the object. These properties don't influence the geometry of the object (otherwise if you change the type the geometry could change, which we absolutely don't want). However, we sometimes want them to be tied to the object geometry. For example, we want the "Overall Height" of a window to be the actual height of the window.
So, whenever possible, these dynamic properties get automatically linked to the actual geometry of the object. For example, The "Elevation" property of a Building Storey gets automatically taken from its Z coordinate, or the "Overall Height" of a window to its "Height" property.
This gives us quite an interesting level of translation between FreeCAD objects and IFC objects, that is fully transparent to the user.
On any Arch/BIM object in FreeCAD, look for its "IFC Attributes" properties group. That's where they live. Try changing the IFC type, you'll see the contents of that group adapting.
There is still more to be done there to increase that automatic behaviour, but I am quite happy with this feature already, now really any aspect of how a FreeCAD object is exported to IFC is available to the user: type, name and description, attributes (the "built-in" properties of an IFC object), properties (the "custom" properties of an IFC object) and quantities are all settable and controllable.
All Draft objects that can form a face (rectangles, wires, circles,polygons...) now have an Area property that is set automatically when the object has a face. So it is pretty convenient to use these objects to calculate areas.
Building Parts objects, which are also used underneath buildings and levels/building storeys/floors, whichever name you like most, now have a right-click option to reorder their contents alphabetically. Inside the FreeCAD tree, everything is always listed chronologically. This is something very delicate to change, although in large models it becomes increasingly useful. This feature is mostly a test to see how it behaves (quite well, I think) before trying to add that in other areas as well.
When working with high-rise buildings, we often have a same floor/storey being repeated several times. BuildingParts now have a right-click option to clone them up. To use that option, your building part must have its Height property defined, so the new floor will be place at that height above the one you are cloning.
The new floor is an independent copy, but all objects inside are clones of the same objects in the original floor. This is not yet what we would like I think, it would be best to have the new floor as a kind of big all-in-one clone, but I wanted something which would export correctly to IFC first. This system does.
Also, once a floor is cloned that way, it is pretty easy to move, delete, etc... so at the moment it works well.
In a next move, I'm planning to add a possibility for BuildingParts to be clones of other BuildingParts, and automatically do the management of all cloned objects inside, in order to stay compatible with IFC.
When creating TechDraw views of Section Planes, until now spaces were displayed as only their text tag. But in BIM work spaces are usually very useful in early stages of a project, when you need to arrange different areas or rooms that compose the project.
TechDraw Arch views now have a new "Fill Spaces" property that, when turned on, will show a filled area behind the text, of the color of the space in the 3D view, which enable you to quickly create nice organisational diagrams.
Reinforcement bars so far could only be created inside a structure object. This is no longer the case, you can now create independent rebars outside of any host object. To host a Rebar inside an object, you just need to set its "Host" property. But you can now leave that property empty, just as it works with windows.
That's it for this month I guess, thanks for reading and thanks for the support!
Time flew this month, and there have been quite heavy groundwork on FreeCAD itself, as we have 0.18 release happening now! Everything is set up and ready already, but we're struggling to make the packages for all platforms. As you may know if you follow the forum discussion, this release supports both Python2 and Python3, and it's giving us some headache to make it smoothly working on all platforms.
So, just a little bit more patience, and thanks to the hard work of our FreeCAD package heroes, we'll have everything sorted soon. I'll do an official announcement here so you don't loose a minute!
In the meantime, since the main FreeCAD repo is now out of feature freeze, we've been busy merging the long queue of Pull Requests that were waiting. It's not done yet but most of it is merged. Expect some instability if you are compiling FreeCAD yourself from the master branch, but that is normal and should get better soon too.
Because of this groundwork and my architect life that got strangely busy for this time of the year (the carnival month uses to be quiet in Brazil...), I haven't been able to do as much as I hoped on the BIM front, but hopefully everything will be back on track now. Nevertheless, we've got hopefully enough here to keep fed for the month!
I worked further on the Barcelona pavilion series, and we're at the twelfth video already! Here there are (the first three are in the previous post), and you can get all of them at once from this youtube channel
The series is not finished, next episodes will show how to insert furniture/equipment, export the model to IFC for opening in other BIM applications, produce 2D drawings (plans and sections), and extract quantities. If you think of some specific aspect I haven't covered and that would be nice to add, tell me!
For the rest, I have been mostly busy starting to merge some of the features I've been developing in the BIM workbench recently, to the Arch workbench. As you know, the plan behind the BIM workbench is for it to act as a "user-friendly" layer on top of other workbenches (namely Arch), but not to provide specific tools itself. That is, all its important functionality should also be available in Arch.
Because of the feature freeze in the last months, however, I've added many things directly to the BIM workbench, which appear to be working quite well, so it's now time to transfer them back to Arch, so they are available to both workbenches.
As I mentioned here another time, we are progressively decoupling the geometry construction tools, in Arch, from their BIM semantics. This is something that annoys us all in many other BIM applications, that you must use the wall tool to create walls. Why can't you just use a box, or import an object from another application?
So in Arch, that's exactly what we're planning to end with: You will no more have a wall tool, a window tool, etc. You'll have geometry constructors such as "linear extrusion" (the current wall tool) or "embeddable object" (the current window tool) (we're not sure about the wording of all this yet). After you created such object, you decide if it is a wall or a window simply by setting its type. And that's it. You can use any of the geometry constructors or just any other FreeCAD tool or even any object imported from another application, and turn them into a wall, a column, a chair... simply by setting their type property.
And that's exactly how the IFC schema is designed too. So I think we'll be reaching a level of compliance rarely seen in the BIM world...
Of course, this can make many people used to other BIM applications feel totally lost. Most of them will still want a wall tool, a window tool, etc. That's exactly where the BIM workbench comes in. It basically provides you with the "BIM sauce" around this. You will still have a wall tool there, and it will basically be a thin layer on top of the Arch linear extrusion tool, possibly with a couple of handy presets. For the average BIM user, this all will be fully transparent, you'll still build your walls by pressing a wall button.
However, this is mostly cosmetic. You'll still have all the power beneath, and be able to change the type of your wall to anything you want afterwards.
Thanks to a big refactoring by Dion Moult, that has just been merged, when you change the IFC type of an object, several additional properties needed by that type in IFC are now automatically added or removed. For example, if you change the type to "Column", a "Column type" property gets added.
Although I haven't met an IFC-capable application that requires these to be present, it raises the level of compliance of the IFC files exported by FreeCAD even more. Each month we have less and less problems with opening FreeCAD-generated files in other applications, and although FreeCAD will likely never get a proper IFC compliance certification, because it costs a lot of money that an open-source project like FreeCAD doesn't have (and honestly I don't really see any big advantage), I dare to say we begin to have a VERY compliant IFC workflow.
Another thing to note, the latest 0.6 version of IfcOpenShell, which is not released yet but that I'm currently using, supports several versions of the schema at the same time (currently IFC2X3 and IFC4). Our changes in FreeCAD follow the same line, so you'll soon be able to switch at will between the two (and future ones when they come)
The diff tool I had been working on in the past months has now been consolidated into a bona fide tool in the BIM workbench, you'll find it under the Utils menu.
The work I have been doing on the BIMBots plugin is basically finished, it just waits for some upcoming changes to the BIMServer API to be declared ready and added to the FreeCAD add-ons manager. You can already try it by installing it manually (instructions and documentation available in the repo)
Not really BIM-related but interesting nevertheless, have a look at this gorgeous icon theme being worked on by Blender veteran 1D_Inc, soon available at your fingertips!
Several changes are also coming to the Draft workbench, the Edit tool is currently being upgraded and several of its long-time bugs fixed, the 3-point arc tool from the BIM workbench has been transferred to Draft, and we have many more ideas starting to get shape.
It has been announced last month the the free-to-use 2D CAD application DraftSight would no longer be free by the end of this year. This might appear as a sad news at first, because DraftSight is often referred as the only free, professional 2D CAD application with good DWG support running on Windows, Mac and Linux out there, but I believe it is actually a good thing for the open-source world. First, our CAD friend project LibreCAD now has DWG support, and it is working already and quite promising, and the DraftSight move can bring a lot of attention to LibreCAD, but also because it will also bring some attention to FreeCAD's own 2D tools.
Of course, FreeCAD is not made to handle the thousands of small 2D objects that 2D applications work with, and will probably never be. But I don't see this really as a big problem. Probably, we could divide the 2D CAD users between who is doing heavy 2D CAD, who will still need a dedicated 2D tool like LibreCAD, and others who sporadically need to do some 2D, for example during a 3D modelling process. For them, the 2D tools of FreeCAD could work perfectly.
One more step in the direction of having intelligent "defaults", Arch tools like Wall or Structure or Window now remember their last settings. So if you draw a 15 cm-wide wall, the next time you use the wall tool, it will start with its width set to 15 cm. So progressively you won't need to use the Arch preferences's "defaults" page anymore, defaults will be set transparently.
I've also started implementing presets for the wall tool (which basically use Arch Multi-Materials to define wall compositions), so we're on our way to a decent, flexible, easy to use wall tool.
Last step missing will be to have a proper system to handle wall joining. There, unfortunately, I still don't have a clear idea to go forward. Should it be handled at document level, outside of the wall objects? Should a wall keep a list of its "siblings"? More experimentation is needed.
And finally a small improvement, wall blocks feature doesn't need to have both block width and block height values set anymore. So you can now use it to make "strips", vertical or horizontal. This can be handy, for example, to represent wood sidings.
That's it for this month, prepare for more serious stuff next month, as we go back into full speed development!
Sorry for the slight delay in producing this article, you know, when you live in Brazil, Carnival is kind of sacred... Jokes apart (half jokes, to be honest), I've been pretty busy on many different plans this month, apart from our BIM development road itself, and there are exciting things coming from several other sides, I'll explain below.
Also, we are now on the final stretch of the path to the version 0.18 release of FreeCAD. It took way more time than planned, as usual, but we are almost there. No more blocking bugs, we are just ironing out minor issues in translations, documentation and packaging, and we're ready to go. It will be by far the most stable and usable version of FreeCAD ever.
As usual, many thanks to all of you who sponsor me on Patreon, Liberapay or Paypal, I am really glad and honoured you guys still judge this effort worthwhile after almost two years, I think we are more than halfway already. Modelling is already working very well in FreeCAD, I would say at least as well as other BIM apps, even commercial ones, we are already well underway on the second issue which is working with large models, and the third issue, which is outputting quality 2D drawings, will be the big focus of this year.
So, let's see what we have this month:
This month we don't have just one video but a larger series. A MUCH larger series. I have recorded them all, but I still need to do sound and editing on several of them (it takes quite a lot of time). So I'll start publishing the first three parts here today, and the next ones will come along in the next days. The total will be 10 or 12 videos (still not sure how to cut). I'll release the final FreeCAD file with the last one too.
These videos show a small but complete BIM project made entirely in FreeCAD: The reconstruction of the Pabellón de Barcelona, by Mies Van Der Rohe.
I tried to go around a bit all aspects of working with FreeCAD, hope you'll like! The DXF file used as a base is here.
The FreeCAD importer for Blender has been ported to the forthcoming 2.80 release, which hasn't officially been published yet, but will be soon. Blender 2.80 is really a small revolution in the Blender universe, with many impressive enhancements. Our FreeCAD importer allows to directly import FreeCAD files in Blender, without the need to go through other exchange formats such as OBJ or 3DS. This is specially important for who works with ArchViz and wants to produce gorgeous renderings out of FreeCAD models.
As the Python3 version of FreeCAD stabilised a lot and is now being pushed out everywhere and also integrated in Linux distributions. the Python2/Python3 difficulties between FreeCAD and Blender are becoming a thing of the past. So as soon as the 0.18 release is out, I'll register this importer on the Blender add-ons repository, which will make it a lot easier to install and use by everybody.
If you use FreeCAD already, I highly recommend you to give a go at the 2.80 version of Blender. With a few tweaks your work in the 3D view itself (no "rendering" needed anymore) looks gorgeous...
I've worked further on the integrated tutorial of the BIM workbench, and it is coming close to completion. Modelling part is complete, only missing parts are exporting to IFC, producing 2D drawings, and extracting quantities.
Be sure to give it a try, and please report (or fix yourself!) anything you think is unclear.
This is a very small thing, but of a big meaning I think. Two applications I know of, Sketchup and BricsCAD Shape, place this stylised human figure inside the 3D space when starting a new model. Coincidentally, these two applications are targeted not so much at very technically skilled people, but try a more intuitive and human approach. And as you know, a big part of what we're trying to do here is make FreeCAD more intuitive.
So now when creating a new project with the BIM project tool, you have an option to add this sympathetic figure in you model, which immediately gives a very good sense of scale.
The BIM setup tool has gained a couple of toolbars, so the panel doesn't grow out of reasonable size, and, more importantly, presets, that fill the rest of the settings with sensible values when working in meters, centimetres or imperial units. It is now much easier to start FreeCAD from scratch with everything correctly set for BIM work/
Just a note to keep you updated about the forthcoming 0.18 release, which should land in the coming days or weeks now. There will be both Python2 and Python3 versions available, and a pre-0.18 version has been added just in time to Debian, for the coming Debian 10 release. As it is a long-time support version, it will be used as a base for Ubuntu and all its derivatives. So for the fist time in history all these Linux distributions should come natively with a pretty recent version of FreeCAD. We have Kurt to thank for that!
We have now processed all the important bugs and most smaller ones, the application itself is basically ready for release. We are just finishing work on documentation, translations, etc... which should take a couple of days more, and you'll be able to put your hands on the 0.18, if you haven't done it yet.
We also have a load of new features waiting for the 0.18 release to be merged, so as soon as it's done, FreeCAD development will resume at full speed. And we have big changes coming in the BIM/Arch area, with deep and meaningful changes to adapt much better to the IFC schema, free ourselves from concepts stupidly copied from other BIM apps. I believe we will find ourselves with a BIM application that is much better adapted to IFC, and at the same time gives much more freedom to BIM modelling.
I've started to work on my main plan for this year, which is to produce quality 2D output from BIM models. There is not much result to show so far, because many experiments failed but it is interesting anyway to go through the different options and see what works, what not, what's worth pursuing, etc. What I have started to explore:
Threaded computing of TechDraw views
The result of this so far is in this branch, if you fancy having a look, but it's unsatisfying so far and not working at all. The idea was to make TechDraw views not recompute immediately, but in the background, in a separate thread. As TechDraw views are almost always "terminal" objects (only the Page depends on them), and given that they can take a lot of time to calculate, I thought it might be interesting to make them calculate in the background, while you can continue working on other things in FreeCAD. When the computation is ready, the view would get notified and display the new contents.
However, it turns out working with threads is very complex and delicate. A separate thread must really be thought as a completely self-contained environment. If it uses functionality implemented outside of itself, this functionality will most of the time run on the main thread. So making things multi-threaded really requires a lot of previous thinking and planning, and in the case of FreeCAD there is also a lot that is not in our hands, such as how the OpenCasCade kernel works.
To resume, not much progress on this side. I'll keep toying with it, though, but I don't think impressive things can come from there.
SIMVoleon is an extension for Coin3D, our main 3D display engine in FreeCAD, that allows to do volumetric rendering. In other words, it can automatically "fill" meshes being cut. Since Coin3D can generate very fast sections through models, but these sections appear "hollow", so the have little use so far, this could be a very useful addition.
I had to make a few changes to be able to compile it with recent Coin versions, which are in this repo. The next step will be to try to build pivy with it (it seems to have support for it already), so we can play with that from Python.
SVG views generated from Coin
I've also started playing with generating SVG views directly from the main 3D view of FreeCAD, and this seems so far the most interesting path. It is very fast, produces pretty good results, and if we can make SIMVoleon work with it, might be an excellent solution. There are many changes required to the SVG-producing system in FreeCAD, to control things like scale and line types, I'll start working on that as soon as the release is out.
BIMbots is a new idea developed by the people behind BIMServer. Basically the idea is that you don't need to install and manage a BIMServer yourself, you'd be able to use services provided by a BIMServer somewhere, directly form your BIM application. For example, validate an IFC file, or do all kinds of queries on it, such as counting windows, computing walls area, etc. Together with them, I've started working on a BIMbots plugin for FreeCAD, which is almost ready now, and will be integrated to the BIM workbench as soon as it is ready.
I'll also have a look at the developer docs and try to develop (and document) a BIMbots service, to help us assess how we can use it in BIM projects. The way I see it so far, it could be the perfect open-source replacement for rules-based systems like Solibri model checker.
I also started working on a curtain wall tool for the BIM workbench. However, it is a crazily complex problem! The idea is that you could take any surface (such as one generated with the Surface workbench), decide yourself how you want to "cut" through it (for example using Part MultiSections), then use the produced lines to generate flat panels. The last operation being to generate different kinds of mullions from the edges and glass panels from the faces.
Alas, taking non-flat faces and trying to make a continuous series of flat faces from it is not simple I haven't found a satisfying way so far. But ultimately we'll get there.
If you want to play with it already, select a series of edges (in one direction only), and do:
import BimCurtainWall BimCurtainWall.makeCurtainWall(edges,subdiv=5,detach=False)
Where edges is a list of edges, subdiv is the number of subdivisions. If detach is True, each generated face is independent from the others, which yields much better results, but is not really what we want...
This year again we are part of the Google Summer of Code with our friends at BRL-CAD, LibreCAD, OpenSCAD and Slic3r. This time we're trying to concentrate all our project ideas together, and encourage cross-project ideas. If you want to code for FreeCAD during the norther hemisphere summer (June to August), talk with us! It's open to anybody, and you earn nice Google money!
If you follow the forum and the github repo, you'll notice that several new people started contributing actively to the development of the Draft/Arch/BIM areas of FreeCAD. And there is much more to come after the 0.18 release. That's thrilling, I feel we are at a kind of turning point. The future looks bright for 0.19!
This is the report of the BIM features I implemented in FreeCAD this month. As FreeCAD is still in feature freeze (as usual, the new release is taking more time than we planned, new bugs appear all the time and we definitely want to squash as many as possible), almost all of the development of this month went into the BIM workbench which is developed outside the FreeCAD core code, and therefore not subject to the feature freeze.
There is quite a lot of new stuff this month so I'll make it short. Thanks a bunch to everybody to helps this effort by sponsoring me on Patreon, Liberapay or directly via PayPal! Quite a lot of you are behind this since the early beginnings, almost two years ago, I am really deeply honoured by your trust.
Apologies for not having a video this month again, but I believe you won't feel hungry after reading this
This is a very simple tool, that will make it to the Draft workbench too as soon as we are out of feature freeze. It simply allows you to create an arc by given three points through which the arc must pass, instead of the center, start and end points of the default Draft Arc tool. At the moment it produces an object that is not parametric, mostly because I still couldn't make my mind if internally, the resulting object should be the same as the current Draft one (that is, loose its midpoint parameter), or a different one with three vector properties.
The IFC Elements manager has now been split into three different tools: Elements manager, quantities manager and properties manager. This is mostly to keep the code elegant and easy to dive in, it was becoming very big and complex, now each distinct functionality is in its own tool and python file, that will make it a lot easier to maintain and to extend.
The Elements manager continues just the same as before: It allows you to bulk-manage IFC types and materials of your BIM model, and quickly ensure that everything has the correct type and material.
This is where you define which quantities will be explicitly exported to IFC. As I wrote in these pages earlier, quantities such as length or width or area of an object can be explicitly written in the IFC file, which makes it unnecessary for other BIM applications to analyse the geometry to know it. A spreadsheet, for example, would be able to quickly calculate quantities from an IFC file without having a geometry engine.
With the split of this functionality in its own tool, it also gained a bit more practicality, no more need to click items one by one, you can now select a bunch of objects, and press the column header to apply the setting to all selected objects.
The biggest change brought by the split of the Elements manager is that we now have a proper and decent bulk IFC properties editor. It was already possible to add IFC properties and property sets to individual objects, but that's very tedious if you want to apply some standards, such as, for example, add a Pset_WallCommon to all your walls. With this new tool, you can now easily add property sets or individual properties to any object, individually or together, edit the values of those properties, and search objects to check which one has or hasn't a given property or property set.
The Classification manager tool has also received a good upgrade. Before, it only allowed you to give classes to materials, now it also allows you to bulk-classify all your BIM objects and gives a clear view of what is missing a class.
Note that the classification is still not exported to IFC, but as soon as we are out of feature freeze, that will be done.
This is of course inspired by the similar tool in Revit, but I believe we've made something way more powerful here. The idea is that you can use the arrow keys of the keyboard (CTRL+arrows in FreeCAD) to move objects slightly, in any Cartesian direction. This is very useful when modelling details. In Revit, how far the objects get moved depends on your zoom level. In FreeCAD, we have two modes: a fixed one and an automatic one. Automatic mode works like Revit, but fixed mode will always move objects by a same distance that you can specify. This can therefore become extremely useful in other situations, for example moving walls, doors or windows 10 cm in any direction.
Additionally, the nudge tool is also able to perform other things: Rotate objects by 45° clockwise or counter-clockwise (CTRL+. or ,), and, if the selected objects are walls or structures, expand or shrink their extrusion distance (CTRL+Page Up or Page Down).
It also has a control in the status bar, from which you can set the nudge distance. Hovering the mouse over that control shows you all the keyboard shortcuts above.
This new tool does the contrary of the Clone tool. It turns a cloned object into an independent copy. So far it only works for Arch/BIM objects that are clones of another, not for regular Draft Clone objects. Ultimately, the idea is to reach the same level of comfort as Blender, where it is very easy to play with all this, and you can unlink linked copies or re-link unlinked copies.
Note that if you have a column that is based on a profile, then you clone that column, then you unclone it, the new independent copy resulting from the uncloning will still use the same profile as the original column. So they don't become 100% fully independent objects. But I believe this is the most logical result of such tool. We probably need another one to separate things further...
A typical use case for this tool is when you want a cloned column to have a different height from its original, but still be based on the same profile (be of the same family, in revitspeak)
This tool allows you to select a face of an object, and recreate the object as an extrusion (structure or wall) of the selected face. This is above all useful when you are dealing with a non-parametric object, such as a STEP file or even an IFC file that you imported in "Simple Part Shapes" or "Non-parametric Arch objects" mode, which are many levels of magnitude faster than the "Full Arch objects" mode.
So this allows you, for example, to import a large IFC model as non-parametric, and turn only the objects you wish to edit into extrusions. And it gives you finer control too over which face should be the base of extrusion. It also allows you to change the extrusion direction of an object. Or, imagine you made a slab by drawing a rectangle on the ground floor and extruding it vertically. But suddenly you realize you need to give a special profile to that slab. "Damn!", you think, "I wish I had drawn the profile of this slab instead, and extruded it horizontally". Now it's a piece of cake: Reextrude the slab, then edit its (new) profile.
If the face you selected has only straight edges, it gets reconstructed as a Draft Wire, which really turns the object fully editable. If there are curves or holes, it stays as a non-parametric face (for now...)
At the moment, there is no test yet to check if the face you selected can indeed produce the correct object when extruded. If you select a face of an object that is not a linear extrusion, it won't give correct results.
Before, if you clicked for example the wall tool with a structure selected, instead of creating a wall, the selected structure would be turned into a wall. This was a really annoying behaviour, you always needed to make sure everything was deselected when using an Arch/BIM tool.
Now that behaviour has been changed so pressing the wall (or any other Arch/BIM button) will always create a new object, regardless of what is selected (if a planar 2D object is selected, though, the behaviour continues the same: The BIM object uses it as a base).
So, in order to be able to perform the same operation as before (turn a structure into a wall, for example), this Convert tool has been added. Select an object, click Convert, and choose into which other object it must be turned.
However, since a couple of months now, all Arch/BIM objects are able to take any IFC type/role, such as wall, column, etc.. regardless of the FreeCAD type. So this tool is actually already unnecessary, I just added it to not remove any functionality without providing an alternative one.
Also, in an ongoing discussion on the FreeCAD forum (come and participate!), we are now playing with the idea of semantically separating the geometry creation tool (which basically performs an extrusion) from its BIM purpose (wall, column, beam...). I find the idea highly interesting. You would basically have a tool to extrude a linear object into a wall-like object with thickness, another that extrudes a profile along a path or direction (structures), a third one that produces "embeddable" objects (windows, doors..), etc. These tools would not be called Wall, Structure, Window anymore, but something like Linear Extrusion. Profile Extrusion. etc. You would give the type you want (Wall, Structure, Window..) to the result of any of those tools. This is much more like IFC works, and is actually something very annoying in other BIM apps, where you cannot make a wall the way you want, it needs to fit in what the wall tool can do.
There are still unresolved questions, such as the different properties/attributes (A wall should have a height, width, height, what happens if you suddenly turn it into a roof), but there is a very interesting pull request coming, which starts addressing this aspect, with a completely dynamic model, where the FreeCAD properties of Arch/BIM objects can change on the fly.
Of course, we are here speaking of the inner, "core" module (Arch, currently), not necessarily what the user would see. I believe that for user-friendliness, we still need a wall button, a column button, etc... That's exactly where the separation between a "core" module (Arch) and a more "user-friendly" module layered on top of it (BIM) becomes interesting.
The Reference tool gained a new ability, which begins to turn it into something really interesting and flexible. Up to now, when you created a reference object, the shape of the object you were referencing would be stored into the host file too. This is the standard way of working of FreeCAD: Shapes are stored into the file, so when you open a file, parametric objects don't need to be recalculated, they just take the shape that was stored. Otherwise loading times would quickly explode.
Now, you have the option to drop the shape when turning the visibility of a reference object off. It provokes an additional loading time every time you turn it back on, but it drastically reduces the file size and initial file load time. And there is no limit anymore on the quantity and complexity of referenced models, as long as you don't turn them all on at the same time. That is, until we implement the next step, the ability to use a "lightweight" version instead of the full shape...
By right-clicking the BIM trash (that gets created when you use the "Send to trash" right-click command in the BIM workbench), you now have a new "Clean trash" option, which deletes all its objects that are not used anymore by any other. Objects that are still in use are not deleted. (You can do so simply by deleting the Trash, if you absolutely want)
When using the BIM Setup dialog, a couple more defaults are now set: File thumbnails are turned on, and the orbit mode of the FreeCAD 3D view is set to Turntable, which is how it works in all other BIM apps. Many people not used to other 3D modelling apps didn't realise the default Trackball mode could be changed...
Two more options were added when right-clicking an element in the tree: Ungroup, if you right-click an object that is inside a group or Building Part, which will remove the object from its host, and Select group contents, if you right-click a group or Building Part.
The new materials manager of the BIM workbench also gained some new tools. There are two new buttons to automatically merge duplicated materials (a same material name with 001, 002,... at the end), and to delete all unused materials.
By right-clicking any material in the list, you can now also rename it, duplicate it, delete it, merge it with another one.
I am not sure this is a very good name yet, it can change... This new tool allows to perform several tests on your model, for IFC compatibility, such as verifying some IFC requirements, or checking that the geometry of all your objects is valid, or checking specific things that might give problems in other BIM applications (specially the one-BIM-application-that-shouldn't-be-named...)
The idea of this tool is also to be very didactic, and give plenty of information about how things should be done properly when working with IFC.
I changed a bit the grouping of the toolbars and menus in the BIM workbench. It now works like this:
There are still visual inconsistencies there (icons that create objects should all be yellow, icons that modify existing objects should all be blue, etc) that we'll address on the way, but I think this is much more logical. Tell us what you think!
We have another interesting discussion about the behaviour of BIM objects based on another one, such as a 2D baseline or profile. As you know, both the base object and the BIM object have a Placement property. When you move the BIM object, the placement of the BIM object changes, but not the placement of the base object. This is logical, as other objects might use the same base, that would change too if the base was moved.
However, the effect of this is that the BIM object is not on top of its base object anymore. If you turn both on, they appear at different places.
Other workbenches, such as PartDesign, solve this by preventing you from moving the result object directly. You need to move the base sketch if you want to move the object that is built from it. I don't think that would be good to do that in BIM, though.
Ultimately, we're probably let the user choose, by adding a property that, if turned on, will in fact move the base object when you move the BIM object.
I kept the best for the end. This is currently still developed in a macro, because it still needs some work and fine-tuning, but it already works well, feel free to give it a shot.
Basically, when you change a file, it shows you in a very clear way what has been changed between two versions of the file: lines that have been added (in green), and lines that have been removed (in red). You can actually compare just about any two files that way, not only two versions of the same file.
With BIM, as with 2D CAD before, it is always very hard to know what changed in a file. Usually it requires the person who made the changes to mark them somehow (the traditional "revision cloud" that were added on drawings to tell "this has been changed since last version".
However, the IFC format introduces many tools to be able to assess more reliably what has changed and what not. The most fundamental one is a unique ID that is given to all objects in the file. Most BIM applications nowadays, when importing an IFC file, will store the ID of each object, and use it when exporting the file back to IFC. So we have a way to know with certainty, between two IFC files, which objects are the same, regardless of anything else that might have changed (geometry, properties, etc).
So now our job is simple: Take two BIM models. A same ID exists in both models? It's the same object. It exists in the newer model but not in the older one? It has been added since then. It doesn't exist anymore in the newer model? It has been deleted.
That's basically what the macro above does. It takes two FreeCAD models (you can just open two IFC files in it), and paints in red all the deleted objects, and in green all the newly added objects.
For all the others, that exist in both files, it does the following checks: Has the volume of the object changed? Has its bounding box dimensions or position changed? Has its center of gravity changed? If any of these is true, we can reasonably assume the geometry of the object has changed, and the object is painted in yellow.
If all these tests give no difference, we can reasonably assume the geometry of the object has not changed. It would be very hard to modify the geometry of an object and not have any of the above characteristics change.
The macro also checks for other things, but it doesn't paint the objects, since their geometry is still the same:
So at the end of the process, you have a clear view of what has changed between the two files, and, exactly like with code, you can choose the best strategy to adopt: Will you just take the new file and discard the old one? Or will you only copy over the new objects and change the modified ones by hand? Each case is usually a different case.
Like with version control systems, the macro is able to do a series of changes automatically to the old file, to reflect the state of the new file, for example update the materials, or rename the objects whose name has changed. Most complex changes, such as geometry changes, will still require you to decide what to do manually.
That's it for this month, hope you liked the new developments, and stay tuned for more!
Finally to the last report about BIM development for FreeCAD for this year! This is already the 21st of these reports I'm writing (I'm keeping a copy of all of them on the wiki of the BIM workbench's github repo if you are interested).
It's been a pretty amazing journey so far, as always, thanks so much to you who is sponsoring this effort by donating on my Patreon, LiberaPay or Paypal accounts. At some point in time I'll need to setup a special credits page for the BIM Workbench where you'll all appear! And if you aren't, join us!
Most of the images shown in this report are from a project we are currently working on in the open with Ryan and Regis, with a pretty interesting FreeCAD/Revit workflow. Check the files there if you're interested!
This year I really could spend quite a lot of hours working on FreeCAD and BIM tools, and I hope you'll agree with me that it rendered pretty decent results already. Really at this point I consider that we begin to have a very stable and powerful open-source BIM solution. I do almost all my architecture projects with it nowadays, and in many areas it already does better than the commercial alternatives we all know of. For example:
There are of course areas where we still lag seriously behind, for example:
User-friendliness: Since I began to work on the BIM workbench, I realized this is a far more complicated issue than we use to think. What is user-friendliness exactly? How do you measure it? Very often our notion of user-friendliness is based on how well we know an application. A Revit user will find Revit very user-friendly but think ArchiCAD is not, while an ArchiCAD user will think the contrary.
Another difficulty is that applications more universally considered user-friendly are very often so by limiting options. A very good example of this is TinkerCAD which really has a wonderfully intuitive interface, but try to do anything complex there, you will quickly reach the limit, or SketchUp, where you can gain power by adding plugins, but then you quickly loose the user-friendliness.
At this point I believe there is no miraculous recipe we can apply to instantly turn FreeCAD into a pleasure garden for the newcomer. One concept I really think could help us a lot, though, is making things progressive. You start with a simple set of concepts, and expand as your knowledge of the application grows. That's where I'm heading now with the BIM workbench.
2D output: While we can produce BIM models of the same level of complexity and refinement as other BIM applications already, the same cannot be said of producing 2D drawings yet. The TechDraw workbench is mostly oriented towards mechanical design, and currently fails short to handle huge BIM models with all their details and annotations.
However, there are ways out of this, and I started experimenting with it already (see below).
Nope, this month I'm officially in video-holiday! Next month we're back with one.
So, on with the enhancements I did this month. As FreeCAD is getting close to the 0.18 release and still in feature freeze mode, all the new features of this month are in the BIM workbench itself:
I have added a couple of enhancements to the BIM Library tool. It now supports IFC and SAT formats (this last one needs the CadExchanger add-on), and there is now a search function. There are also buttons that search on 3 well-known online resources of BIM objects, bimobject.com, the nationalbimlibrary.com and bimtool.com. This is mostly to test the usefulness so far. Most IFC models available on these websites are of awful quality (all curved surfaces triangulated, etc) so it didn't seem worth to me making a better integration, at least for now.
Personally, my best source of good quality models is still grabcad.com. If you limit results there for STEP/IGES files, you'll often get files of excellent quality, readily and perfectly importable into FreeCAD, and which are perfectly usable as BIM objects and appliances. BIM is not the main focus of grabcad, so the offering is limited, but there is more than enough of the basic stuff (basic furniture, sanitary/kitchen appliances, etc).
I'm not sure which direction to go with this tool now. What do you think? Integrate grabcad better than the others? Do some lobbying with the other BIM objects providers? Other ideas?
The BIM workbench gained a brand-new material tool which I believe makes it much, much handier to work with materials. It has one main button that either offers to create a new material if nothing is selected, or, if any object with material support is selected, shows you a new, big, searchable material list, that you can operate fully from the keyboard (start typing, press arrows up and down, press enter) that makes it very quick to attribute materials to selected objects when you have a very big list of materials.
The materials also have icons that show their diffuse color. Later on I'll use this code to generate the tree icons of materials too.
These are all improvements to the BIM Views tool. That tool is still in infancy, but the final aim is really to have a clean and easy way to manage all the different views and working planes of your document, and mimic, so to speak, how other BIM apps like Revit or ArchiCAD manage their views. The idea of this tool is basically that all the Building Parts and Working Plane proxies are shown there, so you don't need to search for them when they are buried deep inside the tree view. Double-clicking any of them will 1) set the working plane to it, and 2), if their "Restore View" (and provided you stored a view angle in them by right-clicking them in the tree view and storing the current view), restore the stored view.
So basically it works like views in other BIM apps: Double-click one, and find yourself looking into that view, with the working plane set where it needs to be. Building Parts and Working Plane Proxies now work almost identically, only the former can hold objects too.
Building Parts also now have a new "Auto Working Plane" property which, if set, keeps the working plane in "Auto" mode. So if you change the view to something else, the working plane will change to that view too automatically.
The unit indicator in the status bar is now properly clickable and sets the unit on the fly. No more back-and-forth to the preferences setting!
Instead of using the default sketch tool from the Sketcher workbench, the BIM workbench now has its own "new sketch" tool. The difference is very simple: New sketches start in the current working plane. So using sketches feels much more like Draft tools, and everything is much better integrated. Also, it doesn't change the view when entering sketch edit mode, so it escapes from the Sketcher's "introspective" mode, where when you enter the sketch, you sort of "forget everything else" to focus purely on the sketch. Here, you just draw sketches more seamlessly into your model.
If you prefer the standard behaviour, don't forget how easy it is to add a tool from another workbench (menu Tools -> Customize), but I found this really comfortable for BIM work, try it!
The BIM Views button has moved to the status bar, next to the button that shows/hides output panels, and both became toggle buttons (they have a pressed/non pressed state). They have similar default shortcuts (Ctrl+9 and Ctrl+0), I think it makes much more sense.. The BIM Views tool is not really a management tool, it makes more sense here IMHO.
I added a series of simple 2D symbols to the Parts Library (installable via the Addons manager) that look like those found in other apps like SketchUp or BricsCAD shape (which is quite interesting BTW, try it, it's free and multiplatform, a kind of "solid modelling SketchUp". It still crashes often and there is no easy way to import its results into FreeCAD, but it is definitely an interesting thing). Although they are 2D, they are meant to be used in 3D models. It's just that they are symbolic instead of fully modelled. But for that reason, they are very lightweight. And I kind of like that aspect...
If you think of anything else that would be useful to have modelled that way, let me know!
As stated above, one of the areas of FreeCAD that really lags behind for BIM use, is producing complex 2D documents such as construction documents. The TechDraw, although pretty powerful already, is more focused on mechanical design, which are typically much smaller models.
There are several problems there for us who work with BIM: One is the time that it takes to produce a 2D view of a large model, because there are several heavyweight Boolean operations involved, and the 2D drawing itself is done by OpenCasCade (the geometry engine of FreeCAD) itself, on which we have no control, another is that, as you can see on the image above, there are usually many things on such a drawing that is not geometry but annotations: Texts, dimensions, labels, symbols, etc.
All this is old story, I've written a lot about this on this blog already.
But I've recently found one more hidden gem inside FreeCAD: the ability to export very faithful vector graphics from the 3D view of FreeCAD. There is a quite interesting system provided by Coin3D, the display library used by the FreeCAD 3D view, that walks through the different entities (lines, triangles,..) displayed on screen and allow you to do something with each, such as exporting them as SVG. It already works amazingly well, you can try it simply by issuing the following command in the FreeCAD python console:
It need a bit more work, for example to support line thickness better, of image textures, but it works already amazingly well and is blind fast and precise. And the algorithm could probably easily be adapted to produce QGraphics entities that are used in TechDraw, and therefore obtain a result where dimensions and pattern fills work.
We could do quite a lot of annotation work directly inside the 3D view, this works quite well already, and we could have blazing fast, virtually unlimited amount of 2D views inside a FreeCAD document.
All this needs some thought and work, but it seems to me a more than interesting path to go. There are several issues to solve, for example the scaling (the output is dependent on the view size and proportions), and also the fact that currently the view needs to be displayed on screen for this to work, but these problems certainly have several possible solutions.
This is I think the most exciting change of this month. The Stretch tool, that so far only worked with 2D objects, now works with BIM objects as well, provided they are based on a 2D object. This seems like a small change, but it is actually a massive step in direction to direct modelling: BIM objects can now be deformed and stretched graphically.
So far this will only apply to the 2D shape that is used as a profile or baseline of a BIM object, so it cannot be used for example to change the extrusion height of an object, but we'll get there in time.
This is not really like Revit, more like old-school AutoCAD, when you had no object handles, but it seems to work amazingly well, and if it proves solid (I think it is), we can extend that a lot, to other tools too such as Draft Edit, and slowly get there.
The BIM workbench now has a mechanism that will check for your installed version against the most recent one on GitHub, and pop up a notification if an update is available. You need the python-git package installed for this to work, but it's on my to-do list to make this work regardless of this package (and actually extend that to all add-ons).
There is now also a new view shortcut, (key 9 or menu Utils->Working Plane view) that sets the view to the current working plane or, if the BIM Views window is open, to the last item double-clicked there. So you can now pretty easily navigate between your current Building Part and other standard views such as Front, Top, etc.. using the keyboard only.
Thar's it for this month, thanks for reading until here, I wish all of you a happy new year, and see you next month!
PS - Only recently I realized that I never put the appropriate captions on the images of these articles... If you are blind, I really apologize, from now on that will be done with care.
This is the November edition of our monthly report about the development of BIM tools for FreeCAD. As you know already if you read last month's report, we are (increasingly) busy preparing FreeCAD for its next 0.18 release, which is scheduled to happen before the end of this month/year. So far so good, we are busy ironing out the last bugs and getting everything ready.
By the way, one of the areas that always needs a lot of help from the community of FreeCAD users, is translation. With each release, we achieve a bigger number of languages in which FreeCAD is fully translated. This year, we have many that are above 90% already, and a couple of others that lag behind, that would really deserve some care. Do you know any of the languages on our translations framework? Please help! Just create yourself an account there and you are ready to go. No need to compromise yourself to reach any goal, if you just have 5 minutes and can translate 5 sentences, you will already have helped the project a lot! (And if you reach 500 sentences, you will have your name in the credits in FreeCAD -> Help -> About FreeCAD )
Last month I announced I would spend more time on the BIM workbench itself this month, as it is not tied to the pre-release "feature freeze" in which FreeCAD is at the moment. I did that, but I also underestimated the amount of bug-fixing needed in FreeCAD, so I ended up still spending a lot of time on FreeCAD bug fixing. In any case, one thing is as important as the other, and I think with this release the whole BIM ecosystem inside FreeCAD is reaching a level of maturity and stability that we never had before, and that it is becoming ready to enter the big player's courtyard.
As always, many, many thanks to all of you who contributed to this effort by donating money on Patreon, Liberapay or Paypal so I can spend more time working on FreeCAD. Next month, since it will be the last report of 2018, I'll do a small recap of these nearly two years of "campaign", it has been steadily increasing over the time, and so far it is a really motivating and, I hope, productive experience.
So, enough boring bla-bla already, let's go to what interests us:
This month's video is about the expressions engine of FreeCAD:
This is a small change, but curiously something I never really gave some thought before. As I am working more on the User Experience (UX) side of things with the BIM workbench, these questions take more importance. Until now, I tried to fit all the new interface panels inside the Task panel of FreeCAD. This is the good old idea that interface elements should not block your 3D view, and stop you from working. However, some tasks do require you to stop working and work on the task only. These should not be squeezed into the sidebar but get a larger dialog that occupies the central part of your screen. So the Project setup dialog now has a nicer and more comfortable dialog and it works much better.
The other BIM tools from the Manage menu should, I think, stay in the Task area, as they allow you to interact with the contents of the model. I think we have a good rule from now on to decide what should be in the Task area and what should get its own separate, blocking dialog. I will try to assess which areas of FreeCAD are not following this rule correctly.
This was one of the first ideas I had for the BIM workbench, and the system is now implemented and running, although the tutorial itself is still incomplete. The concept is largely used in games: After you install it and start a new game, you are often offered to take a tutorial first, to familiarize with how the game works. That tutorial is often itself the first chapter of the game, so you play a first chapter that is specially designed to help you learn what needs to be learned, and you are guided through it by tips boxes, explanations, small "goals" you need to achieve, etc.
I find that brilliant, very different than a video or text tutorial. You are already playing, and the game explains you how to play it. After you finish the tutorial chapter, you are on your way.
The idea here is to do as much as possible the same: Have a tutorial that "unfolds" right inside your FreeCAD window, and that guides you through a series of steps designed to show you how things work. Each page of the tutorial explains you something, and has goals to be achieved.
The tutorial is entirely written on the FreeCAD wiki, so it is easy to get fixed and bettered by community members. Each goal has a simple, one-line python test, that returns True or False. I hope this will become a killer feature that no other BIM application has, and might also be of a big help to overcome the steep learning curve of FreeCAD.
You can now change the working units on-the-fly, directly in the status bar.
The BIM workbench documentation is finally complete. Although many of the tools can still evolve, we now have an up-to-date documentation, which is a very fundamental piece of the game too.
I also started a parity table which I believe will be a very precious resource to learn FreeCAD and its BIM workbench when coming from another application. Please help me to complete it with other concepts and applications!
The BIM workbench now has what we in FreeCAD call Task Watchers, which takes place inside the Task panel when no command is active. These watchers can change according to the context, so we can really use them to guide the user through logical sequences of actions. At the moment, they will simply display creation tools when no object is selected, and modification tools when something is selected. However, I plan to refine that when we see opportunities for it.
I also spent some time fixing a few issues in the IFC importer and exporter, and we begin to get a satisfying experience when exchanging models between Revit and FreeCAD. It is now possible to model in FreeCAD with a reliable 100% of your exported objects appearing correctly in Revit and being editable, by 1) using only extrusions (Part Extrude, Arch Structure or Arch Wall) and 2) Setting the IFC role of all exported objects to "Undefined", which will export them as IfcBuildingElementProxy, which imports into Revit as Generic Components. This is not mandatory, of course, all IFC types are supported, but the reason is that some other types have additional rules that sometimes override the way the object is stored inside the IFC file. To say it another way, if some object doesn't appear correctly in Revit, set its IFC role to "Undefined" in FreeCAD. Although not ideal (yet), at least it is reliable.
That's it for this month, I'm not listing here the small bugfixes and polishes I've been doing a bit everywhere, be sure to check the commit log of FreeCAD and the BIM workbench if you are interested in the details. Thanks for reading!
High time for a new article about what I've been doing this month with FreeCAD related to BIM development. Sorry for being late! This month again, there are not many new features, basically because 1) I've been to the Google Summer of Code mentors summit at Google, in San Francisco Bay Area, and 2) FreeCAD has entered "feature-freeze mode", that is, a special time scheduled before an official release, where everybody agrees to not introduce any new feature (which might always introduce new bugs), and instead, solve all possible bugs to make the release as bug-free as possible.
That is no less important, of course. Bug fixing is an important part of the development cycle, even if less enjoyable. Developers always prefer to code new stuff, which is far more exciting, and, as any other human being, tend to leave the boring stuff for later So it's good to have a time where we force ourselves to concentrate on bugs. Also, it makes it much more enjoyable and motivating when your friends are also busy fixing bugs, it turns the whole thing into a kind of game.
Once again, thanks a lot to all of you who contribute to this whole effort by sponsoring me on Patreon or Liberapay or who directly sent some bucks on my PayPal account. Sorry for leaving you probably hungry for new features this month, but I'm sure everybody understands the importance and necessity of this bug-fixing phase. Since the BIM workbench is not part of the FreeCAD code base, though, it is also not part of the feature freeze. So expect some new stuff there in the coming months anyway, as soon as I get the bulk of the bug-fixing effort done.
The plan is to have a new release of FreeCAD ready for the end of this year or early 2019, in time for the next Debian freeze cycle (they also have one, during which they don't accept any new package). This is important because if we get the new version of FreeCAD into Debian in time, it will cascade back on Ubuntu and all other derivative distributions such as Mint or Elementary, and all the next versions of these distributions will automatically get that new version.
This release will not bring a very big amount of new features, but rather be dedicated to stability. We've been busy this year with porting FreeCAD to the latest versions of Python (Python3) and Qt (Qt5). This makes FreeCAD basically future-proof for a reasonable time. Not that FreeCAD still supports Python2 and Qt4, so it can still safely be built on older platforms. We will probably continue to support these until they get really obsolete.
Another reason to make this release is that we have big things coming in. The new Assembly3 workbench is close to completion, but it represents a big change to the FreeCAD code, and introduces a lot of new bugs. However, while it is not merged into the main FreeCAD code, very few people actually test it, and therefore bugs are slow to get spotted. And the Assembly3 code is so huge that it has become very difficult to assess and split into more easily manageable parts. So we are pondering if it would not be best to merge it and let the bugs happen, and fix them as they come. In any case, for that, we need to have an official release just before, so people can stay with a stable version until things calm down.
By the way, if you haven't seen it, we now also have a third way to makes assemblies in FreeCAD, with a new plugin workbench called A2Plus which is now an official FreeCAD add-on](https://github.com/kbwbe/A2plus) that can be installed via the Addons Manager. So now we are starting to have a whole family of solutions to deal with assemblies in FreeCAD. Choose what suits you best!
This month's video is about producing 2D drawings from your model, and placing dimensions, hatches and annotations.
As I mentioned above, I've this year again attended the GSOC Mentors Meeting, which happened at Google headquarters in California. Since we participated to the GSOC program this year again, together with our FOSS CAD friends, we earned a couple of slots to go to California. This year, I went to represent FreeCAD, together with Sean Morrison and Daniel Rossberg from BRL-CAD.
The mentors summit is an incredible experience, unlike any other open-source-oriented event I've been lucky to go. A part of the Google campus is open during one weekend, to receive around 300 developers from the whole world. There is plenty to eat, drink, do and watch at any time of day and night, plenty of goodies for you to grab, and they provide several spaces for people to gather and discuss what they like. That's basically it. And it works amazingly. You end up talking a lot to everybody else, contacts are made, brains work, ideas are discussed, projects get born.
This year I had pretty long discussions with both Sean and Daniel, about two interesting subjects: Integration of FreeCAD and BRL-CAD, and a general effort to do more integration with all other FOSS CAD projects.
The BRL-CAD and FreeCAD integration is something we've been discussing with Sean for some time: BRL-CAD is in need of a better modelling interface, which FreeCAD can provide, and on the other hand the BRL-CAD system is a very powerful modelling engine, and it would only serve FreeCAD to make use of it. Besides, FreeCAD being so modular and extensible, we made an habit to try to plug anything we can into it..
We are still thinking as to how this integration would/could happen, but it would likely be on the form of an additional FreeCAD workbench/addon, a bit like the OpenSCAD workbench. BRL-CAD has a nice C++ API, to which Daniel is one of the main contributors, which is very likely what we would use. The aim would be first to be able to use FreeCAD to model and save the result as a BRL-CAD file, then see all we can get from this that could benefit FreeCAD. One of the big advantages of BRL-CAD is its capacity to manage extremely large models. And it can do all the important parts that we need in FreeCAD: Geometry calculations and triangulation.
The other idea is actually a series of ideas we have been discussing, to encourage the interaction between all the different FOSS CAD projects out there, such as LibreCAD, STEPcode,OpenSCAD, LinuxCNC ro Slic3r. There are many others specially in the BIM area (IfcOpenShell, IfcPlusPlus or BIMServer for example), that could be interested in this as well. Unlike the commercial world, where each similar application to yours is seen as a concurrent, that you should try to beat (or buy, or kill, or, even better, both), in the open-source world we can help each other, and help users with a family of tools that work well with each other. Each individual application benefits from this, as it integrates and can count on a more solid ecosystem.
Our ideas ranged from a common forum, structures to be able to collect and redistribute donations, definition and sponsoring of common projects, etc. There is much to be defined and done there yet, but we now have several people committed to make this happen. As soon as we have something ready, you'll be the first to know
Ah, as usual, there was an impressive table of chocolates that everybody brought from all corners of the world. I had also brought a load of FreeCAD stickers (very poor ones that I made at the last minute, will do a new batch of better quality ASAP) that got entirely distributed. Quite a lot of people know FreeCAD nowadays!
Besides this, I've also added another feature to the Arch Reference, which is the support for colors. When reading an object that has individual face colors defined, the Reference object will adopt those colors (and, if its UpdateColors property is set, will keep those in sync if the base file changes). The Arch BuildingPart has also be updated to store the colors of its children, so from now on you can create a whole BuildingPart made of several objects, reference it in another file, and have its aspect look exactly like in the referenced file.
I am already experimenting with the next step, which is to introduce a "lightweight" mode, which will allow us to work with way larger models. This will probably only be merged after the 0.18 release, but we'll make sure to have everything ready by then.
That's it for this month, expect more focus on the BIM workbench itself next month, thanks for reading, and thanks again to everybody who supports this effort!
Time for one more of our monthly posts about the development of BIM tools for FreeCAD. This month unfortunately, since I was taking some holiday, travelling (and sketching) for the biggest part of the month, I have less new stuff than usual to show. To compensate, I tried a longer and more detailed video. Looking back at it, I think this is a bit too long, though, so next time I'll get back to a shorter format.
As usual, many thanks to everybody who is backing me up on Patreon, Liberapay, or donated directly to my Paypal account, this is a really amazing experience, I hope you guys feel as thrilled as I do about the progresses we're doing here, each month we have a new layer of paint on the wall, and it begins to form a very solid and coherent compound. I sincerely think some parts of the job are now almost done (basically, BIM modelling itself) and already work as well or even better than many commercial BIM applications. What I am going to concentrate more and more on, in the next months, is the 2D output, ie. how to generate good quality drawings from our BIM models.
I have several threads to explore there, one being of course TechDraw, where we need to optimize things to be able to work with larger models, and integrate better the native TechDraw tools with BIM models, and another thread is the 3D view itself, in order to obtain a more "WYSIWYG" (What You See Is What You Get) workflow, that is, have the 3D view really give you good and useful 2D views of your model. Finally, see how we can tie both these threads. Our OpenInventor-based 3D view has several tools for offline rendering, that is, produce a "copy" of the 3D view that can be used for other purposes, such as saving an image. This could offer us a blind-fast way to generate 2D documents, and could be a very interesting path to explore too.
This month the video is a generic tutorial that shows how to get started with BIM modelling in FreeCAD:
I've also started working on the documentation of the BIM workbench. As you know, the main effort behind the BIM workbench is to offer a good user experience. This is therefore a very important point. There is still some work to do, but it is there already and usable. It is also something I wanted to do to advocate other Addon workbench developers to use the FreeCAD wiki to write their documentation. The new Start workbench, that has landed in FreeCAD last month, will display links to specific workbench pages on the wiki, so this would be very useful.
I also gathered all the development news articles I wrote so far on the github page of the BIM workbench, inside the "wiki" section. Some might find them easier to find and read there than on my blog...
The big, new feature that has landed this month in Arch (and therefore BIM) workbench is the new [External Reference] tool. It basically works like an Xref in AutoCAD, or File Link in Revit (I'm not sure how it's called in other apps...). To resume, it allows to include the contents of one file in another. If the contents of the first file change, what's included in the second file changes too.
Working with reference files has a lot of advantages: One person can work on a part of a model, while others can work on other parts, and everyone can keep working on a separate file. Or you can split big files into smaller, more manageable chunks.
In FreeCAD, it has also a big extra advantage: Like in most parametric modellers, having a lot of individual objects in your model document makes FreeCAD run significantly slower. The 3D view of FreeCAD is capable of rendering several millions of faces without much slowdown (yes we tested), and the OpenCasCade engine is actually very efficient at managing very complex geometry. The problem is the logic. Each new document object created inserts a load of relationships with other parts of FreeCAD, because there are many mechanisms that must run every time you touch an object. Often, these mechanisms need to scan all the objects of the model.
It is interesting to compare this with games. A couple of years ago, the biggest part of the CPU computing occuring when you were playing a modern, resource-intensive game, was to compute the 3D graphics. Now, in some recent games like Kingdom Come (my favourite of the moment), the Artificial Intelligence uses more computing power than the 3D rendering! This is because each character in the game has its own "program" running, all interacting with each other, creating exponentially long chains of computation. Basically the same happens in FreeCAD. Such is the price of parametricism, that you'll have to pay one day, mister Schumacher! (Architects joke, don't worry about it)
By using reference files (I'm not sure the name is really good... Any other idea?) in FreeCAD, you can include the whole content of one file (several objects) as one object in the host file. This reduces dramatically computing time, and allow us to work with increasingly bigger models.
When you create a reference object, you give it a path to another FreeCAD file, then you can choose one of the included shape-based objects inside the file. The implementation is very simple: The Reference object doesn't open the included file. It just unzips the stored brep data of the object you specified. Any object with a shapecan be included, including, and that's the interesting point, BuildingParts. As I explained last month, internally, the BuildingPart always keeps a shape that is a compound of all the shapes of its children. Compound shapes in FreeCAD are very cheap and fast to produce (no boolean operation involved). So you can group anything you want, a whole storey, a whole building, etc... inside a BuildingPart, then include that BuildingPart as one single object inside another model.
The referenced object is a fully valid shape object, that you can move, rotate, duplicate, clone, project in 2D, and snap to it like any other. At the moment, it will be exported to IFC as one monolithic IfcBuildingElementProxy object, that's something to work further on in the future.
If you follow FreeCAD's latest developments, you might be asking yourself why this was not based on Realthunder's Assembly3 branch, which provides about the same functionality? There are a couple of reasons to that, basically because I wanted to try a very simple implementation, while his is rather complex, and also the aim is different: The Assemby3 functionality aims at pretty complex models, with not so much geometry, but with complex hierarchies and relationships. In BIM, we are aiming at very large models with very little or no relationships at all between the included parts. In any case it can certainly be interesting to have both approaches in FreeCAD.
Further immediate development will be the retrieval of colors. At the moment only the shape of included objects is gathered by the reference tool, we need to make the BuildingPart store not only the shapes of its children, but also the face colors, like the Part Compound does. Then we can read that as well when we include an object from another file.
Next, I'll also add an option to have the BuildingPart also store an OpenInventor representation. This will allow us to load only that representation from the included file, not the shape itself. This "lightweight include" would give blind-fast imports, and would have virtually no limit in terms of model complexity. There are a couple of caveats to solve, that I already experimented with the "Hi-Res" mode of Arch objects (snapping and selecting and everything else based on element names doesn't work correctly), which is something realthunder has been able to solve much better in his branch, but there is no reason to not be able to make it work.
Finally, Sliptonic, a long time FreeCAD developer and main brain behind the Path workbench, has written a new FreeCAD e-book called FreeCAD for Inventors. It is available for purchase on Amazon and Kobo. It uses the same basic structure of the FreeCAD manual, that is, a general walk through the different parts and workbenches of FreeCAD, with a series of pretty interesting exercises. Sliptonic has also paid close attention to the usual requests and difficulties reported by newcomers to FreeCAD, and tries to address them in the book. Definitely a very good entry path into FreeCAD, if you are new to it.
That's it for this month, next month I'll attend the Google Summer of Code Mentors summit in San Francisco (and spend a couple of days in Mexico City on the way back). I'll be sure to dutifully report here.
One month passes bloody fast, doesn't it? So here we are again, for one more report about what I've been coding this month in FreeCAD. Looking at the text below (I'm writing this intro after I wrote the contents) I think we actually have an interesting set of new features.
None of this open-source BIM journey would be possible without the help of everybody who contributes to my Patreon or Liberapay campaigns, and therefore allow me to spend a good amount of working hours per month on FreeCAD. Thanks a million to all of you, it is really making a difference for FreeCAD, we're well on our way to a good, open-source BIM application.
The house illustrated in this post is a famous house built by architect Vilanova Artigas in São Paulo and was modelled by Wilson Melo.
So let's have a look at this month's features, but first, here goes our monthly video:
In FreeCAD, like in most other BIM applications, many 3D objects are based on 2D objects: Walls are based on a line, columns and beams on a 2D profile, etc. In most cases, you are not forced to draw that 2D object yourself: You can draw a wall directly in the 3D view, or you can place a structural component by selecting a preset profile from a list. However, all these objects can also be made from a custom 2D object that you draw yourself. There are many ways to do that in FreeCAD, this video will give you a quick overview of the available options.
As announced last month, we are reaching the first goal I have defined on Patreon, which is, a place where we can discuss BIM ideas and features to be implemented in FreeCAD, and you guys can vote for them, and I would do my best to implement the most voted ones. I had a look at the different (open-source and not) solutions available to do that efficiently, but unfortunately the results of this search are not very good. Most "feature voting" applications are very old and unmaintained, or require a heavy web infrastructure to be put in place, and you will certainly agree that our time should be spent better than in maintaining heavy web infrastructures just for that purpose...
So I thought, why not simply use the Github issues system? It is possible to vote there, submit new ideas, etc. Most open-source projects hosted on Github use it. It might not be the ideal (given the fact that Github is now owned by Microsoft, etc..) but at least it's easy to use, anybody can add new ideas, vote for existing issues (give it a "thumbs up", etc.
I am starting to put some ideas on the BIM workbench Github page, have a look there under the "issues" tab, I'll add more in the coming weeks. Don't hesitate to add your own ideas there, or comment as much as you like on the existing ones.
I discovered a small but bright IFC trick recently that might not be "proper" IFC behaviour, but that is definitely improving our FreeCAD workflow a lot: Groups, in IFC, are handled by an object called IfcGroup. However, groups are not really part of the standard way to use IFC, which is to use spatial structures (Buildings, Storeys, Spaces, etc..). As far as I could see, they are just offered as an additional way to create relationships between objects, if anyone really wants to. You will rarely see an IFC file that contains groups. Revit and ArchiCAD, although both offer the functionality, don't use groups much.
In FreeCAD, however, groups are a very important feature. All the objects of your model are appearing in the tree view, so it is very important to organize them. Grouping is an extremely powerful way to organize your model, and, unlike other methods such as using storeys or layers, it is completely free from any "meaning". You, the user, decide how you want to organize your model. Will you group all your walls under a "Walls" group? will you make sub-groups for different types of walls? Will you not use the materials system at all, and instead group all your objects by material? The model is yours, the choice is yours. Also, every project is different, it makes little sense to force users into one kind of arrangement. An office tower model should definitely not be organized the same way as a house.
In FreeCAD, you can mix everything together: Have groups inside levels (which are now handled by the BuildingPart object), levels inside groups, groups of buildings, anything your wild imagination (or very concrete requirements) dictates. But this was all lost when exporting to IFC.
Now I discovered that IfcGroups are actually derived from the same base entity as other IFC grouping features such as Storeys or Buildings, and, as such, they share some functionality. More important, it is possible to stack groups as part of these other entity types.
So from now on, you can export your wild model structure to IFC, re-import it, it will come back exactly as it was. Most of our BIM competing applications might still not be able to cope with such a complex model structure, poor them, but hopefully they will do their homework at some point.
Forgive me for the quite exaggerated last sentence, but I couldn't resist
Another IFC feature I've implemented in the last month, is support for IfcElementAssembly, which is the standard IFC way to define an element made of several other building elements. For example a truss system, or a bathroom unit. It is a bit like grouping, with the difference that the assembly is not just a group but a real, physical, manipulable object.
In FreeCAD, any BIM object can be an assembly of any kind of geometry or other BIM objects. You just need to add them to its "Additions" property. However, until now, if the host object was a wall, it will be exported as a wall.
Now, if you change the Ifc Role of any BIM object to Element Assembly, it will be exported as such. But even better, BuildingParts will also be exported as IfcElementAssembly when its Ifc Role is set as such. And it is much easier to add objects to a BuildingPart, as you can drag/drop objects into it in the tree view, and is a much more "intuitive" way to construct an assembly.
When importing an IFC file containing IfcElementAssembly entities, they will be rendered as a BuildingPart, so all their components will be available and manipulable.
On our way to a full roundtrippable IFC <-> FreeCAD workflow!
Finally we now have preliminary support for quantities. I say preliminary, although it works well already, because I'm still not sure about the future direction of this.
Basically, the IFC format supports defining objects by quantities. Together with the geometry of an object, for example a wall, you can also attach quantities to it, for example a height value of 3 meters, or a thickness value of 20 cm. This is all arbitrary, you can decide yourself what name you will give to these quantities (it it "thickness" or "width"? "largeur" maybe? or "??"?) and, even more problematic, you can make them lie (the "thickness" value you give is not the same thickness as the geometry you provide).
So it is complicated to trust these values. However, the point is not there. The idea is that an application that doesn't have geometry support, for example a spreadsheet application, would be able to open an IFC file and build a list of quantities of all the elements in the file, without the need to have very complex geometry tools to extract that information from the geometry.
The idea is brilliant of course. Imagine "opening" your IFC model in Excel?
So here is how it works in FreeCAD now. The IFC Elements Manager (sorry, the documentation is not there yet at the time of writing, will work on it in the coming days) of the BIM workbench now has gained a new tab that shows available quantities for BIM objects. So far, I only considered objects that had standard, universally recognizable quantities such as width or length. This will be developed further along the way.
For any of them, you can now mark if you want those quantities to be exported to IFC. That screen will also show a warning sign when such a value is zero, which probably indicate a problem somewhere that you should look at before exporting.
These quantities are then exported to IFC and attached to the corresponding object. When reading back an IFC file, the quantities are not read, as we prefer to get them from the geometry, which is more trustworthy. In the future, we could think of comparing what the geometry says with the given quantities (FreeCAD as a lie detector for IFC files?), but I can't think of much use for that.
I had been busy with this for some time, and it's finally ready. The old start page, which appeared when you opened FreeCAD, was something a bit clumsy and not very usable nor interesting. Now we have something that is much more useful, both for newcomers and experienced users. There are three tabs, one for your files, one for documentation, and one to have a quick peek at the recent activity in the FreeCAD world (latest changes to the source code and latest posts on the forum), which is a feature many users liked in the previous version.
All of this is customizable, translatable and themable, and you can even replace the start page by any HTML file of your own. That can be useful for example in companies or schools so they can display additional content.
There is also a "notes" area, that you can enable in the Start preferences, where you can write text that is saved across FreeCAD sessions. This could be useful as a kind of "FreeCAD to-do list".
There are still some small hiccups depending on the platform, but we'll address them on the way. Don't be scared about the colors in the images above, I adapted the start page colors to my desktop theme (you can do that in Edit->Preferences->Start), but by default it looks like this:
This was not done by me but by FreeCAD user AR795, with the help of many others, bu have you seen the gorgeous new FreeCAD website? Next we'll adapt the rest of the FreeCAD web universe (wiki, etc..) to the same aspect.
Until now, the BIM workbench featured, among its 3D tools, the standard Part Box tool. Using boxes is very practical in BIM, more than half of the geometry we create is usually made of these rectangular shapes, and the Part Box is a very simple and versatile tool that has 101 utilities. The way it is created, however, is often annoying: A 10mm x 10mm x 10mm box appears at the origin point when pressing the button, which requires several additional operations to move it to the correct location and set its length, width and height dimensions. Most of the time I was using a Draft Rectangle that I then extruded, which was faster.
Now I rescued an existing macro and turned it into a full new BIM Box command (sorry, no doc yet) command, that still creates a Part Box, but graphically in the 3D view. You give two points to define the base line (length), a third point to define the width, and a fourth to define the height. You can also enter length, width and height manually in the Task panel, but you still need to click the two first points to define the position and orientation of your box.
These boxes can be used as walls (just press the wall button with one selected), beams, columns or any other BIM object, or as a subtraction to any of them (select the box, CTRL+ select the host object, press the Remove button).
The Section Plane tool has also gained a series of improvements. First, when you create one, if you have objects selected, for example a building, the section plane will automatically be placed at the center point of the building and resized to encompass it.
Then, by double-clicking the section plane to enter its edit mode, you now have several controls to flip it in other directions and resize it to fit. So it is now much easier and faster to create multiple views and sections.
With Wandererfan, we are working on having proper support for Section Planes in TechDraw, which is the FreeCAD workbench used to produce ready-to-print sheets. At the moment, you must still use the TechDraw ArchView tool, which is the only one that supports Section Planes. However, that tool has many limitations, because it produces its view through SVG, and therefore looses many of the TechDraw features such as the ability to add hatches and dimensions.
But while proper support is not ready, I already experimented with caching. The contents of the TechDraw ArchView is now cached, and only recalculated if the objects seen by the section plane change. So you can now move, rescale, change thicknesses, etc... of ArchViews without redoing the heavyweight calculations, which makes it much faster.
This seems to work pretty well, so that might be a good idea to implement further in TechDraw later on.
Finally, I built this little macro the other day that builds a whole Site object out of a series of contour lines, that you can for example import from a DXF file. Your contour lines can be organized in any way you want, grouped in different layers, and don't need to be connected into wires (they can be a series of simple lines). The macro solves it all.
Internally, it breaks everything into separate edges, re-joins everything into wires, turns the wires into b-splines, sorts them by elevation, then builds ruled surfaces between the contours, then builds a shell object out of the surfaces. Finally, that shell is used as the Terrain property of a site.
There will be many situations where it won't work correctly (for example the sorting by elevation will produce wrong results if there is more than one contour with a certain elevation), which we can adjust later on, until it is good enough to become a real FreeCAD tool.
But the results are quite good already, and of a much better quality than the point cloud-based method I used some time ago. Plus, it is easily editable by editing the b-splines.
That's it for this month, see you in September!
This is the monthly development post about the development of BIM functionalities of FreeCAD. This month we won't have a video here, because there is quite a lot of stuff to show already, but next month I'll resume making videos, and I'll try to begin to show real projects in them too (not sure how doable that is, as it might easily make videos pretty long, but we'll try).
As usual, thanks a million to everybody who makes all this journey possible by supporting me on Patreon or Liberapay. As you might have heard if you are using Liberapay, they currently have problems with their payment provider, and operations are suspended there at the moment. Many of you who are using Liberapay opted to empty their online wallet by distributing their remaining money between the projects you sponsor, so I got quite an unusual amount of money this month (around 700 EUR). I am keeping this money intact for now, maybe there would be something cool to do with it, I don't know yet.
As I wrote here last month, by combining what I earn on Patreon (about 700 USD/month) and Liberapay (around 90 USD/month), we are hitting the first goal I had set on Patreon (750 USD), which is to set a site, or forum, where you guys can propose and vote for ideas to be implemented and I would try my best to make them come true. I lacked time to organise this, so it will be for next month. But it's definitely coming!
The project illustrated in this post is by OpeningDesign
So on with the stuff I did this month. Basically not much fancy graphical stuff, bu heavy work on the IFC side of things:
Last month I starrted with this by implementing support for property sets in FreeCAD. Property sets are a feature of the IFC format, where properties of an objects can be grouped into sets. As you can add any number or type of custom properties to any IFC object, you can also group them into custom sets. But the IFC format also provides standard sets, for example walls have a Pset_Wall_Common property set, that contains usual wall properties such as "IsExternal" or "IsLoadBearing". IFC Property sets are now fully supported when importing an IFC file in FreeCAD, and when exporting a FreeCAD model to IFC.
The other big feature I had been working on last month, the new BuildingPart object, which is made to replace the current Building and Floor objects with something more robust and versatile, is now also supported by the IFC importer and exporter. Depending on the IFC role that you give to your BuildingPart object, being Building or Building Storey, it will behave that way in the IFC file.
As important as the support for it in IFC, is the ability to easily edit, add and remove properties to/from your BIM objects in FreeCAD. So in the BIM workbench, we now have a full property manager tool. That tool can be launched directly from the BIM Elements Manager in the "Manage" toolbar or menu of the BIM workbench, or directly from inside the Edit Mode panel of BIM/Arch objects. If the BIM workbench is not installed, that option is not available.
I'm not a big fan of that, "plugins" that spread out new functionality inside existing tools, I find that confusing and hard to discover, so the idea is not to go that way, and keep things clear between Arch and BIM workbenches and not begin to mix stuff between the two. But at the moment I'm still experimenting with all this, trying to find where it fits best, so consider these "intrusions" of the BIM workbench inside existing Arch tools just an experiment to see how it works best. If it consolidates into some "ground" functionality, it will go to Arch. If it's just an additional layer of UI work, it will stay in BIM.
The general idea is that you might want to use the Arch tools sporadically but you work mainly with other FreeCAD workbenches. Then you don't want to be bothered with BIM stuff. Or you are using FreeCAD mainly for BIM, then you want the full-fledged BIM workbench.
We already had several Axis tools in Arch/BIM, that can already cater reasonably well for your axes/alignment needs. However, they weren't very compatible with the way these work in IFC, where each axis is an independent object, grouped under an IfcGrid object that defines which ones are in the X, Y and Z directions. The IFC importer and exporters of FreeCAD now support all this transparently. In FreeCAD, axes can now be only one axis, so IFC grids can be imported as they are (several independent axes inside one grid/axes system), and on export, FreeCAD systems made of several axes will simply be decomposed into their individual axes.
This is not a very good title for this feature, but it sounded powerful Basically this is something that Revit does, that is fully supported by the IFC format. When you have two objects that share, for example, a same point (0,0,0) or a same colour, or a same property (Height = 3m), this information is stored only one in the IFC file, and used everywhere it is needed. This results in drastic file size reduction (30 or 40% everywhere I tested) because in IFC there are a LOT of those simple, basic pieces of information, but makes the file more annoying to read by human eyes, because if you are reading about an object at line 3500, you might need to scroll all the way up to line 15 to know the position of the object, and then half-way back at line 1500 to know its colour.
So this feature is now enabled by default, because in most cases you will want that compression, but can be unchecked in IFC preferences if you need a more human-readable file.
Not every IFC information can be compressed/reused that way at the moment, I just implemented some of the most common ones, but the list is easy to extend.
This is coming from an old dicussion we had with Ryan Schultz and Jon Mirtschin, about how to store and retrieve parametric profiles in IFC. The idea is that several objects can be based on a same profile, a very simple way to convey some "model intelligence" inside an IFC file. You modify the profile, all objects based on it change.
It turns out the IFC format supports that in a pretty simple way, very similar to the previous topic here above, you simply use the same IFC profile entity in different extruded objects. So the IFC importer now implements this, when different FreeCAD objects are extrusions of a same 2D object, it will be saved that way in IFC, and restored that way too when reading the file back.
So with all of the above we can now begin to get pretty accurate "roundtrips" when working with IFC files in FreeCAD. That is, the file contents you get when opening an IFC file you just exported are 100% identical with the original file.
Of course the concept of 100% equality is debatable, you WILL find something that is different from the original file, that is inevitable due to the complexity of the IFC format. But my idea is that we can settle on a general agreement over what reasonably needs to be there in order for us to consider it identical. I would say basically the model tree must be identical, the geometry of all objects must be identical, and all BIM-related properties of all objects must be there and contain identical values.
I think in many cases we have that now fully working in FreeCAD. I'm proud to say that you won't find that in many other BIM aps out there, even the big players
A very simple addition, when an IFC extruded object is imported into FreeCAD, if possible (ie. it is planar and doesn't contain curves), the base profile is now created as a Draft Wire, making it easier to edit.
It's a very small and simple change, but I think we can go a long way like this. "IFC doesn't contain model intelligence", you will often hear hard-core supporters - or vendors - of a certain well-known BIM platform say. But if you think of what makes this intelligence, or in other words what is it really that you do when working with said platform, I think 95% of it are simple things, the ability to click an object and change its extrusion length, duplicate it but still be able to edit a common property of both, etc. All this is well supported in IFC, and can probably be recovered and used in FreeCAD with pretty little changes like this, and we'll be able to make IFC model much more editable.
Another very simple change: Until now, when importing IFC objects that were extrusions, a 2D profile object was created, then a Part Extrusion, then this was encapsulated inside an Arch/BIM object with the correct IFC type. Now, for Arch objects that can create an extrusion themselves (Walls and Structures, basically), the intermediate step is skipped, and the final object is using the profile directly, making the whole model tree a bit thinner.
The progress bar of the IFC importer never worked well, because it was interrupted and reset all the time by the shape reader (which "stole" the progress bar). The shape reader can now run silently, and doesn't perturb us anymore, so the progress bar displayed during IFC import show realistic progress and remaining time estimation. Plus, its abort mechanism is now functioning, and you can abort the import anytime by pressing the Escape key.
For IFC export, the process is so fast that I think we don't need a progress bar at the moment
We had some discussions about materials recently, and, since they are used everywhere in BIM, I thought they could be a good way to handle these characteristics and properties that you want to give to several objects at once. In fact, IFC doesn't give you much option to give extra properties to materials, you have to give these properties to each object that uses the material. But we can do better in FreeCAD, and allow materials to have any number of custom properties (that is implemented already). So materials become a kind of "host" for these properties, and on IFC import/export there would be transferred to/from individual objects transparently.
But that means that if you have two objects made of concrete, but one of their "common" properties has a different value, you need two different concrete materials. This will quickly become annoying. So we need a system to be able to have one concrete material, but with sub-materials, which would change only one value, but keep all the others from their parent.
This system existed already in FreeCAD materials, and is now reflected in the tree. You just need to specify which other material is a parent of this one. There is still a lot to implement (additional properties, the ability to remove a value so it takes its parent's corresponding value, support all this in IFC etc), but I think we are on the right track to get an easy and flexible system that won't overcomplicate the model tree.
A simple addition to the ShapeBuilder tool, an option to build a Wire from a selected set of Edges. It doesn't need to be closed or planar.
A new series of American Wide Flange steel profiles (W profiles) was added to the Structure tool, and the profile object, that is used structural objects when based on a "built-in" profile, was also upgraded. It now uses an own icon, and it has gained an edit mode panel where you can change the profile definition.
At the moment you can only change to another profile of the same type (H, rectangular, etc...) because I am not sure it is a good idea to permit cross-type changes, model-wise (it will need another object, which as consequences on your whole model hierarchy), but we need to study that point further.
This is another rather simple to implement but major improvement. Classification systems are common since quite some time in the construction world. Basically instead of your own description like "concrete pavement tile for exterior use", you would use a number from a classification system that has an " 01 Exterior pavements" categories, with a subcategory " 03 tiles" with different categories for " 05 concrete", " 06 stone", etc. So your number would look like 01 03 05. You get the idea.
That way, you can give your file around, and there is a much higher chance that everything will be correctly understood, even by people in different countries, as the whole system can be faithfully translated. This is not used much for small projects of course, but think of stadiums being built in other countries, you might see the interest there can be in such systems.
There are many classification systems in use around the world already. Most of them proprietary unfortunately (you have to pay to obtain them), some open and free, and most countries are also developing their own which might or might not be compatible with others. In other words, this is a jungle
In FreeCAD, materials already had a "Standard Code" property, which can hold any text value. Now, all BIM/Arch objects also have a "Standard Code" property. The idea would still be to use materials for that, but you would be able to override the material code for any individual object.
Last month I stumbled on this repository made available by Graphisoft with many of the most used standards available as xml files (an open format). So now in the BIM workbench we have a Classification Manager tool, that is able to read these xml files, and set the Standard Code property of a material or BIM object with any its values.
So far this is not exported to IFC (I still need to understand better how it works) but we have a fairly decent classification system in FreeCAD already!
Note that these xml files are provided there by Graphisoft on their own good will. We cannot include these files in FreeCAD because they don't have any license allowing us to do so, so the responsibility to download and use them is yours (how to do it is explained when you open the Classification Manager in FreeCAD). They might change their system or simply remove those files anytime. Some of these, however, such as GuBIM, are open-source, and also provided on the website of their author. So it's important to keep fighting for open standards that we can really rely on on the long term.
Finally another small experiment: In the BIM workbench, there is one new tool beside the Move tool (which is the pain old Draft Move tool): A copy tool. It is simply the same Move tool, but with its "copy" option turned on by default. I think it is pretty handy, so you can start it by another shortcut (C,P instead or M,V) and perform a copy instead of a move. One click or key press less.
And another one, the Clone tool in the BIM workbench now works differently than the original Draft Clone tool: Immediately after creating the clone, the Move command is launched so it works more like in other applications: you select an object, press the clone button, and drop the clone at some other location (since you rarely want the clone to stay at the same place of its original).
I am not sure yet if these changes should go to Draft or not. Tell me what you think!
So that's it for this month, once again thanks a lot if you are supporting this effort, one step closer to our dream BIM application!
Time for a new update on the development of BIM tools for FreeCAD. There is some exciting new stuff, most of it are things that I've been working for some time, that are now ready. As always, a big thank you to everybody who helped me this month through Patreon or Liberapay! We are very close to meet our first goal on Patreon. We would actually already be there if we sum up both platofrms, so next month I'll lower the goal accordingly and declare it achieved and set everything up accordingly!
So here go the new stuff of this month:
This month's video is a presentation of the new BIM workbench, so in next videos we'll use it instead of Arch. As always, your comments are highly welcome (here or directly in youtube comments).
You will remember last time that I told you about the impressive series of FreeCAD-related videos made by Regis, you might also be interested in this other very nice series about BIM and open-source, with a very large part dedicated to FreeCAD, made by Nirbhay, another well-known member of the FreeCAD community. We begin to have pretty decent FreeCAD BIM learning material!
The BuildingPart object I have been working on during the last months is finally ready and is part of the Arch workbench already. It is meant to replace the Arch Floor tool. For the time being, the Floor button is still there in Arch, but it already produces a BuildingPart object with its IFC role set to "Building Storey".
The BuildingPart object is still based on a classical FreeCAD Group object. I played a lot with the idea of using an App::Part instead, because it looked interesting because of its ability to automatically move its contents when you move it, and also that you can make it "active" and automatically add contents to it.
However, I discovered that it was relatively easy to reimplement these two features in another object, and also met some particularities that made me decide against using the App::Part:
The App::Part only allows its children to be part of this App::Part. They cannot belong to any other. This, summed with another particularity, which is that all descendents of an App::Part also become its direct children, makes it impossible to use, for example, a same profile to build two columns placed in two different App::Parts, since the profile will become a direct child of the App::Part. This is not of big importance when designing, for example, mechanical parts, but is very common in BIM.
When you add objects to an App::Part, then move the App::Part, the Placements of the objects don't change. Only their visual appearance gets moved. So if you build a column on the ground floor, then move its containing App::Part 3 meters above, the internal coordinates of the column still indicate the ground floor. And when you remove the column from the App::Part, it pops back to its original location on the ground. This is all "fixable" of course, there are methods in place to obtain the "summed up" placement of the column + its App::Part, and you can add code when removing the column from its Part to deal with the change of location, but this all seemed to me like trying to patch up something that's not really made for that use case.
For part design workflows, this is exactly what you want: Draw your elements at (0,0), then add the to the Part, then move the Part around. If you remove elements from the Part, you want them back to (0,0). You want their internal coordinates to reflect that. In BIM workflows, I think we prefer all our elements to have real-world coordinates. Tell me in the comments if you have a different opinion!
So the BuildingPart is basically a Group, like the old Arch Floor. But with a lot of enhancements:
It can display a "mark" in the 3D view that shows the origin point and optionally the label and level (its z coordinate) . If you move the BuildingPart in Z direction, the level updates. You can give an artificial offset value, so for example if the offset value is 700, but your level is at z = 30, the displayed level will be 730. This is useful to work with geographic coordinates and elevations. You can also select the BuildingPart by its mark in the 3D view.
It can be made "active" by double-clicking it, like an App::Part. When a BuildingPart is active, all new objects will be added to it automatically, like the App Part or PartDesign Body.
When moved/rotated, all its children that either have no "Move With Host" property, or have it turned on, will move/rotate together.
When moving an object out of a BuildingPart, it will keep its current position, not "pop back" to its original position (different from App::Part)
It can be cloned. Internally, the BuildingPart stored a Shape, which is a compound of all its direct children. This shape is used by the clone, also keeping individual face colors. This shape is also stored on disk when saving the file, I think you'll be able to guess where we're heading for next
It can take any IFC type, like other Arch objects. The idea behind the BuildingPart is not only to serve as a Floor/Level/Storey, but to group BIM elements in any other possibly useful way in a replicatable manner. One obvious use would be to make a typical storey of a tower, then replicate it for the other floors, but we can also think of other replicatable things like a toilet stall, a wikihouse component, etc.
It can set the height of included walls and structures automatically. The Arch Floor could do that already. If a height value is set for a BuildingPart, any wall or structure inside it, that has its Height value set to zero, will adopt the BuildingPart height.
It defines a working plane automatically. When double-clicking a working plane, in the tree view or the BIM views manager, the working plane will be placed on the XY plane of the BuildingPart. Later on, I'll also implement the same functions that the Draft WP proxy has, which is to be also able to restore a view angle, and show/hide other objects.
So the idea here is that you would be able, for example, to double-click a BuildingPart which represents a level of a building, and set yourself automatically in top view above this level, hide all other levels, and set the working plane to the floor plane of this level, just like if you were working in a 2D plan. When deactivating that level, you would have everything turned back on, and pop back to the view you were at before activating.
But I found it safer to go step by step, and let people play a bit with the BuildingPart first, before implementing more stuff.
This is another big thing I have been working on for many months. It stayed a long time on hold because we were waiting for FreeCAD to reach a good Python3 compatibility. This is now done thanks to the hard work of several FreeCAD developers, specifically looo and Werner (and a bit of myself too). The issue there is that Blender only uses Python3 while FreeCAD was still not fully ported to it, but Python2 and 3 modules are incompatible with each other.
You can already use the importer, it is pretty stable already, but you'll need to get your hands on (or compile yourself) a version of FreeCAD compiled with the same Python version you use in Blender. The minor version number must match too, so if for example Blender uses 3.6.1, FreeCAD must use also 3.6 (the third digit can be different)
After that, it's just a matter of saving the code from the gist as a .py file (for example io_import_fcstd.py) and place it in Blender's addon folder, then enable it in Blender's addons preferences. If your Python3-compiled verision of FreeCAD is in an unusual location, you might also need to set its location in the addon's preferences.
This is all still a bit uncomfortable, but with time this will get addressed properly. The important part is that it already works pretty reliably.
You will then get a new option in Blender's File->Import menu to directly import a FreeCAD file. You can set a scaling factor between FreeCAD's internal unit (millimeter) and Blender (at the moment I set the default to 0.001) which will import as one Blender unit = 1 meter, and set a couple of other handy options.
The importer will at the moment only handle Part and Mesh-based objects. That is, basically, no texts and dimensions. Groups are also not yet supported, and either are clones (each comes as a separate object). But the geometry comes pretty accurately. Curved faces will be triangulated, flat faces imported as ngons. Materials are also correctly handled and attributed, and materials have both Blender internal settings and cycle nodes (I stil need to implement a proper cycles transparency node for transparent materials).
There is also one feature that will be specially interesting in viz work: The ability to replace objects with similar names. FreeCAD holds an internal, unique name for each object. Blender doesn't have that feature, but has something similar, where an object holds a mesh that can have a different name.
So what happens now is that the Blender object name is set to the FreeCAD object label, while the mesh name takes the FreeCAD object unique name. This allows to match each FreeCAD object with a corresponding, unique Blender object. If you enable the appropriate option when importing a FreeCAD file, if a corresponding object is found in Blender, only its mesh will be updated, the current Blender materials will be kept (and reattributed per-face).
This allows you to work on a FreeCAD model, import it in Blender, makes some changes to materials in Blender, setup your scene, add more objects, etc... Then reimport your FreeCAD files, and keep the object positions and materials that you changed in Blender.
This is a small change, but that will be great for backwards and forwards compatibiliy between different versions of FreeCAD. Basically objects loaded from an older file will now have their properties updated when loaded in a newer version of FreeCAD, so they'll be albe to use all the new features.
In the same way, objects loaded from a file made with a newer version will be able to "auto-fix" to work with this version.
Walls can already use all kinds of 2D objects as their baseline, but by default, new walls will have their base line created as a sketch. This is not always the most interesting thing to do, in many cases a simple Draft line is more efficient, as it can be edited by Draft tools like Edit or Stretch, which support snapping. So now there is a preference option to make new walls create a Draft line instead of a sketch.
This is still a work in progress and not ready for merging, but it's an interesting subject anyway. In IFC, objects can have custom properties. These properties can be grouped into property sets. At the moment, when reading an IFC file, FreeCAD will read and store all properties of an object, but not the property sets they belong to. So when reexporting the file, properties will loose their property set information.
I tried for some time a complicated way to handle these property sets, but recently found a much easier (json-based) way which will also serve for other things (speckle?). So this part can almost be considered as solved.
There is another interesting feature available in the IFC specification, which are pre-made, or standardized property sets. These define, for example, some common properties for walls, that all walls should have. Same for almost all IFC entity types.
These standard property sets are not mandatory. In fact I have very rarely seen an IFC file that uses them. But using them in FreeCAD would be a very good way to create more standardized IFC files. These property sets are not defined in the IFC schema, so I already coded a small utility to download these definitions from the net, and pack them in an xml file. This xml file will be bundled with FreeCAD, and the IFC property editor I'm working on will be able to use it, so we can easily, for example, add common property sets to our objects.
So far, once a window was created, it was possible to change its width and height via its properties editor. To change more advanced details such as frame thickness, you had to edit the window components parameters or the base sketch directly, which was tedious. Now, windows have two new properties: Frame and Offset. As with width and height, changing the frame or offset values will change the window accordingly.
If you wish to use this in your custom windows, it uses the same system as width and height: In the base sketch, if you define two length constraints (horizontal or vertical) and name them "Height" and "Width", they will be controlled by the host window's "height" and "width" properties. To have other length constraints controlled by the "Frame" property, just include "Frame" in their name, for example Frame04.
In the window parameters editor, you now have two new checkboxes to make use of the offset and frame properties.
This is not the end of the path of course, but slowly we'll get there to a friendlier window object...
By right-clicking a material group, you now have an option to merge duplicate materials. That is, materials with a same name but with 3 digits at the end. For example Concrete and Concrete001 will be merged. Any object that used Concrete001 will be changed to use Concrete instead. Very useful when importing susequent versions of IFC files.
Now this dialog from the BIM Workbench also allows you to check what object uses what material, and make sure you have everything properly configured before exporting to IFC.
Time for a new update on BIM development in FreeCAD. Since last month saw the release of version 0.17, we now have our hands free to start working again on new features! There is quite a lot of new stuff this month, as usual now, spread between the Arch and BIM workbenches. For who didn't see the previous posts where I explained the idea, I am now basically more and more trying to split BIM stuff between what goes into the Arch module, which is included into the FreeCAD source code, which will contain all the "hard-core" stuff (object definitions) and will probably grow more and more deprecated as a workbench, and the BIM workbench, which will contain all the UI (User Interface) work.
This split has many advantages, mainly 1) to make it easier for other people to contribute to BIM development without the need to dig into the FreeCAD source code, and 2) be easier to experiment, outside of the FreeCAD source code itself.
For the FreeCAD user, these distinctions don't really matter, you should basically now use the BIM workbench, and everything from Arch will be there too.
As always, the time I can spend on FreeCAD is a diret consequence of the help I receive from many of you on Patreon or LiberaPay. Thanks a million to everybody who is contributing already, and if you aren't, what about joining the family? Also, helping me with a couple of bucks is just one way to help. Python coding is easy, and the Arch/BIM split makes it even easier to get into it. There is a forum thread dedicated to BIM development. All the help is welcome!
Also: Some pleasant things can happen while you work with FreeCAD...
This month, the video is about windows. Hope you'll like!
This is an item that was annoying me since a long time and has now gained a good update. Panels were already able to be displayed as a flat plate, or as a corrugated panel. But the system was very slow, because a small curve section was generated, then copied over, then extruded, then unioned to the next curve section, resulting in a lot of boolean operations, which, in any CAD system, are an expensive operation that you as a developer must try to use as little as possible.
Besides, that system didn't do a very good job with multilayer panels, and couldn't have a different bottom face, which is both common in sandwich panels and convenient when you don't need to show the curves on the bottom face.
Both these issues are now solved. Now, internally, the code generates one big profile for the whole panel, which is then extruded and doesn't need to be unioned anymore, which makes it way faster to calculate. Additionally, there is one more wave type ("spike"), and you can make the bottom face flat.
This is another long-time request, it is the ability to "draw" beams directly in the 3D view, like walls. So now, when pressing the Structure button, you have an option to switch to that beam drawing mode, instead of just placing an element. I'm not too happy about that interface yet, it seems annoying to me to have to click that control to switch modes, but it is more important to have the tool to work well first, sooner or later an idea will arise to make the UI workflow better.
Another related idea I am always toying with, is if it wouldn't be more interesting to split the "internal" functionality offered by the different BIM tools into separate toolbar buttons, in other words, less complex tools, more toolbar buttons. For example, instead of one Window button that has 6 window presets, have 6 window buttons, each running a different preset. I have no clear idea about that yet, I am not convinced that it is an interesting trade-off, it seems to me it's only moving the compexity to another place...
More thinking is needed there
The Draft Scale tool, when I coded it, was very remotely molded upon the AutoCAD scale tool. One feature I used a lot in AutoCAD was reference scaling. You take one distance, and you say "I want this distance to become that other distance". But this made the Draft Scale tool horribly clumsy to use, specially with 3D objects. In fact, nobody was using it and people were using the Clone tool, which allows to set a scaling factor in an easy and intuitive way like (2.0, 2.0, 2.0) for scale factors on the X, Y and Z axes.
So a while ago I remolded the Scale tool to have the same, simple system. Now you choose your objects, set the scale factor, and choose if the result is a Clone object, or if the original objects must be modified directly (this doesn't work for all object types ATM).
Now we finally have the best of both worlds: The scale tool still works the simple, reliable way, but you can also define the scaling ratio by picking a reference distance and a target distance in the 3D view. The scale factor will be the ratio between these two distances.
This is a very simple change, but that open large possibilities. All Arch objects already had a "Role" property that could be used to fine-tune the use of each object, for example a Structure could have its Role set as Beam, Column, Slab, etc.. But this was basically not used anywhere, except when exporting to IFC. And each Arch object type has its specific list of possible roles.
Now the Role property has been renamed to IfcRole (this is part of a larger effort I am beginning, to group all Ifc-related properties into some specific group), and it can take any IfcProduct role. The IfcProduct is the master class of all "physical" (and a couple of non-physical ones too) elements found in a building, such as column, wall, door, etc (full list here).
In other words, from now on, any Arch object (or, in fact, any FreeCAD object, as you can just encapsulate it in a Component) can be exported to any IFC type. This is something surprisingly simple, offered by very simple apps like Sketchup, but that is curiously hard to do in many BIM applications...
The Draft Text tool, until now, was using a basic App::Annotation object, which was not very handy to use and lacked a couple of features. Now the tool is using its own python object, which is much more comfortable to work with. The two immediate results is that the text object now has a placement, so it can be rotated and placed in any custom position you may want, and it is now a common scene node, so it won't appear through other objects anymore, like the old object did.
From python, you can use Draft.convertDraftTexts() to convert old-style Draft texts in a document to the new format.
A new "manager" tool is now functional in the BIM workbench: The IFC elements manager. What it does is basically shows you all the Arch objects of your document, together with their IFC role. Here you can easily manage all these roles individually or several at once, and make sure everything will export as you want. That screen also allows you to rename objects.
Accurate window placement has always been a pain in FreeCAD. So much that me and others ended up advising to disable snapping when placing windows, then reenable it and move the window to its correct position. Hopefully, thanks to a very simple change, this is history.
Now, when placing a window, when hovering with the mouse over a face, the window will take and keep the orientation of that face, until you hover on another face. This allows to both align a window to a face, and take advantage of the full snapping tools, for example to place a window on an edge or a vertex, like one would expect.
This is not yet 100% perfect, one would still like to be able to place a window at a certain position relatively to another element, but this is a larger question that relates to other elements too like walls or columns. In any case it is already a good step forward, now the window tool finally works properly.
It can happen, when working with Draft Wires,that the wire is not exactly flat. Nothing in FreeCAD or OpenCasCade prevents that. But it might not be usable to form a flat face anymore. This is specially often the case with geometry that you import from other applications, where rounding could occur. The DraftGeomUtils module already had a flattenWire() function that would project all the points of the wire onto its median plane. Now, a right-click context menu option has been added to Draft Wires to perform that action, so it has become a piece of cake to fix those problems.
This is only an experiment so far.
It is a recurrent request from new FreeCAD users coming from AutoCAD: They want an AutoCAD command line. I don't like the idea, basically because it conflicts with a shortcut-based UI like FreeCAD has. If you look at how other apps with both shortcut-based UIs and command line do, for example QCAD or LibreCAD, it doesn't work really well. At some point the app needs to decide if the L key you pressed is a shortcut or the first letter of a command line command. You need either to move your mouse over the command window, or press SPACE to "switch" to command-line mode, which kills a bit the efficiency of it all.
But I have this idea that it would be possible to "fake" the system, and offer the user not a "real" command-line system, but a keyboard-only workflow with the same speed and easiness of the famous AutoCAD command line. To make it simple, pressing the keys would still trigger shortcuts and UI actions, but you would get a "feedback" of it in the output window of FreeCAD, making it look exactly as if you were typing stuff in it.
So far two Draft tools have been adapted to that system, as a proof of concept: Line and Wire. There are a couple of improvements to bring to the console, like the possibility to show stuff in bold font, or maybe enable clickable links, I will look at that later on. But I am not convinced yet if this is usful at all. After all, it is totally possible to pilot most of Draft and Arch commands via keyboard only since a long time...
Please test and give your opinion! There is a forum thread dedicated to this topic.
The Multimaterial dialog already allowed you to define different material layers, to be used by walls, panels, and windows. In the case of windows, it was a bit clumsy to use, you had to create one material layer for each window component. So if you had 20 panels in a window, you needed 20 material layers too. And take care that it uses the same name.
Now instead of a layer name in the Multimaterial editor, you can also click the drop-down arrow and select a window component type. That material layer will then apply to all window components of that type. So you now just need to create a Multimaterial with one material as "Frame" and another as "Glass panel", apply it to all your windows, and you are done.
Another new widget is available in the BIM workbench: A Views manager, that will open inside your Combo View. It is basically a small widow that will list all the Draft WorkingPlane Proxies of your document. You often need to double-click them to set the corresponding view, but they are often buried deep down your model tree. Now they can always be conveniently be available there, no more endless scrolling!
Later on, as the BuildingPart object evolves and can also define a view, it will also appear in that view.
Finally, this is not mine but the result of the hard work of Wandererfan, the TechDraw master, and of huge importance to Arch/BIM users, TechDraw pages can now be exported to DXF. Every single TechDraw feature is not 100% supported yet, but Wandererfan is working amazingly fast on this, and it is very usable already. The result is a very clean and compact DXF file.
If you haven't tried to use TechDraw for Arch/BIM work yet, give it a try, it is still a bit slow for production use, but most of the needed features are there already, no doubt we are getting very close!
That's it for this month, thanks for reading, thanks for the support, more to come next month, don't forget, if you are new to these pages, I can go faster with your support!
This is time for a new report on FreeCAD development, particularly the development of BIM tools. To resume the affair for who is new to this column, I recently started to "divide" the development of BIM tools in FreeCAD between the original Arch, which is included in FreeCAD itself, and the new BIM workbench, which is a plug-in, and is now easily installable right from within FreeCAD, under menu Tools -> Addons manager. The idea is to keep the "technical" side inside the Arch module of FreeCAD, and concentrate, in the BIM workbench, on workflow and interface. This makes it clearer for me, allows for more experimentation without touching the "core" stuff (and therefore keep existing users happy), and also makes it easier for other people to contribute, since there is much less code to deal with in the BIM workbench, and you don't need to know much about FreeCAD internals, nor need to compile anything.
As you certainly know already, this month we released version 0.,17 of FreeCAD, I wrote about it in another article. This was a long-awaited one, and a lot of things were kept back to make sure we fixed as many bugs as possible and delivered a reasonably clean and stable version. Now that this is done, experimentation and new features can start again!
As always, all this is possible because many of you are sponsoring me on Patreon or Liberapay so I can steadily and increasingly spend some working hours on FreeCAD every month. Thanks once again for the wonderful support, together we're firmly on the way to a fully functional and professional-grade open-source BIM tool. I sincerely believe there is not much missing. If you would like to help me, head to one of the two crowdfunding platform, any help is welcome! Also, we now have a Bountysource account for the FreeCAD project (not just me), although at the moment the money received has not been used for anything yet.
So this month's video will be about generic Arch/BIM objects, and how to get started with BIM modelling.
One feature I had been working on before the release already, that was ready and just waiting to be merged is a wall blocks feature. Now, walls can be made to display as blocks instead of the normal, solid wall. You can specify the size of each block, the size of the joints, and an offset for the first and second rows. In blocks mode, the wall will also calculate how many entire and how many broken blocks it contains.
So far this works only for walls based on a single line or on a wire. In case of wires, it can give wrong situations at corners, like blocks not properly cut like in real life. Walls based on faces or on solids cannot display blocks yet. Subtractions are supported, but additions not. This all will be addressed in due time.
At least for simple wall cases, you can now do pretty accurate wall design based on concrete blocks or brick size, check interferences, easily get the number of blocks, etc. This is only a start of course, but I think it will allow well to see if this goes in the right direction or not.
What I spent most of this month working on is unfortunately half a failure. But we shouldn't consider failures as less important than successes, they teach us a lot and are fundamental to get it right next time. Besides, as we are not totally stupid, we made things such as we can still reuse most of the stuff developed, so it is only a partial failure
Basically my idea was:
1) to make the Arch Floor object a bit more generic, allowing you to group BIM objects in different ways than just stacking building storeys. For example a lift, which traverses a whole building vertically, cannot be inside one particular storey. Or you must cut it in little pieces, which is illogical. Resuming, we need less restrictive ways to group building objects. There was also a discussion about what name such an object should have, right now my favorite is BuildingPart, as it says pretty clearly what that object is, and is semantically in sync with the general FreeCAD naming of things, specially given point 2 below.
2) Instead of being just a group, I wanted to make this new object based on the new App Part feature of FreeCAD, which is the base used in the PartDesign Body. The main advantage is that it is a mix between a group and a shape. It has a placement, that defines a "local coordinate system". The objects that you place inside such an object have their coordinates not anymore defined relative to the global (0,0,0) point, but to the placement of their host Part. So you can move and manipulate a Part like if it was a single object. This looked (and still looks) perfect for our BuildingPart. This also links to another idea we raised with Ryan some time ago, that we should be able to design buildings much more based on components, and that component should be treated like any other BIM object (or family in revitspeak), you should be able to make other objects based on it, etc. And it should be whatever you need it to be: A shipping container, a restroom stall, a lift machine, etc...
So far so good, The main problem is basically that the App Part is too restrictive, it doesn't allow a same object to be in several Parts, and doesn't allow cross-Part links, both things that are used pretty often in BIM models. So in the next month I'm going to look at how to solve that, probably by "forking" the App Part (which is fortunately an extension now, so in theory it shouldn't be hard) into a less restrictive version that we can use in our case.
But all the other stuff I developed for the BuildingPart object is still there (you can test it by using this branch or looking at this commit and will be easy to adapt to any solution we come up with, so this is not lost work.
Basically, the BuildingPart can show an "origin" mark, so you know where its (0,0,0) or "insertion" or "pivot" point is, it can display a level mark, it can be a clone of another BuildingPart, it can act as a floor/storey, or as a gathering of Arch Spaces, in which case it will compute areas (and later on other properties of spaces) and of course it has a Height property that can automatically set the heights of included walls and structures. Within the ArchFloor module there is also a python function to easily convert existing Floor objects to BuildingParts.
Other ideas I have planned is to make it behave as a WorkingPlane Proxy, so you can double-click it and automatically set the view and working plane and display of other BuildingParts according to it, and also make it automatically create a view in TechDraw, not sure yet if by creating an Arch SectionPlane automatically, or maybe try to using TechDraw views directly (and therefore stop relying on the ArchView), which is something else I want to experiment with anyway.
I think that will give us a pretty cool tool to work with, I dare to say better than many commercial counterparts I wished I had it ready this month, but it shouldn't take long.
Deleting things forever is something we don't want to do with our computer files, why do we need to do it in CAD/BIM apps? So now, in the BIM workbench, besides the standard "Delete" option, we also have a "Move to Trash" option, which will simply move selected objects to a "Trash" group (that will be created if not existing, you can rename and move if you want) and turn them off. There is no "Restore" option, I don't think that would be very practical because it might not be able to recreate the original links without destroying something, so I thought it safer to just let the user restore objects manually if needed, for now.
Anyway, since I implemented it, I find myself using it all the time (you never know if you won't need that window again later on), I'm curious to hear about you.
I added a new Window type too, which is a simple 4-pane sliding window. We use these a lot here in Brazil. I think we should add more prest types here... Remembering, of course, that the idea is not to have all possible window types listed here (that's the job of the library, see below), but let's say very common, or "archetype" window types. Any suggestion?
If you have the Parts Library installed (easy to install via the addons manager), then window tool will now include all the doors and windows found in the library (inside Architectural Parts/Doors and Architectural Parts/Windows). You might find that some of these library objects don't respect all the conventions, for example their width doesn't update correctly, but these are easy fixes that we must add to the library objects at some point. The fact is, it becomes easier than ever to add new window and door presets, without a single line of code.
This year, like the last two years, FreeCAD will be part of the Google Summer of Code program, together with our other open-source CAD frends BRL-CAD (who are the brain behind the whole affair), LibreCAD, StepCODE, OpenSCAD, LinuxCNC and Slic3r. This year, we have one one student, Kurt, who is a well-known community member and already participated last year. His project this year is about implementing and bettering configuration and packaging management in FreeCAD. This is a rather generic project, but that is a good thing because it is also flexible and adaptable, and can make a big difference in the way we manage to make releases, which, you will certainly agree, will be highly welcome.
When the coding period starts, Kurt's project will mostly "happen" on the forum, which is now the standard way we do GSOC projects at FreeCAD. I'll announce it here too, so stay tuned to watch him closely! As he is the only student, all eyes will be on him!
In case you are wondering like me, all our other CAD friends also had few students this year, and generally many other projects too. Maybe anything changed at Google? In any case, let's not depend too much on Google, and be happy with whatever they want to sponsor. I'm sure we'll have a great GSOC experience this year again.
In case you are wondering, the above image is the world-famous Google Summer Of Code Chocolate Table, that gets set up during the mentors meeting, of which I have been lucky to participate last year. Every participant must bring chocolate from her/his country, they all go on that table, and you can eat as much as you want of it during the week-end. Believe me, even with the best efforts, we were hardly able to eat half of it...
Last weekend I was giving a FreeCAD workshop at the FLISOL, and, although women's part increases in such events (more or less one third of participants and speakers were women, my own estimation) I read some tweets afterwards complaining about some gender discrimination and argueing. This reminded me that we're doing pretty bad at FreeCAD, all developers are men, sometimes a woman appears on the forum, and, although I don't think there were any gender discrimination, for some reason none of them stayed until now. I would very much like that to change, I'm not sure how yet but I'll try to come up with ideas... If you are a woman and know (or would learn) some python and would like to get into FreeCAD, please, we need you!
Finally, after two years of intense work, the FreeCAD community is happy and proud to announce the release 0.17 of FreeCAD. You can grab it at the usual places, either via the Downloads page or directly via the github release page. There are installers for Windows and Mac, and an AppImage for Linux. Our Ubuntu Stable PPA is also updated with the new version.
The list of changes and new features is big. Check the Release notes for a full dose. I will resume things a bit here, and, for once, I won't talk about BIM or Arch but about other workbenches. There is also a video showing the main highlights on the forum.
Basically the most fundamental change, and also the main reason why this release took so long to come, is that the PartDesign workbench has been drastically reworked, in preparation for upcoming Assembly system. As FreeCAD's father Jürgen once explained, the PartDesign workbench suffered from several flaws that prevented to implement Assemblies the way it needed to be. Several FreeCAD developers took upon themselves to dig into the already quite large PartDesign code and implement the necessary changes. This obviously caused a lot of new bugs, and it took a long time to bring it to a state where we feel it is suficently stable and solid for everybody to use.
The principal change is that now everything you do happens inside a Body. The Body is a hybrid between a container and a shape. It also contains many helpers such as planes or axes that you can use in different operations. The ultimate goal is that the body is what will allow for one FreeCAD file to be a part of an assembly in another file.
You might feel a bit lost when starting to use the new PartDesign, but fear not, after you pass through these new things, everything still works pretty much like before. And everybody who went through it agrees that it is much better than before.
The Path workbench also got wildly extended. From its embrionary state in FreeCAD 0.16, it has now evolved into an increasingly impressive CAM platform. Yo have now a wide range of tools to perform CNC operations, several filling algorithms to fill areas, fin-tuning and gcode inspection tools and a voxel-based simulation tool like in your favorite commercial CAM software.
There is a long path to be done for Path yet, sorry about the bad joke, but it is no more an infant, it is now a real CAM tool, that can do the whole thing from the 3D model to the machining.
TechDraw is the new Drawing. It is another of these workbenches that has been carried successively by several developers, and on the way has gained impressive features. It still accepts the same templates as Drawing, has much finer control over aspect and linestyle than Drawing had, plus a load of new features: Most of the dimensionning tools of Drawing Dimensioning, hatching (both geometry-based and image-based), support of bitmap images, etc. But I kept the best for the end: The dimensions you add in TechDraw are parametric. You update the model, the TechDraw view updates too, and all the dimensions attached to it.
Finally, and not the least important, the number of new workbenches being developed outside of the FreeCAD official source code is growing frenetically and exponentially. FreeCAD 0.17 now features an easy Addon installer, that allows you to install any (or all, why not) of these juicy workbenches with a mouse click right from inside FreeCAD.
Go get it, it's free!
I hope you noticed the small improvement in the title... It's not that I became suddenly a big fan of the "BIM" term, but really the word "Arch" is too narrow in todays construction field. Besides, as I explained last month, I am now starting to split the BIM stuff in FreeCAD in two parts: One is the Arch workbench that you already know, that stays integrated to FreeCAD, and that will carry all the "dirty stuff" (objects, tools, base functionality), and the other is the new BIM workbench which will contain only UI elements (wizards, managers, etc). Starting from FreeCAD v0.17, installing the BIM workbench is very easy with the addon manager.
Talking about v0.17, the release is a bit late (we wanted to do it before end of February), but bugs kept coming in, and we are fixing them all! So it got a bit delayed, but we are finally there. In the coming days we should have it released. I'm adding he latest translations from crowdin as we speak. You can already check what's new in the 0.17 release notes.
As always, thanks to everybody who is contributing to my crowdfunding campaign on Patreon or Liberapay. I am now more and more able to regularly dedicate a good portion of working hours per week to FreeCAD, that I try to balance between developing new stuff, fixing bugs, and do all kinds of maintenance tasks. The main focus, of course, is still to push BIM development forward. As soon as the 0.17 release is out, I have already a few features that are ready to merge into the main FreeCAD source code. More on this next month!
Last month, I posted a first video introducing the Arch workbench. I made a new one this month, showing how to set things up and get started to do BIM with FreeCAD. Thanks for the many of you who left comments under the first video, this gives a lot of further ideas. Please keep going on!
One important thing I forgot to mention last time: There is no need to wait for me to make all these videos (Anyway, the idea is not to make a full course, rather toillustrate the concepts of how things work). There is already a lot of material on the internet, and specially the very impressive series of tutorials by Regis about FreeCAD and BIM, and other ways to do architecture and BIM work with free software like Blender. What you have there is a more than complete course of FreeCAD BIM, and for free... Amazing work Regis!
So, here is this month's video. Hope you'll like, please keep commenting!
While FreeCAD was in "feature freeze" mode this month, the new BIM workbench, being developed outside of the main FreeCAD source code, allowed me to keep working on some cool features there. There is not much of a revolution there yet, but I believe this is going in the right direction. What we have so far is this (keep in mind that all this is experimental, it can change in the future):
This screen is shown to you the first time that you switch to the BIM workbench. The idea is to tell you, in a few words, "what to do next", and offer you to follow a tutorial (yet to be written). You can still show that window again anytime from menu Help -> Show welcome screen. I must think a bit more about the tutorial but the idea is to do like in games, where when you take the tutorial, you are usually playing the first chapter of the game, but with an assistance that tells you what to do.
If you pess OK, you go to the next step, which is:
The Preferences system of FreeCAD is becoming huge and complex. And some preferences get loaded only when the corresponding workbench is loaded. It is very hard for a newcomer to find what options he/she needs to set. So we have here a summarized and unified set of the most important preferences for BIM. Some are grouped, for example when you set your preferred text font, it will set all the places in the preferences where a text font can be configured, for example in Draft, Arch and TechDraw.
This is a new dialog that allows you to quickly setup a BIM project. It will optionally create a new document, create a Site, a Building and a couple of Axes, Levels (the Floor object in Arch will soon be renamed to something less ambiguous, my favorite at the moment is "Level", although I would like to find a word that doesn't necessarily suggests that things must stack on top of each other, maybe Zone, or Cell?) and a rectangular outline of the building.
With that done, you have something to start building walls on. What you fill in that screen can be saved as a preset, so you can have several building templates around. The axes and outiline are linked, so moving the outline around will move the axes together, a good example of the powerful expression system of FreeCAD (check the Placement property of the axes).
This is a simple interface to manage the different levels (Floors currently) of your document. At the moment you can only do basic things such as changing their properties and add or remove levels, but the intent here is to add more dependent functionality to levels, like WP proxies, which would allow neat things like, upon double-clicking a level, hide all other levels, and set you in a configured view (for example a top view above the level plan). This would mimmick quite well how other BIM apps work, where you can isolate a particular level to only work in it.
Another idea I have is to have a section plane automatically associated with a level, and make it (optionally of course) cut the view above it when you select the level
This is a simple screen that allows you to manage all the windows and doors of your project. So far it doesn't do much more than list all windows and doors, and allow to group them by type or dimensions. But the idea of this screen is basically just that, allow you to have a clear view of all the windows and doors, see what is missing or wrong, and in the future, or course, allow you to export this to a spreadsheet.
If all this thrills you, I would encourage you to help me. Of course an easy way is to contribute to my Patreon or Librepay accounts, but I would also encourage you to help in other forms. There is more in several heads than in a single one, my grandmother used to say...
We have a forum thread where you can contribute to the discussion, but working directly with the source code is not hard. In a next report I will explain better how it is organized, but you have basically, for each tool, an .ui file which is the design of the dialog, made with QtDesigner (which is part of the QtCreator suite), and a corresponding .py file that has the code that runs "behind" the .ui dialog (ie. what happens when you click such button, or click on such item, etc..)
QtCreator is a complex application, but the QtDesigner inside is very simple to use, it is very easy to constructs dialog boxes with it. And when designing User Interfaces, a great deal of effort goes into thinking and constructing intuitive dialogs. This effort is often bigger than writing the code behind. So playing with these dialgos and proposing ideas with it would be helping the project tremedously, even if the code is to be written by someone else later on.
But the python code behind these BIM dialogs is not too complex either, have a look
(image swallowed from the speckle.works blog)
Thanks to Ryan I discovered Speckle last month and got fascinated. It is a free & open-source 3D model server, a bit like BimServer, but, instead of being based on IFC, it is built for parametric 3D models. It is basically everything I wished BIMServer would be: It speaks json, a widely used transfer protocol, and it is totally system-agnostic. In it, you have collections of objects (streams), each object being a collection of properties, and that's it. The parametric "engine", that knows what to do with these, stays in the original application.
So for example, a cube would have a name, a text describing its type ("cube", for example), and length, width and height properties. That's all that would get stored on the Speckle server. But FreeCAD would know exactly what to do with such info. And so would Rhino, Blender and anything you would plug Speckle into. It is particularly well adapted to those so-called "visual programming" interface such as Grasshopper or Dynamo, of course, but a FreeCAD model could also be transferred to/from a Speckle model with almost 1:1 compatibility. This is something I experimented in IFC a while ago, that can be carried on here way further.
So I started working on a Speckle interface for FreeCAD (probably will be part of the WebTools workbench). I believe this can yield wild results...
That's it for this month, thanks again to everybody for your support, see you next month!
Time for our monthly development update. This month again, no new feature has landed in the FreeCAD codebase, because we are still in "feature freeze mode", which means no new feature (that might break something) can be added to the FreeCAD source code, only bug fixes.
We hoped to release version 0.17 in February, but, as usual, this has been delayed a bit. There are still some bugs remaining, and there is also some documentation missing. The whole community is working hard to fix this, so it won't take long and we will have a release with the documentation in a very good state, much better than it has ever been before.
Translations are also basically done, we have 16 languages over 90% translated and 5 100% done, which is more than we ever had in the past. It is still time to help us!
I have myself been busy touching all these areas, and also done more bugfixing in Arch and Draft. I think these two workbenches are getting pretty robust now, which is basically the level I wanted to reach at this point. My intention after the release is not to touch these features too much anymore, and concentrate on building better UI tools to manipulate them.
By the way, TechDraw is becoming more and more useful for BIM work, hopefully we will soon be able to retire the old section planes system for something much better... It is still a bit slow and not totally adapted to architecture/BIM (you must produce the elevation before the plan, for example), but those are all solvable issues. The results are very nice already...
As promised last month, I tried to record a video this time. Let me know what you think of it, sorry about the non-professional quality, I'm not a professional youtuber yet I propose to do more later on, about specific parts of the Arch workbench.
Since I was in Europe last month to attend FOSDEM (read about it in my previous post, and the video of my talk is here), I also took the opportunity to visit the Pionierswoning (Pioneers housing), another WikiHouse-based construction that happened in the same time as the WikiLab (We even had a dummy "competition" to see who would finish first) and talk with Vincent and Ivar who are behind the project.
This was a very, very interesting visit. The Pionierswoning is part of a bigger experience in Almere, to build experimental tiny houses. The number of single-person houses is climbing strongly in the Netherlands, and this becomes a very real question to solve. On the same site as the Pionierswoning are 5 or 6 other tiny houses made for one person, all of them with different approaches and solutions, definitely a very interesting place to visit if you are in the area (it's only a 15 minutes train ride from Amsterdam).
The Pionierswoning itself is definitely a very interesting achievement. Contrarily to our WikiLab, where we tried to be didactical and keep the wooden construction as apparent as possible, the aim of the Pionierswoning was opposite, they try to show that it could make a house like any other. As a result, you don't see the WikiHouse structure anymore. Most solutions that they adopted as finishings, both inside and outside, follow the same direction. It is amazing to see two projects built basically on the same structure, give such different results.
And I must say, the finishings they did are gorgeous. While on the WikiLab we had principally to deal with very short money (the whole construction cost no more than 15000 EUR / 20000 USD), which led to drastically simple solutions, they made a point to demonstrate the validity of the WikiHouse technology for "day-to-day" construction.
The other interesting thing is that both them and us came to the same conclusions afterwards: If the built result is not particularily impressive, in either cases, it is the process that is potentially revolutionary. The fact that it is possible for non professional people to build their own house, without any super-human skills or equipment.
All of us also had to deal with a construction that had phases dones by volunteers and other phases done by professional builders, and we all think much more should have been done by the volunteers, and things should be organized in a manner that lets the volunteers finish the construction. It was very frustrating on both sides for the volunteers to participate to the building, feel all the excitment, only to have to leave the field at some point, to let the professional team finish the job.
This is an experiment I am currently working on, and that you can already test. It is basicalyl an effort to re-think the whole organization of BIM tools and workflow in FreeCAD, with the aim of making it easier to learn and use. The basic idea is not to modify any of the existing tools of FreeCAD, just gather them in a more intuitive way, and provide a couple of useful macros to glue it all.
If using FreeCAD 0.17, you can test it immediately by installing it from menu Tools->Addon Manager. Or manually from here
So this workbench is, at the moment, a collection of tools from several workbenches: Draft, Arch, Part, Flamingo and Fasteners. There will be more later on. On top of that, a simple "setup" screen that will set all the most common FreeCAD settings used for BIM, and later on a couple of interesting macros from the Macros repository.
As I often say in these reports, building User Interfaces for BIM or CAD work is a very complicated task. Simple tools, like Sketchup or TinkerCAD have very good, simple and intuitive user interfaces. In FreeCAD, especially when dealing with BIM, we deal with much more complex situations. If we look around, other BIM apps also have very complex interfaces, and the learning curve is also steep. And when you look at, for example, BIM plugins for Sketchup, you also see that the complexity raises very quickly.
So there is no easy, straightforward answer to "solve" the steep learning curve of FreeCAD. But that doesn't mean nothing can be done either. But it needs some experimentation and step-by-step improvements. That is precisely what I want to achieve with this workbench: Find the good parts that run well, identify what doesn't work as smooth, and what can be done. It's all about details. The rest, the technical part, will stay in Arch.
I had this aim for the Arch workbench at first, to be the "all-in-one" BIM solution of FreeCAD. But the exponential growth of the addons being developed around FreeCAD, made me rethink that approach. The Arch tools, as said above, begin to be reasonably solid. They lack some polish, and better interface. That will be a main focus point for me this year. But it might be time to also think better in more global "BIM workflow". I have no clear idea of what that would be, that is the reason of existence of this new workbench.
Another motivation behind this is also to split things more between the "technical" part (the Arch Workbench), and the "interface" part (the BIM Workbench), and make the latter much more simple, so hopefully more people will be able to contribute to it, without having to merge much into the FreeCAD source code.
So, please use it, test it, be aware that it willbe an experimental test bed so it might change often, and share with me any thought you might have (that is reasonably doable, please!) to make the BIM workflow better, and the learning curve smoother.
Sorry about the late news again, but it would have been a pity not to include a fresh feedback from the FOSDEM that happened this weekend. So here are the main topics that happened in the last month. Once again, thanks a million to eveybody who helps the effort by contributing to my Patreon campaign or on LibrePay. Not only it's highly appreciated, but it allows to do more and more long-term planning, and 2018 promises to be rich in BIM features in FreeCAD. I also believe we are really closing the gap with commercial BIM apps out there.
Since FreeCAD is close to the next official release, that we plan to unleash this month, the development is now in "feature-freeze mode", which means nobody is adding new features (to avoid the risk to break anything and introduce new bugs) and instead concentrates on fixing bugs. Consequently, this month was pretty low on new features, so there won't be much appetizing BIM stuff to show here. On the other hand it was intense in coding and bug fixing.
Basically I have been busy thoroughly testing the BIM functions and workflow in FreeCAD, and fixed a lot of bugs on the way. I think it is now pretty stable, more than it has ever been in the past. Also all the main Arch/BIM objects (Walls, structures, windows, etc...) now have their base code pretty well consolidated and reliable, so the next step, which is working on making them a bit more user-friendly, can now begin.
To do this testing, I have built 3 house projects with FreeCAD. The internal organization of these files differs a bit from one to the other, but they are all pretty simple. I think they show well the "stage" you can now reach with FreeCAD easily and reliably, and extract from it all the data you need (2D drawings, decent IFC files, spreadsheets/schedules, and mesh models for rendering). Not yet a full large-scale building with all its details, but we'll get there.
In any case this is already a full BIM workflow, all objects are parametric, all export to IFC with all the properties you wish to add to them, everything can be modified, and the 2D drawings update automatically (or not if you choose not to, to have a faster workflow).
You will notice that these models don't use TechDraw for the 2D views, but that is because I specifically needed DXF files from these 2D views, which are at the moment easier to produce with the Draft workbench.
But that doesn't mean TechDraw is not up to the task, far from it. If you wish to produce good-looking documents right from within FreeCAD, give it a try, it works impressively well already.
There are also several interesting things that are available to you due to the very generic nature of FreeCAD, that are sometimes hard to obtain in commercial apps, such as mixing 2D and 3D elements in your models. You can easily keep these 2D elements out of IFC export (or not, your choice), simply by grouping things the way you like best. In FreeCAD, you don't really need to use Floors/Storeys/Levels. You can, if you need (for example to produce sounder IFC files), but you can perfectly well stick with groups. I often think BIM and IFC files would give much less headache if everything was simply properly named and organized.
The whole cycle of placing section planes, getting 2D views from it and exporting them to DXF/DWG is now pretty straightforward and hasn't given me anymore problems recently. Draft Shape2DViews objects now have a switch to disable automatic recompute, so they won't be recalculated automatically everytime you change an object, which can have a huge impact on performance if you have a lot of views. You can then recompute them manually whenever you want.
As we are coming close to our 0.17 release, there are a few areas which would welcome some help, if you have a bit of time to spare. The main one is to finish the translations, so we can include them in the release files. As I'm writing this, 6 languages are fully done already, and 10 others are at more than 90%. The other 34 also need some love. We won't wait for all of them to reach 100% ofcourse, but the more we get, the better!
There is also currently heavy work being done on the documentation to update it with all the latest changes that have been added mainly to FEM, Path and TechDraw, and to make it easier for users of earlier versions to make the transition to the new Part Design workflow. If you know some of these tools reasonably well, please help us to make sure the documentation is accurate and up to date!
So this weekend I was at the FOSDEM in Brussels, and gave a talk about the WikiLab project we've been doing last year, and how FreeCAD was used in it. The talk went pretty well, lots of people in the room (some FreeCAD forum members were there!), and very interesting questions raised. Thanks to FOSDEM blazing fast video processing, the recording of the talk is already available (the slides are here):
Right-click -> Play to play the video above or watch it here
Other than that, I watched a couple of talks (a big part is online already, browse here), hanged around the different booths, and because the FOSDEM is so huge, couldn't meet almost anybody I knew was there.
I got a bit surprised how the FOSDEM is still predominently a male event (around 95% males, my own estimation), while many IT/open source events around the world (FISL in Brazil for example) are very close to 50/50%. Mystery... But there were fries!
That's it for this month, stay tuned for the FreeCAD 0.17 release annoucement (or follow it on the forum), and after that, expect new BIM features to land in!
First off, sorry for the delay, I was trying to finish the new Render workbench (see below) before posting this report, because otherwise there is not much exciting stuff this month, and it ended up taking more time than I thought, because I kept experimenting a lot until arriving to a good solution. And since not much more will be happening this year, given the coming new year events (a good friend of mine calls this The Great Intoxication) I'll exceptionally make one report for two months, if you don't mind. But I'll give you some more news before the January report.
I'd also like to take this opportunity to thank you all who contributed to my Patreon campaign (or Librepay) this year, it has triggered some big changes for me, which took (and are still taking) more time than I thought, you don't turn into a part-time programmer overnight, but it is a really cool process, and, truth be told, during last year's dire economical crisis in Brazil, this FreeCAD "job" I now have thanks to you guys helped me a lot to keep the boat afloat. Thanks a million for that.
Basically FreeCAD development has now entered "feature freeze" mode, in preparation to the upcoming 0.17 release. I can hear the question rushing from your hearts: When???
There is unfortunately no answer to this yet, as some of you know, a motto we have at FreeCAD, that we really like a lot is: "It's done when it's done". This can be interpreted in many ways, you might think "lazy developers don't want to work hard enough!" but it is not that. It is very important to all of us to be able to release when we think it has reached the correct level of quality. As the project grows too, there are more and more developers involved, and more and more features weren't touched at all by one of the core developers, and it takes time to have everybody focus on fixing bugs. In a sense, FreeCAD has its own rythm, and we try to make sure everything that needs to be done is done before releasing.
Also, but this is more my personal opinion, working on an open-source project is awesomely cool. You don't have a boss telling you how you must do your job, no schedule, no deadline, no need to do this or that today, you decide what you want to do, how you want to do it and when. Total freedom. And I believe one of the main reason why open-source projects thrive well is this. People like to work on them, they have cool communities full of entusiast people who stick there for a very long time. And I think it is important to keep an open-source project a very cool and awesome place for developers to be. And I'm not sure very strict projects with lots of schedules and roadmaps are as cool to work with as FreeCAD I'd like to hear it if you have a different opinion, though.
Also in the case of FreeCAD we have a pretty permeable workflow. Development versions are easy to obtain and install, even side-by-side with the current "official" release, and are usually very stable. Most long-time FreeCAD users only use development versions. So the urgency to release official versions is low.
So, we are now in feature freeze mode, which means we don't add new features to the code anymore (at least we try to), we concentrate on testing and fixing bugs. There are still a couple of nasty ones to be fixed, but in general the process is going well.
Regarding the Arch workbench specifically, I am currently developing an architecture project with it, and using it as a test bed to test all possible scenarios and find bugs (and fix them of course). There is unfortunately nothing very exciting to share here, it's mostly small things, but this is an important phase.
All in all, I think the Arch workbench is in pretty good shape for the coming release, we of course still don't have all the features we want for it to be a full BIM application, but the existing tools grew a lot in stability, versatility and usability. For some of them like the structure or panel tools, I believe we're not far from commercial counterparts.
Also, there are now several tools and addons around Arch, such as Reinforcement or Flamingo, that, together with Arch, are building a much bigger and more complete BIM ecosystem in FreeCAD.
There are many things you can do to help to speed up the release process, if you are interested. For example translating FreeCAD, helping with the documentation or more generally, do some work with FreeCAD and help to find bugs. As always, the forum is the best place to go if you want to help.
The Render workbench is a new addon workbench I've developed last month. It is meant to replace the built-in Raytracing workbench of FreeCAD. The main reason is that the Raytracing workbench wasn't really made to be extended with other rendering engines, but these engines get obsolete quickly and new ones pop up all the time, so I thought it was worth starting a new one from scratch.
The Render workbench is coded in Python, because since the rendering itself is performed by another application anyway, there is no critical speed issue here, so the speed of C++ code is not really necessary, and it makes the workbench much easier to extend by other people. I also took extra care of making it simple to understand and extend, you basically only need to add one new file for each new renderer, and write 3 functions inside: One that writes the position of the camera in the file format of the renderer, one that writes the geometry of a given object, and one that is called when the "Render" button is pressed.
So far the two original engines of the Raytracing workbench are supported (Pov-Ray and Luxender), plus a new one, Appleseed. Other such as Blender's Eevee and OpenCasCade's CadRays are on my todo list.
The Render workbench works exactly like Raytracing: You start by creating a Render project, then add your objects to it. You can tweak some things like color, transparency, etc (the Render workbench also supports FreeCAD materials, which turns it the third workbench with material support, after FEM and Arch), and finally press the Render button to create the rendered image. And the Render workbench uses the same templates as Raytracing, in the good tradition installed with TechDraw and Drawing.
This is still pretty new, but in the coming days I'll try to produce some good-looking images to post on the forum.
That's it for today, thanks once again to everybody who helps me on Patreon or Librepay, it's really thrilling to see what this can produce, this year has been very rich in new features, I can't wait to see what we'll do next year!
Time for a new report on the development of Architecture and BIM tools for FreeCAD. Remember, you can help me to spend more time working on this, by sponsoring me on Patreon, Librepay or directly (ask me for a PayPal email or bitcoin address).
Since I just recently opened the Librepay account, and the Patreon campaign is progressing much (I'm receiving above US$ 600/month already, thanks so much everybody!) I think it's time to be a little more serious and transparent about it, and give you guys some more "accountable" feedback on how the money is used. I'll start using this report to give a sum of how much I receive each month, all crowdfunding accounts together, and also make a bit of a better plan.
As you know if you read my last article, I just returned from the US, and we are also now finishing the WikiLab project (Grand opening is on next friday, november 10th). So I have been a bit away from FreeCAD coding for some time. But I've been saving the money from this campaign, and I'm now getting back to it, and it's quite refreshing! I have many ideas to work on, that I'm in the process of classifying. Basically I am currently working on two main ones (see below), and I'll also start attacking my overdue issue queue on the FreeCAD tracker, and I also have this "small" list of smaller items/issues that have either to be checked further or solved or implemented:
I should really transfer all this to the bug tracker...
I'm currently working on two things, that are not finished yet and therefore not ready to be used:
One is a new FreeCAD importer for Blender, that allows Blender to import FreeCAD files. A prototype exists already, but the Python3 version of FreeCAD that is needed by this importer still gives me problems (crashes on opening, etc). But once that is solved, we should have a proper importer again. And it will have a couple of more advanced features too, such as Cycles support and the ability to re-import a FreeCAD file later, and keep all your existing materials (only update the geometry of existing objects).
The other feature I'm working on (I have no code that is good enoough to test to share yet) is adding Appleseed as a new renderer to the Raytracing workbench. In a first step I am simply looking at producing an .appleseed file from FreeCAD, that can be fed to the renderer externally (same as we do with PovRay and LuxRender), but Appleseed has a powerful and elegant python (and C++) API too, that can in the futre allow a much more seamless integration, and litterally control and display the rendering progress within FreeCAD. But first things first. I'm also extending a bit the Raytracing workbench code, which is currently C++ only, to allow to add new renderers in python code, which will make it much easier for other people to help and add more renderers.
That's it for this month I'm afraid, thanks once again to everybody who helps me with money, and for your patience with me this last months during the WikiLab construction, I'll make sure it was not lost and reverts into concrete, usable material to push the development of BIM projects with FreeCAD closer to what we all wish it to become!
By the way, if you haven't yet, check the amazing work that Regis is doing with recreating one of Aravena/Elemental open-sourced projects in FreeCAD...
Last week was the Google Summer of Code Mentors Summit, a yearly event organized by Google, where they invite mentors of the Google Summer of Code program, a program that pays students to work on open-source projects. This year, like last year, FreeCAD participated to GSOC. This year we had 4 really good students, and the one I have been mentoring, Amritpal Singh, has done a really remarkable job with his Reinforcement Bar add-on for FreeCAD.
The two years, FreeCAD participated to GSOC together with other open-source CAD, CAM or 3D-related projects, under the "umbrella" of BRL-CAD (they basically did all the organizing). Each year, Google invites a certain number of mentors from each organization to the Mentors Summit, at Google headquarters, in California. So this year, I applied and was lucky enough to get selected. We were five in the BRL-CAD group: Sean, Vasco, Gauravjeet and Inderpreet from BRL-CAD, and myself from FreeCAD.
My main motivation to go was, beside a huge curiosity to see Google inside, I was really eager to know and chat with the BRL-CAD people, our umbrella organization. This project is quite fascinating, it is the first ever registered project on Sourceforge, it is very hard to see it progressing (their website doesn't show much), but it is a huge and powerful application, that stays a bit arcane, and hard to explore by newcomers. But I had a good contact with Sean over the years, and was really curious to know more.
So, the said day, after a pleasant flight (not so pleasant because at he last moment they changed my SÃ£o Paulo -> Mexico -> San Francisco flight to SÃ£o Paulo -> New York -> San Franciso, which added 2 or 3 hours of flight time), I landed at San Francisco and shared a ride to the Google headquarters with other people going there (everybody chatting and arranging these things beforehand through a quite interesting open-source chat system called Zulip that got used quite extensively throughout the event. Another chat app, RocketChat was there too, there has been quite interesting debates between the two, I still didn't make my mind fully).
So we arrived at Google HQ, landed to our hotel (conveniently located INSIDE the Google campus (which is not really one campus, they basically own half the cities of Sunnyvale and Mountain View). This is located at the southern tip of the San Francisco Bay (San Francisco being at the North).
And it began immediately, right there. You get your badge, and immediately you can start eating and drinking and chatting, because they reserved some rooms of the hotel and stuffed them with food. After a little while, a transfer bus takes you to one of the Google building, where there is a dinner (two large restaurants plus many cafÃ©s, food trucks, etc where everything is for free were available for us basically the whole time), then an opening session, then a couple of lightning talks (3 minutes talks to present GSOC projects), then more beer
I couldn't get a chance to showcase our GSOC projects of this year though, there were around 300 people wanting to present theirs, and only 50 or 60 slots.
There was also a cool table where everybody dropped chocolate brought from all over the world.
The next day started early, around 7h, with a breakfast at Google, and a whole day packed with "unconferences" (basically small spontaneous lectures or workshops organized by the mentors themselves), more food, more coffee, more chat, more lighning talks, and at the end, of course, more beer, and even roast marshmallow on the open fire, maybe the most epic moment for us non-Americans.
The last day was like that again, and ended up with a closing session in the afternoon.
Like I guess most people there, I didn't attend many unconferences. I basically stayed most of the time in the common areas chatting with people. My impression is that I never chatted so much in two days. At the closing session, the event organizers said they were happy, because they almost never saw anybody alone with his computer, which is something you see a lot in other open-source events. Everybody just kept talking with everbody, all the time.
This is really a magic that Google operated. There were no "boot camp" crap, or "socializing games" or any of those activities to make people socialize. They just provided space, food, drink, and a friendly atmosphere. That's it. Even me who is not a very social person, kept playing that game of going sitting for lunch each time to a different table with unknown people and talk about our projects. I've never seen an open-source event like that.
I also tried to get a glimpse at how life is at Google, but couldn't do much. The security schema was tight, no pictures allowed inside buildings, we were only allowed in a very small zone of the Goolge campus, you gave one step out of it and a security guard came to herd you, etc. But all in all I believe they do their publicity extremely well. In my mind everybody at Google would just lie on colored sofas, picking free drinks in an open fridge, would cycle around marvelous campuses on Google bikes, etc. The reality seems actually much more normal, you just sit on your computer and do computer work, and have meetings with your colleagues. But the atmosphere seems really relaxed, there really is free drink and coffee Other than that, my spying mission at Google failed miserably.
Ah, there were ice cream sandwiches too.
I talked a lot with Ton Roosendaal, the father of Blender. I met him other times already, he always keeps an eye on FreeCAD too. Ton made me a bit anxious, because he told several horror stories about big companies threatening to sue open-source project developers about patents, and in some cases managing to scare developers away of coding completely. We really need to start thinking about that at FreeCAD, and think of strategies to protect ourselves as much as possible.
But we also talked about things we could do together with Blender. The big game engines out there are moving towards offering more tools for CAD software, and we should do something similar, like an easy/1-click, template-based export from FreeCAD to the new stunnigly realistic view mode they are preparing in Blender, called Eevee. Just do a small search on youtube for "blender eevee" and your jaw will drop
Another person I hanged a lot with if FranÃ§ois Beaune (Franz) from Appleseed, a stand-alone rendering engine, similar to Luxrender. I knew Appleseed for some time, and I had a vague idea of trying to integrate it in FreeCAD some day, but this has now become a much better and more realistic plan, after FranÃ§ois showed me around the renderer, its API and file format. It is definitely doable, and could become easily the best integrated renderer in FreeCAD. It is in fact possible to make it totally seamless, as if FreeCAD itself would do the rendering. But first things first, we'll start with exporting an appleseed file from the FreeCAD Raytracing workbench first, like the other engines we support already. I'll also take the opportunity to make the Raytracing workbench a bit more pythonic, so new render engines with a python interface will be much easier to add.
And the third really interesting talk I had was with Sean from BRL-CAD. BRL-CAD is a very old project, started by the US Army, which later on released it as open-source. I really thought BRL-CAD had become a pretty inactive project, but this is very far from the truth. The thing is, BRL-CAD's main user is still the US Army, so almost everything that is modelled with it is classified, so it is very hard to publish anything that was done with it, which explains the very sparse image galleries, social media, etc.
However, it is an extremely interesting project. It consists of about 700 commands, a bit like a Unix/Linux operating system where all the base commands you use in a terminal, such as ls, mount, chown, etc.. are actually each one a file, or individual program. Then higher-level tools, such as the desktop environment, uses these commands under the hood to list directories contents, move files, change file permissions, etc.
BRL-CAD works exactly like that, it's a bit like a Unix of CAD... It has a graphical interface, but its real power resides in the vast array of command-line tools. And a modelling tree in BRL-CAD is in fact a shell script!
Another interesting feature in BRL-CAD is that it is capable of managing absurdly huge models. Since it doesn't really have a graphical modeling interface, which must display the model (and therefore compute it and triangulate it, because most computer 3D visualization systems around, such as OpenGL, rely on triangles), they can produce raytracing directly from the model definition and not from a triangulated version of it. This removes a big part of the process that FreeCAD has to do.
So there is much interesting stuff there that maybe we could do something with in FreeCAD. I am not sure what exactly yet, but only the "command line" system itself could easily be integrated into FreeCAD, it's not very different than what we do at FreeCAD level itself between App and Gui.
And BRL-CAD and Appleseed are also working on integration.
After the mentors summit ended, I got really curious about something I read in The Circle, the main character, who works at "some computer firm close to the south tip of the San Francisco bay", likes to take her kayak, go behind the office and paddle in the bay. I saw that the Google campus lies at a few minutes by foot to the bay, and there are many trail paths around, so I went there for a walk, and wasn't deceived. The area is magical, lots of channels and water ways, with here and there a stand-alone, man-made artifact, like a radar, a ship lock, etc...
After that I spend a couple of days in the lovely San Francisco, which I decided should integrate my list of magical cities, together with Barcelona, Venice, Cape Town and Rio de Janeiro. I did a bit of drawing too, and checked a couple of architecture icons like the Federal Buiding by Morphosis (impressive "concretization"of everything Morphosis has been saying, but big doubts about the so-called "green building" stuff and the very poor attempts at making the building users "socialize"...), Libeskind's Jewish Museum (really disappointing, very little more than just a "funny space", or the MOMA by SnÃ¸hetta (couldn't enter unfortunately, wrong planning).
Hi everybody! Here we are for another monthly report about the development of BIM tools for FreeCAD, our favorite open-source 3D CAD modeling platform. The coding I am doing for FreeCAD is now more and more heavily supported and funded by many of you via my Patreon page, thanks once more to everybody who contributes to this, it is incredibly motivating. We won't stop until we get a proper open-source, multiplatform BIM modeler!
As expected in last month report, this month I had very little time to dedicate to FreeCAD coding itself, because our WikiLab project construction started, and it swallowed almost all of my time. I am saving the Patreon money of this month, though, and as soon as the WikiLab is finished (about two more weeks to go) and I'm back from the GSOC mentors meeting (see below), I'll be back at FreeCAD coding with full dedication and twice the money to spend (and I really miss coding already).
This time spent on the WikiLab is not lost at all for FreeCAD, though. First, the project were entirely developed on FreeCAD. The whole project files are open-source, hosted here. Check the two FcStd files in the main repo folder, one contains the base WikiHouse module, called "Wren", that file was used to generate the CNC cut sheets, and the other is the complete assembled model, that was used to generate the construction manual, documents for aproval, etc.
Second thing, everything happening during the construction (changes from the original project, difficulties, etc) is being recorded, documented, and is onlien on the same github account. There will be several reports written at the end of it all about the different aspects of the experience (technical, financial, etc..)
Also, the construction of a WikiHouse building is an amazing experience, and this is giving us a wealth of useful information, feedback, ideas. We used one of the main WikiHouse designs (the Wren module) almost without any modification, to stay on the safe side. However, we added many experiments around it, for example the "rain cover" that we're currently placing around it, or our hybrid construction model, part made by volunteers, part made by a professional construction team.
This all is too much information to be resumed here in a couple of paragraphs, but count on me to write detailed articles about all this after the dust settles. To resume a bit what's going on, the WikiHouse construction itself is a wonderful thing. People with no experience at all in building come, need only two tools (a rubber hammer and a flat screwdriver to "help" hammering the joints in), and in 2 hours everybody has turned into a WikiHouse building professional, able to build without even looking at the plan. There was no difficulty, no accident, and no "gambiarra". The result is very solid, while still manageable (the biggest parts, once assembled, can still be moved around by a 10-people team).
The rain cover is being built now, I'll have more to tell about it next month, but it is a very simple, cheap (whole cover costs less than 4000 BRL/1300 USD/1100 EUR), ansd easy to build solution. The polypropylene sheets we used can be cut with a pair of scissors. And they give a nice look (kind of cheap SANAA )
The hybrid construction system, half professional, half volunteers works up pretty well to some extend, but it is the hardest part to manage. They are very, very different types of construction. The volunteers part is very, very fast, but requires everything to be very well planned ahead. The traditional system with a professional contractor, however, is slower, but they take care of a big part of the planning themselves, and there is much more experimentation and and on-site modifications possible. Really, both have their strengths, and I'm still very much convinced that it is a good way to go. But their different rythms are really hard to sync and "compatibilize", specially that we did this in three parts, first part with the contractor, second part with the volunteer team, and now the third part with the contractor again. This scheme should realy be simplified in the future.
Also one other thing stiked my mind, that I hadn't fully realized before: You don't make this with a team of volunteers to save money. You do it because people want to build their own house. The construction itself is the "product", not the finished house. The disappointment of the team when their "task" is over is big In the future we'll need to find smart solutions that allow the team to stay on-site up to the very end.
Both the professional and volunteers teams also need very different kinds of documents. Professionals are used to architecture drawings, and they feel more at ease opening a plan, that has everything on a single sheet, than browsing through a book. However, the book makes the whole construction easier to understand by volunteers. If you have both kinds of teams, you need both.
This started from a discussion that I had with a friend this month, about "all that BIM stuff", and several other discussions I stumbled upon on the net go in the same direction, so let's sum some of it here, no doubt it's a subject all of use are interested in
The basic point we started with was "What about all that fuss, BIM here, BIM there, at the end where is the big gain?" Everybody who works in a BIM-enabled architecture office has a lot to rant about. BIM makes project organization actually MORE difficult than before, BIM is just a commercial concept idealized by software vendors to make you pay more, BIM actually RESTRICTS creativity (Some things were avoided in your project because they were hard to do with the BIM software being used, don't tell me this never happened to you), collaboration works "more or less" when everybody uses the same software, but becomes so complicated when different software is used that you end up needing a "BIM manager" to sort things out, etc.
Compare this with the 2D-based era, there are clear steps back IMHO.
However, what we're trying to do goes beyond the mere BIM term. I mean having a project that is fully (and reasonably accurately) modelled in 3D, and that is organized semantically (this cuboid shape is a wall, that other is a beam, both belong to the same floor, etc), and that contains as much non-geometrical data as possible/needed (this wall is made of 20cm of concrete block with specific thermal and structural properties), so that model can be used in many ways (to generate drawings, to study structural resistance or thermal behaviour, etc). Basically, a model that can be understood and used by others.
When you tell all this to mechanical engineers they usually look at you like, what's the fuss, we're doing that since a long time, and we still call it CAD.
But there is something interesting happening now: More and more you hear or read similar opinions. And far from being something negative, I think it actually serves the general direction. Many BIM gurus are having new looks at IFC, the good, old, clumsy, ugly, all-in-one BIM format that everybody likes to hate. That format should already have died a long time ago, by commercial standards. However, not only it doesn't die, but many people are having a new go at issues like versionning (or this one) or, like in a previous article I wrote, parametric files. And more and more people are also using it (I think) the way it is meant to be used: controlled and validated by rules.
It turns out the good old IFC format, even being ugly and clumsy, has surprisingly more tools than previosuly thought to deal with these "advanced" issues. In the case of versionning, I also think that the problem is beyond the file format itself, versionning CAD/BIM files is a complex problem where a change can be significant for a machine but not for a human, and vice-versa, unlike code. So the problem is actually larger, and when you look deeper at it, the IFC format contains many stems and tools that could at some point give birth to realiable solutions. We'll probably need to invent a revision control system that is very much based on semantics too (a way to "tell" or "describe" what has changed in a model).
All in one, I hope all the "myth" around BIM is beginning to fail/die, and I think it's a good thing for BIM...
I've not been able to do much in FreeCAD this month, apart from a couple of bug fixes. But I managed to work on one feature that needed a bit of love, which is the Arch Survey tool. This tool allows you to quickly take a couple of measurements by clicking on a model, like traditional quantity surveyors would do on a plan, by measuring the lines.
Until now you had to sum things up yourself. Now, the tool has gained a proper interface that sums lengths and areas as you click them. So it becomes very easy to measure, for example, the total length of walls that you have, or the total area of concrete slabs. And the final result is exportable as a CVS file, that you can import in a spreadsheet.
There are many more possible improvements, be sure to add your voice to the forum thread!
Finally, next month I'll be in the San Francisco Bay Area for the Google Summer of Code Mentors Summit. I'm really curious to see the inside of Google (Count on me to reveal all the secrets I'll be able to grab!), and it will be a great opportunity to meet the BRL-CAD people too, with who we're participating to the GSOC program for the second time, I hope we can set up more ideas to work together with other free and open-source CAD projects.
If you are in San Francisco around october 15-19, be sure to tell be and let's have a beer or coffee somewhere!
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.
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.
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.
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.
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!
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 -> 'FreeCAD' PROPERTY SET -> PROPERTY ObjectType="Arch.Wall" -> PROPERTY Width="20cm" -> PROPERTY Length="200cm" -> PROPERTY Height="200cm"
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 SET -> 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.
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.
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.
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.
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:
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:
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.
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...
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.
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...
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!
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
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.
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...)
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.
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).
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...
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.
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.
I am also working on a new version of the Start Center:
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:
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.
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.
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).
@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.
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.
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.
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.
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:
PS - Half the stuff on the images in this post was done by Ryan
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?
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:
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.
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!
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.
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.
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:
ogr2ogr -f "dxf" contours-lambert.dxf contours-lambert.shp -zfield ELEV
import Part,ReverseEngineering obj = FreeCAD.ActiveDocument.getObject("Points") Part.show(ReverseEngineering.approxSurface(obj.Points,NbUPoles=16,NbVPoles=16).toShape())
|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.|
|ProgeCAD Architecture||R$ 6 149,00||Vende direto no site.|
|VisualARQ||R$ 5 189,07||Vende direito no site. PreÃ§o do Rhino + VisualARQ.|
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:
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.
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.
The Arch Workbench is mainly made for two kinds of workflows:
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 São 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:
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.
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:
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:
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:
On the left is are the two intersecting walls, on the right the result after adding one to the other.
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:
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:
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.
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):
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.
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:
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:
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 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.
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:
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.
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:
Now, our structure is complete, we just have a couple of smaller objects to do.
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.
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:
Once the wires are drawn, just turn them into structures, and give them a height of 0.15:
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:
On the elevation view, draw (then rotate) the border:
Then move everything into place:
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!
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.
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:
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.
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:
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.
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:
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:
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:
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:
Now, as before, it's just a matter of rotating the pieces, and moving them to their correct position:
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:
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.
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:
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.
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:
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:
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:
After the necessary rotations, everything clicks perfectly into place:
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:
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:
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:
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:
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:
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.
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:
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.
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:
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:
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.
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.
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.
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.
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:
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:
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.
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.
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.
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.
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:
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
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
<?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"/> </mime-type> </mime-info>
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:
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:
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.
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" print(a)
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" print(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" print(myVariable) myVariable = "good bye" print(myVariable)
We changed the value of myVariable. We can also copy variables:
var1 = "hello" var2 = var1 print(var2)
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" type(myVar)
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) type(firstNumber)
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 print(total) print(type(total))
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" print(int(varA)) print(float(varA))
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" myVar
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)) 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] type(myList) 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 myFriendsName = myOtherList
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" len(myvar) myvar
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.
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!!!") else: 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 ) sum(45,34) 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:
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 os.path.abspath(".")
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:
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 * sum(12,54)
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 dir(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 myModule.myTestFunction()
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.
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) ml=FreeCAD.ActiveDocument.addObject("Part::FeaturePython","myLine") Line(ml)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):