Refactored addition of well path models

Well path models can now be added to geo mech models. Moved code that
adds well path models to a scene from RimEclipseView to
RimView::addWellPathsToScene(). This new function is now used by both
RimEclipseView and RimGeoMechView. Made sure that it is not needed to
load a result before well paths appear. TODO: Compute characteristic hex
element size for geo mech models.
This commit is contained in:
Stein Dale
2015-06-11 13:44:21 +02:00
parent 3d0e0ace7a
commit b59695f352
4 changed files with 68 additions and 37 deletions

View File

@@ -243,6 +243,10 @@ void RimGeoMechView::createDisplayModel()
m_viewer->setMainScene(scene.p());
else
m_viewer->addFrame(scene.p());
// !! TODO: Compute characteristic cell size
double characteristicCellSize_HARDCODED = 300;
addWellPathsToScene(scene.p(), cvf::Vec3d(0, 0, 0), characteristicCellSize_HARDCODED, m_viewer->mainScene()->boundingBox(), scaleTransform());
}
// If the animation was active before recreating everything, make viewer view current frame
@@ -278,6 +282,10 @@ void RimGeoMechView::updateCurrentTimeStep()
frameParts->updateBoundingBoxesRecursive();
frameScene->removeAllModels();
frameScene->addModel(frameParts.p());
// !! TODO: Compute characteristic cell size
double characteristicCellSize_HARDCODED = 300;
addWellPathsToScene(frameScene, cvf::Vec3d(0, 0, 0), characteristicCellSize_HARDCODED, m_viewer->mainScene()->boundingBox(), scaleTransform());
}
}
@@ -290,7 +298,6 @@ void RimGeoMechView::updateCurrentTimeStep()
}
overlayInfoConfig()->update3DInfo();
}
//--------------------------------------------------------------------------------------------------