mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix display of intersection lines in 3D view
* 10675 Fix missing intersection line geometry * Change to list of visible surface intersection lines * Enable surface intersection band for any intersection * Show labels for intersection curves in 3D The polylines are defined in the display coordinate system without Z-scaling. The z-scaling is applied to the visualization parts using Part::setTransform(Transform* transform) The annotation objects are defined by display coordinates, so apply the Z-scaling to the coordinates. * Improve naming of surfaces * Use scaling factor of 1.0 for flat intersection views
This commit is contained in:
@@ -36,17 +36,6 @@
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicCreateSurfaceIntersectionBandFeature, "RicCreateSurfaceIntersectionBandFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicCreateSurfaceIntersectionBandFeature::isCommandEnabled() const
|
||||
{
|
||||
auto* surfColl = RimTools::surfaceCollection();
|
||||
auto surfaces = surfColl->ensembleSurfaces();
|
||||
|
||||
return !surfaces.empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -64,12 +53,11 @@ void RicCreateSurfaceIntersectionBandFeature::onActionTriggered( bool isChecked
|
||||
|
||||
RimSurfaceIntersectionBand* objectToSelect = nullptr;
|
||||
|
||||
const double defaultOpacity = 0.6;
|
||||
const auto colors = RiaColorTables::structuralUncertaintyColors();
|
||||
|
||||
if ( firstEnsembleSurface )
|
||||
{
|
||||
const double defaultOpacity = 0.6;
|
||||
|
||||
auto colors = RiaColorTables::structuralUncertaintyColors();
|
||||
|
||||
// Create min/max band
|
||||
{
|
||||
auto surf1 = firstEnsembleSurface->findStatisticsSurface( RigSurfaceStatisticsCalculator::StatisticsType::MIN );
|
||||
@@ -110,6 +98,27 @@ void RicCreateSurfaceIntersectionBandFeature::onActionTriggered( bool isChecked
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
auto band = intersection->addIntersectionBand();
|
||||
|
||||
auto surfColl = RimTools::surfaceCollection();
|
||||
auto surfaces = surfColl->surfaces();
|
||||
|
||||
if ( surfaces.size() > 1 )
|
||||
{
|
||||
band->setSurfaces( surfaces[0], surfaces[1] );
|
||||
}
|
||||
|
||||
auto color = colors.cycledColor3f( 1 );
|
||||
band->setBandColor( color );
|
||||
band->setBandOpacity( defaultOpacity );
|
||||
band->setPolygonOffsetUnit( 0.1 );
|
||||
|
||||
band->lineAppearance()->setColor( color );
|
||||
|
||||
objectToSelect = band;
|
||||
}
|
||||
|
||||
intersection->rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
intersection->updateAllRequiredEditors();
|
||||
|
||||
Reference in New Issue
Block a user