BIM/Arch development news articles from Yorik's blog

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: BIM/Arch development news articles from Yorik's blog

Post by Kunda1 »

Yorik, really awesome job working on all this stuff and documenting it. Fantastic!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
yorik
Founder
Posts: 13642
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

The BIM/Arch wiki pages badly need some upgrade, though... :?
User avatar
bitacovir
Veteran
Posts: 1570
Joined: Sat Apr 19, 2014 6:23 am
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by bitacovir »

Great work.
::bitacovir::
==================
One must be absolutely modern.
Arthur Rimbaud (A Season in Hell -1873)

Canal Youtube Grupo Telegram de FreeCAD Español

My personal web site
My GitHub repository
Mini Airflow Tunnel Project
Cyril
Posts: 133
Joined: Wed Aug 23, 2017 5:04 pm
Location: Geneva (Switzerland)
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by Cyril »

It looks like the previous rss/atom feed link do not work anymore and I can't find any new link. Is there one somewhere ?
I see that you now use Pico CMS which apparently not include a rss feed natively. I found a plugin here : https://github.com/gilbitron/Pico-RSS-Plugin in case you need one. (Pretty old plugin, I hope it still works)
I blog about HVAC / BIM / Energy : pythoncvc.net. If you like you can follow the RSS feed.
User avatar
yorik
Founder
Posts: 13642
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Yeah sorry, still trying to find a good rss solution for pico... This in principle should work: http://yorik.uncreated.net/feed
But it doesn't seem right... If I don't find anything that works I'll code one myself.
User avatar
yorik
Founder
Posts: 13642
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

FreeCAD BIM development news - July 2019

Post by yorik »

Cross-posting from https://yorik.uncreated.net/blog/2019-068

Image

Hi Everybody,

Time for a new edition of our monthly reports about BIM development for FreeCAD. I've been quite busy with work this month, but there is still a good quantity of cool new features to show.

Once again, a big thank you to everybody who helps this effort by donating to my Patreon, Liberapay or Paypal accounts. On the advice of Liberapay people, we have now set up an official Liberapay team page for FreeCAD. All FreeCAD developers (or other community members who do significant work on FreeCAD) who have a Liberapay account will be added there, and any money received through that page will be split equally between them. If you are donating to me personally but would prefer your donation to go through that page instead, please don't hesitate. I'll be happy either way.

Apologies for not having a video this month, I didn't have time to make one and likely won't have this week, and I thought best not to delay this report any longer. Next month we're back with the videos!

So let's not loiter any more (whatever that means), and go to the juicy part:

Lightweight mode for Arch Reference

Image

As you know if you've been following this column, we already have in FreeCAD's Arch workbench a tool called Arch Reference that works like AutoCAD's Xrefs or Revit's Links: It allows you to include the contents of one file into another, while keeping the content in the first file. So if you change the first file, the second one gets updated automatically.

In FreeCAD, this works using a very simple mechanism: All Part-based objects, which include all Arch/BIM objects, when saved inside the .FCStd file, also have their shape stored as a .brep file (OpenCasCade's native format). This allows FreeCAD to not need to recompute the shape of these objects when opening the file, saving precious time.

The Arch Reference does just that too: When referencing (or linking) another file, it reads the .brep objects stored inside the file. So it doesn't need to recompute the objects. When you have large assemblies of objects "packed" into one, for example using Compounds or BuildingParts, this makes a huge difference, the Reference object only needing to read one single brep file.

Last month, I implemented one new mode for Arch References, called "Lightweight". You'll find it in the "Mode" property of the Reference object. So far it only works if you are referencing a Building Part from another file.

The lightweight mode works like this: Building Parts, when saved into a .FCStd file, will together with the brep file also write their full Inventor node, that is, their visual representation in the 3D view, which is a much lighter, mesh-based geometry than the full brep shape, which is NURBS-based.

When in Lightweight mode, Reference objects will load that saved Inventor file and add it to the 3D view, giving you a perfect illusion that the object is there. However, it is not fully there, many operations won't work because there is no real shape behind it, so no way to perform calculations. But if you just need to see the other objects, not interact with them, this can work very well.

Unfortunately, I was hoping to get a huge performance gain, compared to the normal, brep-based system, but it turns out to be not much faster, as far as I tested. However, there is much room for optimization (for example, the openInventor also has a binary format, which should be much faster, there are many ways to compact the nodes, which should yield huge speed gains in the 3D view, etc)

In any case it works well so far, have a try!

BIM Views improvements

Image

The new BIM Views tool that we introduced last month has gained a bit more polish, you can now do several building part-related operations directly from it, such as isolating a level, saving the current view orientation, etc.

Dynamic materials icon

Image

Following the test I did with layers last month, Arch materials now also have a dynamically colored icon in the tree view, that shows the material color. I used a caching mechanism, to avoid having to redraw the icon each time the tree requests the icon, and this still causes minor issues, such as the icon not being immediately redrawn when you change the color, but we'll fix that along the way.

Multimaterial improvements

Image

There was quite some time I wanted to give a bit of work to the Arch MultiMaterial tool, and here are several improvements that have been added:

A button to invert multimaterials: Click the button, and the materials layers stack will be inverted, top to bottom.
Support for negative thicknesses: If you give a material layer a negative value, this layer won't be drawn in the object. This is useful, for example, to represent an air gap in a wall. In the future, when we'll have walls able to contain studs and structure, this will be useful to not fill a certain layer with material.
The total thickness, made from the sum of the material layers, is now shown on the MultiMaterial task panel. (It considers negative thicknesses as positive, of course )
Misc visual improvements: buttons have icons, and the column widths are remembered across sessions.

View clipping for Building Parts

Image

Building Parts are now able to clip the 3D view, like Arch SectionPlanes do: You can define an offset between the Building Part's base plane, which is given by its Placement, and a cut plane. By default, that cut plane is situated 150cm above the base plane, which would be more or less the eye level of a person standing on the base plane (you can change that to anything you want). When clipping is activated, everything in the current view above that cut plane is hidden. There is also an "AutoClip" mode that turns clipping on automatically when activating the Building Part.

This brings the workflow with Building Parts much closer to what you do in other BIM applications, where, when switching to a plan view, your plan view looks the way it's going to look on the sheet, that is, with everything above a certain plane cut off.

By combining different options of Building Planes, such as clipping and storing a top view, you can now achieve the same thing: double-click it in the BIM Views window, and find yourself in top view, with everything above its cut plane hidden. Most tools work pretty well in that mode, I'll take care of the remaining ones (windows mostly) in the next weeks.

Big refactor of multi-view grids and working planes

Image

If you used to work in Arch/Draft/BIM with multiple models open in a same FreeCAD session, you know the problem: the grid would quickly start to go crazy when switching between the views. The grid system has been refactored and I think it works pretty well now.

I'll take the opportunity to reexplain an important concept: The grid, that you see in the 3D view, reflects the current working plane, but it is not the working plane. Each opened 3D view has its own grid. But there is only one, FreeCAD-wide, working plane. If you set the working plane to the XY ground plane, this will count in all opened 3D views.

If you leave the working plane in "auto" mode, however, when switching from one 3D view to the other, the working plane will follow and adapt to the view you are currently in. So we can actually have, as we say in french, both the butter and the money from the butter

Allow to reorder materials alphabetically

Image

This is a minor fix, but it already improves things a bit. By right-clicking the materials group in the tree, you can now reorder its contents alphabetically. This is while we don't have better reordering sytems in the tree view...
Offline Rendering Utils module improvements

This module, that I described last month, is used to help producing files while running FreeCAD without its GUI. I added several new functions to that tool, to retrieve the full GUI object properties from a file (not only the colors), add shadows (see below), and read/write OpenInventor .iv files.

Solar diagram fixes

Image

The solar diagram functionality of Arch Sites was a bit buggy, mostly due to the switch to the Python3 version of PySolar, which powers it. This is now solved, and several utility functions have been added for future use, such as retrieving a given sun position for a given site at a given time/date, etc.

Also, the Py3 version of PySolar now works in local time. Since I didn't find a good Python library that can give a time zone from a geographic position (and we don't want to force users to go online everytime), currently the Arch Site has gained a new "Time Zone" property that you must set yourself to get a correct solar diagram. Certainly at some point we'll be able to do that automatically.

Schedule tool improvements

Image

In last months video, we showcased two methods to extract quantities from a BIM model, one using the Arch Schedule tool, another using the Reporting add-on. This made me think the Arch Schedule tool was not that bad, although it is not as powerful as the Reporting tool, its syntax is easier, so it is also useful. And, as always in the open-source world, two different solutions for a same problem is not a bad thing. It's a good thing! So I ended up adding a series of improvements to the schedule tool:

UI polish: Better and more complete tooltips, icons everywhere
Grammar improvements in filters: Before, you had only a couple of predefined filters: Name, label, type, and that was basically it. Now, any object property can become a filter. So you can for example grab all the windows with a certain tag.
Export to Markdown: You could already export the results as a .csv file, you can now also export it to a nice markdown table. Cool to place on github!
Detailed output: You can now show the results of the schedule as before, each line of the schedule produces one line in the result sheet, or as detailed output, where each object caught by the filter produce one line, and then a total line is added below. This is good for checking that everything is there, however as your model changes, the lines that show the totals might shift up or down, which is not good if you are referencing the cells, for example in a spreadsheet application.
Schedules now work without spreadsheet: The schedule tool used to produce an attached spreadsheet, where the results are shown. However, the spreadsheet is slow to update and can make all your model work slower. You can now turn the spreadsheet output off (and delete the existing one if any), the schedule will still work, print its results in the Report view, and still be exportable to csv and markdown. By right-clicking the schedule object in the tree, you can also open a spreadsheet only when you need it.
Schedule panel as stan-alone dialog: The schedule tool's task panel was really not practical at all: Too horizontal for the limited space of the task panel. So now it is not a task panel anymore, it is a floating dialog. It will also remember its dimensions when you close it, for next time you reopen it (I'm beginning to use this everywhere...). This is now way much comfortable to work with, and after all, you barely need to look at your 3D view when working on a schedule...

Shadows in the FreeCAD 3D view

Image

Another very cool thing I have been toying with for some time, is shadows. In architecture work, shadows are very important. Not only it helps people (and yourself!) to understand the masses, voids and volumes better, but it is also important to take the sun position into account when designing. So viewing the shadows that the sun projects on your model is a very important feature.

Luckily, the coin3D engine, that powers the FreeCAD 3D view, is natively capable of projecting and displaying shadows. Coin3D although quite old and not much maintained anymore, is an amazing piece of software, with very advanced capabilities for its old age. For example, it also has GLSL support, which could allow for things like ambient occlusion or specular bloom in FreeCAD...

With some help from Werner, we managed to set up a system to have shadows enabled directly in the FreeCAD view. It works amazingly well so far, there is still a bit more testing needed to catch all possible issues, but this will soon be consolidated into a real FreeCAD feature.

In the meantime, you can already test with a little bit of python...

Image

Talking about shadows, ambient occlusion, bloom, you might not have heard about this, but the new Blender 2.80 is out, and it is a real game-changer... Check this video by Blender guru Andrew Price to get an idea.

And since now FreeCAD is using Python3 on most platforms, it's time to pack our FreeCAD importer for Blender as an official Blender addon!

That's it for this one I guess, thanks for reading, and see you next month!
Cyril
Posts: 133
Joined: Wed Aug 23, 2017 5:04 pm
Location: Geneva (Switzerland)
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by Cyril »

Great news !
Just a dead link on team page for FreeCAD. It links to https://liberapay/FreeCAD instead of https://liberapay.com/FreeCAD
I blog about HVAC / BIM / Energy : pythoncvc.net. If you like you can follow the RSS feed.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: BIM/Arch development news articles from Yorik's blog

Post by triplus »

yorik wrote: Thu Jul 04, 2019 1:41 am The big feature of this month is a brand-new layers system in FreeCAD.
Great news!
User avatar
yorik
Founder
Posts: 13642
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Cyril wrote: Tue Aug 06, 2019 7:34 am Just a dead link on team page for FreeCAD. It links to https://liberapay/FreeCAD instead of https://liberapay.com/FreeCAD
Fixed, thanks!
User avatar
yorik
Founder
Posts: 13642
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: BIM/Arch development news articles from Yorik's blog

Post by yorik »

Cross-posting from https://yorik.uncreated.net/blog/2019-075

FreeCAD BIM development news - August 2019

Image

Hi friends!

Time for another report about what has happened this month regarding the development of BIM tools in FreeCAD. We have quite a lot of stuff again this month, and pretty exciting news all over FreeCAD!

As always, thanks a million to everybody who supports me on Patreon, Liberapay or donated me directly via [URL=mailto:yorik@uncreated.net]PayPal[/URL]. The more I get, the more of my working hours I can dedicate to FreeCAD. This has been now almost two years since I began this campaign, I consider it an astonishing success. There is always movement (new people starting to donate, some people leaving, some changing the amount of their donations, for higher or for lower), but it is all in all very steady, and it really helped me to keep the boat afloat and keep working on FreeCAD several times when I would have stopped otherwise to switch to other stuff to pay the bills. Also, it's a great thermometer of the interest that you guys have in all this.

But let's no delay things any longer, here it goes!

The video: Rendering with Blender

As you know, I'm a huge fan of Blender, and it's an absolutely indispensable companion tool to FreeCAD. All the things that FreeCAD doesn't do well, Blender is excellent at. And, if I dare to say so, vice-versa. I couldn't recommend enough you spend some time playing with it, if you are in to BIM. Here I'll show how to import a FreeCAD model into it and do very basic rendering:

phpBB [video]


This is (probably) the last video of the Barcelona Pavillion series. All the files I produced when making the series are available on GitHub, I still need to give it a bit of cleaning then I'll add the link on all the videos pages...

I'll go on making videos, of course. You guys showed clearly that you like them. But I'll go back to illustrating more specific aspects of BIM modeling in FreeCAD.

GIT support for FreeCAD files

Image

I did two experiments this month, one with the FCInfo utility and another using Zippey. Both are ways to make the changes between one version and another version of a FreeCAD file rendered as text, and therefore comparable by diffing (diff is a program that highlights differences between two texts, like the image above).

Both methods have their advantages. The FCInfo methods gives a nicer diff, but is not a 1:1 text conversion, so for example some differences inside the binary parts fo the FreeCAD file won't appear (although it will be marked as changed, as the SHA1 code will be different). The zippey method is uglier but guaranteed to show each and every change, even if unreadable to a human.

Note that this only solves one of the problems of working with FreeCAD files in git, which is to know what changed between two versions of a same file. The other problem, which is that each commit stores the entire FreeCAD file again, thus eating quite a lot of space, remains to be addressed. But this is a step already.

Support for different object and material color

Until now, when an Arch/BIM object in FreeCAD got a material assigned, the object would automatically take the material color. This is what you want in most cases, but not always: For example, a civil engineer would want to have a certain set of beams in red, and another in green, to illustrate categories they belong to, although they have the same material.

Now, Arch/BIM objects have a property to switch the automatic color association off, so they won't take automatically the material color, and you can give them another color if you wish.

BuildingParts properties cleanup, and section support

Image

I did a good cleanup in the BuildingPart properties, they are now a bit better organized. Since this object is becoming the all-in-one do-it-all BIM container object, which can be used to represent a building, a storey, or just about any kind of (duplicatable) grouping you want to do in a BIM model, it also gained quite a lot of behavioural functionality (ways to manipulate it), so I created a specific properties group for them.

Another big change, is that BuildingParts now have a built-in, implicit section plane. That section plane is always parallel to the BuildingPart's base plane, but you can specify the offset between them. So now all tools that work with a section plane, such as Draft Shape2DView and TechDraw ArchView also work with BuildingParts. Showing a plan view in TechDraw is now pretty easy: Create your level model, create a TechDraw page, add your plan to it with the ArchView button.

TechDraw ArchView and DraftView improvements

Image

The TechDraw ArchView, which you use to create on a TechDraw sheet a view obtained from an Arch Section Plane (or now from a Building Part too), has gained a couple of additional properties:

* **Arch Join**: If set to True, all Walls and Structure objects will be unioned by material. Those that have no material will be unioned together.
* **Cutline Width**: Allows you to give a custom line width to cut lines

And the Draft View, which is used to put drawings made with Draft tools on a TechDraw page, has gained this one:

* **Override Style**: This is set to True by default, to make it still work as before: All objects gathered by this view are rendered with the same line width, color and style. If you set it to False, however, each object will be rendered with the line width, color and style it has in the model. The Line Width set on the TechDraw view serves as a base factor, that is, if it is for example set to 0.15, objects with line width of 1.0 will be rendered in 0.15, those with 2.0 will render in 0.30, etc..

Image

Image

IfcProject

Image

This one was done by Dion Moult. It adds a Project object to FreeCAD, which gives support for the IfcProject entity in IFC. That entity basically holds georeferencing data, such as units system, orientation, projection system, etc. In the future, this will also allow us to support other kinds of product collections in IFC, such as the IfcProjectLibrary

When importing an IFC file, a Project object will now always be created. You can delete it afterwards if you are not using it. When exporting, it works the same way as other entites such as Site or Building. If you have one, it will be used and exported. If you don't, a default one will be added to the file. So this doesn't force you to use anty of them in your FreeCAD model.

Coin-based TechDraw views

Image

In this forum thread, we started a discussion about improving TechDraw performance, and it ended up connecting to some experiments I did earlier, which finally gave birth to a working solution, that is, a third rendering mode for TechDraw ArchViews.

The first mode, Wireframe, uses OpenCasCade's internal hidden-line algorithm to create a 2D view. Furthermore, it also performs a gigantic boolean operation to cut the model when rendering a section. The second mode, Solid, uses an own vector rendering module that essentially applies the painter's algorithm: it projects each face of the model in the correct order so faces closer to the camera are drawn on top. This works well with SVG, which works the same way. However, it falls short for curved surfaces, which can be both behind and in front of another face, and the gigantic boolean operation is still needed.

The new, third mode (thery are actually two: Coin and Coin Monochrome), use another system: they "simply" (nothing is simple there, of course) create a vector output of the FreeCAD 3D view, which is another amazing possiblity offered by Coin, the engine behind the FreCAD 3D view, which was masterfully adapted by Werner some time ago to produce SVG code.

The way it works is simple: When needing a recompute, the TechDraw view spawns a separate FreeCAD 3D view, copies over the Coin nodes from the main view, sets the camera and clip planes as needed, renders it to an SVG file, and closes the view. As there is no shape operation involved, this happend blind-fast, even for pretty large models. It can basically solve all the problem of using TechDraw for large models. We could in theory have any number of views open at the same time with little overhead.

Of course, there are still problems: If you have many views needing recomputation, FreeCAD opens and closes many 3D views at the same time, which is prone to crash, and some features are not supported by this method, such as transparency and cut lines. But no doubt solutions will come up. The important thing is that, I feel, we now have a real, working solution to work with.

DXF layer support improvements

Image

The DXF import/export framework has also gained better support for Layers. Layers are now imported and exported with correct line color and style, and objects that are inside a layer that affects children color and style are exported with "BYLAYER" style, which means they must take the color or line style of their host layer. This works only for the legacy (python) importer and exporter at the moment.

This gives a much better workflow when using FreeCAD as a 2D CAD platform, which is something I intend to develop further. I am increasingly using FreeCAD as my main 2D CAD platform too, in order to, as they say in the developers world, eat your own dogfood, and also solve issues on the way.

I don't really think 2D CAD is anywhere close to dead... In many cases *drawing* is still more efficient than *modeling*... Besides, having both 2D drawing and 3D/BIM modeling tools in the same "space" and be able to use both in the same model is awesome.

BIM Rewire tool

Image

This is a small tool that I added to the BIM workbench that will go to Draft once it has stabilized, it basically takes a bunch of lines, being separate objects or not, and joins them into wires (it finds connected edges automatically).

Link branch merge

This might not say you much if you are from the BIM area, but it is a major milestone in FreeCAD's life. The Link branch has been developed mostly single-handedly during more than a year by Realthunder, and has finally been merged into FreeCAD's main code branch, after a gigantic review work that Werner did.

As the Link branch does some pretty heavy changes all over FreeCAD, during this year, there have been many lengthy discussions and issues, and the branch has grown into an enormous set of changes, which has been very hard to merge. But it is finally there, and so far it behaves pretty well, and is causing far less instabilities than I anticipated.

Basically, the Link branch prepares FreeCAD for the phase that was scheduled to happen after PartDesign: Working with assemblies. It allows to share object data such as geometry or even their 3D visual representation with other objects, inside or outside the file.

The Link branch basically adds a new object type, that we call App::Link, that is able to use another object's shape or visual representation. Think of a kind of sublime, absolute clone. Or a same object living into two different "instances".

A lot of the functionality offered by the App::Link functionality is already present in Arch/BIM (clones, references,...), but this is a much wider and lower-level implementation, and no doubt many new uses will pop-up for us too.


That's all for this month I guess, next month I'll be traveling most part of the month (Russia and Belgium, tell me if you are around for a beer!) so there will likely be much less coding from my part. But I'll concentrate on working on the documentation instead, which is in dire need of a good cleanup!

Cheers

Yorik
Post Reply