Skip to content
Snippets Groups Projects
Commit 4427ab7f authored by Tom Fischer's avatar Tom Fischer
Browse files

[MeL/MeshEnums] Add flex. in spelling elem. types.

parent d7a39319
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include "MeshEnums.h" #include "MeshEnums.h"
#include <boost/algorithm/string/predicate.hpp>
namespace MeshLib { namespace MeshLib {
std::string MeshElemType2String(const MeshElemType t) std::string MeshElemType2String(const MeshElemType t)
{ {
...@@ -91,35 +93,35 @@ std::string MeshElemType2StringShort(const MeshElemType t) ...@@ -91,35 +93,35 @@ std::string MeshElemType2StringShort(const MeshElemType t)
MeshElemType String2MeshElemType(const std::string &s) MeshElemType String2MeshElemType(const std::string &s)
{ {
if (s == "point" || s == "Point") if (boost::iequals(s, "point"))
{ {
return MeshElemType::POINT; return MeshElemType::POINT;
} }
if (s == "line" || s == "Line") if (boost::iequals(s, "line"))
{ {
return MeshElemType::LINE; return MeshElemType::LINE;
} }
if (s == "quad" || s == "Quadrilateral") if (boost::iequals(s, "quad") || boost::iequals(s, "Quadrilateral"))
{ {
return MeshElemType::QUAD; return MeshElemType::QUAD;
} }
if (s == "hex" || s == "Hexahedron") if (boost::iequals(s, "hex") || boost::iequals(s, "Hexahedron"))
{ {
return MeshElemType::HEXAHEDRON; return MeshElemType::HEXAHEDRON;
} }
if (s == "tri" || s == "Triangle") if (boost::iequals(s, "tri") || boost::iequals(s, "Triangle"))
{ {
return MeshElemType::TRIANGLE; return MeshElemType::TRIANGLE;
} }
if (s == "tet" || s == "Tetrahedron") if (boost::iequals(s, "tet") || boost::iequals(s, "Tetrahedron"))
{ {
return MeshElemType::TETRAHEDRON; return MeshElemType::TETRAHEDRON;
} }
if (s == "pris" || s == "Prism") if (boost::iequals(s, "pris") || boost::iequals(s, "Prism"))
{ {
return MeshElemType::PRISM; return MeshElemType::PRISM;
} }
if (s == "pyra" || s == "Pyramid") if (boost::iequals(s, "pyra") || boost::iequals(s, "Pyramid"))
{ {
return MeshElemType::PYRAMID; return MeshElemType::PYRAMID;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment