mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6495 Update python api to changes in fracture model + template.
This commit is contained in:
@@ -246,15 +246,7 @@ void RimFractureModel::fieldChangedByUi( const caf::PdmFieldHandle* changedField
|
||||
changedField == &m_autoComputeBarrier )
|
||||
{
|
||||
updateThicknessDirection();
|
||||
|
||||
if ( m_autoComputeBarrier )
|
||||
{
|
||||
updateDistanceToBarrierAndDip();
|
||||
}
|
||||
else
|
||||
{
|
||||
clearBarrierAnnotation();
|
||||
}
|
||||
updateBarrierProperties();
|
||||
}
|
||||
|
||||
if ( changedField == &m_autoComputeBarrier || changedField == &m_hasBarrier )
|
||||
@@ -502,6 +494,21 @@ cvf::Vec3d RimFractureModel::calculateTSTDirection() const
|
||||
return ( direction / static_cast<double>( numContributingCells ) ).getNormalized();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureModel::updateBarrierProperties()
|
||||
{
|
||||
if ( m_autoComputeBarrier )
|
||||
{
|
||||
updateDistanceToBarrierAndDip();
|
||||
}
|
||||
else
|
||||
{
|
||||
clearBarrierAnnotation();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -1159,6 +1166,7 @@ void RimFractureModel::setMD( double md )
|
||||
m_MD = md;
|
||||
updatePositionFromMeasuredDepth();
|
||||
updateThicknessDirection();
|
||||
updateBarrierProperties();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -164,6 +164,7 @@ private:
|
||||
static RigEclipseCaseData* getEclipseCaseData();
|
||||
static RimEclipseCase* getEclipseCase();
|
||||
|
||||
void updateBarrierProperties();
|
||||
void addBarrierAnnotation( const cvf::Vec3d& startPosition, const cvf::Vec3d& endPosition );
|
||||
void clearBarrierAnnotation();
|
||||
RimAnnotationCollection* annotationCollection();
|
||||
|
||||
@@ -25,7 +25,9 @@
|
||||
#include "RimFractureModelTemplate.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimFractureModelTemplateCollection, "FractureModelTemplateCollection" );
|
||||
|
||||
@@ -34,9 +36,14 @@ CAF_PDM_SOURCE_INIT( RimFractureModelTemplateCollection, "FractureModelTemplateC
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimFractureModelTemplateCollection::RimFractureModelTemplateCollection()
|
||||
{
|
||||
CAF_PDM_InitObject( "Fracture Model Templates", ":/FractureTemplates16x16.png", "", "" );
|
||||
CAF_PDM_InitScriptableObject( "Fracture Model Templates", ":/FractureTemplates16x16.png", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_fractureModelTemplates, "FractureDefinitions", "", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_fractureModelTemplates,
|
||||
"FractureModelTemplates",
|
||||
"Fracture Model Templates",
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
m_fractureModelTemplates.uiCapability()->setUiHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_nextValidId, "NextValidId", 0, "", "", "", "" );
|
||||
|
||||
@@ -52,13 +52,13 @@ RimFaciesProperties::RimFaciesProperties()
|
||||
m_propertiesTable.uiCapability()->setUiReadOnly( true );
|
||||
m_propertiesTable.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_faciesDefinition, "FaciesDefinition", "", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_faciesDefinition, "FaciesDefinition", "", "", "", "" );
|
||||
m_faciesDefinition.uiCapability()->setUiHidden( true );
|
||||
m_faciesDefinition.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_faciesDefinition = new RimEclipseResultDefinition;
|
||||
m_faciesDefinition->findField( "MResultType" )->uiCapability()->setUiName( "Facies Definiton" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_colorLegend, "ColorLegend", "Colors", "", "", "" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_colorLegend, "ColorLegend", "Colors", "", "", "" );
|
||||
m_colorLegend = RimRegularLegendConfig::mapToColorLegend( RimRegularLegendConfig::ColorRangesType::NORMAL );
|
||||
|
||||
setUiName( "Facies Properties" );
|
||||
|
||||
Reference in New Issue
Block a user