#1194 Use larger geometry for open wells for spheres and well head

This commit is contained in:
Magne Sjaastad
2017-02-08 14:26:28 +01:00
parent c197f22013
commit 9753e8b242
3 changed files with 17 additions and 3 deletions

View File

@@ -110,7 +110,7 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
}
}
cvf::ref<cvf::Part> part = createPart(centerColorPairs);
cvf::ref<cvf::Part> part = createPart(centerColorPairs, wellResultFrame.m_isOpen);
model->addPart(part.p());
}
@@ -118,7 +118,7 @@ void RivWellSpheresPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLis
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::Part> RivWellSpheresPartMgr::createPart(std::vector<std::pair<cvf::Vec3f, cvf::Color3f> >& centerColorPairs)
cvf::ref<cvf::Part> RivWellSpheresPartMgr::createPart(std::vector<std::pair<cvf::Vec3f, cvf::Color3f> >& centerColorPairs, bool isWellOpen)
{
cvf::ref<cvf::Vec3fArray> vertices = new cvf::Vec3fArray;
cvf::ref<cvf::Vec3fArray> vecRes = new cvf::Vec3fArray;
@@ -154,6 +154,13 @@ cvf::ref<cvf::Part> RivWellSpheresPartMgr::createPart(std::vector<std::pair<cvf:
cvf::GeometryBuilderTriangles builder;
double characteristicCellSize = m_rimReservoirView->mainGrid()->characteristicIJCellSize();
double cellRadius = m_rimReservoirView->wellCollection()->spheresScaleFactor() * characteristicCellSize;
if (isWellOpen)
{
// Increase radius to make sure open connection are slightly larger than closed connections
cellRadius = 1.1 * cellRadius;
}
cvf::GeometryUtils::createSphere(cellRadius, 15, 15, &builder);
vectorDrawable->setGlyph(builder.trianglesUShort().p(), builder.vertices().p());