#9470 User defined perf length for azimuth fractures

Fractures: Add UI for user-defined perforation length for az fractures
Add user defined perforation length for azimuth fractures.
Janitor: remove duplication
This commit is contained in:
Kristian Bendiksen
2022-11-24 10:42:26 +01:00
committed by GitHub
parent 4345cb3a70
commit e8789f3d4b
14 changed files with 171 additions and 64 deletions

View File

@@ -165,6 +165,21 @@ double GeometryTools::getAngle( const cvf::Vec3d& v1, const cvf::Vec3d& v2 )
return angle;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Mat4d GeometryTools::rotationMatrixBetweenVectors( const cvf::Vec3d& v1, const cvf::Vec3d& v2 )
{
cvf::Vec3d rotAxis = v1 ^ v2;
rotAxis.normalize();
// Guard acos against out-of-domain input
const double dotProduct = cvf::Math::clamp( v1 * v2, -1.0, 1.0 );
const double angle = cvf::Math::acos( dotProduct );
cvf::Mat4d rotMat = cvf::Mat4d::fromRotation( rotAxis, angle );
return rotMat;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------