Add polygon classes

This commit is contained in:
Magne Sjaastad committed 2024-02-16 15:51:19 +01:00
1 parent 573a8f78cf
commit 5fdf30d124
40 files changed
+1816 -37

No files matched your search

@@ -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();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------