diff --git a/src/serializers/HdfSerializer.cpp b/src/serializers/HdfSerializer.cpp index 5542a0da6e..720165ada9 100644 --- a/src/serializers/HdfSerializer.cpp +++ b/src/serializers/HdfSerializer.cpp @@ -252,6 +252,11 @@ void HdfSerializer::read_surface_style(surface_style_serialization& s, std::shar } +void HdfSerializer::remove(const std::string& guid) { + if (H5Lexists(file.getId(), guid.c_str(), H5P_DEFAULT)) { + file.unlink(guid); + } +} const IfcGeom::Element* HdfSerializer::read(IfcParse::IfcFile& f, const std::string& guid, unsigned int representation_id, read_type rt) { if (!H5Lexists(file.getId(), guid.c_str(), H5P_DEFAULT)) { diff --git a/src/serializers/HdfSerializer.h b/src/serializers/HdfSerializer.h index 614cada7c0..2b18791a48 100644 --- a/src/serializers/HdfSerializer.h +++ b/src/serializers/HdfSerializer.h @@ -95,6 +95,7 @@ public: H5::Group write(const IfcGeom::Element* o); void write(const IfcGeom::BRepElement* o); void write(const IfcGeom::TriangulationElement* o); + void remove(const std::string& guid); const IfcGeom::Element* read(IfcParse::IfcFile& f, const std::string& guid, unsigned int representation_id, read_type rt = READ_BREP);