mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2847 Add a fall back dominant direction (0, -1, 0) if the path does not extrude in z-direction.
* This direction means Left will cause it to go -x and Right +x so that the directions are correct with respect to "Left" and "Right" when you look "North".
This commit is contained in:
parent
f6cbf0f34f
commit
a165172723
@ -139,5 +139,11 @@ cvf::Vec3d RigWellPathGeometryTools::estimateDominantDirectionInXYPlane(const st
|
||||
}
|
||||
directionSum += vec;
|
||||
}
|
||||
|
||||
if (directionSum.length() < 1.0e-8)
|
||||
{
|
||||
directionSum = cvf::Vec3d(0, -1, 0);
|
||||
}
|
||||
|
||||
return directionSum.getNormalized();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user