mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
#5497 Fix crash in 3d Well Log Curves
This commit is contained in:
parent
2949d3458d
commit
d832674691
@ -71,33 +71,38 @@ void Riv3dWellLogPlanePartMgr::appendPlaneToModel( cvf::ModelBasicList*
|
||||
|
||||
if ( m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty() ) return;
|
||||
|
||||
if ( isStaticResult )
|
||||
std::set<Rim3dWellLogCurve::DrawPlane> drawPlanes;
|
||||
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
|
||||
{
|
||||
std::set<Rim3dWellLogCurve::DrawPlane> drawPlanes;
|
||||
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
|
||||
if ( rim3dWellLogCurve->showInView( m_gridView ) )
|
||||
{
|
||||
if ( rim3dWellLogCurve->showInView( m_gridView ) )
|
||||
{
|
||||
drawPlanes.insert( rim3dWellLogCurve->drawPlane() );
|
||||
}
|
||||
drawPlanes.insert( rim3dWellLogCurve->drawPlane() );
|
||||
}
|
||||
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() );
|
||||
appendDrawSurfaceToModel( model, displayCoordTransform, wellPathClipBoundingBox, drawPlane, planeWidth() );
|
||||
}
|
||||
}
|
||||
|
||||
for ( Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves() )
|
||||
{
|
||||
if ( rim3dWellLogCurve->showInView( m_gridView ) &&
|
||||
rim3dWellLogCurve->isShowingTimeDependentResult() != isStaticResult )
|
||||
{
|
||||
append3dWellLogCurveToModel( model,
|
||||
displayCoordTransform,
|
||||
wellPathClipBoundingBox,
|
||||
rim3dWellLogCurve,
|
||||
m_3dWellLogDrawSurfaceGeometryGenerators[rim3dWellLogCurve->drawPlane()]
|
||||
->vertices() );
|
||||
auto it = m_3dWellLogDrawSurfaceGeometryGenerators.find( rim3dWellLogCurve->drawPlane() );
|
||||
if ( it != m_3dWellLogDrawSurfaceGeometryGenerators.end() )
|
||||
{
|
||||
append3dWellLogCurveToModel( model,
|
||||
displayCoordTransform,
|
||||
wellPathClipBoundingBox,
|
||||
rim3dWellLogCurve,
|
||||
it->second->vertices() );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -874,14 +874,17 @@ void RivWellPathPartMgr::appendDynamicGeometryPartsToModel( cvf::ModelBasicList*
|
||||
// Well measurements visibility is independent of well path visibility
|
||||
appendWellMeasurementsToModel( model, displayCoordTransform, characteristicCellSize );
|
||||
|
||||
RimGridView* gridView = dynamic_cast<RimGridView*>( m_rimView.p() );
|
||||
if ( !gridView ) return;
|
||||
|
||||
if ( m_3dWellLogPlanePartMgr.isNull() )
|
||||
if ( showWellPath )
|
||||
{
|
||||
m_3dWellLogPlanePartMgr = new Riv3dWellLogPlanePartMgr( m_rimWellPath, gridView );
|
||||
RimGridView* gridView = dynamic_cast<RimGridView*>( m_rimView.p() );
|
||||
if ( !gridView ) return;
|
||||
|
||||
if ( m_3dWellLogPlanePartMgr.isNull() )
|
||||
{
|
||||
m_3dWellLogPlanePartMgr = new Riv3dWellLogPlanePartMgr( m_rimWellPath, gridView );
|
||||
}
|
||||
m_3dWellLogPlanePartMgr->appendPlaneToModel( model, displayCoordTransform, wellPathClipBoundingBox, false );
|
||||
}
|
||||
m_3dWellLogPlanePartMgr->appendPlaneToModel( model, displayCoordTransform, wellPathClipBoundingBox, false );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user