Don't fail on product without placement

This commit is contained in:
Thomas Krijnen
2024-03-21 09:44:40 +01:00
parent 0d3c73de82
commit 4b32381192
+6 -1
View File
@@ -8,7 +8,12 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcProduct* inst) {
// @todo decide on this, what happens in the product mapping?
// currently things like openings, layers and materials are processed in the converter
auto c = taxonomy::make<taxonomy::collection>();
c->matrix = taxonomy::cast<taxonomy::matrix4>(map(inst->ObjectPlacement()));
if (inst->ObjectPlacement()) {
c->matrix = taxonomy::cast<taxonomy::matrix4>(map(inst->ObjectPlacement()));
} else {
// @todo Otherwise we get crashes in the serializer, but maybe fix them there..?
c->matrix = taxonomy::make<taxonomy::matrix4>();
}
return c;
/*