mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Renaming and improved some readability around well paths
This commit is contained in:
parent
a520a4322a
commit
b5cfa8ab53
@ -66,7 +66,8 @@ void RivWellPathCollectionPartMgr::setScaleTransform(cvf::Transform * scaleTrans
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivWellPathCollectionPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset, cvf::Transform* scaleTransform, double characteristicCellSize, cvf::BoundingBox boundingBox)
|
void RivWellPathCollectionPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset,
|
||||||
|
cvf::Transform* scaleTransform, double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox)
|
||||||
{
|
{
|
||||||
setScaleTransform(scaleTransform);
|
setScaleTransform(scaleTransform);
|
||||||
|
|
||||||
@ -77,7 +78,7 @@ void RivWellPathCollectionPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBa
|
|||||||
{
|
{
|
||||||
RivWellPathPartMgr* partMgr = m_wellPathCollection->wellPaths[wIdx]->partMgr();
|
RivWellPathPartMgr* partMgr = m_wellPathCollection->wellPaths[wIdx]->partMgr();
|
||||||
partMgr->setScaleTransform(scaleTransform);
|
partMgr->setScaleTransform(scaleTransform);
|
||||||
partMgr->appendStaticGeometryPartsToModel(model, displayModelOffset, characteristicCellSize, boundingBox);
|
partMgr->appendStaticGeometryPartsToModel(model, displayModelOffset, characteristicCellSize, wellPathClipBoundingBox);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public:
|
|||||||
cvf::Vec3d displayModelOffset,
|
cvf::Vec3d displayModelOffset,
|
||||||
cvf::Transform* scaleTransform,
|
cvf::Transform* scaleTransform,
|
||||||
double characteristicCellSize,
|
double characteristicCellSize,
|
||||||
cvf::BoundingBox boundingBox);
|
cvf::BoundingBox wellPathClipBoundingBox);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmPointer<RimWellPathCollection> m_wellPathCollection;
|
caf::PdmPointer<RimWellPathCollection> m_wellPathCollection;
|
||||||
|
@ -95,7 +95,8 @@ RivWellPathPartMgr::~RivWellPathPartMgr()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// The pipe geometry needs to be rebuilt on scale change to keep the pipes round
|
/// The pipe geometry needs to be rebuilt on scale change to keep the pipes round
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, double characteristicCellSize, cvf::BoundingBox boundingBox)
|
void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, double characteristicCellSize,
|
||||||
|
cvf::BoundingBox wellPathClipBoundingBox)
|
||||||
{
|
{
|
||||||
if (m_wellPathCollection.isNull()) return;
|
if (m_wellPathCollection.isNull()) return;
|
||||||
|
|
||||||
@ -127,7 +128,7 @@ void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, doubl
|
|||||||
for (size_t idx = 0; idx < wellPathGeometry->m_wellPathPoints.size(); idx++)
|
for (size_t idx = 0; idx < wellPathGeometry->m_wellPathPoints.size(); idx++)
|
||||||
{
|
{
|
||||||
cvf::Vec3d point = wellPathGeometry->m_wellPathPoints[idx];
|
cvf::Vec3d point = wellPathGeometry->m_wellPathPoints[idx];
|
||||||
if (point.z() < (boundingBox.max().z() + m_wellPathCollection->wellPathClipZDistance))
|
if (point.z() < (wellPathClipBoundingBox.max().z() + m_wellPathCollection->wellPathClipZDistance))
|
||||||
clippedPoints.push_back(point);
|
clippedPoints.push_back(point);
|
||||||
}
|
}
|
||||||
if (clippedPoints.size() < 2) return;
|
if (clippedPoints.size() < 2) return;
|
||||||
@ -220,7 +221,8 @@ void RivWellPathPartMgr::buildWellPathParts(cvf::Vec3d displayModelOffset, doubl
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RivWellPathPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset, double characteristicCellSize, cvf::BoundingBox boundingBox)
|
void RivWellPathPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset,
|
||||||
|
double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox)
|
||||||
{
|
{
|
||||||
if (m_wellPathCollection.isNull()) return;
|
if (m_wellPathCollection.isNull()) return;
|
||||||
if (m_rimWellPath.isNull()) return;
|
if (m_rimWellPath.isNull()) return;
|
||||||
@ -234,7 +236,7 @@ void RivWellPathPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* m
|
|||||||
if (m_needsTransformUpdate)
|
if (m_needsTransformUpdate)
|
||||||
{
|
{
|
||||||
// The pipe geometry needs to be rebuilt on scale change to keep the pipes round
|
// The pipe geometry needs to be rebuilt on scale change to keep the pipes round
|
||||||
buildWellPathParts(displayModelOffset, characteristicCellSize, boundingBox);
|
buildWellPathParts(displayModelOffset, characteristicCellSize, wellPathClipBoundingBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<RivPipeBranchData>::iterator it;
|
std::list<RivPipeBranchData>::iterator it;
|
||||||
|
@ -49,7 +49,8 @@ public:
|
|||||||
|
|
||||||
void scheduleGeometryRegen() { m_needsTransformUpdate = true; }//printf("R"); }
|
void scheduleGeometryRegen() { m_needsTransformUpdate = true; }//printf("R"); }
|
||||||
|
|
||||||
void appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset, double characteristicCellSize, cvf::BoundingBox boundingBox);
|
void appendStaticGeometryPartsToModel(cvf::ModelBasicList* model, cvf::Vec3d displayModelOffset,
|
||||||
|
double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmPointer<RimWellPathCollection> m_wellPathCollection;
|
caf::PdmPointer<RimWellPathCollection> m_wellPathCollection;
|
||||||
@ -58,7 +59,7 @@ private:
|
|||||||
cvf::ref<cvf::Transform> m_scaleTransform;
|
cvf::ref<cvf::Transform> m_scaleTransform;
|
||||||
bool m_needsTransformUpdate;
|
bool m_needsTransformUpdate;
|
||||||
|
|
||||||
void buildWellPathParts(cvf::Vec3d displayModelOffset, double characteristicCellSize, cvf::BoundingBox boundingBox);
|
void buildWellPathParts(cvf::Vec3d displayModelOffset, double characteristicCellSize, cvf::BoundingBox wellPathClipBoundingBox);
|
||||||
|
|
||||||
struct RivPipeBranchData
|
struct RivPipeBranchData
|
||||||
{
|
{
|
||||||
|
@ -446,7 +446,10 @@ void RimEclipseView::createDisplayModel()
|
|||||||
scene->addModel(model);
|
scene->addModel(model);
|
||||||
|
|
||||||
// Add well paths, if any
|
// Add well paths, if any
|
||||||
addWellPathsToScene(scene.p(), mainGrid->displayModelOffset(), mainGrid->characteristicIJCellSize(), currentActiveCellInfo()->geometryBoundingBox(), m_reservoirGridPartManager->scaleTransform());
|
addWellPathsToScene(scene.p(), mainGrid->displayModelOffset(),
|
||||||
|
mainGrid->characteristicIJCellSize(),
|
||||||
|
currentActiveCellInfo()->geometryBoundingBox(),
|
||||||
|
m_reservoirGridPartManager->scaleTransform());
|
||||||
|
|
||||||
if (frameIndex == 0)
|
if (frameIndex == 0)
|
||||||
m_viewer->setMainScene(scene.p());
|
m_viewer->setMainScene(scene.p());
|
||||||
@ -634,7 +637,11 @@ void RimEclipseView::updateCurrentTimeStep()
|
|||||||
RigMainGrid* mainGrid = caseData ? caseData->mainGrid() : NULL;
|
RigMainGrid* mainGrid = caseData ? caseData->mainGrid() : NULL;
|
||||||
CVF_ASSERT(mainGrid);
|
CVF_ASSERT(mainGrid);
|
||||||
|
|
||||||
addWellPathsToScene(frameScene, mainGrid->displayModelOffset(), mainGrid->characteristicIJCellSize(), currentActiveCellInfo()->geometryBoundingBox(), m_reservoirGridPartManager->scaleTransform());
|
addWellPathsToScene(frameScene,
|
||||||
|
mainGrid->displayModelOffset(),
|
||||||
|
mainGrid->characteristicIJCellSize(),
|
||||||
|
currentActiveCellInfo()->geometryBoundingBox(),
|
||||||
|
m_reservoirGridPartManager->scaleTransform());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,8 @@ void RimGeoMechView::createDisplayModel()
|
|||||||
double characteristicCellSize = geoMechCase()->geoMechData()->femParts()->characteristicElementSize();
|
double characteristicCellSize = geoMechCase()->geoMechData()->femParts()->characteristicElementSize();
|
||||||
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
|
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
|
||||||
|
|
||||||
addWellPathsToScene(scene.p(), cvf::Vec3d(0, 0, 0), characteristicCellSize, femBBox, scaleTransform());
|
addWellPathsToScene(scene.p(), cvf::Vec3d(0, 0, 0),
|
||||||
|
characteristicCellSize, femBBox, scaleTransform());
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the animation was active before recreating everything, make viewer view current frame
|
// If the animation was active before recreating everything, make viewer view current frame
|
||||||
@ -286,7 +287,8 @@ void RimGeoMechView::updateCurrentTimeStep()
|
|||||||
|
|
||||||
double characteristicCellSize = geoMechCase()->geoMechData()->femParts()->characteristicElementSize();
|
double characteristicCellSize = geoMechCase()->geoMechData()->femParts()->characteristicElementSize();
|
||||||
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
|
cvf::BoundingBox femBBox = geoMechCase()->geoMechData()->femParts()->boundingBox();
|
||||||
addWellPathsToScene(frameScene, cvf::Vec3d(0, 0, 0), characteristicCellSize, femBBox, scaleTransform());
|
addWellPathsToScene(frameScene, cvf::Vec3d(0, 0, 0),
|
||||||
|
characteristicCellSize, femBBox, scaleTransform());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -448,7 +448,9 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimView::addWellPathsToScene(cvf::Scene* scene, const cvf::Vec3d& displayModelOffset, double characteristicCellSize, const cvf::BoundingBox& boundingBox, cvf::Transform* scaleTransform)
|
void RimView::addWellPathsToScene(cvf::Scene* scene, const cvf::Vec3d& displayModelOffset,
|
||||||
|
double characteristicCellSize, const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||||
|
cvf::Transform* scaleTransform)
|
||||||
{
|
{
|
||||||
CVF_ASSERT(scene);
|
CVF_ASSERT(scene);
|
||||||
CVF_ASSERT(scaleTransform);
|
CVF_ASSERT(scaleTransform);
|
||||||
@ -478,7 +480,8 @@ void RimView::addWellPathsToScene(cvf::Scene* scene, const cvf::Vec3d& displayMo
|
|||||||
|
|
||||||
if (wellPathCollectionPartMgr)
|
if (wellPathCollectionPartMgr)
|
||||||
{
|
{
|
||||||
wellPathCollectionPartMgr->appendStaticGeometryPartsToModel(wellPathModelBasicList.p(), displayModelOffset, scaleTransform, characteristicCellSize, boundingBox);
|
wellPathCollectionPartMgr->appendStaticGeometryPartsToModel(wellPathModelBasicList.p(), displayModelOffset,
|
||||||
|
scaleTransform, characteristicCellSize, wellPathClipBoundingBox);
|
||||||
}
|
}
|
||||||
|
|
||||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||||
|
@ -110,7 +110,11 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
void setDefaultView();
|
void setDefaultView();
|
||||||
void addWellPathsToScene(cvf::Scene* scene, const cvf::Vec3d& displayModelOffset, double characteristicCellSize, const cvf::BoundingBox& boundingBox, cvf::Transform* scaleTransform);
|
void addWellPathsToScene(cvf::Scene* scene,
|
||||||
|
const cvf::Vec3d& displayModelOffset,
|
||||||
|
double characteristicCellSize,
|
||||||
|
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||||
|
cvf::Transform* scaleTransform);
|
||||||
|
|
||||||
virtual void createDisplayModel() = 0;
|
virtual void createDisplayModel() = 0;
|
||||||
virtual void updateDisplayModelVisibility() = 0;
|
virtual void updateDisplayModelVisibility() = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user