mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 09:00:20 -05:00
#14437 Guard against lateral without active well targets
A lateral gets its well path geometry from the parent well, and is visualized even when it has no active well targets. Building the well target spheres then calls setVectors() with empty arrays, which asserts.
This commit is contained in:
1 parent
403450dfdf
commit
69faf4ac13
3 files changed
+55
-2
No files matched your search
@@ -928,6 +928,10 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
|
||||
{
|
||||
auto geoDef = modeledWellPath->geometryDefinition();
|
||||
|
||||
// A lateral gets its well path geometry from the parent well, and can have no active well targets
|
||||
auto wellTargets = geoDef->activeWellTargets();
|
||||
if ( wellTargets.empty() ) return;
|
||||
|
||||
auto sphereColor = geoDef->sphereColor();
|
||||
double sphereRadiusFactor = geoDef->sphereRadiusFactor();
|
||||
|
||||
@@ -935,8 +939,6 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
|
||||
cvf::ref<cvf::Vec3fArray> vecRes = new cvf::Vec3fArray;
|
||||
cvf::ref<cvf::Color3fArray> colors = new cvf::Color3fArray;
|
||||
|
||||
auto wellTargets = geoDef->activeWellTargets();
|
||||
|
||||
size_t pointCount = wellTargets.size();
|
||||
vertices->reserve( pointCount );
|
||||
vecRes->reserve( pointCount );
|
||||
|
||||
Reference in new issue
Block a user