YORIK’S COFFEE CORNER

You are currently viewing a single post of this guestblog.

Click here to go back the complete page. I would be glad to hear your comments, so don’t hesitate to leave me your feedback below. It will appear on the main guestblog page.


in categories  freecad  opensource  permalink:  536   posted on 02.10.2018 2:00
From Yorik

FreeCAD BIM development news - September 2018

Hi folks,

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.

The video

This month the video is a generic tutorial that shows how to get started with BIM modelling in FreeCAD:

BIM workbench documentation

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.

past development news articles on github

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...

External references

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.

FreeCAD for Inventors book

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.

Cheers!

Yorik


First and foremost, your name:

And your message:

To publish it, just press this ...