#1078 Added well head control to RimEclipseWell plus rename and reorder

This commit is contained in:
Magne Sjaastad
2017-01-25 07:45:17 +01:00
parent 90c791a2da
commit c4d4d03cee
6 changed files with 33 additions and 23 deletions

View File

@@ -85,7 +85,7 @@ void RivSimWellPipesPartMgr::buildWellPipeParts()
m_rimWell->calculateWellPipeStaticCenterLine(m_pipeBranchesCLCoords, pipeBranchesCellIds);
double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() *m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize;
double pipeRadius = m_rimReservoirView->wellCollection()->pipeScaleFactor() * m_rimWell->pipeScaleFactor() * characteristicCellSize;
for (size_t brIdx = 0; brIdx < pipeBranchesCellIds.size(); ++brIdx)

View File

@@ -160,7 +160,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
pipeGeomGenerator->setPipeColor(well->wellPipeColor());
pipeGeomGenerator->setCrossSectionVertexCount(m_rimReservoirView->wellCollection()->pipeCrossSectionVertexCount());
double pipeRadius = m_rimReservoirView->wellCollection()->pipeRadiusScaleFactor() * m_rimWell->pipeRadiusScaleFactor() * characteristicCellSize;
double pipeRadius = m_rimReservoirView->wellCollection()->pipeScaleFactor() * m_rimWell->pipeScaleFactor() * characteristicCellSize;
pipeGeomGenerator->setRadius(pipeRadius);
cvf::ref<cvf::DrawableGeo> pipeSurface = pipeGeomGenerator->createPipeSurface();
@@ -349,6 +349,7 @@ void RivWellHeadPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList*
}
if (wellCollection->showWellHead() &&
m_rimWell->showWellHead() &&
m_wellHeadArrowPart.notNull())
{
model->addPart(m_wellHeadArrowPart.p());

View File

@@ -38,19 +38,21 @@ RimEclipseWell::RimEclipseWell()
{
CAF_PDM_InitObject("Well", ":/Well.png", "", "");
CAF_PDM_InitFieldNoDefault(&name, "WellName", "Name", "", "", "");
CAF_PDM_InitField(&showWell, "ShowWell", true, "Show well ", "", "", "");
CAF_PDM_InitFieldNoDefault(&name, "WellName", "Name", "", "", "");
CAF_PDM_InitField(&showWell, "ShowWell", true, "Show well ", "", "", "");
showWell.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well label", "", "", "");
CAF_PDM_InitField(&showWellLabel, "ShowWellLabel", true, "Show well label", "", "", "");
CAF_PDM_InitField(&showWellHead, "ShowWellHead", true, "Show well head", "", "", "");
CAF_PDM_InitField(&showWellPipes, "ShowWellPipe", true, "Show well pipe", "", "", "");
CAF_PDM_InitField(&showWellSpheres, "ShowWellSpheres", true, "Show well spheres", "", "", "");
CAF_PDM_InitField(&showWellPipes, "ShowWellPipe", true, "Show well pipe", "", "", "");
CAF_PDM_InitField(&showWellSpheres, "ShowWellSpheres", true, "Show well spheres", "", "", "");
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale",1.0, "Pipe radius scale", "", "", "");
CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), "Well pipe color", "", "", "");
CAF_PDM_InitField(&pipeScaleFactor, "WellPipeRadiusScale", 1.0, "Well Pipe Scale Factor", "", "", "");
CAF_PDM_InitField(&wellPipeColor, "WellPipeColor", cvf::Color3f(0.588f, 0.588f, 0.804f), "Well pipe color", "", "", "");
CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", "");
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", "");
CAF_PDM_InitField(&showWellCells, "ShowWellCells", true, "Add cells to range filter", "", "", "");
CAF_PDM_InitField(&showWellCellFence, "ShowWellCellFence", false, "Use well fence", "", "", "");
name.uiCapability()->setUiHidden(true);
name.uiCapability()->setUiReadOnly(true);
@@ -83,6 +85,7 @@ void RimEclipseWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
if (!m_reservoirView) return;
if (&showWellLabel == changedField ||
&showWellHead == changedField ||
&showWellPipes == changedField ||
&showWellSpheres == changedField ||
&wellPipeColor == changedField)
@@ -97,7 +100,7 @@ void RimEclipseWell::fieldChangedByUi(const caf::PdmFieldHandle* changedField, c
m_reservoirView->scheduleGeometryRegen(VISIBLE_WELL_CELLS);
m_reservoirView->scheduleCreateDisplayModelAndRedraw();
}
else if (&pipeRadiusScaleFactor == changedField)
else if (&pipeScaleFactor == changedField)
{
if (m_reservoirView)
{
@@ -199,11 +202,14 @@ bool RimEclipseWell::visibleCellsInstersectsWell(size_t frameIndex)
void RimEclipseWell::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering)
{
caf::PdmUiGroup* pipeGroup = uiOrdering.addNewGroup("Appearance");
pipeGroup->add(&showWellLabel);
pipeGroup->add(&showWellHead);
pipeGroup->add(&showWellPipes);
pipeGroup->add(&showWellSpheres);
pipeGroup->add(&showWellLabel);
pipeGroup->add(&pipeScaleFactor);
pipeGroup->add(&wellPipeColor);
pipeGroup->add(&pipeRadiusScaleFactor);
caf::PdmUiGroup* filterGroup = uiOrdering.addNewGroup("Range filter");
filterGroup->add(&showWellCells);

View File

@@ -67,15 +67,18 @@ public:
caf::PdmField<bool> showWell;
caf::PdmField<QString> name;
caf::PdmField<bool> showWellLabel;
caf::PdmField<bool> showWellHead;
caf::PdmField<bool> showWellPipes;
caf::PdmField<bool> showWellSpheres;
caf::PdmField<double> pipeScaleFactor;
caf::PdmField<cvf::Color3f> wellPipeColor;
caf::PdmField<bool> showWellCells;
caf::PdmField<bool> showWellCellFence;
caf::PdmField<bool> showWellPipes;
caf::PdmField<bool> showWellSpheres;
caf::PdmField<cvf::Color3f> wellPipeColor;
caf::PdmField<double> pipeRadiusScaleFactor;
protected:
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);

View File

@@ -107,7 +107,7 @@ RimEclipseWellCollection::RimEclipseWellCollection()
CAF_PDM_InitField(&wellPipeVisibility, "GlobalWellPipeVisibility", WellVisibilityEnum(PIPES_OPEN_IN_VISIBLE_CELLS), "Global well pipe visibility", "", "", "");
CAF_PDM_InitField(&pipeRadiusScaleFactor, "WellPipeRadiusScale", 0.1, "Pipe radius scale", "", "", "");
CAF_PDM_InitField(&pipeScaleFactor, "WellPipeRadiusScale", 0.1, "Pipe radius scale", "", "", "");
CAF_PDM_InitField(&pipeCrossSectionVertexCount, "WellPipeVertexCount", 12, "Pipe vertex count", "", "", "");
pipeCrossSectionVertexCount.uiCapability()->setUiHidden(true);
CAF_PDM_InitField(&wellPipeCoordType, "WellPipeCoordType", WellPipeCoordEnum(WELLPIPE_INTERPOLATED), "Well Pipe Coords", "", "", "");
@@ -264,7 +264,7 @@ void RimEclipseWellCollection::fieldChangedByUi(const caf::PdmFieldHandle* chang
}
}
else if ( &pipeCrossSectionVertexCount == changedField
|| &pipeRadiusScaleFactor == changedField
|| &pipeScaleFactor == changedField
|| &wellHeadScaleFactor == changedField
|| &showWellHead == changedField
|| &isAutoDetectingBranches == changedField
@@ -307,7 +307,7 @@ void RimEclipseWellCollection::defineUiOrdering(QString uiConfigName, caf::PdmUi
caf::PdmUiGroup* wellPipe = uiOrdering.addNewGroup("Well pipe");
wellPipe->add(&wellPipeVisibility);
wellPipe->add(&pipeRadiusScaleFactor);
wellPipe->add(&pipeScaleFactor);
wellPipe->add(&wellPipeCoordType);
caf::PdmUiGroup* cellCenterSpheres = uiOrdering.addNewGroup("Well cell center spheres");

View File

@@ -99,7 +99,7 @@ public:
caf::PdmField<double> wellCellTransparencyLevel;
caf::PdmField<WellVisibilityEnum> wellPipeVisibility;
caf::PdmField<double> pipeRadiusScaleFactor;
caf::PdmField<double> pipeScaleFactor;
caf::PdmField<int> pipeCrossSectionVertexCount;
caf::PdmField<WellPipeCoordEnum> wellPipeCoordType;