FreeCAD BIM development news - April 2018
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...
Women in FreeCAD
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!