Commit e97a170a authored by Michael Turner's avatar Michael Turner

Merge branch 'fix/geo-spacing' into 'master'

Fix CR issue in the GEO reader

See merge request !805
parents 9a32dc04 24425e60
......@@ -8,6 +8,7 @@ v5.0.0
expansion in pyramids (!750)
- Significant overhaul of CMake infrastructure (!770, !804)
- Fix ThridpartyCCM options (!802)
- Fix Windows CRLF tokens in GEO reader and improve comment handling (!805)
**NekMesh**:
- Add feature to read basic 2D geo files as CAD (!731)
......
......@@ -57,9 +57,9 @@ bool CADSystemOCE::LoadCAD()
{
if (m_naca.size() == 0)
{
//not a naca profile behave normally
//could be a geo
string ext = boost::filesystem::extension(m_name);
// not a naca profile behave normally
// could be a geo
string ext = boost::filesystem::extension(m_name);
if (boost::iequals(ext, ".geo"))
{
......@@ -422,15 +422,11 @@ TopoDS_Shape CADSystemOCE::BuildGeo(string geo)
{
getline(f, fline);
if (fline.size() == 0)
{
continue;
}
boost::erase_all(fline, "\r");
if (boost::starts_with(fline, "//"))
{
continue;
}
vector<string> tmp1, tmp2;
boost::split(tmp1, fline, boost::is_any_of("//"));
fline = tmp1[0];
if (!boost::contains(fline, ";"))
{
......@@ -441,7 +437,6 @@ TopoDS_Shape CADSystemOCE::BuildGeo(string geo)
fline = flinetmp + fline;
flinetmp.clear();
vector<string> tmp1, tmp2;
boost::split(tmp1, fline, boost::is_any_of("="));
boost::split(tmp2, tmp1[0], boost::is_any_of("("));
......@@ -472,9 +467,9 @@ TopoDS_Shape CADSystemOCE::BuildGeo(string geo)
}
else if (boost::iequals(type, "Line Loop"))
{
//line loops sometimes have negative entries for gmsh
//orientaton purposes
//we dont care so remove it
// line loops sometimes have negative entries for gmsh
// orientaton purposes
// we dont care so remove it
boost::erase_all(var, "-");
loops[id] = var;
}
......@@ -561,6 +556,5 @@ TopoDS_Shape CADSystemOCE::BuildGeo(string geo)
return sf.Face();
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment