From 69ccce225cf45d04d7333a1a4284a42a05ea3876 Mon Sep 17 00:00:00 2001 From: Kristian Bendiksen Date: Thu, 24 Nov 2022 19:27:01 +0100 Subject: [PATCH] #9470 Fracture Template: make perforation length scriptable. Also use it in example script. --- .../ProjectDataModel/Completions/RimFractureTemplate.cpp | 2 +- .../Python/rips/PythonExamples/import_fractures_on_well.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp index 0bcd541e76..7cbaa7efb4 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimFractureTemplate.cpp @@ -141,7 +141,7 @@ RimFractureTemplate::RimFractureTemplate() CAF_PDM_InitField( &m_skinFactor, "SkinFactor", 0.0f, "Skin Factor" ); - CAF_PDM_InitField( &m_perforationLength, "PerforationLength", 1.0, "Perforation Length" ); + CAF_PDM_InitScriptableField( &m_perforationLength, "PerforationLength", 1.0, "Perforation Length" ); CAF_PDM_InitField( &m_perforationEfficiency, "PerforationEfficiency", 1.0, "Perforation Efficiency" ); m_perforationEfficiency.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() ); diff --git a/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py b/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py index 7af9bf7e66..3d57d5ad71 100644 --- a/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py +++ b/GrpcInterface/Python/rips/PythonExamples/import_fractures_on_well.py @@ -46,6 +46,8 @@ for measured_depth in measured_depths: # Call update() to propagate changes from the Python object back to ResInsight fracture_template.orientation = "Azimuth" fracture_template.azimuth_angle = 60.0 +fracture_template.user_defined_perforation_length = True +fracture_template.perforation_length = 12.3 fracture_template.update() # Scale the template