mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
Thermal Fracture: fix occasional glitch in fracture orientation.
The normal has to always point downwards, and this was not the case.
This commit is contained in:
parent
737eb9693a
commit
286855cce0
@ -527,9 +527,13 @@ std::vector<cvf::Vec3d>
|
||||
};
|
||||
|
||||
// Find the rotation that aligns the data so that depth (z coord) is the most similar.
|
||||
auto [e1, e2] = findPointsWithMostSimilarDepth( relativePos, depths );
|
||||
cvf::Vec3d direction = e1 - e2;
|
||||
auto rotMat2 = rotationMatrixBetweenVectors( direction.getNormalized(), cvf::Vec3d::X_AXIS );
|
||||
auto [e1, e2] = findPointsWithMostSimilarDepth( relativePos, depths );
|
||||
cvf::Vec3d direction = e1 - e2;
|
||||
cvf::Vec3d directionNormal = direction.getNormalized();
|
||||
// Make sure normal is pointing down
|
||||
if ( directionNormal.y() > 0.0 ) directionNormal *= -1.0;
|
||||
|
||||
auto rotMat2 = rotationMatrixBetweenVectors( directionNormal, cvf::Vec3d::X_AXIS );
|
||||
for ( auto& r : relativePos )
|
||||
{
|
||||
r.transformVector( rotMat2 );
|
||||
|
Loading…
Reference in New Issue
Block a user