Geomech frames support (#9678)

Support for showing frames in geomech data.
This commit is contained in:
jonjenssen
2023-01-18 14:42:33 +01:00
committed by GitHub
parent 95202ad36a
commit 85f1b004cb
106 changed files with 2468 additions and 1948 deletions

View File

@@ -199,19 +199,19 @@ void RimTensorResults::mappingRange( double* min, double* max ) const
Rim3dView* view = nullptr;
firstAncestorOrThisOfType( view );
int currentTimeStep = view->currentTimeStep();
RimGeoMechView* geoMechView = dynamic_cast<RimGeoMechView*>( view );
RigFemPartResultsCollection* resultCollection = geoMechView->geoMechCase()->geoMechData()->femPartResults();
if ( !resultCollection ) return;
auto [stepIdx, frameIdx] = geoMechView->currentStepAndDataFrame();
if ( m_rangeMode == RimRegularLegendConfig::RangeModeType::AUTOMATIC_ALLTIMESTEPS )
{
resultCollection->minMaxScalarValuesOverAllTensorComponents( selectedTensorResult(), min, max );
}
else if ( m_rangeMode == RimRegularLegendConfig::RangeModeType::AUTOMATIC_CURRENT_TIMESTEP )
{
resultCollection->minMaxScalarValuesOverAllTensorComponents( selectedTensorResult(), currentTimeStep, min, max );
resultCollection->minMaxScalarValuesOverAllTensorComponents( selectedTensorResult(), stepIdx, frameIdx, min, max );
}
}
}