mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
SvgSerializer: Name storeys properly too
- Fix correct "storey-" prefix for stories - Follow user settings on names/guids/notset
This commit is contained in:
committed by
Thomas Krijnen
parent
c419885329
commit
a9606b3044
@@ -348,7 +348,11 @@ std::string SvgSerializer::nameElement(const IfcSchema::IfcProduct* elem) {
|
||||
if (elem == 0) { return ""; }
|
||||
std::ostringstream oss;
|
||||
const std::string type = elem->is(IfcSchema::Type::IfcBuildingStorey) ? "storey" : "product";
|
||||
oss << "id=\"product-" << IfcParse::IfcGlobalId(elem->GlobalId()).formatted() << "\"";
|
||||
const std::string name = (settings().get(SerializerSettings::USE_ELEMENT_GUIDS)
|
||||
? elem->GlobalId() : (settings().get(SerializerSettings::USE_ELEMENT_NAMES)
|
||||
? elem->Name() : IfcParse::IfcGlobalId(elem->GlobalId()).formatted()));
|
||||
|
||||
oss << "id=\"" << type << "-" << name << "\"";
|
||||
return oss.str();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user