Add polygon classes

This commit is contained in:
Magne Sjaastad
2024-02-12 10:19:52 +01:00
parent 573a8f78cf
commit 5fdf30d124
40 changed files with 1816 additions and 37 deletions

View File

@@ -25,6 +25,8 @@
#include "RigGeoMechCaseData.h"
#include "RigReservoirGridTools.h"
#include "Polygons/RimPolygon.h"
#include "Polygons/RimPolygonCollection.h"
#include "RimCase.h"
#include "RimColorLegend.h"
#include "RimColorLegendCollection.h"
@@ -493,6 +495,20 @@ void RimTools::seismicDataOptionItems( QList<caf::PdmOptionItemInfo>* options, c
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimTools::polygonOptionItems( QList<caf::PdmOptionItemInfo>* options )
{
auto project = RimProject::current();
auto coll = project->activeOilField()->polygonCollection();
for ( auto* p : coll->allPolygons() )
{
options->push_back( caf::PdmOptionItemInfo( p->name(), p, false, p->uiIconProvider() ) );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -546,6 +562,15 @@ RimSurfaceCollection* RimTools::surfaceCollection()
return proj->activeOilField()->surfaceCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimPolygonCollection* RimTools::polygonCollection()
{
RimProject* proj = RimProject::current();
return proj->activeOilField()->polygonCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------