mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5615 GOCAD : Fix sign of z-value of imported vertex data
This commit is contained in:
parent
0cd0c7d80d
commit
ff2e757789
@ -51,7 +51,9 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceReader::read
|
||||
{
|
||||
std::ifstream stream( filename.toLatin1().data() );
|
||||
|
||||
bool isInTfaceSection = false;
|
||||
bool isInTfaceSection = false;
|
||||
GocadZPositive zDir = GocadZPositive::Unknown;
|
||||
|
||||
while ( stream.good() )
|
||||
{
|
||||
std::string line;
|
||||
@ -61,8 +63,6 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceReader::read
|
||||
|
||||
std::istringstream lineStream( line );
|
||||
|
||||
GocadZPositive zDir = GocadZPositive::Unknown;
|
||||
|
||||
std::string firstToken;
|
||||
lineStream >> firstToken;
|
||||
|
||||
@ -82,7 +82,10 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RifSurfaceReader::read
|
||||
|
||||
if ( vertexId > -1 )
|
||||
{
|
||||
if ( zDir == GocadZPositive::Elevation ) z = -z;
|
||||
if ( zDir == GocadZPositive::Depth )
|
||||
{
|
||||
z = -z;
|
||||
}
|
||||
|
||||
vertices.emplace_back( cvf::Vec3d( x, y, z ) );
|
||||
vertexIdToIndex[vertexId] = static_cast<unsigned>( vertices.size() - 1 );
|
||||
|
Loading…
Reference in New Issue
Block a user