diff --git a/src/ifcconvert/XmlSerializer.cpp b/src/ifcconvert/XmlSerializer.cpp index 9a8cc05d95..83be2a66e5 100644 --- a/src/ifcconvert/XmlSerializer.cpp +++ b/src/ifcconvert/XmlSerializer.cpp @@ -164,6 +164,16 @@ void descend(IfcProduct* product, ptree& tree) { } } + if (product->is(Type::IfcElement)) { + IfcElement* element = static_cast(product); + IfcOpeningElement::list::ptr openings = get_related( + element, &IfcElement::HasOpenings, &IfcRelVoidsElement::RelatedOpeningElement); + + for (IfcOpeningElement::list::it it = openings->begin(); it != openings->end(); ++it) { + descend(*it, child); + } + } + #ifdef USE_IFC2x3 IfcObjectDefinition::list::ptr structures = get_related