Fix latebound entity inheritance hierarchy wrt id() #5822 - not ideal, because BaseEntity.declation now returns declaration

This commit is contained in:
Thomas Krijnen
2024-11-28 12:57:08 +01:00
parent c9847caa6a
commit 8edbb37121
4 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ namespace IfcGeom {
// Use the id to compare, or the elevation is the elements are IfcBuildingStoreys and the elevation is set
friend bool operator < (const Element& element1, const Element& element2) {
if (element1.type() == "IfcBuildingStorey" && element2.type() == "IfcBuildingStorey") {
size_t attr_index = element1.product()->declaration().attribute_index("Elevation");
size_t attr_index = element1.product()->declaration().as_entity()->attribute_index("Elevation");
auto elev_attr1 = element1.product()->data().get_attribute_value(attr_index);
auto elev_attr2 = element2.product()->data().get_attribute_value(attr_index);