IFC Parser misses unit assignment?

Hi guys,

I am testing the latest IFC. I am using a server version 2.24.2.

After importing an IFC file, I could not find any information about the unit alignment. Each IFC file normally specifies IfcUnitAssignment, where all units like length, area, cost, etc. are defined. Now, this is a problem when reading any parameters, as the units are missing. Besides, I find it a bit odd that the units are not assigned to the parameters, as is done with files from Revit, where each parameter also has a unit.

Did I miss the unit assignment? Can I read it from any object? It would help me a lot! Thanks!

Cheers,
Kilian

Which unit systems do you use in your IFC files?
And what are you expecting to see in Speckle?


The current IFC importer will correctly scale units, all geometry will be dimentionally accurate, but will convert everything to meters for the Speckle data. This is because IFC supports way more types of units than Speckle, including custom ones and projects with mixed unit systems which Speckle does not support.

We could look into supporting specific length units better, but this isn’t currently on the roadmap.

Hi Jedd,

Thanks for the quick response.

We have no control over the IFC files that we receive. I need to implement some flexibility when requesting the files.

It is good to know that you convert the geometries into meters. Knowing that this will always be in meters allows us to handle geometries. However, the parameters do not seem to be converted accordingly. For instance, the project that I use is set to length: millimeters, area: square meters, volume: cubic meters.

The properties in Speckle reflect this as well. However, I have no chance to find the unit settings once the file has been parsed by Speckle.

When using Revit, the same behavior is supported by Speckle, as shown below.

1 Like

Hmm, so these PSET property values are not being scaled to meters?
or showing their original unit.

In Revit, every property is aware of it’s unit system. I’ll need to investigate the IFC schema a bit more to understand if this is the same in IFC. Potentially there’s something we could do here to either attach the Unit like Revit properties, or scale length units to meters…

I’ll do some investigation later this week.

Hi Jedd,

As far as I understood, each Ifc File has one IfcUnitAssignment.

The IfcUnitAssignment is a list of IfcUnits where each unit type is defined. For instance, IfcUnitEnum.AREAUNIT, IfcUnitEnum.LENGTHUNIT, IfcUnitEnum.VOLUMEUNIT.

Everything mentioned so far is valid for the entire Ifc file.

Now, when looking at an individual parameter in the quantity set, these parameters are normally of type IfcElementQuantity. In IfcElementQuantity.Quantities, we can then find the different quantity parameters like NetVolume, SurfaceArea…

However, they are all of a different class. They can be, among others, IfcQuantityLength, IfcQuantityVolume, and IfcQuantityArea. And this is where we again have to refer to the global unit settings that we found in IfcUnitAssignment.

I hope this helps you somehow. I would recommend that, instead of scaling the dimensions to a common unit when reading the parameters/quantities, include the units in the parameters/quantities, as is done now when parameters are sent from Revit (see screenshot before). It makes it easier when retrieving. Or at least, include somewhere in the model that it is in meters. Maybe with the old “units” attribute at the Base.

Please let me know what you think!

Cheers,
Kilian

1 Like