mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
Add IFC entity type as element group attribute
This commit is contained in:
@@ -113,12 +113,18 @@ void HdfSerializer::write(const IfcGeom::TriangulationElement<real_t>* o) {
|
|||||||
const int fcount = (int)mesh.faces().size() / 3;
|
const int fcount = (int)mesh.faces().size() / 3;
|
||||||
const bool isyup = settings().get(SerializerSettings::USE_Y_UP);
|
const bool isyup = settings().get(SerializerSettings::USE_Y_UP);
|
||||||
|
|
||||||
|
std::string value = o->type();
|
||||||
|
|
||||||
if (fcount > 0) {
|
if (fcount > 0) {
|
||||||
|
|
||||||
guids.insert(guid);
|
guids.insert(guid);
|
||||||
elementGroup = file.createGroup(guid);
|
elementGroup = file.createGroup(guid);
|
||||||
meshGroup = elementGroup.createGroup("Triangle Mesh");
|
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;
|
const int RANK = 2;
|
||||||
hsize_t dimsf[2];
|
hsize_t dimsf[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user