mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1230 Created StimPlan colors and show lenged in 3D view
This commit is contained in:
@@ -50,6 +50,62 @@ RimFractureTemplateCollection::~RimFractureTemplateCollection()
|
||||
fractureDefinitions.deleteAllChildObjects();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<std::pair<QString, QString> > RimFractureTemplateCollection::stimPlanResultNamesAndUnits() const
|
||||
{
|
||||
std::set<std::pair<QString, QString> > nameSet;
|
||||
|
||||
for (const RimFractureTemplate* f : fractureDefinitions())
|
||||
{
|
||||
auto stimPlanFracture = dynamic_cast<const RimStimPlanFractureTemplate*>(f);
|
||||
if (stimPlanFracture)
|
||||
{
|
||||
std::vector<std::pair<QString, QString> > namesAndUnits = stimPlanFracture->getStimPlanPropertyNamesUnits();
|
||||
|
||||
for (auto nameAndUnit : namesAndUnits)
|
||||
{
|
||||
nameSet.insert(nameAndUnit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::pair<QString, QString>> names(nameSet.begin(), nameSet.end());
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<QString> RimFractureTemplateCollection::stimPlanResultNames() const
|
||||
{
|
||||
std::vector<QString> names;
|
||||
|
||||
for (auto nameAndUnit : stimPlanResultNamesAndUnits())
|
||||
{
|
||||
names.push_back(nameAndUnit.first);
|
||||
}
|
||||
|
||||
return names;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimFractureTemplateCollection::computeMinMax(const QString& resultName, const QString& unit, double* minValue, double* maxValue) const
|
||||
{
|
||||
for (const RimFractureTemplate* f : fractureDefinitions())
|
||||
{
|
||||
auto stimPlanFracture = dynamic_cast<const RimStimPlanFractureTemplate*>(f);
|
||||
if (stimPlanFracture)
|
||||
{
|
||||
stimPlanFracture->computeMinMax(resultName, unit, minValue, maxValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user