mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix : fill the storey property of an Element with NULL when we don't find any IfcBuildingStorey parent
This commit is contained in:
@@ -363,8 +363,8 @@ void ColladaSerializer::ColladaExporter::write(const IfcGeom::TriangulationEleme
|
||||
material_references.push_back(material_name);
|
||||
}
|
||||
|
||||
DeferredObject defered = (serializer->settings().get(SerializerSettings::USE_ELEMENT_HIERARCHY) ?
|
||||
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
||||
DeferredObject defered = (serializer->settings().get(SerializerSettings::USE_ELEMENT_HIERARCHY) && o->storey() != NULL ?
|
||||
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
||||
mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs(), *(o->storey())) :
|
||||
DeferredObject(name, representation_id, o->type(), o->transformation().matrix().data(), mesh.verts(), mesh.normals(),
|
||||
mesh.faces(), mesh.edges(), mesh.material_ids(), mesh.materials(), material_references, mesh.uvs()));
|
||||
|
||||
@@ -132,12 +132,12 @@ private:
|
||||
|
||||
if (parent1 == NULL || parent2 == NULL)
|
||||
{
|
||||
bool res = (def_obj1.unique_id < def_obj2.unique_id ? true : false);
|
||||
bool res = (parent1 == NULL) ? true : false;
|
||||
return res;
|
||||
}
|
||||
else
|
||||
{
|
||||
bool res = parent1->name() < parent2->name() ? true : false;
|
||||
bool res = parent1->name().compare(parent2->name()) > 0 ? true : false;
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -604,6 +604,7 @@ namespace IfcGeom {
|
||||
}
|
||||
|
||||
if (hasParent) { ret->SetFloor(parent_object); }
|
||||
else { ret->SetFloor(NULL); } // Set it so null in order to know that we didn't found any IfcBuildingStorey type parent
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user