mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-16 10:22:15 -05:00
#9323 Thermal Fracture: add python methods for importing fracture template.
Fixes #9323.
This commit is contained in:
1 parent
dc80f582bd
commit
accf5713ac
7 files changed
+195
-3
No files matched your search
+11
-2
@@ -45,14 +45,22 @@ void RicPlaceThermalFractureUsingTemplateDataFeature::onActionTriggered( bool is
|
||||
|
||||
if ( !fracture->fractureTemplate() ) return;
|
||||
|
||||
placeUsingTemplateData( fracture );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicPlaceThermalFractureUsingTemplateDataFeature::placeUsingTemplateData( RimWellPathFracture* fracture )
|
||||
{
|
||||
RimThermalFractureTemplate* thermalTemplate = dynamic_cast<RimThermalFractureTemplate*>( fracture->fractureTemplate() );
|
||||
if ( !thermalTemplate ) return;
|
||||
if ( !thermalTemplate ) return false;
|
||||
|
||||
RimWellPath* wellPath = nullptr;
|
||||
fracture->firstAncestorOrThisOfTypeAsserted( wellPath );
|
||||
|
||||
auto wellPathGeometry = wellPath->wellPathGeometry();
|
||||
if ( !wellPathGeometry ) return;
|
||||
if ( !wellPathGeometry ) return false;
|
||||
|
||||
auto [centerPosition, rotation] = thermalTemplate->computePositionAndRotation();
|
||||
|
||||
@@ -77,6 +85,7 @@ void RicPlaceThermalFractureUsingTemplateDataFeature::onActionTriggered( bool is
|
||||
fracture->updateConnectedEditors();
|
||||
RimProject* project = RimProject::current();
|
||||
project->reloadCompletionTypeResultsInAllViews();
|
||||
return true;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in new issue
Block a user