mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Remove unused code
This commit is contained in:
parent
69c38dfb21
commit
9169ee2e43
@ -174,6 +174,13 @@ grpc::Status RiaGrpcGridGeometryExtractionService::CutAlongPolyline( grpc::Serve
|
||||
return status;
|
||||
}
|
||||
|
||||
// Validate requested polyline
|
||||
auto& fencePolyline = request->fencepolylineutmxy();
|
||||
if ( fencePolyline.size() < 2 )
|
||||
{
|
||||
return grpc::Status( grpc::StatusCode::INVALID_ARGUMENT, "Invalid fence polyline - require two or more points" );
|
||||
}
|
||||
|
||||
// Get eclipse view, show inactive cells and ensure static geometry parts created for grid part manager in view
|
||||
auto* eclipseView = dynamic_cast<RimEclipseView*>( m_eclipseCase->views().front() );
|
||||
if ( eclipseView == nullptr )
|
||||
@ -183,12 +190,6 @@ grpc::Status RiaGrpcGridGeometryExtractionService::CutAlongPolyline( grpc::Serve
|
||||
eclipseView->setShowInactiveCells( true );
|
||||
eclipseView->createGridGeometryParts();
|
||||
|
||||
auto& fencePolyline = request->fencepolylineutmxy();
|
||||
if ( fencePolyline.size() < 2 )
|
||||
{
|
||||
return grpc::Status( grpc::StatusCode::INVALID_ARGUMENT, "Invalid fence polyline" );
|
||||
}
|
||||
|
||||
// Convert polyline to vector of cvf::Vec3d
|
||||
std::vector<cvf::Vec2d> polylineUtmXy;
|
||||
for ( int i = 0; i < fencePolyline.size(); i += 2 )
|
||||
@ -211,16 +212,6 @@ grpc::Status RiaGrpcGridGeometryExtractionService::CutAlongPolyline( grpc::Serve
|
||||
cvf::UByteArray visibleCells = cvf::UByteArray( m_eclipseCase->mainGrid()->cellCount() );
|
||||
eclipseView->calculateCurrentTotalCellVisibility( &visibleCells, firstTimeStep );
|
||||
|
||||
// Loop to count number of visible cells
|
||||
int numVisibleCells = 0;
|
||||
for ( size_t i = 0; i < visibleCells.size(); ++i )
|
||||
{
|
||||
if ( ( visibleCells )[i] != 0 )
|
||||
{
|
||||
++numVisibleCells;
|
||||
}
|
||||
}
|
||||
|
||||
// Generate intersection
|
||||
polylineIntersectionGenerator.generateIntersectionGeometry( &visibleCells );
|
||||
if ( !polylineIntersectionGenerator.isAnyGeometryPresent() )
|
||||
|
Loading…
Reference in New Issue
Block a user