mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2333 Add flattened intersectino geometry. Some view modifications to move towards a final 2D view experience
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
#include "cvfBoundingBox.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
#include "cvfPlane.h"
|
||||
#include "Rim2dIntersectionView.h"
|
||||
|
||||
|
||||
namespace caf {
|
||||
@@ -723,6 +724,24 @@ void RimIntersection::appendPointToPolyLine(const cvf::Vec3d& point)
|
||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim2dIntersectionView* RimIntersection::correspondingIntersectionView()
|
||||
{
|
||||
std::vector<caf::PdmObjectHandle*> objects;
|
||||
|
||||
this->objectsWithReferringPtrFields(objects);
|
||||
Rim2dIntersectionView* isectView = nullptr;
|
||||
for (auto obj : objects)
|
||||
{
|
||||
isectView = dynamic_cast<Rim2dIntersectionView*>(obj);
|
||||
if (isectView) break;
|
||||
}
|
||||
return isectView;
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -851,6 +870,13 @@ void RimIntersection::rebuildGeometryAndScheduleCreateDisplayModel()
|
||||
{
|
||||
rimView->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
|
||||
Rim2dIntersectionView * iview = correspondingIntersectionView();
|
||||
if (iview)
|
||||
{
|
||||
iview->scheduleGeometryRegen(RivCellSetEnum::ALL_CELLS);
|
||||
iview->scheduleCreateDisplayModelAndRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user