Commit 34bb63de authored by Sylvain Thery's avatar Sylvain Thery

bug export nastran file

parent 5cc5a623
......@@ -46,6 +46,15 @@ inline std::string truncFloatTO8(float f)
std::stringstream ss;
ss << f;
std::string res = ss.str();
size_t expo = res.find('e');
if (expo != std::string::npos)
{
if ( res[expo+2] == '0')
return res.substr(0,6) + res[expo+1] + res[expo+3];
return res.substr(0,5) + res.substr(expo+1);
}
return res.substr(0,8);
}
......
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