#13651 Fix formation dip sign issue when fracture normal is rotated 180 deg

Rename calculateFormationDip to calculateAngleFromVertical to better reflect what the function computes. Add calculateFormationDipFromHorizontal which applies the -90 deg adjustment and std::abs, fixing the wrong sign when the fracture direction normal is flipped.
This commit is contained in:
Magne Sjaastad committed 2026-02-24 13:46:15 +01:00
1 parent d3d1c1a148
commit 71b734efec
4 files changed
+19 -9

No files matched your search

@@ -105,7 +105,7 @@ std::expected<caf::PdmObjectHandle*, QString> RimcWellPath_addFracture::execute(
cvf::Vec3d formationDirection = RimStimPlanModel::projectVectorIntoFracturePlane( position, fractureDirectionNormal, direction );
if ( !formationDirection.isUndefined() )
{
double formationDip = RigStimPlanModelTools::calculateFormationDip( formationDirection ) - 90.0;
double formationDip = RigStimPlanModelTools::calculateFormationDipFromHorizontal( formationDirection );
RiaLogging::info( QString( "Computed formation dip: %1" ).arg( formationDip ) );
wellPathFracture->setDip( formationDip );