#7470 Well Path Tools : Use a positive value of each component to represent length

This commit is contained in:
Magne Sjaastad 2021-03-08 13:07:34 +01:00
parent 6481813eeb
commit 59562aec29
2 changed files with 5 additions and 1 deletions

View File

@ -131,7 +131,9 @@ cvf::Vec3d RigWellPathIntersectionTools::calculateLengthInCell( const std::array
jAxisDirection.z(),
kAxisDirection.z() );
return vec.getTransformedVector( localCellCoordinateSystem.getInverted() );
auto signedVector = vec.getTransformedVector( localCellCoordinateSystem.getInverted() );
return { std::fabs( signedVector.x() ), std::fabs( signedVector.y() ), std::fabs( signedVector.z() ) };
}
//--------------------------------------------------------------------------------------------------

View File

@ -59,6 +59,8 @@ public:
const cvf::Vec3d& startPoint,
const cvf::Vec3d& endPoint );
// Returns the length along each axis in local cell coordinate system
// The returned vector has unsigned component values
static cvf::Vec3d calculateLengthInCell( const RigMainGrid* grid,
size_t cellIndex,
const cvf::Vec3d& startPoint,