diff --git a/src/serializers/SvgSerializer.cpp b/src/serializers/SvgSerializer.cpp index ab4c5c0d0c..c7e679e793 100644 --- a/src/serializers/SvgSerializer.cpp +++ b/src/serializers/SvgSerializer.cpp @@ -668,7 +668,7 @@ void SvgSerializer::write(const IfcGeom::BRepElement* brep_obj) { // @todo is it correct to call nameElement() here with a single storey (what if this element spans multiple?) geometry_data data{ compound_local, dash_arrays, trsf, brep_obj->product(), storey, elev, brep_obj->name(), nameElement(storey, brep_obj) }; - if (auto_section_ || auto_elevation_ || section_ref_ || elevation_ref_) { + if (auto_section_ || auto_elevation_ || section_ref_ || elevation_ref_ || elevation_ref_guid_) { element_buffer_.push_back(data); } @@ -1972,6 +1972,8 @@ void SvgSerializer::finalize() { } } + previous = it->first; + if (it->second.second.empty()) { continue; } @@ -1982,7 +1984,6 @@ void SvgSerializer::finalize() { svg_file << jt->str(); } svg_file << " \n"; - previous = it->first; } if (previous) {