From 182952a8811a82c0cb2da6dee7b716ef7a17a2c7 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 20 Mar 2021 19:19:30 +0100 Subject: [PATCH] Mesh: [skip ci] do not make lower case read lines of OBJ file as otherwise it may fail to load the MTL file --- src/Mod/Mesh/App/Core/MeshIO.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Mod/Mesh/App/Core/MeshIO.cpp b/src/Mod/Mesh/App/Core/MeshIO.cpp index 1c49e1205c..5184bff722 100644 --- a/src/Mod/Mesh/App/Core/MeshIO.cpp +++ b/src/Mod/Mesh/App/Core/MeshIO.cpp @@ -341,11 +341,6 @@ bool MeshInput::LoadOBJ (std::istream &rstrIn) unsigned long countMaterialFacets = 0; while (std::getline(rstrIn, line)) { - // when a group name comes don't make it lower case - if (!line.empty() && line[0] != 'g') { - for (std::string::iterator it = line.begin(); it != line.end(); ++it) - *it = tolower(*it); - } if (boost::regex_match(line.c_str(), what, rx_p)) { fX = (float)std::atof(what[1].first); fY = (float)std::atof(what[4].first); @@ -1285,8 +1280,7 @@ bool MeshInput::LoadMeshNode (std::istream &rstrIn) return false; while (std::getline(rstrIn, line)) { - for (std::string::iterator it = line.begin(); it != line.end(); ++it) - *it = tolower(*it); + boost::algorithm::to_lower(line); if (boost::regex_match(line.c_str(), what, rx_p)) { fX = (float)std::atof(what[1].first); fY = (float)std::atof(what[4].first);