#5497 Fix crash in 3d Well Log Curves

This commit is contained in:
Gaute Lindkvist
2020-02-10 10:06:35 +01:00
parent 2949d3458d
commit d832674691
2 changed files with 28 additions and 20 deletions

View File

@@ -71,8 +71,6 @@ void Riv3dWellLogPlanePartMgr::appendPlaneToModel( cvf::ModelBasicList*
if ( m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty() ) return; if ( m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty() ) return;
if ( isStaticResult )
{
std::set<Rim3dWellLogCurve::DrawPlane> drawPlanes; std::set<Rim3dWellLogCurve::DrawPlane> drawPlanes;
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() ) for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
{ {
@@ -82,22 +80,29 @@ void Riv3dWellLogPlanePartMgr::appendPlaneToModel( cvf::ModelBasicList*
} }
} }
for ( Rim3dWellLogCurve::DrawPlane drawPlane : drawPlanes ) for ( Rim3dWellLogCurve::DrawPlane drawPlane : drawPlanes )
{
auto it = m_3dWellLogDrawSurfaceGeometryGenerators.find( drawPlane );
if ( it == m_3dWellLogDrawSurfaceGeometryGenerators.end() )
{ {
m_3dWellLogDrawSurfaceGeometryGenerators[drawPlane] = new Riv3dWellLogDrawSurfaceGenerator( m_wellPath.p() ); m_3dWellLogDrawSurfaceGeometryGenerators[drawPlane] = new Riv3dWellLogDrawSurfaceGenerator( m_wellPath.p() );
appendDrawSurfaceToModel( model, displayCoordTransform, wellPathClipBoundingBox, drawPlane, planeWidth() ); appendDrawSurfaceToModel( model, displayCoordTransform, wellPathClipBoundingBox, drawPlane, planeWidth() );
} }
} }
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() ) for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
{ {
if ( rim3dWellLogCurve->showInView( m_gridView ) && if ( rim3dWellLogCurve->showInView( m_gridView ) &&
rim3dWellLogCurve->isShowingTimeDependentResult() != isStaticResult ) rim3dWellLogCurve->isShowingTimeDependentResult() != isStaticResult )
{
auto it = m_3dWellLogDrawSurfaceGeometryGenerators.find( rim3dWellLogCurve->drawPlane() );
if ( it != m_3dWellLogDrawSurfaceGeometryGenerators.end() )
{ {
append3dWellLogCurveToModel( model, append3dWellLogCurveToModel( model,
displayCoordTransform, displayCoordTransform,
wellPathClipBoundingBox, wellPathClipBoundingBox,
rim3dWellLogCurve, rim3dWellLogCurve,
m_3dWellLogDrawSurfaceGeometryGenerators[rim3dWellLogCurve->drawPlane()] it->second->vertices() );
->vertices() ); }
} }
} }
} }

View File

@@ -874,6 +874,8 @@ void RivWellPathPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasicList*
// Well measurements visibility is independent of well path visibility // Well measurements visibility is independent of well path visibility
appendWellMeasurementsToModel( model, displayCoordTransform, characteristicCellSize ); appendWellMeasurementsToModel( model, displayCoordTransform, characteristicCellSize );
if ( showWellPath )
{
RimGridView* gridView = dynamic_cast<RimGridView*>( m_rimView.p() ); RimGridView* gridView = dynamic_cast<RimGridView*>( m_rimView.p() );
if ( !gridView ) return; if ( !gridView ) return;
@@ -883,6 +885,7 @@ void RivWellPathPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasicList*
} }
m_3dWellLogPlanePartMgr->appendPlaneToModel( model, displayCoordTransform, wellPathClipBoundingBox, false ); m_3dWellLogPlanePartMgr->appendPlaneToModel( model, displayCoordTransform, wellPathClipBoundingBox, false );
} }
}
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///