IfcCountMeasure changes from NUMBER to INTEGER

According to wikipedia’s page on the express data modelling language, number is typically implemented as a double. This is also expected in view of IfcNumericMeasure often needing to be a real.

In Ifc2x3 Tc1 and Ifc4 Add2 Tc1, IfcCountMeasure is defined as a NUMBER, while in Ifc4x3 Add2 it is defined as an INTEGER. Indeed, in view of the existence of IfcNumericMeasure and the intention of IfcCountMeasure, it makes sense to change it. But…

There can be an IfcCountMeasure with value 3.5 inside an Ifc4 file. This change hence breaks backward compatibility (i.e. the Ifc4 data doesn’t ‘fit’ in the Ifc4x3). From a data modeling perspective, it seems a bit odd to force this change without a major version bump.

Equating a ‘Count’ with Number was clearly a mistake. IfcRealMeasure is available for doubles. So a correction was at least foreseeable.

Thank you for your answer.

Yes, it’s obvious that it’s a mistake, and we’re working around it, also treating the ifc2x3 and ifc4 IfcCountMeasures as integers.

There exists no IfcRealMeasure. IfcCountMeasure is based on count_measure defined in ISO 10303-41 which is based on ISO 31. Counts can be real numbers. But see Revert IfcCountMeasure to number and introduce a new IfcIntegerCountMeasure instead · Issue #580 · buildingSMART/IFC4.3.x-development · GitHub for the discussion.

Applying the second of the Object Oriented Solid Principles would not be bad (The Open–closed principle: "Software entities … should be open for extension, but closed for modification).