mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 07:16:53 -06:00
#4317 Add default ellipse fracture template
This commit is contained in:
parent
a8bcfefca2
commit
4439f7609b
@ -81,14 +81,7 @@ RimEllipseFractureTemplate* RicNewEllipseFractureTemplateFeature::createNewTempl
|
||||
|
||||
if (fracDefColl)
|
||||
{
|
||||
RimEllipseFractureTemplate* ellipseFractureTemplate = new RimEllipseFractureTemplate();
|
||||
|
||||
fracDefColl->addFractureTemplate(ellipseFractureTemplate);
|
||||
ellipseFractureTemplate->setName("Ellipse Fracture Template");
|
||||
ellipseFractureTemplate->setUnitSystem(fracDefColl->defaultUnitSystemType());
|
||||
ellipseFractureTemplate->setDefaultValuesFromUnit();
|
||||
|
||||
return ellipseFractureTemplate;
|
||||
return fracDefColl->addDefaultEllipseTemplate();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ RimCompletionTemplateCollection::RimCompletionTemplateCollection()
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_fractureTemplates, "FractureTemplates", "", "", "", "");
|
||||
m_fractureTemplates = new RimFractureTemplateCollection;
|
||||
|
||||
m_fractureTemplates->addDefaultEllipseTemplate();
|
||||
CAF_PDM_InitFieldNoDefault(&m_valveTemplates, "ValveTemplates", "", "", "", "");
|
||||
m_valveTemplates = new RimValveTemplateCollection;
|
||||
}
|
||||
|
@ -99,6 +99,22 @@ std::vector<RimFractureTemplate*> RimFractureTemplateCollection::fractureTemplat
|
||||
return templates;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEllipseFractureTemplate* RimFractureTemplateCollection::addDefaultEllipseTemplate()
|
||||
{
|
||||
RimEllipseFractureTemplate* ellipseFractureTemplate = new RimEllipseFractureTemplate();
|
||||
|
||||
addFractureTemplate(ellipseFractureTemplate);
|
||||
|
||||
ellipseFractureTemplate->setName("Ellipse Fracture Template");
|
||||
ellipseFractureTemplate->setUnitSystem(defaultUnitSystemType());
|
||||
ellipseFractureTemplate->setDefaultValuesFromUnit();
|
||||
|
||||
return ellipseFractureTemplate;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
|
||||
class RimEllipseFractureTemplate;
|
||||
class RimFractureTemplate;
|
||||
|
||||
//==================================================================================================
|
||||
@ -40,6 +41,7 @@ public:
|
||||
|
||||
RimFractureTemplate* fractureTemplate(int id) const;
|
||||
std::vector<RimFractureTemplate*> fractureTemplates() const;
|
||||
RimEllipseFractureTemplate* addDefaultEllipseTemplate();
|
||||
void addFractureTemplate(RimFractureTemplate* templ);
|
||||
|
||||
RiaEclipseUnitTools::UnitSystemType defaultUnitSystemType() const;
|
||||
|
Loading…
Reference in New Issue
Block a user