Cross-posting from https://yorik.uncreated.net/blog/2020-003-freecad-april
FreeCAD BIM development news - April 2020
Here goes a new update about the development of BIM tools
. I'll try my best to resume posting here once a month and hopefully do some videos again next time.
We have some great stuff to share this month, and it's great to see a momentum picking, with new developers putting some efforts into Arch/BIM development. This is visible not only in FreeCAD, but in other BIM FOSS projects as well. Have a look at the very cool osarch.org
if you haven't yet.
Thanks a million to everybody who supports me on Patreon
! This real makes a nice difference for me as I can throw a nice amount of time into FreeCAD development.
So here is what I've been working with this month:
Better partial IFC handling
Most IFC files you'll find around have a full IfcProject -> IfcSite -> IfcBuilding -> IfcBuildingStorey structure, even though this is not specifically required by the IFC specifications (the only thing really mandatory is one IfcProject and at least one building component, being building or storey). But it has become a kind of general habit to always have all the four in each and every IFC file.
There is of course a kind of logic there, that you cannot have a storey without a building around it, and there is always a site under any built building...
In practice, however, you don't always know or care about these when starting a BIM project. In FreeCAD, more than often, when importing an IFC file, the first thing I do is delete the project, site and building, as they usually only serve to contain a storey, which in FreeCAD is a Building Part
and can live on its own, as it does not necessarily represent a storey.
So now there is an import option that you can turn on, to skip importing the project and site, and also building and storey if there is only one of each, and place all the imported contents in to a group.
This makes it easy to handle partial IFC files, that only contain parts of a building, not an entire one. For example, the structural or MEP part of a building. You can have your main FreeCAD model, and import the contents of partial IFC file, each into a separate group. When you need to update one specific file, it is just a matter of deleting the group and re-import the file.
This paves the way for a bit more automatic behaviour similar to the Reference
tool, where new versions of the IFC file could automatically be detected, the user notified, and a one-click update performed.
Annotation style editor
This is preliminary work to support annotation styles in Draft
. These are styles defined by the user, where you can configure things like text font, size, colour or dimension arrows, and have these styles applied to any of your texts, dimensions or labels. On changing any setting of the style, all objects that use it change automatically.
We started by implementing an editor and a system to store the styles in the document. Next steps will be adapting the different annotation objects to support the styles.
A new Truss
tool has landed in Arch and BIM workbenches. This tool allow you to build a variety of trusses
. Like walls or beams, they are constructed from a baseline, and different properties define the shape of the truss, its height, the way supporting and intermediary members are drawn, etc.
It also supports multi-materials
, so you can assign a different material to the inferior and superior members and the intermediary members.
As there is no proper IFC class for trusses, they are currently exported as IfcBeams. Suggestions are welcome to better this point, though.
Open-source IFC-based classification
Dion Moult, the author of BlenderBIM
(and quite some work in FreeCAD itself), has published a series of building classification systems such as OmniClass or Uniformat in IFC format. FreeCAD can now use these IFC files with the BIM Classification
Both the former XML-based format and this IFC format can be used by the tool, the advantage of IFC being that it doesn't depend on vendors since it is managed the open-source way, and it can be fixed/bettered by users.
Curtain wall tool
A new Curtain wall
tool has been also added to Arch and BIM workbenches. This is still preliminary work, since curtain walls is a complex and delicate matter, but I believe the base is pretty solid.
The curtain wall object needs a base surface to work on. If none is selected when using the tool, you can simply draw a line between two points, like the standard wall tool. The surface is then subdivided into rows and columns, and four points extracted from the surface subdivisions, forming quadrangular facets. Each facet receives a panel, the horizontal lines receive horizontal mullions, and the vertical lines vertical mullions. If the 4 points are not co-planar, two triangles are formed instead of a quad, and a diagonal mullion is added.
This covers basically almost any kind of base surface, no matter how complex. To get quadrangular facets, however, the base face must be ruled
. A ruled surface is basically a surface formed by sweeping a straight line along guides. Straight extrusions or portions of cones are ruled surfaces. But surfaces formed by four NURBS curves might not be. The tool will work on any of them, but produce triangles in the latter case. This, however, is the only way it could be built in real-life anyway...
You can achieve more complex subdivisions that the regular ones proposed by the tool, by preparing and subdividing your base surface yourself before using the tool, for example by subtracting
perpendicular faces from it, to produce custom subdivisions, and setting horizontal and vertical subdivisions properties of the curtain wall to 1, to not subdivide any further.
As mostly everywhere in FreeCAD, it's pretty easy to keep all this nicely parametric, using a base rectangle (Draft or Sketch) with controllable dimensions, and using expressions
to set the positions of the intermediary planes accordingly, for example using an array
where the number of vertical divisions depends on the height of the base rectangle.
are the main file format for GIS
. They are actually composed of 3 files, a .shp, .shx and .dbf file). One contains the geometry, one the fields related to the geometry, and one the projection system information.
Shapefiles contain 2D points, polylines or polygons, referenced to a specific geographic projection system. They can also contain fields, which can be numbers or text. Each shape (point, polyline, polygon) can have an own value in each of the fields. This is the great gem of GIS, the ability to tie geometric objects to information cells stored in an attached database. You can do anything with these, such as tag each object (for example to give names to streets), or give a certain ID to points.
Another very common use of fields is to give an elevation to each shape of the shapefile. This can be used by FreeCAD when you import the file
to draw each shape at its correct elevation.
At the moment, the importer will not perform any transformation of the coordinates system from the file, and will place each shape at the location stored in the file. Geographic projection coordinates is a vast subject currently out of my understanding, but I'd like to be able to do some simple transformations, such as import in meters or place the imported file at the 3D space origin. Help welcome!
Roundtripping basically consists in exporting your model from any BIM application to IFC, re-importing the IFC file into the same application, and being able to continue working without having lost any significant information. during the operation.
Of course, IFC is a complex format, and it does not have the exact the same set of features of your favourite BIM application (FreeCAD, of course
). So the IFC file never reflects exactly your model in its original BIM application. So you will inevitably loose some information on the way. The question here is to be able to identify and save what you actually need.
Some will tell you IFC is not made for that purpose and we should abandon that idea. However, me and several others think IFC has all the capabilities for and could be used that way. Ryan Schultz
and I have a long history
of trying to address such IFC translation issues between FreeCAD and Revit.
Now with osarch
folks we are starting to build step-by-step simple examples of what works and where, hopefully we can progress a bit in isolating the really important information and have better understanding of what works on each BIM platform (and of course solve problems on FOSS ones and make them the best IFC platforms out there!)
That's it for this month, thanks for reading, and see you next month!