Skip to content

Commit

Permalink
Don't fail on product without placement
Browse files Browse the repository at this point in the history
  • Loading branch information
aothms committed Mar 21, 2024
1 parent 0d3c73d commit 4b32381
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ifcgeom/mapping/IfcProduct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/*
Expand Down

0 comments on commit 4b32381

Please sign in to comment.