Format obj and dae output predictably based on rfc notation of GlobalId. As discussed in https://sourceforge.net/p/ifcopenshell/discussion/1782717/thread/cbb0c8ca/

This commit is contained in:
Thomas Krijnen
2015-05-13 14:30:21 +00:00
parent b37a684eb9
commit 9bf9f82b3b
15 changed files with 176 additions and 115 deletions
+1 -7
View File
@@ -67,13 +67,7 @@ void WaveFrontOBJSerializer::writeMaterial(const IfcGeom::Material& style) {
}
void WaveFrontOBJSerializer::write(const IfcGeom::TriangulationElement<double>* o) {
std::string tmp = o->name().empty() ? o->guid() : o->name();
std::replace( tmp.begin(), tmp.end(), ' ', '_');
std::string name = tmp;
name += std::string("_") + o->context();
obj_stream << "g " << name << "\n";
obj_stream << "g " << o->unique_id() << "\n";
obj_stream << "s 1" << "\n";
const IfcGeom::Representation::Triangulation<double>& mesh = o->geometry();