From 84e7a86e77125e02e9fb9eb159e7d6f3ef4ccbe3 Mon Sep 17 00:00:00 2001 From: Stinkfist0 Date: Sun, 28 Feb 2016 19:51:50 +0200 Subject: [PATCH] XmlSerializer: handle openings. Original author of the commit/idea @otsoa. --- src/ifcconvert/XmlSerializer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) 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