Add IFC entity type as element group attribute

This commit is contained in:
johltn
2021-02-18 11:19:03 +01:00
parent c7a0003ef4
commit 17bb42faab
+6
View File
@@ -113,12 +113,18 @@ void HdfSerializer::write(const IfcGeom::TriangulationElement<real_t>* o) {
const int fcount = (int)mesh.faces().size() / 3;
const bool isyup = settings().get(SerializerSettings::USE_Y_UP);
std::string value = o->type();
if (fcount > 0) {
guids.insert(guid);
elementGroup = file.createGroup(guid);
meshGroup = elementGroup.createGroup("Triangle Mesh");
H5::StrType str_type(0, H5T_VARIABLE);
H5:: DataSpace attrdspace(H5S_SCALAR);
H5::Attribute att = elementGroup.createAttribute("IFC entity type", str_type, attrdspace);
att.write(str_type, value);
const int RANK = 2;
hsize_t dimsf[2];