Merge pull request #5096 from OPM/feature-rename-RimIntersection

Rename RimIntersection
This commit is contained in:
Jacob Støren 2019-11-26 15:28:23 +01:00 committed by GitHub
commit e4a4b40a3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
97 changed files with 1868 additions and 1853 deletions

View File

@ -270,7 +270,7 @@ set ( QT_MOC_HEADERS
${QT_MOC_HEADERS}
ProjectDataModel/RimMimeData.h
ProjectDataModel/RimIntersectionBox.h
ProjectDataModel/RimBoxIntersection.h
SocketInterface/RiaSocketServer.h
)

View File

@ -19,9 +19,9 @@
#include "RicAppendIntersectionFeature.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGeoMechView.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionCollection.h"
#include "RimTensorResults.h"
@ -98,7 +98,7 @@ void RicAppendIntersectionFeatureCmd::redo()
{
CVF_ASSERT( m_intersectionCollection );
RimIntersection* intersection = new RimIntersection();
RimExtrudedCurveIntersection* intersection = new RimExtrudedCurveIntersection();
intersection->setName( "Intersection" );
m_intersectionCollection->appendIntersectionAndUpdate( intersection );

View File

@ -19,9 +19,9 @@
#include "RicAppendSeparateIntersectionResultFeature.h"
#include "RimGridView.h"
#include "RimIntersectionResultDefinition.h"
#include "RimIntersectionResultsDefinitionCollection.h"
#include "RimGridView.h"
#include "cafCmdExecCommandManager.h"
#include "cafSelectionManager.h"
@ -103,7 +103,7 @@ void RicAppendSeparateIntersectionResultFeatureCmd::redo()
m_intersectionCollection->updateConnectedEditors();
//if ( m_intersectionCollection->intersectionResultsDefinitions().size() < 2 ) // New default created. Possible
// if ( m_intersectionCollection->intersectionResultsDefinitions().size() < 2 ) // New default created. Possible
//{
// RimGridView* gridView;
// m_intersectionCollection->firstAncestorOrThisOfTypeAsserted( gridView );

View File

@ -30,7 +30,8 @@ class RimIntersectionResultsDefinitionCollection;
class RicAppendSeparateIntersectionResultFeatureCmd : public caf::CmdExecuteCommand
{
public:
explicit RicAppendSeparateIntersectionResultFeatureCmd( RimIntersectionResultsDefinitionCollection* intersectionCollection );
explicit RicAppendSeparateIntersectionResultFeatureCmd(
RimIntersectionResultsDefinitionCollection* intersectionCollection );
~RicAppendSeparateIntersectionResultFeatureCmd() override;
QString name() override;

View File

@ -19,11 +19,11 @@
#include "RicCopyIntersectionsToAllViewsInCaseFeature.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimEclipseCase.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "cafCmdExecCommandManager.h"
@ -48,11 +48,11 @@ enum SelectionComposition
SEL_BOTH_INTERSECTION_TYPES
};
static RimIntersectionCollection* selectedIntersectionCollection();
static std::vector<RimIntersection*> selectedIntersections();
static std::vector<RimIntersectionBox*> selectedIntersectionBoxes();
static SelectionComposition selectionComposition();
static RimCase* commonGridCase( std::vector<caf::PdmUiItem*> selectedItems );
static RimIntersectionCollection* selectedIntersectionCollection();
static std::vector<RimExtrudedCurveIntersection*> selectedIntersections();
static std::vector<RimBoxIntersection*> selectedIntersectionBoxes();
static SelectionComposition selectionComposition();
static RimCase* commonGridCase( std::vector<caf::PdmUiItem*> selectedItems );
//--------------------------------------------------------------------------------------------------
///
@ -83,8 +83,8 @@ void RicCopyIntersectionsToAllViewsInCaseFeature::onActionTriggered( bool isChec
copyIntersectionBoxesToOtherViews( *gridCase, coll->intersectionBoxes() );
}
std::vector<RimIntersection*> selIntersections = selectedIntersections();
std::vector<RimIntersectionBox*> selIntersectionBoxes = selectedIntersectionBoxes();
std::vector<RimExtrudedCurveIntersection*> selIntersections = selectedIntersections();
std::vector<RimBoxIntersection*> selIntersectionBoxes = selectedIntersectionBoxes();
if ( compostion == SEL_INTERSECTIONS || compostion == SEL_BOTH_INTERSECTION_TYPES )
{
@ -109,10 +109,11 @@ void RicCopyIntersectionsToAllViewsInCaseFeature::setupActionLook( QAction* acti
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicCopyIntersectionsToAllViewsInCaseFeature::copyIntersectionsToOtherViews( RimCase& gridCase,
std::vector<RimIntersection*> intersections )
void RicCopyIntersectionsToAllViewsInCaseFeature::copyIntersectionsToOtherViews(
RimCase& gridCase,
std::vector<RimExtrudedCurveIntersection*> intersections )
{
for ( RimIntersection* intersection : intersections )
for ( RimExtrudedCurveIntersection* intersection : intersections )
{
for ( Rim3dView* const view : gridCase.views() )
{
@ -122,9 +123,9 @@ void RicCopyIntersectionsToAllViewsInCaseFeature::copyIntersectionsToOtherViews(
if ( currGridView && parentView != nullptr && parentView != currGridView )
{
RimIntersectionCollection* destCollection = currGridView->crossSectionCollection();
RimIntersectionCollection* destCollection = currGridView->intersectionCollection();
RimIntersection* copy = dynamic_cast<RimIntersection*>(
RimExtrudedCurveIntersection* copy = dynamic_cast<RimExtrudedCurveIntersection*>(
intersection->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
CVF_ASSERT( copy );
@ -143,9 +144,9 @@ void RicCopyIntersectionsToAllViewsInCaseFeature::copyIntersectionsToOtherViews(
//--------------------------------------------------------------------------------------------------
void RicCopyIntersectionsToAllViewsInCaseFeature::copyIntersectionBoxesToOtherViews(
RimCase& gridCase,
std::vector<RimIntersectionBox*> intersectionBoxes )
std::vector<RimBoxIntersection*> intersectionBoxes )
{
for ( RimIntersectionBox* intersectionBox : intersectionBoxes )
for ( RimBoxIntersection* intersectionBox : intersectionBoxes )
{
for ( Rim3dView* const view : gridCase.views() )
{
@ -155,9 +156,9 @@ void RicCopyIntersectionsToAllViewsInCaseFeature::copyIntersectionBoxesToOtherVi
if ( currGridView && parentView != nullptr && parentView != currGridView )
{
RimIntersectionCollection* destCollection = currGridView->crossSectionCollection();
RimIntersectionCollection* destCollection = currGridView->intersectionCollection();
RimIntersectionBox* copy = dynamic_cast<RimIntersectionBox*>(
RimBoxIntersection* copy = dynamic_cast<RimBoxIntersection*>(
intersectionBox->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
CVF_ASSERT( copy );
@ -179,17 +180,17 @@ RimIntersectionCollection* selectedIntersectionCollection()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimIntersection*> selectedIntersections()
std::vector<RimExtrudedCurveIntersection*> selectedIntersections()
{
return caf::selectedObjectsByType<RimIntersection*>();
return caf::selectedObjectsByType<RimExtrudedCurveIntersection*>();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimIntersectionBox*> selectedIntersectionBoxes()
std::vector<RimBoxIntersection*> selectedIntersectionBoxes()
{
return caf::selectedObjectsByType<RimIntersectionBox*>();
return caf::selectedObjectsByType<RimBoxIntersection*>();
}
//--------------------------------------------------------------------------------------------------
@ -203,9 +204,9 @@ SelectionComposition selectionComposition()
RimCase* gridCase = commonGridCase( allSelectedObjects );
if ( gridCase && gridCase->gridViews().size() > 1 )
{
RimIntersectionCollection* selColl = selectedIntersectionCollection();
std::vector<RimIntersection*> selIntersections = selectedIntersections();
std::vector<RimIntersectionBox*> selIntersectionBoxes = selectedIntersectionBoxes();
RimIntersectionCollection* selColl = selectedIntersectionCollection();
std::vector<RimExtrudedCurveIntersection*> selIntersections = selectedIntersections();
std::vector<RimBoxIntersection*> selIntersectionBoxes = selectedIntersectionBoxes();
if ( selColl )
{

View File

@ -24,8 +24,8 @@
#include "cafPdmPointer.h"
class RimCase;
class RimIntersection;
class RimIntersectionBox;
class RimExtrudedCurveIntersection;
class RimBoxIntersection;
class RimIntersectionCollection;
//==================================================================================================
@ -41,6 +41,6 @@ protected:
void onActionTriggered( bool isChecked ) override;
void setupActionLook( QAction* actionToSetup ) override;
void copyIntersectionsToOtherViews( RimCase& gridCase, std::vector<RimIntersection*> intersections );
void copyIntersectionBoxesToOtherViews( RimCase& gridCase, std::vector<RimIntersectionBox*> intersectionBoxes );
void copyIntersectionsToOtherViews( RimCase& gridCase, std::vector<RimExtrudedCurveIntersection*> intersections );
void copyIntersectionBoxesToOtherViews( RimCase& gridCase, std::vector<RimBoxIntersection*> intersectionBoxes );
};

View File

@ -21,8 +21,8 @@
#include "RiaApplication.h"
#include "RimCase.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionCollection.h"
#include "Riu3DMainWindowTools.h"
@ -62,7 +62,7 @@ void RicNewAzimuthDipIntersectionFeature::onActionTriggered( bool isChecked )
if ( !activeView ) return;
RicNewAzimuthDipIntersectionFeatureCmd* cmd = new RicNewAzimuthDipIntersectionFeatureCmd(
activeView->crossSectionCollection() );
activeView->intersectionCollection() );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
}
@ -105,9 +105,9 @@ void RicNewAzimuthDipIntersectionFeatureCmd::redo()
{
CVF_ASSERT( m_intersectionCollection );
RimIntersection* intersection = new RimIntersection();
RimExtrudedCurveIntersection* intersection = new RimExtrudedCurveIntersection();
intersection->setName( "Azimuth and Dip" );
intersection->type = RimIntersection::CS_AZIMUTHLINE;
intersection->type = RimExtrudedCurveIntersection::CS_AZIMUTHLINE;
intersection->inputTwoAzimuthPointsFromViewerEnabled = true;
RimCase* rimCase;

View File

@ -22,8 +22,8 @@
#include "RiaApplication.h"
#include "RimCase.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionCollection.h"
#include "Riu3DMainWindowTools.h"
@ -61,7 +61,7 @@ void RicNewPolylineIntersectionFeature::onActionTriggered( bool isChecked )
if ( !activeView ) return;
RicNewPolylineIntersectionFeatureCmd* cmd = new RicNewPolylineIntersectionFeatureCmd(
activeView->crossSectionCollection() );
activeView->intersectionCollection() );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
}
@ -103,9 +103,9 @@ void RicNewPolylineIntersectionFeatureCmd::redo()
{
CVF_ASSERT( m_intersectionCollection );
RimIntersection* intersection = new RimIntersection();
RimExtrudedCurveIntersection* intersection = new RimExtrudedCurveIntersection();
intersection->setName( "Polyline" );
intersection->type = RimIntersection::CS_POLYLINE;
intersection->type = RimExtrudedCurveIntersection::CS_POLYLINE;
intersection->inputPolyLineFromViewerEnabled = true;
m_intersectionCollection->appendIntersectionAndUpdate( intersection, false );

View File

@ -20,7 +20,7 @@
#include "RicNewSimWellIntersectionFeature.h"
#include "RimEclipseView.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimIntersectionCollection.h"
#include "RimSimWellInView.h"
@ -56,7 +56,7 @@ void RicNewSimWellIntersectionFeature::onActionTriggered( bool isChecked )
simWell->firstAncestorOrThisOfType( eclView );
CVF_ASSERT( eclView );
RicNewSimWellIntersectionCmd* cmd = new RicNewSimWellIntersectionCmd( eclView->crossSectionCollection(), simWell );
RicNewSimWellIntersectionCmd* cmd = new RicNewSimWellIntersectionCmd( eclView->intersectionCollection(), simWell );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
}
@ -101,9 +101,9 @@ void RicNewSimWellIntersectionCmd::redo()
CVF_ASSERT( m_intersectionCollection );
CVF_ASSERT( m_simWell );
RimIntersection* intersection = new RimIntersection();
RimExtrudedCurveIntersection* intersection = new RimExtrudedCurveIntersection();
intersection->setName( m_simWell->name );
intersection->type = RimIntersection::CS_SIMULATION_WELL;
intersection->type = RimExtrudedCurveIntersection::CS_SIMULATION_WELL;
intersection->simulationWell = m_simWell;
m_intersectionCollection->appendIntersectionAndUpdate( intersection, false );

View File

@ -21,8 +21,8 @@
#include "RiaApplication.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionCollection.h"
#include "RimWellPath.h"
@ -63,7 +63,7 @@ void RicNewWellPathIntersectionFeature::onActionTriggered( bool isChecked )
RimWellPath* wellPath = collection[0];
RicNewWellPathIntersectionFeatureCmd* cmd =
new RicNewWellPathIntersectionFeatureCmd( activeView->crossSectionCollection(), wellPath );
new RicNewWellPathIntersectionFeatureCmd( activeView->intersectionCollection(), wellPath );
caf::CmdExecCommandManager::instance()->processExecuteCommand( cmd );
}
@ -108,9 +108,9 @@ void RicNewWellPathIntersectionFeatureCmd::redo()
CVF_ASSERT( m_intersectionCollection );
CVF_ASSERT( m_wellPath );
RimIntersection* intersection = new RimIntersection();
RimExtrudedCurveIntersection* intersection = new RimExtrudedCurveIntersection();
intersection->setName( m_wellPath->name() );
intersection->type = RimIntersection::CS_WELL_PATH;
intersection->type = RimExtrudedCurveIntersection::CS_WELL_PATH;
intersection->wellPath = m_wellPath;
m_intersectionCollection->appendIntersectionAndUpdate( intersection, false );

View File

@ -31,10 +31,10 @@
#include "RimWellPath.h"
#include "RiuViewer.h"
#include "RivBoxIntersectionSourceInfo.h"
#include "RivExtrudedCurveIntersectionSourceInfo.h"
#include "RivFemPickSourceInfo.h"
#include "RivGeoMechVizLogic.h"
#include "RivIntersectionBoxSourceInfo.h"
#include "RivIntersectionSourceInfo.h"
#include "RivMeshLinesSourceInfo.h"
#include "RivSimWellPipeSourceInfo.h"
#include "RivSourceInfo.h"
@ -351,7 +351,7 @@ bool RicHoloLensExportImpl::isGrid( const cvf::Part* part )
}
{
auto sourceInfoOfType = dynamic_cast<const RivIntersectionSourceInfo*>( sourceInfo );
auto sourceInfoOfType = dynamic_cast<const RivExtrudedCurveIntersectionSourceInfo*>( sourceInfo );
if ( sourceInfoOfType )
{
return true;
@ -359,7 +359,7 @@ bool RicHoloLensExportImpl::isGrid( const cvf::Part* part )
}
{
auto sourceInfoOfType = dynamic_cast<const RivIntersectionBoxSourceInfo*>( sourceInfo );
auto sourceInfoOfType = dynamic_cast<const RivBoxIntersectionSourceInfo*>( sourceInfo );
if ( sourceInfoOfType )
{
return true;

View File

@ -18,9 +18,9 @@
#include "RicAppendIntersectionBoxFeature.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "Riu3DMainWindowTools.h"
@ -53,7 +53,7 @@ void RicAppendIntersectionBoxFeature::onActionTriggered( bool isChecked )
if ( coll )
{
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
RimBoxIntersection* intersectionBox = new RimBoxIntersection();
intersectionBox->setName( "Intersection Box" );
coll->appendIntersectionBoxAndUpdate( intersectionBox );

View File

@ -20,9 +20,9 @@
#include "RiaApplication.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RiuMainWindow.h"
@ -55,17 +55,17 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered( bool isChecked )
RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( activeMainOrComparisonView )
{
RimIntersectionCollection* coll = activeMainOrComparisonView->crossSectionCollection();
RimIntersectionCollection* coll = activeMainOrComparisonView->intersectionCollection();
CVF_ASSERT( coll );
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
RimBoxIntersection* intersectionBox = new RimBoxIntersection();
intersectionBox->setName( "Intersection box" );
coll->appendIntersectionBoxAndUpdate( intersectionBox );
cvf::Vec3d domainCoord = activeView->viewer()->viewerCommands()->lastPickPositionInDomainCoords();
intersectionBox->setToDefaultSizeSlice( RimIntersectionBox::PLANE_STATE_NONE, domainCoord );
intersectionBox->setToDefaultSizeSlice( RimBoxIntersection::PLANE_STATE_NONE, domainCoord );
coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem( intersectionBox, false );

View File

@ -22,9 +22,9 @@
#include "RiaApplication.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RiuViewerCommands.h"
@ -54,7 +54,7 @@ bool RicIntersectionBoxXSliceFeature::isCommandEnabled()
void RicIntersectionBoxXSliceFeature::onActionTriggered( bool isChecked )
{
RicIntersectionFeatureImpl::createIntersectionBoxSlize( "X-slice (Intersection box)",
RimIntersectionBox::PLANE_STATE_X );
RimBoxIntersection::PLANE_STATE_X );
}
//--------------------------------------------------------------------------------------------------

View File

@ -22,9 +22,9 @@
#include "RiaApplication.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RiuMainWindow.h"
@ -54,7 +54,7 @@ bool RicIntersectionBoxYSliceFeature::isCommandEnabled()
void RicIntersectionBoxYSliceFeature::onActionTriggered( bool isChecked )
{
RicIntersectionFeatureImpl::createIntersectionBoxSlize( "Y-slice (Intersection box)",
RimIntersectionBox::PLANE_STATE_Y );
RimBoxIntersection::PLANE_STATE_Y );
}
//--------------------------------------------------------------------------------------------------

View File

@ -22,9 +22,9 @@
#include "RiaApplication.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RiuViewerCommands.h"
@ -54,7 +54,7 @@ bool RicIntersectionBoxZSliceFeature::isCommandEnabled()
void RicIntersectionBoxZSliceFeature::onActionTriggered( bool isChecked )
{
RicIntersectionFeatureImpl::createIntersectionBoxSlize( "Z-slice (Intersection box)",
RimIntersectionBox::PLANE_STATE_Z );
RimBoxIntersection::PLANE_STATE_Z );
}
//--------------------------------------------------------------------------------------------------

View File

@ -19,8 +19,8 @@
#include "RiaApplication.h"
#include "RimBoxIntersection.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RiuMainWindow.h"
@ -31,19 +31,19 @@
///
//--------------------------------------------------------------------------------------------------
void RicIntersectionFeatureImpl::createIntersectionBoxSlize( const QString& name,
RimIntersectionBox::SinglePlaneState plane )
RimBoxIntersection::SinglePlaneState plane )
{
RimGridView* activeView = RiaApplication::instance()->activeGridView();
RimGridView* activeMainOrComparisonView = RiaApplication::instance()->activeMainOrComparisonGridView();
if ( activeMainOrComparisonView )
{
RimIntersectionCollection* coll = activeMainOrComparisonView->crossSectionCollection();
RimIntersectionCollection* coll = activeMainOrComparisonView->intersectionCollection();
CVF_ASSERT( coll );
cvf::Vec3d domainCoord = activeView->viewer()->viewerCommands()->lastPickPositionInDomainCoords();
RimIntersectionBox* intersectionBox = new RimIntersectionBox();
RimBoxIntersection* intersectionBox = new RimBoxIntersection();
intersectionBox->setName( name );
coll->appendIntersectionBoxNoUpdate( intersectionBox );

View File

@ -18,12 +18,12 @@
#pragma once
#include "RimIntersectionBox.h"
#include "RimBoxIntersection.h"
class QString;
class RicIntersectionFeatureImpl
{
public:
static void createIntersectionBoxSlize( const QString& name, RimIntersectionBox::SinglePlaneState plane );
static void createIntersectionBoxSlize( const QString& name, RimBoxIntersection::SinglePlaneState plane );
};

View File

@ -20,7 +20,7 @@
#include "Rim2dIntersectionView.h"
#include "RimCase.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
#include "Riu3DMainWindowTools.h"
#include "Riu3dSelectionManager.h"
@ -40,7 +40,7 @@ CAF_CMD_SOURCE_INIT( RicNewIntersectionViewFeature, "RicNewIntersectionViewFeatu
//--------------------------------------------------------------------------------------------------
bool RicNewIntersectionViewFeature::isCommandEnabled()
{
std::set<RimIntersection*> objects = selectedIntersections();
std::set<RimExtrudedCurveIntersection*> objects = selectedIntersections();
return !objects.empty();
}
@ -50,7 +50,7 @@ bool RicNewIntersectionViewFeature::isCommandEnabled()
//--------------------------------------------------------------------------------------------------
void RicNewIntersectionViewFeature::onActionTriggered( bool isChecked )
{
std::set<RimIntersection*> intersections = selectedIntersections();
std::set<RimExtrudedCurveIntersection*> intersections = selectedIntersections();
Rim2dIntersectionView* objectToSelect = nullptr;
@ -62,7 +62,7 @@ void RicNewIntersectionViewFeature::onActionTriggered( bool isChecked )
intersection->firstAncestorOrThisOfType( rimCase );
if ( rimCase )
{
if ( intersection->direction() != RimIntersection::CS_VERTICAL )
if ( intersection->direction() != RimExtrudedCurveIntersection::CS_VERTICAL )
{
QString text =
QString(
@ -101,9 +101,9 @@ void RicNewIntersectionViewFeature::setupActionLook( QAction* actionToSetup )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::set<RimIntersection*> RicNewIntersectionViewFeature::selectedIntersections()
std::set<RimExtrudedCurveIntersection*> RicNewIntersectionViewFeature::selectedIntersections()
{
std::set<RimIntersection*> objects;
std::set<RimExtrudedCurveIntersection*> objects;
Riu3dSelectionManager* riuSelManager = Riu3dSelectionManager::instance();
RiuSelectionItem* selItem = riuSelManager->selectedItem( Riu3dSelectionManager::RUI_TEMPORARY );
@ -111,7 +111,8 @@ std::set<RimIntersection*> RicNewIntersectionViewFeature::selectedIntersections(
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
if ( generalSelectionItem )
{
RimIntersection* intersection = dynamic_cast<RimIntersection*>( generalSelectionItem->m_object );
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>(
generalSelectionItem->m_object );
if ( intersection )
{
objects.insert( intersection );
@ -123,7 +124,8 @@ std::set<RimIntersection*> RicNewIntersectionViewFeature::selectedIntersections(
}
{
std::vector<RimIntersection*> selectedObjects = caf::selectedObjectsByType<RimIntersection*>();
std::vector<RimExtrudedCurveIntersection*> selectedObjects =
caf::selectedObjectsByType<RimExtrudedCurveIntersection*>();
for ( auto obj : selectedObjects )
{
objects.insert( obj );

View File

@ -22,7 +22,7 @@
#include <set>
class RimIntersection;
class RimExtrudedCurveIntersection;
//==================================================================================================
///
@ -37,5 +37,5 @@ protected:
void setupActionLook( QAction* actionToSetup ) override;
private:
static std::set<RimIntersection*> selectedIntersections();
static std::set<RimExtrudedCurveIntersection*> selectedIntersections();
};

View File

@ -23,8 +23,8 @@
#include "RiuViewerCommands.h"
#include "Rim3dView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimMeasurement.h"
#include "RimProject.h"

View File

@ -19,15 +19,15 @@
#include "RicCopyReferencesToClipboardFeature.h"
#include "RimBoxIntersection.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimEnsembleCurveSet.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFractureTemplate.h"
#include "RimGeoMechView.h"
#include "RimGridCrossPlotCurve.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimMimeData.h"
#include "RimSummaryCurveFilter.h"
#include "RimSummaryPlot.h"
@ -141,11 +141,11 @@ bool RicCopyReferencesToClipboardFeature::isCopyOfObjectSupported( caf::PdmObjec
{
return true;
}
else if ( dynamic_cast<RimIntersection*>( pdmObject ) )
else if ( dynamic_cast<RimExtrudedCurveIntersection*>( pdmObject ) )
{
return true;
}
else if ( dynamic_cast<RimIntersectionBox*>( pdmObject ) )
else if ( dynamic_cast<RimBoxIntersection*>( pdmObject ) )
{
return true;
}

View File

@ -20,8 +20,8 @@
#include "RicPasteFeatureImpl.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimBoxIntersection.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimIntersectionCollection.h"
#include "RiuMainWindow.h"
@ -41,10 +41,10 @@ bool RicPasteIntersectionsFeature::isCommandEnabled()
caf::PdmObjectGroup objectGroup;
RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup );
std::vector<caf::PdmPointer<RimIntersection>> intersectionObjects;
std::vector<caf::PdmPointer<RimExtrudedCurveIntersection>> intersectionObjects;
objectGroup.objectsByType( &intersectionObjects );
std::vector<caf::PdmPointer<RimIntersectionBox>> intersectionBoxObjects;
std::vector<caf::PdmPointer<RimBoxIntersection>> intersectionBoxObjects;
objectGroup.objectsByType( &intersectionBoxObjects );
if ( intersectionObjects.empty() && intersectionBoxObjects.empty() )
@ -81,12 +81,12 @@ void RicPasteIntersectionsFeature::onActionTriggered( bool isChecked )
if ( objectGroup.objects.size() == 0 ) return;
std::vector<caf::PdmPointer<RimIntersection>> intersectionObjects;
std::vector<caf::PdmPointer<RimExtrudedCurveIntersection>> intersectionObjects;
objectGroup.objectsByType( &intersectionObjects );
for ( size_t i = 0; i < intersectionObjects.size(); i++ )
{
RimIntersection* intersection = dynamic_cast<RimIntersection*>(
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>(
intersectionObjects[i]->xmlCapability()->copyByXmlSerialization( caf::PdmDefaultObjectFactory::instance() ) );
QString nameOfCopy = QString( "Copy of " ) + intersection->name();
@ -102,17 +102,17 @@ void RicPasteIntersectionsFeature::onActionTriggered( bool isChecked )
}
}
std::vector<caf::PdmPointer<RimIntersectionBox>> intersectionBoxObjects;
std::vector<caf::PdmPointer<RimBoxIntersection>> intersectionBoxObjects;
objectGroup.objectsByType( &intersectionBoxObjects );
for ( size_t i = 0; i < intersectionBoxObjects.size(); i++ )
{
RimIntersectionBox* intersectionBox = dynamic_cast<RimIntersectionBox*>(
RimBoxIntersection* intersectionBox = dynamic_cast<RimBoxIntersection*>(
intersectionBoxObjects[i]->xmlCapability()->copyByXmlSerialization(
caf::PdmDefaultObjectFactory::instance() ) );
QString nameOfCopy = QString( "Copy of " ) + intersectionBox->name();
intersectionBox->setName(nameOfCopy);
QString nameOfCopy = QString( "Copy of " ) + intersectionBox->name();
intersectionBox->setName( nameOfCopy );
if ( i == intersectionBoxObjects.size() - 1 )
{
@ -146,14 +146,14 @@ RimIntersectionCollection* RicPasteIntersectionsFeature::findIntersectionCollect
return intersectionCollection;
}
RimIntersection* intersection = dynamic_cast<RimIntersection*>( objectHandle );
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>( objectHandle );
if ( intersection )
{
intersection->firstAncestorOrThisOfType( intersectionCollection );
return intersectionCollection;
}
RimIntersectionBox* intersectionBox = dynamic_cast<RimIntersectionBox*>( objectHandle );
RimBoxIntersection* intersectionBox = dynamic_cast<RimBoxIntersection*>( objectHandle );
if ( intersectionBox )
{
intersectionBox->firstAncestorOrThisOfType( intersectionCollection );

View File

@ -130,11 +130,11 @@ void RicDeleteItemExec::redo()
// Intersections
RimIntersectionCollection* crossSectionColl;
parentObj->firstAncestorOrThisOfType( crossSectionColl );
if ( view && crossSectionColl )
RimIntersectionCollection* intersectionColl;
parentObj->firstAncestorOrThisOfType( intersectionColl );
if ( view && intersectionColl )
{
crossSectionColl->syncronize2dIntersectionViews();
intersectionColl->syncronize2dIntersectionViews();
view->scheduleCreateDisplayModelAndRedraw();
}
else
@ -153,7 +153,7 @@ void RicDeleteItemExec::redo()
if ( gridView && separateIntersectResDefColl )
{
gridView->scheduleCreateDisplayModelAndRedraw();
gridView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
gridView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
// SimWell Fractures

View File

@ -22,6 +22,7 @@
#include "RicDeleteItemExecData.h"
#include "RimAsciiDataCurve.h"
#include "RimBoxIntersection.h"
#include "RimCellRangeFilter.h"
#include "RimDerivedEnsembleCaseCollection.h"
#include "RimEclipseInputProperty.h"
@ -30,6 +31,7 @@
#include "RimEllipseFractureTemplate.h"
#include "RimEnsembleCurveFilter.h"
#include "RimEnsembleCurveSet.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFishboneWellPath.h"
#include "RimFishbonesMultipleSubs.h"
#include "RimFlowCharacteristicsPlot.h"
@ -41,8 +43,6 @@
#include "RimGridCrossPlotDataSet.h"
#include "RimGridTimeHistoryCurve.h"
#include "RimIdenticalGridCaseGroup.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionResultDefinition.h"
#include "RimMultiPlotWindow.h"
#include "RimPerforationInterval.h"
@ -117,8 +117,8 @@ bool isDeletable( caf::PdmUiItem* uiItem )
}
if ( dynamic_cast<RimSummaryCurve*>( uiItem ) ) return true;
if ( dynamic_cast<RimGridTimeHistoryCurve*>( uiItem ) ) return true;
if ( dynamic_cast<RimIntersection*>( uiItem ) ) return true;
if ( dynamic_cast<RimIntersectionBox*>( uiItem ) ) return true;
if ( dynamic_cast<RimExtrudedCurveIntersection*>( uiItem ) ) return true;
if ( dynamic_cast<RimBoxIntersection*>( uiItem ) ) return true;
if ( dynamic_cast<RimFormationNames*>( uiItem ) ) return true;
if ( dynamic_cast<RimFormationNamesCollection*>( uiItem ) ) return true;
if ( dynamic_cast<RimFishboneWellPath*>( uiItem ) ) return true;

View File

@ -21,7 +21,7 @@
#include "RiaApplication.h"
#include "Rim3dView.h"
#include "RimIntersectionBox.h"
#include "RimBoxIntersection.h"
#include "Riu3dSelectionManager.h"
@ -43,7 +43,7 @@ bool RicHideIntersectionBoxFeature::isCommandEnabled()
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
if ( !generalSelectionItem ) return false;
RimIntersectionBox* intersectionBox = dynamic_cast<RimIntersectionBox*>( generalSelectionItem->m_object );
RimBoxIntersection* intersectionBox = dynamic_cast<RimBoxIntersection*>( generalSelectionItem->m_object );
if ( intersectionBox )
{
return true;
@ -65,10 +65,10 @@ void RicHideIntersectionBoxFeature::onActionTriggered( bool isChecked )
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
if ( !generalSelectionItem ) return;
RimIntersectionBox* intersectionBox = dynamic_cast<RimIntersectionBox*>( generalSelectionItem->m_object );
RimBoxIntersection* intersectionBox = dynamic_cast<RimBoxIntersection*>( generalSelectionItem->m_object );
if ( intersectionBox )
{
intersectionBox->setActive(false);
intersectionBox->setActive( false );
intersectionBox->updateConnectedEditors();
activeView->scheduleCreateDisplayModelAndRedraw();

View File

@ -21,7 +21,7 @@
#include "RiaApplication.h"
#include "Rim3dView.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
#include "Riu3dSelectionManager.h"
@ -43,7 +43,8 @@ bool RicHideIntersectionFeature::isCommandEnabled()
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
if ( !generalSelectionItem ) return false;
RimIntersection* intersection = dynamic_cast<RimIntersection*>( generalSelectionItem->m_object );
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>(
generalSelectionItem->m_object );
if ( intersection )
{
return true;
@ -65,7 +66,8 @@ void RicHideIntersectionFeature::onActionTriggered( bool isChecked )
RiuGeneralSelectionItem* generalSelectionItem = static_cast<RiuGeneralSelectionItem*>( selItem );
if ( !generalSelectionItem ) return;
RimIntersection* intersection = dynamic_cast<RimIntersection*>( generalSelectionItem->m_object );
RimExtrudedCurveIntersection* intersection = dynamic_cast<RimExtrudedCurveIntersection*>(
generalSelectionItem->m_object );
if ( intersection )
{
intersection->setActive( false );

View File

@ -23,10 +23,10 @@
#include "Rim2dIntersectionView.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGeoMechCellColors.h"
#include "RimGeoMechView.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "Riu3DMainWindowTools.h"

View File

@ -19,8 +19,8 @@
#include "RicIntersectionPickEventHandler.h"
#include "RiaApplication.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "cafDisplayCoordTransform.h"
#include "cafSelectionManager.h"
@ -41,13 +41,13 @@ RicIntersectionPickEventHandler* RicIntersectionPickEventHandler::instance()
//--------------------------------------------------------------------------------------------------
bool RicIntersectionPickEventHandler::handle3dPickEvent( const Ric3dPickEvent& eventObject )
{
std::vector<RimIntersection*> selection;
std::vector<RimExtrudedCurveIntersection*> selection;
caf::SelectionManager::instance()->objectsByType( &selection );
if ( selection.size() == 1 )
{
{
RimIntersection* intersection = selection[0];
RimExtrudedCurveIntersection* intersection = selection[0];
RimGridView* gridView = nullptr;
intersection->firstAncestorOrThisOfTypeAsserted( gridView );

View File

@ -34,7 +34,7 @@
#include "RivObjectSourceInfo.h"
#include "RivWellPathSourceInfo.h"
#include "RivIntersectionPartMgr.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "cafDisplayCoordTransform.h"
#include "cafSelectionManager.h"
#include "cvfPart.h"

View File

@ -1,25 +1,25 @@
set (SOURCE_GROUP_HEADER_FILES
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionGeometryGenerator.h
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionSourceInfo.h
${CMAKE_CURRENT_LIST_DIR}/RivExtrudedCurveIntersectionGeometryGenerator.h
${CMAKE_CURRENT_LIST_DIR}/RivExtrudedCurveIntersectionPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivExtrudedCurveIntersectionSourceInfo.h
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionResultsColoringTools.h
${CMAKE_CURRENT_LIST_DIR}/RivHexGridIntersectionTools.h
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionBoxGeometryGenerator.h
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionBoxPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionBoxSourceInfo.h
${CMAKE_CURRENT_LIST_DIR}/RivBoxIntersectionGeometryGenerator.h
${CMAKE_CURRENT_LIST_DIR}/RivBoxIntersectionPartMgr.h
${CMAKE_CURRENT_LIST_DIR}/RivBoxIntersectionSourceInfo.h
${CMAKE_CURRENT_LIST_DIR}/RivSectionFlattner.h
)
set (SOURCE_GROUP_SOURCE_FILES
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionGeometryGenerator.cpp
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionSourceInfo.cpp
${CMAKE_CURRENT_LIST_DIR}/RivExtrudedCurveIntersectionGeometryGenerator.cpp
${CMAKE_CURRENT_LIST_DIR}/RivExtrudedCurveIntersectionPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivExtrudedCurveIntersectionSourceInfo.cpp
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionResultsColoringTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RivHexGridIntersectionTools.cpp
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionBoxGeometryGenerator.cpp
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionBoxPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivIntersectionBoxSourceInfo.cpp
${CMAKE_CURRENT_LIST_DIR}/RivBoxIntersectionGeometryGenerator.cpp
${CMAKE_CURRENT_LIST_DIR}/RivBoxIntersectionPartMgr.cpp
${CMAKE_CURRENT_LIST_DIR}/RivBoxIntersectionSourceInfo.cpp
${CMAKE_CURRENT_LIST_DIR}/RivSectionFlattner.cpp
)

View File

@ -16,11 +16,11 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RivIntersectionBoxGeometryGenerator.h"
#include "RivBoxIntersectionGeometryGenerator.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimGridView.h"
#include "RimIntersectionBox.h"
#include "cafHexGridIntersectionTools/cafHexGridIntersectionTools.h"
@ -34,7 +34,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator( RimIntersectionBox* intersectionBox,
RivBoxIntersectionGeometryGenerator::RivBoxIntersectionGeometryGenerator( RimBoxIntersection* intersectionBox,
const RivIntersectionHexGridInterface* grid )
: m_intersectionBoxDefinition( intersectionBox )
, m_hexGrid( grid )
@ -46,12 +46,12 @@ RivIntersectionBoxGeometryGenerator::RivIntersectionBoxGeometryGenerator( RimInt
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionBoxGeometryGenerator::~RivIntersectionBoxGeometryGenerator() {}
RivBoxIntersectionGeometryGenerator::~RivBoxIntersectionGeometryGenerator() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RivIntersectionBoxGeometryGenerator::isAnyGeometryPresent() const
bool RivBoxIntersectionGeometryGenerator::isAnyGeometryPresent() const
{
if ( m_triangleVxes->size() == 0 )
{
@ -66,7 +66,7 @@ bool RivIntersectionBoxGeometryGenerator::isAnyGeometryPresent() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::generateSurface()
cvf::ref<cvf::DrawableGeo> RivBoxIntersectionGeometryGenerator::generateSurface()
{
calculateArrays();
@ -83,7 +83,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::generateSurface(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::createMeshDrawable()
cvf::ref<cvf::DrawableGeo> RivBoxIntersectionGeometryGenerator::createMeshDrawable()
{
if ( !( m_cellBorderLineVxes.notNull() && m_cellBorderLineVxes->size() != 0 ) ) return nullptr;
@ -100,7 +100,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionBoxGeometryGenerator::createMeshDrawab
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RivIntersectionBoxGeometryGenerator::triangleToCellIndex() const
const std::vector<size_t>& RivBoxIntersectionGeometryGenerator::triangleToCellIndex() const
{
CVF_ASSERT( m_triangleVxes->size() );
return m_triangleToCellIdxMap;
@ -110,7 +110,7 @@ const std::vector<size_t>& RivIntersectionBoxGeometryGenerator::triangleToCellIn
///
//--------------------------------------------------------------------------------------------------
const std::vector<RivIntersectionVertexWeights>&
RivIntersectionBoxGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
RivBoxIntersectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
{
CVF_ASSERT( m_triangleVxes->size() );
return m_triVxToCellCornerWeights;
@ -119,7 +119,7 @@ const std::vector<RivIntersectionVertexWeights>&
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const cvf::Vec3fArray* RivIntersectionBoxGeometryGenerator::triangleVxes() const
const cvf::Vec3fArray* RivBoxIntersectionGeometryGenerator::triangleVxes() const
{
CVF_ASSERT( m_triangleVxes->size() );
@ -236,7 +236,7 @@ private:
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionBox* RivIntersectionBoxGeometryGenerator::intersectionBox() const
RimBoxIntersection* RivBoxIntersectionGeometryGenerator::intersectionBox() const
{
return m_intersectionBoxDefinition;
}
@ -244,7 +244,7 @@ RimIntersectionBox* RivIntersectionBoxGeometryGenerator::intersectionBox() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxGeometryGenerator::calculateArrays()
void RivBoxIntersectionGeometryGenerator::calculateArrays()
{
if ( m_triangleVxes->size() ) return;
@ -264,13 +264,13 @@ void RivIntersectionBoxGeometryGenerator::calculateArrays()
Box box( m_intersectionBoxDefinition->boxOrigin(), m_intersectionBoxDefinition->boxSize() );
std::array<cvf::Plane, 6> boxPlanes = box.planes();
RimIntersectionBox::SinglePlaneState singlePlane = m_intersectionBoxDefinition->singlePlaneState();
RimBoxIntersection::SinglePlaneState singlePlane = m_intersectionBoxDefinition->singlePlaneState();
int startFace = 0;
int endFace = 5;
if ( singlePlane == RimIntersectionBox::PLANE_STATE_X ) startFace = endFace = Box::FaceType::POS_I;
if ( singlePlane == RimIntersectionBox::PLANE_STATE_Y ) startFace = endFace = Box::FaceType::POS_J;
if ( singlePlane == RimIntersectionBox::PLANE_STATE_Z ) startFace = endFace = Box::FaceType::POS_K;
if ( singlePlane == RimBoxIntersection::PLANE_STATE_X ) startFace = endFace = Box::FaceType::POS_I;
if ( singlePlane == RimBoxIntersection::PLANE_STATE_Y ) startFace = endFace = Box::FaceType::POS_J;
if ( singlePlane == RimBoxIntersection::PLANE_STATE_Z ) startFace = endFace = Box::FaceType::POS_K;
for ( int faceIdx = startFace; faceIdx <= endFace; ++faceIdx )
{

View File

@ -29,7 +29,7 @@
#include <vector>
class RimIntersectionBox;
class RimBoxIntersection;
namespace cvf
{
@ -37,19 +37,19 @@ class ScalarMapper;
class DrawableGeo;
} // namespace cvf
class RivIntersectionBoxGeometryGenerator : public cvf::Object, public RivIntersectionGeometryGeneratorIF
class RivBoxIntersectionGeometryGenerator : public cvf::Object, public RivIntersectionGeometryGeneratorIF
{
public:
RivIntersectionBoxGeometryGenerator( RimIntersectionBox* intersectionBox,
RivBoxIntersectionGeometryGenerator( RimBoxIntersection* intersectionBox,
const RivIntersectionHexGridInterface* grid );
~RivIntersectionBoxGeometryGenerator() override;
~RivBoxIntersectionGeometryGenerator() override;
// Generate geometry
cvf::ref<cvf::DrawableGeo> generateSurface();
cvf::ref<cvf::DrawableGeo> createMeshDrawable();
RimIntersectionBox* intersectionBox() const;
RimBoxIntersection* intersectionBox() const;
// GeomGen Interface
@ -70,5 +70,5 @@ private:
std::vector<size_t> m_triangleToCellIdxMap;
std::vector<RivIntersectionVertexWeights> m_triVxToCellCornerWeights;
RimIntersectionBox* m_intersectionBoxDefinition;
RimBoxIntersection* m_intersectionBoxDefinition;
};

View File

@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RivIntersectionBoxPartMgr.h"
#include "RivBoxIntersectionPartMgr.h"
#include "RigCaseCellResultsData.h"
#include "RigFemPartCollection.h"
@ -25,19 +25,19 @@
#include "RigResultAccessor.h"
#include "RigResultAccessorFactory.h"
#include "RimBoxIntersection.h"
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechCellColors.h"
#include "RimGeoMechView.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionResultDefinition.h"
#include "RimRegularLegendConfig.h"
#include "RimTernaryLegendConfig.h"
#include "RivIntersectionBoxSourceInfo.h"
#include "RivIntersectionPartMgr.h"
#include "RivBoxIntersectionSourceInfo.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "RivIntersectionResultsColoringTools.h"
#include "RivMeshLinesSourceInfo.h"
#include "RivPartPriority.h"
@ -58,7 +58,7 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionBoxPartMgr::RivIntersectionBoxPartMgr( RimIntersectionBox* intersectionBox )
RivBoxIntersectionPartMgr::RivBoxIntersectionPartMgr( RimBoxIntersection* intersectionBox )
: m_rimIntersectionBox( intersectionBox )
, m_defaultColor( cvf::Color3::WHITE )
{
@ -67,13 +67,13 @@ RivIntersectionBoxPartMgr::RivIntersectionBoxPartMgr( RimIntersectionBox* inters
m_intersectionBoxFacesTextureCoords = new cvf::Vec2fArray;
cvf::ref<RivIntersectionHexGridInterface> hexGrid = intersectionBox->createHexGridInterface();
m_intersectionBoxGenerator = new RivIntersectionBoxGeometryGenerator( m_rimIntersectionBox, hexGrid.p() );
m_intersectionBoxGenerator = new RivBoxIntersectionGeometryGenerator( m_rimIntersectionBox, hexGrid.p() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxPartMgr::applySingleColorEffect()
void RivBoxIntersectionPartMgr::applySingleColorEffect()
{
m_defaultColor = cvf::Color3f::OLIVE; // m_rimCrossSection->CrossSectionColor();
this->updatePartEffect();
@ -82,7 +82,7 @@ void RivIntersectionBoxPartMgr::applySingleColorEffect()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxPartMgr::updateCellResultColor( size_t timeStepIndex )
void RivBoxIntersectionPartMgr::updateCellResultColor( size_t timeStepIndex )
{
RivIntersectionResultsColoringTools::calculateIntersectionResultColors( timeStepIndex,
true,
@ -97,7 +97,7 @@ void RivIntersectionBoxPartMgr::updateCellResultColor( size_t timeStepIndex )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxPartMgr::generatePartGeometry()
void RivBoxIntersectionPartMgr::generatePartGeometry()
{
bool useBufferObjects = true;
// Surface geometry
@ -117,7 +117,7 @@ void RivIntersectionBoxPartMgr::generatePartGeometry()
part->setDrawable( geo.p() );
// Set mapping from triangle face index to cell index
cvf::ref<RivIntersectionBoxSourceInfo> si = new RivIntersectionBoxSourceInfo( m_intersectionBoxGenerator.p() );
cvf::ref<RivBoxIntersectionSourceInfo> si = new RivBoxIntersectionSourceInfo( m_intersectionBoxGenerator.p() );
part->setSourceInfo( si.p() );
part->updateBoundingBox();
@ -158,7 +158,7 @@ void RivIntersectionBoxPartMgr::generatePartGeometry()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxPartMgr::updatePartEffect()
void RivBoxIntersectionPartMgr::updatePartEffect()
{
// Set deCrossSection effect
caf::SurfaceEffectGenerator geometryEffgen( m_defaultColor, caf::PO_1 );
@ -186,7 +186,7 @@ void RivIntersectionBoxPartMgr::updatePartEffect()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxPartMgr::appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model,
void RivBoxIntersectionPartMgr::appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
{
if ( m_intersectionBoxFaces.isNull() && m_intersectionBoxGridLines.isNull() )
@ -204,7 +204,7 @@ void RivIntersectionBoxPartMgr::appendNativeCrossSectionFacesToModel( cvf::Model
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionBoxPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
void RivBoxIntersectionPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
{
if ( m_intersectionBoxFaces.isNull() && m_intersectionBoxGridLines.isNull() )
{

View File

@ -18,7 +18,7 @@
#pragma once
#include "RivIntersectionBoxGeometryGenerator.h"
#include "RivBoxIntersectionGeometryGenerator.h"
#include "cvfObject.h"
@ -37,8 +37,8 @@ class RivTernaryScalarMapper;
class RimCellEdgeColors;
class RimEclipseCellColors;
class RimIntersectionBox;
class RimIntersectionHandle;
class RimBoxIntersection;
class RimIntersection;
class RimEclipseView;
class RimGeoMechView;
class RimEclipseResultDefinition;
@ -49,15 +49,15 @@ class RimGeoMechResultDefinition;
///
//==================================================================================================
class RivIntersectionBoxPartMgr : public cvf::Object
class RivBoxIntersectionPartMgr : public cvf::Object
{
public:
explicit RivIntersectionBoxPartMgr( RimIntersectionBox* intersectionBox );
explicit RivBoxIntersectionPartMgr( RimBoxIntersection* intersectionBox );
void applySingleColorEffect();
void updateCellResultColor( size_t timeStepIndex );
void appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
private:
@ -65,7 +65,7 @@ private:
void generatePartGeometry();
private:
RimIntersectionBox* m_rimIntersectionBox;
RimBoxIntersection* m_rimIntersectionBox;
cvf::Color3f m_defaultColor;
@ -73,5 +73,5 @@ private:
cvf::ref<cvf::Part> m_intersectionBoxGridLines;
cvf::ref<cvf::Vec2fArray> m_intersectionBoxFacesTextureCoords;
cvf::ref<RivIntersectionBoxGeometryGenerator> m_intersectionBoxGenerator;
cvf::ref<RivBoxIntersectionGeometryGenerator> m_intersectionBoxGenerator;
};

View File

@ -16,14 +16,14 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RivIntersectionBoxSourceInfo.h"
#include "RivBoxIntersectionSourceInfo.h"
#include "RivIntersectionBoxGeometryGenerator.h"
#include "RivBoxIntersectionGeometryGenerator.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionBoxSourceInfo::RivIntersectionBoxSourceInfo( RivIntersectionBoxGeometryGenerator* geometryGenerator )
RivBoxIntersectionSourceInfo::RivBoxIntersectionSourceInfo( RivBoxIntersectionGeometryGenerator* geometryGenerator )
: m_intersectionBoxGeometryGenerator( geometryGenerator )
{
CVF_ASSERT( m_intersectionBoxGeometryGenerator.notNull() );
@ -32,7 +32,7 @@ RivIntersectionBoxSourceInfo::RivIntersectionBoxSourceInfo( RivIntersectionBoxGe
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RivIntersectionBoxSourceInfo::triangleToCellIndex() const
const std::vector<size_t>& RivBoxIntersectionSourceInfo::triangleToCellIndex() const
{
CVF_ASSERT( m_intersectionBoxGeometryGenerator.notNull() );
@ -42,7 +42,7 @@ const std::vector<size_t>& RivIntersectionBoxSourceInfo::triangleToCellIndex() c
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::array<cvf::Vec3f, 3> RivIntersectionBoxSourceInfo::triangle( int triangleIdx ) const
std::array<cvf::Vec3f, 3> RivBoxIntersectionSourceInfo::triangle( int triangleIdx ) const
{
std::array<cvf::Vec3f, 3> tri;
tri[0] = ( *m_intersectionBoxGeometryGenerator->triangleVxes() )[triangleIdx * 3];
@ -55,7 +55,7 @@ std::array<cvf::Vec3f, 3> RivIntersectionBoxSourceInfo::triangle( int triangleId
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionBox* RivIntersectionBoxSourceInfo::intersectionBox() const
RimBoxIntersection* RivBoxIntersectionSourceInfo::intersectionBox() const
{
return m_intersectionBoxGeometryGenerator->intersectionBox();
}

View File

@ -22,19 +22,19 @@
#include "cvfObject.h"
#include <array>
class RivIntersectionBoxGeometryGenerator;
class RimIntersectionBox;
class RivBoxIntersectionGeometryGenerator;
class RimBoxIntersection;
class RivIntersectionBoxSourceInfo : public cvf::Object
class RivBoxIntersectionSourceInfo : public cvf::Object
{
public:
explicit RivIntersectionBoxSourceInfo( RivIntersectionBoxGeometryGenerator* geometryGenerator );
explicit RivBoxIntersectionSourceInfo( RivBoxIntersectionGeometryGenerator* geometryGenerator );
const std::vector<size_t>& triangleToCellIndex() const;
std::array<cvf::Vec3f, 3> triangle( int triangleIdx ) const;
RimIntersectionBox* intersectionBox() const;
RimBoxIntersection* intersectionBox() const;
private:
cvf::cref<RivIntersectionBoxGeometryGenerator> m_intersectionBoxGeometryGenerator;
cvf::cref<RivBoxIntersectionGeometryGenerator> m_intersectionBoxGeometryGenerator;
};

View File

@ -17,18 +17,18 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RivIntersectionGeometryGenerator.h"
#include "RivExtrudedCurveIntersectionGeometryGenerator.h"
#include "RigMainGrid.h"
#include "RigResultAccessor.h"
#include "Rim3dView.h"
#include "RimCase.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "RivHexGridIntersectionTools.h"
#include "RivIntersectionPartMgr.h"
#include "RivPolylineGenerator.h"
#include "cafDisplayCoordTransform.h"
@ -44,7 +44,7 @@
#include "RivSectionFlattner.h"
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform( const RimIntersection* intersection )
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform( const RimExtrudedCurveIntersection* intersection )
{
Rim3dView* rimView = nullptr;
intersection->firstAncestorOrThisOfType( rimView );
@ -58,13 +58,14 @@ cvf::ref<caf::DisplayCoordTransform> displayCoordTransform( const RimIntersectio
/// isFlattened means to transform each flat section of the intersection onto the XZ plane
/// placed adjacent to each other as if they were rotated around the common extrusion line like a hinge
//--------------------------------------------------------------------------------------------------
RivIntersectionGeometryGenerator::RivIntersectionGeometryGenerator( RimIntersection* crossSection,
std::vector<std::vector<cvf::Vec3d>>& polylines,
const cvf::Vec3d& extrusionDirection,
const RivIntersectionHexGridInterface* grid,
bool isFlattened,
const cvf::Vec3d& flattenedPolylineStartPoint )
: m_crossSection( crossSection )
RivExtrudedCurveIntersectionGeometryGenerator::RivExtrudedCurveIntersectionGeometryGenerator(
RimExtrudedCurveIntersection* crossSection,
std::vector<std::vector<cvf::Vec3d>>& polylines,
const cvf::Vec3d& extrusionDirection,
const RivIntersectionHexGridInterface* grid,
bool isFlattened,
const cvf::Vec3d& flattenedPolylineStartPoint )
: m_intersection( crossSection )
, m_polyLines( polylines )
, m_extrusionDirection( extrusionDirection )
, m_hexGrid( grid )
@ -81,12 +82,12 @@ RivIntersectionGeometryGenerator::RivIntersectionGeometryGenerator( RimIntersect
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionGeometryGenerator::~RivIntersectionGeometryGenerator() {}
RivExtrudedCurveIntersectionGeometryGenerator::~RivExtrudedCurveIntersectionGeometryGenerator() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionGeometryGenerator::calculateSegementTransformPrLinePoint()
void RivExtrudedCurveIntersectionGeometryGenerator::calculateSegementTransformPrLinePoint()
{
if ( m_isFlattened )
{
@ -112,7 +113,7 @@ void RivIntersectionGeometryGenerator::calculateSegementTransformPrLinePoint()
cvf::Vec3d displayOffset( 0, 0, 0 );
{
RimGridView* gridView = nullptr;
m_crossSection->firstAncestorOrThisOfType( gridView );
m_intersection->firstAncestorOrThisOfType( gridView );
if ( gridView && gridView->ownerCase() )
{
displayOffset = gridView->ownerCase()->displayModelOffset();
@ -136,7 +137,7 @@ void RivIntersectionGeometryGenerator::calculateSegementTransformPrLinePoint()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionGeometryGenerator::calculateFlattenedOrOffsetedPolyline()
void RivExtrudedCurveIntersectionGeometryGenerator::calculateFlattenedOrOffsetedPolyline()
{
CVF_ASSERT( m_segementTransformPrLinePoint.size() == m_polyLines.size() );
@ -212,7 +213,7 @@ private:
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionGeometryGenerator::calculateArrays()
void RivExtrudedCurveIntersectionGeometryGenerator::calculateArrays()
{
if ( m_triangleVxes->size() ) return;
@ -254,10 +255,10 @@ void RivIntersectionGeometryGenerator::calculateArrays()
double maxSectionHeightUp = 0;
double maxSectionHeightDown = 0;
if ( m_crossSection->type == RimIntersection::CS_AZIMUTHLINE )
if ( m_intersection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
{
maxSectionHeightUp = m_crossSection->lengthUp();
maxSectionHeightDown = m_crossSection->lengthDown();
maxSectionHeightUp = m_intersection->lengthUp();
maxSectionHeightDown = m_intersection->lengthDown();
if ( maxSectionHeightUp + maxSectionHeightDown == 0 )
{
@ -320,7 +321,7 @@ void RivIntersectionGeometryGenerator::calculateArrays()
&hexPlaneCutTriangleVxes,
&cellFaceForEachTriangleEdge );
if ( m_crossSection->type == RimIntersection::CS_AZIMUTHLINE )
if ( m_intersection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
{
bool hasAnyPointsOnSurface = false;
for ( caf::HexGridIntersectionTools::ClipVx vertex : hexPlaneCutTriangleVxes )
@ -449,7 +450,7 @@ void RivIntersectionGeometryGenerator::calculateArrays()
/// Generate surface drawable geo from the specified region
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::generateSurface()
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::generateSurface()
{
calculateArrays();
@ -466,7 +467,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::generateSurface()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createMeshDrawable()
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createMeshDrawable()
{
if ( !( m_cellBorderLineVxes.notNull() && m_cellBorderLineVxes->size() != 0 ) ) return nullptr;
@ -483,7 +484,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createMeshDrawable(
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createFaultMeshDrawable()
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createFaultMeshDrawable()
{
if ( !( m_faultCellBorderLineVxes.notNull() && m_faultCellBorderLineVxes->size() != 0 ) ) return nullptr;
@ -500,7 +501,7 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createFaultMeshDraw
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createLineAlongPolylineDrawable()
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createLineAlongPolylineDrawable()
{
return RivPolylineGenerator::createLineAlongPolylineDrawable( m_flattenedOrOffsettedPolyLines );
}
@ -508,10 +509,10 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createLineAlongPoly
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo>
RivIntersectionGeometryGenerator::createLineAlongExtrusionLineDrawable( const std::vector<cvf::Vec3d>& extrusionLine )
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createLineAlongExtrusionLineDrawable(
const std::vector<cvf::Vec3d>& extrusionLine )
{
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( crossSection() );
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( intersection() );
std::vector<cvf::Vec3d> displayCoords;
for ( const auto& pt : extrusionLine )
@ -526,7 +527,7 @@ cvf::ref<cvf::DrawableGeo>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createPointsFromPolylineDrawable()
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createPointsFromPolylineDrawable()
{
return RivPolylineGenerator::createPointsFromPolylineDrawable( m_flattenedOrOffsettedPolyLines );
}
@ -534,10 +535,10 @@ cvf::ref<cvf::DrawableGeo> RivIntersectionGeometryGenerator::createPointsFromPol
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo>
RivIntersectionGeometryGenerator::createPointsFromExtrusionLineDrawable( const std::vector<cvf::Vec3d>& extrusionLine )
cvf::ref<cvf::DrawableGeo> RivExtrudedCurveIntersectionGeometryGenerator::createPointsFromExtrusionLineDrawable(
const std::vector<cvf::Vec3d>& extrusionLine )
{
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( crossSection() );
cvf::ref<caf::DisplayCoordTransform> transform = displayCoordTransform( intersection() );
std::vector<cvf::Vec3d> displayCoords;
for ( const auto& pt : extrusionLine )
@ -552,7 +553,7 @@ cvf::ref<cvf::DrawableGeo>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RivIntersectionGeometryGenerator::triangleToCellIndex() const
const std::vector<size_t>& RivExtrudedCurveIntersectionGeometryGenerator::triangleToCellIndex() const
{
CVF_ASSERT( m_triangleVxes->size() );
return m_triangleToCellIdxMap;
@ -562,7 +563,7 @@ const std::vector<size_t>& RivIntersectionGeometryGenerator::triangleToCellIndex
///
//--------------------------------------------------------------------------------------------------
const std::vector<RivIntersectionVertexWeights>&
RivIntersectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
RivExtrudedCurveIntersectionGeometryGenerator::triangleVxToCellCornerInterpolationWeights() const
{
CVF_ASSERT( m_triangleVxes->size() );
return m_triVxToCellCornerWeights;
@ -571,7 +572,7 @@ const std::vector<RivIntersectionVertexWeights>&
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const cvf::Vec3fArray* RivIntersectionGeometryGenerator::triangleVxes() const
const cvf::Vec3fArray* RivExtrudedCurveIntersectionGeometryGenerator::triangleVxes() const
{
CVF_ASSERT( m_triangleVxes->size() );
return m_triangleVxes.p();
@ -580,15 +581,15 @@ const cvf::Vec3fArray* RivIntersectionGeometryGenerator::triangleVxes() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersection* RivIntersectionGeometryGenerator::crossSection() const
RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionGeometryGenerator::intersection() const
{
return m_crossSection;
return m_intersection;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Mat4d RivIntersectionGeometryGenerator::unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat )
cvf::Mat4d RivExtrudedCurveIntersectionGeometryGenerator::unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat )
{
cvf::Mat4d flattenMx = cvf::Mat4d::IDENTITY;
@ -616,7 +617,7 @@ cvf::Mat4d RivIntersectionGeometryGenerator::unflattenTransformMatrix( const cvf
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RivIntersectionGeometryGenerator::isAnyGeometryPresent() const
bool RivExtrudedCurveIntersectionGeometryGenerator::isAnyGeometryPresent() const
{
if ( m_triangleVxes->size() == 0 )
{

View File

@ -36,7 +36,7 @@
class RigMainGrid;
class RigActiveCellInfo;
class RigResultAccessor;
class RimIntersection;
class RimExtrudedCurveIntersection;
class RivIntersectionHexGridInterface;
class RivIntersectionVertexWeights;
@ -46,17 +46,17 @@ class ScalarMapper;
class DrawableGeo;
} // namespace cvf
class RivIntersectionGeometryGenerator : public cvf::Object, public RivIntersectionGeometryGeneratorIF
class RivExtrudedCurveIntersectionGeometryGenerator : public cvf::Object, public RivIntersectionGeometryGeneratorIF
{
public:
RivIntersectionGeometryGenerator( RimIntersection* crossSection,
std::vector<std::vector<cvf::Vec3d>>& polylines,
const cvf::Vec3d& extrusionDirection,
const RivIntersectionHexGridInterface* grid,
bool isFlattened,
const cvf::Vec3d& flattenedPolylineStartPoint );
RivExtrudedCurveIntersectionGeometryGenerator( RimExtrudedCurveIntersection* intersection,
std::vector<std::vector<cvf::Vec3d>>& polylines,
const cvf::Vec3d& extrusionDirection,
const RivIntersectionHexGridInterface* grid,
bool isFlattened,
const cvf::Vec3d& flattenedPolylineStartPoint );
~RivIntersectionGeometryGenerator() override;
~RivExtrudedCurveIntersectionGeometryGenerator() override;
// Generate geometry
cvf::ref<cvf::DrawableGeo> generateSurface();
@ -77,7 +77,7 @@ public:
return m_faultMeshLabelAndAnchorPositions;
}
RimIntersection* crossSection() const;
RimExtrudedCurveIntersection* intersection() const;
cvf::Mat4d unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat );
@ -93,7 +93,7 @@ private:
void calculateSegementTransformPrLinePoint();
void calculateFlattenedOrOffsetedPolyline();
RimIntersection* m_crossSection;
RimExtrudedCurveIntersection* m_intersection;
cvf::cref<RivIntersectionHexGridInterface> m_hexGrid;
const std::vector<std::vector<cvf::Vec3d>> m_polyLines;
cvf::Vec3d m_extrusionDirection;

View File

@ -17,7 +17,7 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RivIntersectionPartMgr.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "RiaGuiApplication.h"
#include "RiaOffshoreSphericalCoords.h"
@ -34,12 +34,12 @@
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFaultInView.h"
#include "RimFaultInViewCollection.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechCellColors.h"
#include "RimGeoMechView.h"
#include "RimIntersection.h"
#include "RimRegularLegendConfig.h"
#include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
@ -49,10 +49,10 @@
#include "RiuGeoMechXfTensorResultAccessor.h"
#include "RivExtrudedCurveIntersectionGeometryGenerator.h"
#include "RivExtrudedCurveIntersectionSourceInfo.h"
#include "RivHexGridIntersectionTools.h"
#include "RivIntersectionGeometryGenerator.h"
#include "RivIntersectionResultsColoringTools.h"
#include "RivIntersectionSourceInfo.h"
#include "RivMeshLinesSourceInfo.h"
#include "RivObjectSourceInfo.h"
#include "RivPartPriority.h"
@ -84,83 +84,84 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionPartMgr::RivIntersectionPartMgr( RimIntersection* rimCrossSection, bool isFlattened )
: m_rimCrossSection( rimCrossSection )
RivExtrudedCurveIntersectionPartMgr::RivExtrudedCurveIntersectionPartMgr( RimExtrudedCurveIntersection* rimCrossSection,
bool isFlattened )
: m_rimIntersection( rimCrossSection )
, m_isFlattened( isFlattened )
{
CVF_ASSERT( m_rimCrossSection );
CVF_ASSERT( m_rimIntersection );
m_crossSectionFacesTextureCoords = new cvf::Vec2fArray;
m_intersectionFacesTextureCoords = new cvf::Vec2fArray;
cvf::Vec3d flattenedPolylineStartPoint;
std::vector<std::vector<cvf::Vec3d>> polyLines = m_rimCrossSection->polyLines( &flattenedPolylineStartPoint );
std::vector<std::vector<cvf::Vec3d>> polyLines = m_rimIntersection->polyLines( &flattenedPolylineStartPoint );
if ( polyLines.size() > 0 )
{
cvf::Vec3d direction = m_rimCrossSection->extrusionDirection();
cvf::ref<RivIntersectionHexGridInterface> hexGrid = m_rimCrossSection->createHexGridInterface();
m_crossSectionGenerator = new RivIntersectionGeometryGenerator( m_rimCrossSection,
polyLines,
direction,
hexGrid.p(),
m_isFlattened,
flattenedPolylineStartPoint );
cvf::Vec3d direction = m_rimIntersection->extrusionDirection();
cvf::ref<RivIntersectionHexGridInterface> hexGrid = m_rimIntersection->createHexGridInterface();
m_intersectionGenerator = new RivExtrudedCurveIntersectionGeometryGenerator( m_rimIntersection,
polyLines,
direction,
hexGrid.p(),
m_isFlattened,
flattenedPolylineStartPoint );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::applySingleColorEffect()
void RivExtrudedCurveIntersectionPartMgr::applySingleColorEffect()
{
if ( m_crossSectionGenerator.isNull() ) return;
if ( m_intersectionGenerator.isNull() ) return;
caf::SurfaceEffectGenerator geometryEffgen( cvf::Color3f::OLIVE, caf::PO_1 );
cvf::ref<cvf::Effect> geometryOnlyEffect = geometryEffgen.generateCachedEffect();
if ( m_crossSectionFaces.notNull() )
if ( m_intersectionFaces.notNull() )
{
m_crossSectionFaces->setEffect( geometryOnlyEffect.p() );
m_intersectionFaces->setEffect( geometryOnlyEffect.p() );
}
// Update mesh colors as well, in case of change
RiaPreferences* prefs = RiaApplication::instance()->preferences();
if ( m_crossSectionGridLines.notNull() )
if ( m_intersectionGridLines.notNull() )
{
cvf::ref<cvf::Effect> eff;
caf::MeshEffectGenerator CrossSectionEffGen( prefs->defaultGridLineColors() );
eff = CrossSectionEffGen.generateCachedEffect();
m_crossSectionGridLines->setEffect( eff.p() );
m_intersectionGridLines->setEffect( eff.p() );
}
if ( m_crossSectionFaultGridLines.notNull() )
if ( m_intersectionFaultGridLines.notNull() )
{
cvf::ref<cvf::Effect> eff;
caf::MeshEffectGenerator CrossSectionEffGen( prefs->defaultFaultGridLineColors() );
eff = CrossSectionEffGen.generateCachedEffect();
m_crossSectionFaultGridLines->setEffect( eff.p() );
m_intersectionFaultGridLines->setEffect( eff.p() );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper )
void RivExtrudedCurveIntersectionPartMgr::updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper )
{
RivIntersectionResultsColoringTools::calculateIntersectionResultColors( timeStepIndex,
!m_isFlattened,
m_rimCrossSection,
m_crossSectionGenerator.p(),
m_rimIntersection,
m_intersectionGenerator.p(),
explicitScalarColorMapper,
explicitTernaryColorMapper,
m_crossSectionFaces.p(),
m_crossSectionFacesTextureCoords.p() );
m_intersectionFaces.p(),
m_intersectionFacesTextureCoords.p() );
}
//--------------------------------------------------------------------------------------------------
@ -221,14 +222,14 @@ void RivIntersectionResultsColoringTools::calculateNodeOrElementNodeBasedGeoMech
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::generatePartGeometry()
void RivExtrudedCurveIntersectionPartMgr::generatePartGeometry()
{
if ( m_crossSectionGenerator.isNull() ) return;
if ( m_intersectionGenerator.isNull() ) return;
bool useBufferObjects = true;
// Surface geometry
{
cvf::ref<cvf::DrawableGeo> geo = m_crossSectionGenerator->generateSurface();
cvf::ref<cvf::DrawableGeo> geo = m_intersectionGenerator->generateSurface();
if ( geo.notNull() )
{
geo->computeNormals();
@ -243,20 +244,21 @@ void RivIntersectionPartMgr::generatePartGeometry()
part->setDrawable( geo.p() );
// Set mapping from triangle face index to cell index
cvf::ref<RivIntersectionSourceInfo> si = new RivIntersectionSourceInfo( m_crossSectionGenerator.p() );
cvf::ref<RivExtrudedCurveIntersectionSourceInfo> si = new RivExtrudedCurveIntersectionSourceInfo(
m_intersectionGenerator.p() );
part->setSourceInfo( si.p() );
part->updateBoundingBox();
part->setEnableMask( intersectionCellFaceBit );
part->setPriority( RivPartPriority::PartType::Intersection );
m_crossSectionFaces = part;
m_intersectionFaces = part;
}
}
// Cell Mesh geometry
{
cvf::ref<cvf::DrawableGeo> geoMesh = m_crossSectionGenerator->createMeshDrawable();
cvf::ref<cvf::DrawableGeo> geoMesh = m_intersectionGenerator->createMeshDrawable();
if ( geoMesh.notNull() )
{
if ( useBufferObjects )
@ -272,15 +274,15 @@ void RivIntersectionPartMgr::generatePartGeometry()
part->setEnableMask( intersectionCellMeshBit );
part->setPriority( RivPartPriority::PartType::MeshLines );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimCrossSection ) );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimIntersection ) );
m_crossSectionGridLines = part;
m_intersectionGridLines = part;
}
}
// Fault Mesh geometry
{
cvf::ref<cvf::DrawableGeo> geoMesh = m_crossSectionGenerator->createFaultMeshDrawable();
cvf::ref<cvf::DrawableGeo> geoMesh = m_intersectionGenerator->createFaultMeshDrawable();
if ( geoMesh.notNull() )
{
if ( useBufferObjects )
@ -296,16 +298,16 @@ void RivIntersectionPartMgr::generatePartGeometry()
part->setEnableMask( intersectionFaultMeshBit );
part->setPriority( RivPartPriority::PartType::FaultMeshLines );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimCrossSection ) );
part->setSourceInfo( new RivMeshLinesSourceInfo( m_rimIntersection ) );
m_crossSectionFaultGridLines = part;
m_intersectionFaultGridLines = part;
}
}
createPolyLineParts( useBufferObjects );
createExtrusionDirParts( useBufferObjects );
if ( m_isFlattened ) createFaultLabelParts( m_crossSectionGenerator->faultMeshLabelAndAnchorPositions() );
if ( m_isFlattened ) createFaultLabelParts( m_intersectionGenerator->faultMeshLabelAndAnchorPositions() );
applySingleColorEffect();
}
@ -313,7 +315,8 @@ void RivIntersectionPartMgr::generatePartGeometry()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::createFaultLabelParts( const std::vector<std::pair<QString, cvf::Vec3d>>& labelAndAnchors )
void RivExtrudedCurveIntersectionPartMgr::createFaultLabelParts(
const std::vector<std::pair<QString, cvf::Vec3d>>& labelAndAnchors )
{
m_faultMeshLabels = nullptr;
m_faultMeshLabelLines = nullptr;
@ -322,10 +325,10 @@ void RivIntersectionPartMgr::createFaultLabelParts( const std::vector<std::pair<
RimFaultInViewCollection* faultInViewColl = nullptr;
if ( !m_rimCrossSection->activeSeparateResultDefinition() )
if ( !m_rimIntersection->activeSeparateResultDefinition() )
{
RimEclipseView* eclipseView = nullptr;
m_rimCrossSection->firstAncestorOrThisOfType( eclipseView );
m_rimIntersection->firstAncestorOrThisOfType( eclipseView );
if ( eclipseView )
{
faultInViewColl = eclipseView->faultCollection();
@ -351,7 +354,7 @@ void RivIntersectionPartMgr::createFaultLabelParts( const std::vector<std::pair<
drawableText->setTextColor( faultLabelColor );
}
cvf::BoundingBox bb = m_crossSectionFaces->boundingBox();
cvf::BoundingBox bb = m_intersectionFaces->boundingBox();
double labelZOffset = bb.extent().z() / 10;
int visibleFaultNameCount = 0;
@ -420,18 +423,18 @@ void RivIntersectionPartMgr::createFaultLabelParts( const std::vector<std::pair<
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::createPolyLineParts( bool useBufferObjects )
void RivExtrudedCurveIntersectionPartMgr::createPolyLineParts( bool useBufferObjects )
{
// Highlight line
m_highlightLineAlongPolyline = nullptr;
m_highlightPointsForPolyline = nullptr;
if ( m_rimCrossSection->type == RimIntersection::CS_POLYLINE ||
m_rimCrossSection->type == RimIntersection::CS_AZIMUTHLINE )
if ( m_rimIntersection->type == RimExtrudedCurveIntersection::CS_POLYLINE ||
m_rimIntersection->type == RimExtrudedCurveIntersection::CS_AZIMUTHLINE )
{
{
cvf::ref<cvf::DrawableGeo> polylineGeo = m_crossSectionGenerator->createLineAlongPolylineDrawable();
cvf::ref<cvf::DrawableGeo> polylineGeo = m_intersectionGenerator->createLineAlongPolylineDrawable();
if ( polylineGeo.notNull() )
{
if ( useBufferObjects )
@ -463,7 +466,7 @@ void RivIntersectionPartMgr::createPolyLineParts( bool useBufferObjects )
}
}
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_crossSectionGenerator->createPointsFromPolylineDrawable();
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_intersectionGenerator->createPointsFromPolylineDrawable();
if ( polylinePointsGeo.notNull() )
{
if ( useBufferObjects )
@ -504,16 +507,16 @@ void RivIntersectionPartMgr::createPolyLineParts( bool useBufferObjects )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::createExtrusionDirParts( bool useBufferObjects )
void RivExtrudedCurveIntersectionPartMgr::createExtrusionDirParts( bool useBufferObjects )
{
m_highlightLineAlongExtrusionDir = nullptr;
m_highlightPointsForExtrusionDir = nullptr;
if ( m_rimCrossSection->direction() == RimIntersection::CS_TWO_POINTS )
if ( m_rimIntersection->direction() == RimExtrudedCurveIntersection::CS_TWO_POINTS )
{
{
cvf::ref<cvf::DrawableGeo> polylineGeo = m_crossSectionGenerator->createLineAlongExtrusionLineDrawable(
m_rimCrossSection->polyLinesForExtrusionDirection() );
cvf::ref<cvf::DrawableGeo> polylineGeo = m_intersectionGenerator->createLineAlongExtrusionLineDrawable(
m_rimIntersection->polyLinesForExtrusionDirection() );
if ( polylineGeo.notNull() )
{
if ( useBufferObjects )
@ -545,8 +548,8 @@ void RivIntersectionPartMgr::createExtrusionDirParts( bool useBufferObjects )
}
}
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_crossSectionGenerator->createPointsFromExtrusionLineDrawable(
m_rimCrossSection->polyLinesForExtrusionDirection() );
cvf::ref<cvf::DrawableGeo> polylinePointsGeo = m_intersectionGenerator->createPointsFromExtrusionLineDrawable(
m_rimIntersection->polyLinesForExtrusionDirection() );
if ( polylinePointsGeo.notNull() )
{
if ( useBufferObjects )
@ -587,41 +590,42 @@ void RivIntersectionPartMgr::createExtrusionDirParts( bool useBufferObjects )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
void RivExtrudedCurveIntersectionPartMgr::appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
{
if ( m_crossSectionFaces.isNull() )
if ( m_intersectionFaces.isNull() )
{
generatePartGeometry();
}
if ( m_crossSectionFaces.notNull() )
if ( m_intersectionFaces.notNull() )
{
m_crossSectionFaces->setTransform( scaleTransform );
model->addPart( m_crossSectionFaces.p() );
m_intersectionFaces->setTransform( scaleTransform );
model->addPart( m_intersectionFaces.p() );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
void RivExtrudedCurveIntersectionPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
{
if ( m_crossSectionGridLines.isNull() )
if ( m_intersectionGridLines.isNull() )
{
generatePartGeometry();
}
if ( m_crossSectionGridLines.notNull() )
if ( m_intersectionGridLines.notNull() )
{
m_crossSectionGridLines->setTransform( scaleTransform );
model->addPart( m_crossSectionGridLines.p() );
m_intersectionGridLines->setTransform( scaleTransform );
model->addPart( m_intersectionGridLines.p() );
}
if ( m_crossSectionFaultGridLines.notNull() )
if ( m_intersectionFaultGridLines.notNull() )
{
m_crossSectionFaultGridLines->setTransform( scaleTransform );
model->addPart( m_crossSectionFaultGridLines.p() );
m_intersectionFaultGridLines->setTransform( scaleTransform );
model->addPart( m_intersectionFaultGridLines.p() );
}
if ( m_faultMeshLabelLines.notNull() )
@ -640,13 +644,13 @@ void RivIntersectionPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList* mo
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RivIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView& view,
cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
void RivExtrudedCurveIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView& view,
cvf::ModelBasicList* model,
cvf::Transform* scaleTransform )
{
Rim2dIntersectionView* curr2dView = dynamic_cast<Rim2dIntersectionView*>( &view );
if ( m_rimCrossSection->inputPolyLineFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
if ( m_rimIntersection->inputPolyLineFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
{
if ( m_highlightLineAlongPolyline.notNull() )
{
@ -661,7 +665,7 @@ void RivIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView& vi
}
}
if ( m_rimCrossSection->inputExtrusionPointsFromViewerEnabled )
if ( m_rimIntersection->inputExtrusionPointsFromViewerEnabled )
{
if ( m_highlightLineAlongExtrusionDir.notNull() )
{
@ -676,7 +680,7 @@ void RivIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView& vi
}
}
if ( m_rimCrossSection->inputTwoAzimuthPointsFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
if ( m_rimIntersection->inputTwoAzimuthPointsFromViewerEnabled || ( curr2dView && curr2dView->showDefiningPoints() ) )
{
if ( m_highlightLineAlongPolyline.notNull() )
{
@ -695,15 +699,15 @@ void RivIntersectionPartMgr::appendPolylinePartsToModel( Rim3dView& vi
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const RimIntersection* RivIntersectionPartMgr::intersection() const
const RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionPartMgr::intersection() const
{
return m_rimCrossSection.p();
return m_rimIntersection.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Mat4d RivIntersectionPartMgr::unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat )
cvf::Mat4d RivExtrudedCurveIntersectionPartMgr::unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat )
{
return m_crossSectionGenerator->unflattenTransformMatrix( intersectionPointFlat );
return m_intersectionGenerator->unflattenTransformMatrix( intersectionPointFlat );
}

View File

@ -49,9 +49,9 @@ class RigResultAccessor;
class Rim3dView;
class RimCellEdgeColors;
class RimEclipseCellColors;
class RimIntersection;
class RimExtrudedCurveIntersection;
class RivTernaryScalarMapper;
class RivIntersectionGeometryGenerator;
class RivExtrudedCurveIntersectionGeometryGenerator;
class RivIntersectionHexGridInterface;
class RivIntersectionVertexWeights;
class RivPipeGeometryGenerator;
@ -61,21 +61,22 @@ class RivPipeGeometryGenerator;
///
//==================================================================================================
class RivIntersectionPartMgr : public cvf::Object
class RivExtrudedCurveIntersectionPartMgr : public cvf::Object
{
public:
explicit RivIntersectionPartMgr( RimIntersection* rimCrossSection, bool isFlattened = false );
explicit RivExtrudedCurveIntersectionPartMgr( RimExtrudedCurveIntersection* rimIntersection,
bool isFlattened = false );
void applySingleColorEffect();
void updateCellResultColor( size_t timeStepIndex,
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper );
void appendNativeCrossSectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendNativeIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void appendPolylinePartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
const RimIntersection* intersection() const;
const RimExtrudedCurveIntersection* intersection() const;
cvf::Mat4d unflattenTransformMatrix( const cvf::Vec3d& intersectionPointFlat );
@ -87,13 +88,13 @@ private:
void createExtrusionDirParts( bool useBufferObjects );
private:
caf::PdmPointer<RimIntersection> m_rimCrossSection;
caf::PdmPointer<RimExtrudedCurveIntersection> m_rimIntersection;
cvf::ref<RivIntersectionGeometryGenerator> m_crossSectionGenerator;
cvf::ref<RivExtrudedCurveIntersectionGeometryGenerator> m_intersectionGenerator;
cvf::ref<cvf::Part> m_crossSectionFaces;
cvf::ref<cvf::Part> m_crossSectionGridLines;
cvf::ref<cvf::Part> m_crossSectionFaultGridLines;
cvf::ref<cvf::Part> m_intersectionFaces;
cvf::ref<cvf::Part> m_intersectionGridLines;
cvf::ref<cvf::Part> m_intersectionFaultGridLines;
cvf::ref<cvf::Part> m_faultMeshLabels;
cvf::ref<cvf::Part> m_faultMeshLabelLines;
cvf::ref<cvf::Part> m_highlightLineAlongPolyline;
@ -101,7 +102,7 @@ private:
cvf::ref<cvf::Part> m_highlightLineAlongExtrusionDir;
cvf::ref<cvf::Part> m_highlightPointsForExtrusionDir;
cvf::ref<cvf::Vec2fArray> m_crossSectionFacesTextureCoords;
cvf::ref<cvf::Vec2fArray> m_intersectionFacesTextureCoords;
struct RivPipeBranchData
{

View File

@ -17,38 +17,39 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RivIntersectionSourceInfo.h"
#include "RivExtrudedCurveIntersectionSourceInfo.h"
#include "RivIntersectionGeometryGenerator.h"
#include "RivExtrudedCurveIntersectionGeometryGenerator.h"
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionSourceInfo::RivIntersectionSourceInfo( RivIntersectionGeometryGenerator* geometryGenerator )
: m_crossSectionGeometryGenerator( geometryGenerator )
RivExtrudedCurveIntersectionSourceInfo::RivExtrudedCurveIntersectionSourceInfo(
RivExtrudedCurveIntersectionGeometryGenerator* geometryGenerator )
: m_intersectionGeometryGenerator( geometryGenerator )
{
CVF_ASSERT( m_crossSectionGeometryGenerator.notNull() );
CVF_ASSERT( m_intersectionGeometryGenerator.notNull() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
const std::vector<size_t>& RivIntersectionSourceInfo::triangleToCellIndex() const
const std::vector<size_t>& RivExtrudedCurveIntersectionSourceInfo::triangleToCellIndex() const
{
CVF_ASSERT( m_crossSectionGeometryGenerator.notNull() );
CVF_ASSERT( m_intersectionGeometryGenerator.notNull() );
return m_crossSectionGeometryGenerator->triangleToCellIndex();
return m_intersectionGeometryGenerator->triangleToCellIndex();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::array<cvf::Vec3f, 3> RivIntersectionSourceInfo::triangle( int triangleIdx ) const
std::array<cvf::Vec3f, 3> RivExtrudedCurveIntersectionSourceInfo::triangle( int triangleIdx ) const
{
std::array<cvf::Vec3f, 3> tri;
tri[0] = ( *m_crossSectionGeometryGenerator->triangleVxes() )[triangleIdx * 3];
tri[1] = ( *m_crossSectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 1];
tri[2] = ( *m_crossSectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 2];
tri[0] = ( *m_intersectionGeometryGenerator->triangleVxes() )[triangleIdx * 3];
tri[1] = ( *m_intersectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 1];
tri[2] = ( *m_intersectionGeometryGenerator->triangleVxes() )[triangleIdx * 3 + 2];
return tri;
}
@ -56,7 +57,7 @@ std::array<cvf::Vec3f, 3> RivIntersectionSourceInfo::triangle( int triangleIdx )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersection* RivIntersectionSourceInfo::crossSection() const
RimExtrudedCurveIntersection* RivExtrudedCurveIntersectionSourceInfo::intersection() const
{
return m_crossSectionGeometryGenerator->crossSection();
return m_intersectionGeometryGenerator->intersection();
}

View File

@ -23,18 +23,18 @@
#include "cvfObject.h"
#include <array>
class RivIntersectionGeometryGenerator;
class RimIntersection;
class RivExtrudedCurveIntersectionGeometryGenerator;
class RimExtrudedCurveIntersection;
class RivIntersectionSourceInfo : public cvf::Object
class RivExtrudedCurveIntersectionSourceInfo : public cvf::Object
{
public:
explicit RivIntersectionSourceInfo( RivIntersectionGeometryGenerator* geometryGenerator );
explicit RivExtrudedCurveIntersectionSourceInfo( RivExtrudedCurveIntersectionGeometryGenerator* geometryGenerator );
const std::vector<size_t>& triangleToCellIndex() const;
std::array<cvf::Vec3f, 3> triangle( int triangleIdx ) const;
RimIntersection* crossSection() const;
const std::vector<size_t>& triangleToCellIndex() const;
std::array<cvf::Vec3f, 3> triangle( int triangleIdx ) const;
RimExtrudedCurveIntersection* intersection() const;
private:
cvf::cref<RivIntersectionGeometryGenerator> m_crossSectionGeometryGenerator;
cvf::cref<RivExtrudedCurveIntersectionGeometryGenerator> m_intersectionGeometryGenerator;
};

View File

@ -26,7 +26,7 @@
#include "RimGeoMechCellColors.h"
#include "RimGeoMechView.h"
#include "RimGridView.h"
#include "RimIntersectionHandle.h"
#include "RimIntersection.h"
#include "RimIntersectionResultDefinition.h"
#include "RimRegularLegendConfig.h"
#include "RimTernaryLegendConfig.h"
@ -51,7 +51,7 @@
void RivIntersectionResultsColoringTools::calculateIntersectionResultColors(
size_t timeStepIndex,
bool useSeparateIntersectionResDefTimeStep,
RimIntersectionHandle* rimIntersectionHandle,
RimIntersection* rimIntersectionHandle,
const RivIntersectionGeometryGeneratorIF* intersectionGeomGenIF,
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper,

View File

@ -24,7 +24,7 @@
class RimEclipseResultDefinition;
class RimGeoMechResultDefinition;
class RimIntersectionHandle;
class RimIntersection;
class RivIntersectionGeometryGeneratorIF;
class RivTernaryScalarMapper;
@ -43,9 +43,9 @@ class ScalarMapper;
class RivIntersectionResultsColoringTools
{
public:
static void calculateIntersectionResultColors( size_t timeStepIndex,
bool useSeparateIntersectionResDefTimeStep,
RimIntersectionHandle* rimIntersectionHandle,
static void calculateIntersectionResultColors( size_t timeStepIndex,
bool useSeparateIntersectionResDefTimeStep,
RimIntersection* rimIntersectionHandle,
const RivIntersectionGeometryGeneratorIF* intersectionGeomGenIF,
const cvf::ScalarMapper* explicitScalarColorMapper,
const RivTernaryScalarMapper* explicitTernaryColorMapper,

View File

@ -87,15 +87,15 @@ ${CMAKE_CURRENT_LIST_DIR}/RimWellLogFileChannel.h
${CMAKE_CURRENT_LIST_DIR}/RimWellLogFileCurve.h
${CMAKE_CURRENT_LIST_DIR}/RimWellLogRftCurve.h
${CMAKE_CURRENT_LIST_DIR}/RimWellLogWbsCurve.h
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionHandle.h
${CMAKE_CURRENT_LIST_DIR}/RimIntersection.h
${CMAKE_CURRENT_LIST_DIR}/RimExtrudedCurveIntersection.h
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionResultDefinition.h
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionResultsDefinitionCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimContextCommandBuilder.h
${CMAKE_CURRENT_LIST_DIR}/RimGridCollection.h
${CMAKE_CURRENT_LIST_DIR}/RimPlotCurve.h
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionBox.h
${CMAKE_CURRENT_LIST_DIR}/RimBoxIntersection.h
${CMAKE_CURRENT_LIST_DIR}/RimAdvancedSnapshotExportDefinition.h
${CMAKE_CURRENT_LIST_DIR}/RimMdiWindowController.h
${CMAKE_CURRENT_LIST_DIR}/RimPropertyFilter.h
@ -232,15 +232,15 @@ ${CMAKE_CURRENT_LIST_DIR}/RimWellLogFileChannel.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogFileCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogRftCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimWellLogWbsCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionHandle.cpp
${CMAKE_CURRENT_LIST_DIR}/RimIntersection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimExtrudedCurveIntersection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionResultDefinition.cpp
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionResultsDefinitionCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimContextCommandBuilder.cpp
${CMAKE_CURRENT_LIST_DIR}/RimGridCollection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimPlotCurve.cpp
${CMAKE_CURRENT_LIST_DIR}/RimIntersectionBox.cpp
${CMAKE_CURRENT_LIST_DIR}/RimBoxIntersection.cpp
${CMAKE_CURRENT_LIST_DIR}/RimAdvancedSnapshotExportDefinition.cpp
${CMAKE_CURRENT_LIST_DIR}/RimMdiWindowController.cpp
${CMAKE_CURRENT_LIST_DIR}/RimPropertyFilter.cpp

View File

@ -803,7 +803,7 @@ QString RimFlowCharacteristicsPlot::curveDataAsText() const
std::vector<QDateTime> timeStepDates = m_case->timeStepDates();
std::vector<double> storageCapacitySamplingValues = { 0.08, 0.1, 0.2, 0.3, 0.4 };
std::vector<double> storageCapacitySamplingValues = {0.08, 0.1, 0.2, 0.3, 0.4};
size_t sampleCount = storageCapacitySamplingValues.size();
for ( const auto& timeIndex : m_currentlyPlottedTimeSteps )

View File

@ -23,10 +23,10 @@
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGeoMechCellColors.h"
#include "RimGeoMechView.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionResultDefinition.h"
#include "RimRegularLegendConfig.h"
#include "RimSimWellInView.h"
@ -37,7 +37,7 @@
#include "RiuMainWindow.h"
#include "RiuViewer.h"
#include "RivIntersectionPartMgr.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "RivSimWellPipesPartMgr.h"
#include "RivTernarySaturationOverlayItem.h"
#include "RivWellHeadPartMgr.h"
@ -123,7 +123,7 @@ void Rim2dIntersectionView::setVisible( bool isVisible )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void Rim2dIntersectionView::setIntersection( RimIntersection* intersection )
void Rim2dIntersectionView::setIntersection( RimExtrudedCurveIntersection* intersection )
{
CAF_ASSERT( intersection );
@ -135,7 +135,7 @@ void Rim2dIntersectionView::setIntersection( RimIntersection* intersection )
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersection* Rim2dIntersectionView::intersection() const
RimExtrudedCurveIntersection* Rim2dIntersectionView::intersection() const
{
return m_intersection();
}
@ -354,7 +354,7 @@ void Rim2dIntersectionView::updateName()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<RivIntersectionPartMgr> Rim2dIntersectionView::flatIntersectionPartMgr() const
cvf::ref<RivExtrudedCurveIntersectionPartMgr> Rim2dIntersectionView::flatIntersectionPartMgr() const
{
return m_flatIntersectionPartMgr;
}
@ -540,11 +540,11 @@ void Rim2dIntersectionView::onCreateDisplayModel()
nativeOrOverrideViewer()->addFrame( new cvf::Scene(), isUsingOverrideViewer() );
}
m_flatIntersectionPartMgr = new RivIntersectionPartMgr( m_intersection(), true );
m_flatIntersectionPartMgr = new RivExtrudedCurveIntersectionPartMgr( m_intersection(), true );
m_intersectionVizModel->removeAllParts();
m_flatIntersectionPartMgr->appendNativeCrossSectionFacesToModel( m_intersectionVizModel.p(), scaleTransform() );
m_flatIntersectionPartMgr->appendNativeIntersectionFacesToModel( m_intersectionVizModel.p(), scaleTransform() );
m_flatIntersectionPartMgr->appendMeshLinePartsToModel( m_intersectionVizModel.p(), scaleTransform() );
m_flatIntersectionPartMgr->appendPolylinePartsToModel( *this, m_intersectionVizModel.p(), scaleTransform() );
@ -553,7 +553,7 @@ void Rim2dIntersectionView::onCreateDisplayModel()
m_flatSimWellPipePartMgr = nullptr;
m_flatWellHeadPartMgr = nullptr;
if ( m_intersection->type() == RimIntersection::CS_SIMULATION_WELL && m_intersection->simulationWell() )
if ( m_intersection->type() == RimExtrudedCurveIntersection::CS_SIMULATION_WELL && m_intersection->simulationWell() )
{
RimEclipseView* eclipseView = nullptr;
m_intersection->firstAncestorOrThisOfType( eclipseView );
@ -566,7 +566,7 @@ void Rim2dIntersectionView::onCreateDisplayModel()
}
m_flatWellpathPartMgr = nullptr;
if ( m_intersection->type() == RimIntersection::CS_WELL_PATH && m_intersection->wellPath() )
if ( m_intersection->type() == RimExtrudedCurveIntersection::CS_WELL_PATH && m_intersection->wellPath() )
{
Rim3dView* settingsView = nullptr;
m_intersection->firstAncestorOrThisOfType( settingsView );

View File

@ -22,13 +22,13 @@
#include "cafPdmProxyValueField.h"
#include "cafPdmPtrField.h"
class RimIntersection;
class RimExtrudedCurveIntersection;
class RimRegularLegendConfig;
class RimTernaryLegendConfig;
class RivSimWellPipesPartMgr;
class RivWellHeadPartMgr;
class RivWellPathPartMgr;
class RivIntersectionPartMgr;
class RivExtrudedCurveIntersectionPartMgr;
namespace cvf
{
@ -48,9 +48,9 @@ public:
Rim2dIntersectionView( void );
~Rim2dIntersectionView( void ) override;
void setVisible( bool isVisible );
void setIntersection( RimIntersection* intersection );
RimIntersection* intersection() const;
void setVisible( bool isVisible );
void setIntersection( RimExtrudedCurveIntersection* intersection );
RimExtrudedCurveIntersection* intersection() const;
bool isUsingFormationNames() const override;
void scheduleGeometryRegen( RivCellSetEnum geometryType ) override;
@ -71,8 +71,8 @@ public:
void update3dInfo();
void updateName();
cvf::ref<RivIntersectionPartMgr> flatIntersectionPartMgr() const;
cvf::Vec3d transformToUtm( const cvf::Vec3d& unscaledPointInFlatDomain ) const;
cvf::ref<RivExtrudedCurveIntersectionPartMgr> flatIntersectionPartMgr() const;
cvf::Vec3d transformToUtm( const cvf::Vec3d& unscaledPointInFlatDomain ) const;
cvf::ref<caf::DisplayCoordTransform> displayCoordTransform() const override;
@ -117,14 +117,14 @@ private:
caf::PdmChildField<RimRegularLegendConfig*> m_legendConfig;
caf::PdmChildField<RimTernaryLegendConfig*> m_ternaryLegendConfig;
caf::PdmPtrField<RimIntersection*> m_intersection;
caf::PdmPtrField<RimExtrudedCurveIntersection*> m_intersection;
cvf::ref<RivIntersectionPartMgr> m_flatIntersectionPartMgr;
cvf::ref<RivSimWellPipesPartMgr> m_flatSimWellPipePartMgr;
cvf::ref<RivWellHeadPartMgr> m_flatWellHeadPartMgr;
cvf::ref<RivWellPathPartMgr> m_flatWellpathPartMgr;
cvf::ref<cvf::ModelBasicList> m_intersectionVizModel;
cvf::ref<cvf::Transform> m_scaleTransform;
cvf::ref<RivExtrudedCurveIntersectionPartMgr> m_flatIntersectionPartMgr;
cvf::ref<RivSimWellPipesPartMgr> m_flatSimWellPipePartMgr;
cvf::ref<RivWellHeadPartMgr> m_flatWellHeadPartMgr;
cvf::ref<RivWellPathPartMgr> m_flatWellpathPartMgr;
cvf::ref<cvf::ModelBasicList> m_intersectionVizModel;
cvf::ref<cvf::Transform> m_scaleTransform;
caf::PdmProxyValueField<QString> m_nameProxy;
caf::PdmField<bool> m_showDefiningPoints;

View File

@ -20,7 +20,7 @@
#include "Rim2dIntersectionView.h"
#include "RimCase.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
CAF_PDM_SOURCE_INIT( Rim2dIntersectionViewCollection, "Intersection2dViewCollection" );
@ -61,11 +61,11 @@ void Rim2dIntersectionViewCollection::syncFromExistingIntersections( bool doUpda
RimCase* parentCase = nullptr;
this->firstAncestorOrThisOfTypeAsserted( parentCase );
std::vector<RimIntersection*> allOrderedIntersectionsInCase;
std::vector<RimExtrudedCurveIntersection*> allOrderedIntersectionsInCase;
parentCase->descendantsIncludingThisOfType( allOrderedIntersectionsInCase );
std::set<RimIntersection*> currentIntersections( allOrderedIntersectionsInCase.begin(),
allOrderedIntersectionsInCase.end() );
std::set<RimExtrudedCurveIntersection*> currentIntersections( allOrderedIntersectionsInCase.begin(),
allOrderedIntersectionsInCase.end() );
// Delete views without a valid intersection
@ -83,7 +83,7 @@ void Rim2dIntersectionViewCollection::syncFromExistingIntersections( bool doUpda
// Build map from intersection to view
std::map<RimIntersection*, Rim2dIntersectionView*> intersectionToViewMap;
std::map<RimExtrudedCurveIntersection*, Rim2dIntersectionView*> intersectionToViewMap;
for ( Rim2dIntersectionView* iv : m_intersectionViews )
{
CVF_ASSERT( iv && iv->intersection() );
@ -94,7 +94,7 @@ void Rim2dIntersectionViewCollection::syncFromExistingIntersections( bool doUpda
// Insert the old views in correct order, and create new views as we go
for ( RimIntersection* intersection : allOrderedIntersectionsInCase )
for ( RimExtrudedCurveIntersection* intersection : allOrderedIntersectionsInCase )
{
auto it = intersectionToViewMap.find( intersection );
if ( it == intersectionToViewMap.end() )

View File

@ -138,8 +138,8 @@ Rim3dView::Rim3dView( void )
CAF_PDM_InitFieldNoDefault( &m_comparisonView, "ComparisonView", "Comparison View", "", "", "" );
m_crossSectionVizModel = new cvf::ModelBasicList;
m_crossSectionVizModel->setName( "CrossSectionModel" );
m_intersectionVizModel = new cvf::ModelBasicList;
m_intersectionVizModel->setName( "CrossSectionModel" );
m_highlightVizModel = new cvf::ModelBasicList;
m_highlightVizModel->setName( "HighlightModel" );

View File

@ -248,7 +248,7 @@ protected:
// 3D display model data
cvf::ref<cvf::ModelBasicList> m_wellPathPipeVizModel;
cvf::ref<cvf::ModelBasicList> m_crossSectionVizModel;
cvf::ref<cvf::ModelBasicList> m_intersectionVizModel;
cvf::ref<RivWellPathsPartMgr> m_wellPathsPartManager;
private:

View File

@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimIntersectionBox.h"
#include "RimBoxIntersection.h"
#include "Rim3dView.h"
#include "RimCase.h"
@ -26,7 +26,7 @@
#include "RiuViewer.h"
#include "RivIntersectionBoxPartMgr.h"
#include "RivBoxIntersectionPartMgr.h"
#include "cafDisplayCoordTransform.h"
#include "cafPdmUiDoubleSliderEditor.h"
@ -36,22 +36,22 @@
namespace caf
{
template <>
void AppEnum<RimIntersectionBox::SinglePlaneState>::setUp()
void AppEnum<RimBoxIntersection::SinglePlaneState>::setUp()
{
addItem( RimIntersectionBox::PLANE_STATE_NONE, "PLANE_STATE_NONE", "Box" );
addItem( RimIntersectionBox::PLANE_STATE_X, "PLANE_STATE_X", "X Plane" );
addItem( RimIntersectionBox::PLANE_STATE_Y, "PLANE_STATE_Y", "Y Plane" );
addItem( RimIntersectionBox::PLANE_STATE_Z, "PLANE_STATE_Z", "Z Plane" );
setDefault( RimIntersectionBox::PLANE_STATE_NONE );
addItem( RimBoxIntersection::PLANE_STATE_NONE, "PLANE_STATE_NONE", "Box" );
addItem( RimBoxIntersection::PLANE_STATE_X, "PLANE_STATE_X", "X Plane" );
addItem( RimBoxIntersection::PLANE_STATE_Y, "PLANE_STATE_Y", "Y Plane" );
addItem( RimBoxIntersection::PLANE_STATE_Z, "PLANE_STATE_Z", "Z Plane" );
setDefault( RimBoxIntersection::PLANE_STATE_NONE );
}
} // namespace caf
CAF_PDM_SOURCE_INIT( RimIntersectionBox, "IntersectionBox" );
CAF_PDM_SOURCE_INIT( RimBoxIntersection, "IntersectionBox" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionBox::RimIntersectionBox()
RimBoxIntersection::RimBoxIntersection()
{
CAF_PDM_InitObject( "Intersection Box", ":/IntersectionBox16x16.png", "", "" );
@ -92,7 +92,7 @@ RimIntersectionBox::RimIntersectionBox()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionBox::~RimIntersectionBox()
RimBoxIntersection::~RimBoxIntersection()
{
if ( m_boxManipulator )
{
@ -103,7 +103,7 @@ RimIntersectionBox::~RimIntersectionBox()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Mat4d RimIntersectionBox::boxOrigin() const
cvf::Mat4d RimBoxIntersection::boxOrigin() const
{
cvf::Mat4d mx( cvf::Mat4d::IDENTITY );
mx.setTranslation( cvf::Vec3d( m_minXCoord, m_minYCoord, -m_maxDepth ) );
@ -113,7 +113,7 @@ cvf::Mat4d RimIntersectionBox::boxOrigin() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Vec3d RimIntersectionBox::boxSize() const
cvf::Vec3d RimBoxIntersection::boxSize() const
{
return cvf::Vec3d( m_maxXCoord, m_maxYCoord, m_maxDepth ) - cvf::Vec3d( m_minXCoord, m_minYCoord, m_minDepth );
}
@ -121,7 +121,7 @@ cvf::Vec3d RimIntersectionBox::boxSize() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::setFromOriginAndSize( const cvf::Vec3d& origin, const cvf::Vec3d& size )
void RimBoxIntersection::setFromOriginAndSize( const cvf::Vec3d& origin, const cvf::Vec3d& size )
{
m_minXCoord = origin.x();
m_minYCoord = origin.y();
@ -143,7 +143,7 @@ void RimIntersectionBox::setFromOriginAndSize( const cvf::Vec3d& origin, const c
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimIntersectionBox::show3dManipulator() const
bool RimBoxIntersection::show3dManipulator() const
{
return m_show3DManipulator;
}
@ -151,7 +151,7 @@ bool RimIntersectionBox::show3dManipulator() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionBox::SinglePlaneState RimIntersectionBox::singlePlaneState() const
RimBoxIntersection::SinglePlaneState RimBoxIntersection::singlePlaneState() const
{
return m_singlePlaneState();
}
@ -159,7 +159,7 @@ RimIntersectionBox::SinglePlaneState RimIntersectionBox::singlePlaneState() cons
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::setToDefaultSizeBox()
void RimBoxIntersection::setToDefaultSizeBox()
{
cvf::BoundingBox boundingBox = currentCellBoundingBox();
cvf::Vec3d center = boundingBox.center();
@ -177,7 +177,7 @@ void RimIntersectionBox::setToDefaultSizeBox()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::setToDefaultSizeSlice( SinglePlaneState plane, const cvf::Vec3d& position )
void RimBoxIntersection::setToDefaultSizeSlice( SinglePlaneState plane, const cvf::Vec3d& position )
{
m_singlePlaneState = plane;
@ -214,9 +214,9 @@ void RimIntersectionBox::setToDefaultSizeSlice( SinglePlaneState plane, const cv
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivIntersectionBoxPartMgr* RimIntersectionBox::intersectionBoxPartMgr()
RivBoxIntersectionPartMgr* RimBoxIntersection::intersectionBoxPartMgr()
{
if ( m_intersectionBoxPartMgr.isNull() ) m_intersectionBoxPartMgr = new RivIntersectionBoxPartMgr( this );
if ( m_intersectionBoxPartMgr.isNull() ) m_intersectionBoxPartMgr = new RivBoxIntersectionPartMgr( this );
return m_intersectionBoxPartMgr.p();
}
@ -224,7 +224,7 @@ RivIntersectionBoxPartMgr* RimIntersectionBox::intersectionBoxPartMgr()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::appendManipulatorPartsToModel( cvf::ModelBasicList* model )
void RimBoxIntersection::appendManipulatorPartsToModel( cvf::ModelBasicList* model )
{
if ( show3dManipulator() && m_boxManipulator )
{
@ -235,7 +235,7 @@ void RimIntersectionBox::appendManipulatorPartsToModel( cvf::ModelBasicList* mod
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::rebuildGeometry()
void RimBoxIntersection::rebuildGeometry()
{
m_intersectionBoxPartMgr = nullptr;
}
@ -243,7 +243,7 @@ void RimIntersectionBox::rebuildGeometry()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
void RimBoxIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
@ -359,7 +359,7 @@ void RimIntersectionBox::fieldChangedByUi( const caf::PdmFieldHandle* changedFie
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::updateBoxManipulatorGeometry()
void RimBoxIntersection::updateBoxManipulatorGeometry()
{
if ( m_boxManipulator.isNull() ) return;
@ -376,7 +376,7 @@ void RimIntersectionBox::updateBoxManipulatorGeometry()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::defineEditorAttribute( const caf::PdmFieldHandle* field,
void RimBoxIntersection::defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute )
{
@ -437,7 +437,7 @@ void RimIntersectionBox::defineEditorAttribute( const caf::PdmFieldHandle* field
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
void RimBoxIntersection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
uiOrdering.add( &m_name );
@ -478,22 +478,22 @@ void RimIntersectionBox::defineUiOrdering( QString uiConfigName, caf::PdmUiOrder
uiOrdering.add( &m_show3DManipulator );
this->defineSeparateDataSourceUi(uiConfigName, uiOrdering);
this->defineSeparateDataSourceUi( uiConfigName, uiOrdering );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::initAfterRead()
void RimBoxIntersection::initAfterRead()
{
RimIntersectionHandle::initAfterRead();
RimIntersection::initAfterRead();
updateVisibility();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::slotScheduleRedraw()
void RimBoxIntersection::slotScheduleRedraw()
{
Rim3dView* rimView = nullptr;
this->firstAncestorOrThisOfType( rimView );
@ -506,7 +506,7 @@ void RimIntersectionBox::slotScheduleRedraw()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::slotUpdateGeometry( const cvf::Vec3d& origin, const cvf::Vec3d& size )
void RimBoxIntersection::slotUpdateGeometry( const cvf::Vec3d& origin, const cvf::Vec3d& size )
{
Rim3dView* rimView = nullptr;
this->firstAncestorOrThisOfType( rimView );
@ -522,11 +522,10 @@ void RimIntersectionBox::slotUpdateGeometry( const cvf::Vec3d& origin, const cvf
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::rebuildGeometryAndScheduleCreateDisplayModel()
void RimBoxIntersection::rebuildGeometryAndScheduleCreateDisplayModel()
{
m_intersectionBoxPartMgr = nullptr;
@ -536,7 +535,7 @@ void RimIntersectionBox::rebuildGeometryAndScheduleCreateDisplayModel()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::updateVisibility()
void RimBoxIntersection::updateVisibility()
{
m_maxXCoord.uiCapability()->setUiReadOnly( false );
m_maxYCoord.uiCapability()->setUiReadOnly( false );
@ -566,7 +565,7 @@ void RimIntersectionBox::updateVisibility()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::clampSinglePlaneValues()
void RimBoxIntersection::clampSinglePlaneValues()
{
if ( m_singlePlaneState == PLANE_STATE_X )
{
@ -585,7 +584,7 @@ void RimIntersectionBox::clampSinglePlaneValues()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionBox::switchSingelPlaneState()
void RimBoxIntersection::switchSingelPlaneState()
{
cvf::Vec3d orgSize = boxSize();
double orgWidth = orgSize.length();
@ -635,7 +634,7 @@ void RimIntersectionBox::switchSingelPlaneState()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::BoundingBox RimIntersectionBox::currentCellBoundingBox()
cvf::BoundingBox RimBoxIntersection::currentCellBoundingBox()
{
RimCase* rimCase = nullptr;
this->firstAncestorOrThisOfType( rimCase );
@ -660,7 +659,7 @@ cvf::BoundingBox RimIntersectionBox::currentCellBoundingBox()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RiuViewer* RimIntersectionBox::viewer()
RiuViewer* RimBoxIntersection::viewer()
{
Rim3dView* rimView = nullptr;
this->firstAncestorOrThisOfType( rimView );

View File

@ -21,7 +21,7 @@
#include "cafPdmField.h"
#include "cafPdmObject.h"
#include "RimIntersectionHandle.h"
#include "RimIntersection.h"
#include "cvfBoundingBox.h"
#include "cvfVector3.h"
@ -31,7 +31,7 @@
class RicBoxManipulatorEventHandler;
class RiuViewer;
class RivIntersectionBoxPartMgr;
class RivBoxIntersectionPartMgr;
namespace cvf
{
@ -43,7 +43,7 @@ class ModelBasicList;
//
//
//==================================================================================================
class RimIntersectionBox : public QObject, public RimIntersectionHandle
class RimBoxIntersection : public QObject, public RimIntersection
{
Q_OBJECT;
@ -59,8 +59,8 @@ public:
};
public:
RimIntersectionBox();
~RimIntersectionBox() override;
RimBoxIntersection();
~RimBoxIntersection() override;
cvf::Mat4d boxOrigin() const;
cvf::Vec3d boxSize() const;
@ -68,7 +68,7 @@ public:
bool show3dManipulator() const;
RivIntersectionBoxPartMgr* intersectionBoxPartMgr();
RivBoxIntersectionPartMgr* intersectionBoxPartMgr();
void appendManipulatorPartsToModel( cvf::ModelBasicList* model );
void rebuildGeometry();
@ -120,6 +120,6 @@ private:
caf::PdmField<bool> m_show3DManipulator;
cvf::ref<RivIntersectionBoxPartMgr> m_intersectionBoxPartMgr;
cvf::ref<RivBoxIntersectionPartMgr> m_intersectionBoxPartMgr;
QPointer<RicBoxManipulatorEventHandler> m_boxManipulator;
};

View File

@ -32,8 +32,8 @@
#include "Rim2dIntersectionView.h"
#include "Rim2dIntersectionViewCollection.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGridView.h"
#include "RimIntersection.h"
CAF_PDM_XML_ABSTRACT_SOURCE_INIT( RimCase, "RimCase" );

View File

@ -34,7 +34,7 @@ class RimGridView;
class RimFormationNames;
class RimTimeStepFilter;
class Rim2dIntersectionView;
class RimIntersection;
class RimExtrudedCurveIntersection;
class Rim2dIntersectionViewCollection;
namespace cvf

View File

@ -31,6 +31,7 @@
#include "RimAnnotationCollection.h"
#include "RimAnnotationGroupCollection.h"
#include "RimAnnotationInViewCollection.h"
#include "RimBoxIntersection.h"
#include "RimCalcScript.h"
#include "RimCaseCollection.h"
#include "RimCellEdgeColors.h"
@ -51,6 +52,7 @@
#include "RimEnsembleCurveFilterCollection.h"
#include "RimEnsembleCurveSet.h"
#include "RimEnsembleCurveSetCollection.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFaultInView.h"
#include "RimFishboneWellPathCollection.h"
#include "RimFishbonesCollection.h"
@ -74,8 +76,6 @@
#include "RimGridCrossPlotCollection.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimIdenticalGridCaseGroup.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionCollection.h"
#include "RimIntersectionResultDefinition.h"
#include "RimIntersectionResultsDefinitionCollection.h"
@ -666,7 +666,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder.addSeparator();
menuBuilder << "RicCopyIntersectionsToAllViewsInCaseFeature";
}
else if ( dynamic_cast<RimIntersection*>( uiItem ) )
else if ( dynamic_cast<RimExtrudedCurveIntersection*>( uiItem ) )
{
menuBuilder << "RicPasteIntersectionsFeature";
menuBuilder.addSeparator();
@ -677,7 +677,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
menuBuilder.addSeparator();
menuBuilder << "RicCopyIntersectionsToAllViewsInCaseFeature";
}
else if ( dynamic_cast<RimIntersectionBox*>( uiItem ) )
else if ( dynamic_cast<RimBoxIntersection*>( uiItem ) )
{
menuBuilder << "RicPasteIntersectionsFeature";
menuBuilder.addSeparator();

View File

@ -523,7 +523,7 @@ void RimEclipseCase::updateFormationNamesData()
view->scheduleGeometryRegen( PROPERTY_FILTERED );
view->scheduleCreateDisplayModelAndRedraw();
eclView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
eclView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}
}

View File

@ -554,7 +554,7 @@ void RimEclipseResultDefinition::loadDataAndUpdate()
viewLinker->updateCellResult();
}
RimGridView* eclView = dynamic_cast<RimGridView*>( view );
if ( eclView ) eclView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
if ( eclView ) eclView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}
@ -564,7 +564,7 @@ void RimEclipseResultDefinition::loadDataAndUpdate()
{
if ( view ) view->scheduleCreateDisplayModelAndRedraw();
RimGridView* gridView = dynamic_cast<RimGridView*>( view );
if ( gridView ) gridView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
if ( gridView ) gridView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
RimCellEdgeColors* cellEdgeColors = nullptr;

View File

@ -742,7 +742,7 @@ void RimEclipseStatisticsCase::updateConnectedEditorsAndReservoirViews()
// (from Octave) a full display model rebuild is required
reservoirViews[i]->hasUserRequestedAnimation = true;
reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
reservoirViews[i]->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
reservoirViews[i]->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}

View File

@ -50,6 +50,7 @@
#include "RimEclipsePropertyFilter.h"
#include "RimEclipsePropertyFilterCollection.h"
#include "RimEclipseResultDefinition.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFaultInViewCollection.h"
#include "RimFlowCharacteristicsPlot.h"
#include "RimFlowDiagSolution.h"
@ -59,7 +60,6 @@
#include "RimGridCollection.h"
#include "RimGridCrossPlotDataSet.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionCollection.h"
#include "RimIntersectionResultDefinition.h"
#include "RimIntersectionResultsDefinitionCollection.h"
@ -529,12 +529,12 @@ void RimEclipseView::onCreateDisplayModel()
// Cross sections
m_crossSectionVizModel->removeAllParts();
m_crossSectionCollection->rebuildGeometry();
m_crossSectionCollection->appendPartsToModel( *this,
m_crossSectionVizModel.p(),
m_intersectionVizModel->removeAllParts();
m_intersectionCollection->rebuildGeometry();
m_intersectionCollection->appendPartsToModel( *this,
m_intersectionVizModel.p(),
m_reservoirGridPartManager->scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_crossSectionVizModel.p(), isUsingOverrideViewer() );
nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() );
// Well path model
@ -794,11 +794,11 @@ void RimEclipseView::updateVisibleGeometriesAndCellColors()
if ( ( this->hasUserRequestedAnimation() && this->cellResult()->hasResult() ) ||
this->cellResult()->isTernarySaturationSelected() )
{
m_crossSectionCollection->updateCellResultColor( m_currentTimeStep );
m_intersectionCollection->updateCellResultColor( m_currentTimeStep );
}
else
{
m_crossSectionCollection->applySingleColorEffect();
m_intersectionCollection->applySingleColorEffect();
}
}
@ -1633,7 +1633,7 @@ void RimEclipseView::calculateCompletionTypeAndRedrawIfRequired()
{
this->loadDataAndUpdate();
std::vector<RimIntersection*> intersections = m_crossSectionCollection->intersections();
std::vector<RimExtrudedCurveIntersection*> intersections = m_intersectionCollection->intersections();
for ( auto intersection : intersections )
{
if ( intersection && intersection->correspondingIntersectionView() )
@ -1741,7 +1741,7 @@ void RimEclipseView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
uiTreeOrdering.add( faultCollection() );
uiTreeOrdering.add( annotationCollection() );
uiTreeOrdering.add( crossSectionCollection() );
uiTreeOrdering.add( intersectionCollection() );
uiTreeOrdering.add( m_rangeFilterCollection() );
uiTreeOrdering.add( m_propertyFilterCollection() );

View File

@ -57,7 +57,7 @@ class RimStimPlanColors;
class RimVirtualPerforationResults;
class RiuViewer;
class RivReservoirSimWellsPartMgr;
class RivIntersectionPartMgr;
class RivExtrudedCurveIntersectionPartMgr;
class RivReservoirViewPartMgr;
class RimRegularLegendConfig;
class RimTernaryLegendConfig;

View File

@ -0,0 +1,945 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimExtrudedCurveIntersection.h"
#include "RiaApplication.h"
#include "RigEclipseCaseData.h"
#include "RigWellPath.h"
#include "Rim3dView.h"
#include "RimCase.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimOilField.h"
#include "RimProject.h"
#include "RimSimWellInView.h"
#include "RimSimWellInViewCollection.h"
#include "RimTools.h"
#include "RimWellPath.h"
#include "RiuViewer.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "cafCmdFeature.h"
#include "cafCmdFeatureManager.h"
#include "cafPdmUiDoubleSliderEditor.h"
#include "cafPdmUiListEditor.h"
#include "cafPdmUiPushButtonEditor.h"
#include "Rim2dIntersectionView.h"
#include "RimGridView.h"
#include "RimIntersectionResultDefinition.h"
#include "RimIntersectionResultsDefinitionCollection.h"
#include "cvfBoundingBox.h"
#include "cvfGeometryTools.h"
#include "cvfPlane.h"
namespace caf
{
template <>
void caf::AppEnum<RimExtrudedCurveIntersection::CrossSectionEnum>::setUp()
{
addItem( RimExtrudedCurveIntersection::CS_WELL_PATH, "CS_WELL_PATH", "Well Path" );
addItem( RimExtrudedCurveIntersection::CS_SIMULATION_WELL, "CS_SIMULATION_WELL", "Simulation Well" );
addItem( RimExtrudedCurveIntersection::CS_POLYLINE, "CS_POLYLINE", "Polyline" );
addItem( RimExtrudedCurveIntersection::CS_AZIMUTHLINE, "CS_AZIMUTHLINE", "Azimuth and Dip" );
setDefault( RimExtrudedCurveIntersection::CS_WELL_PATH );
}
template <>
void caf::AppEnum<RimExtrudedCurveIntersection::CrossSectionDirEnum>::setUp()
{
addItem( RimExtrudedCurveIntersection::CS_VERTICAL, "CS_VERTICAL", "Vertical" );
addItem( RimExtrudedCurveIntersection::CS_HORIZONTAL, "CS_HORIZONTAL", "Horizontal" );
addItem( RimExtrudedCurveIntersection::CS_TWO_POINTS, "CS_TWO_POINTS", "Defined by Two Points" );
setDefault( RimExtrudedCurveIntersection::CS_VERTICAL );
}
} // namespace caf
CAF_PDM_SOURCE_INIT( RimExtrudedCurveIntersection, "CrossSection" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
{
CAF_PDM_InitObject( "Intersection", ":/CrossSection16x16.png", "", "" );
CAF_PDM_InitFieldNoDefault( &type, "Type", "Type", "", "", "" );
CAF_PDM_InitFieldNoDefault( &direction, "Direction", "Direction", "", "", "" );
CAF_PDM_InitFieldNoDefault( &wellPath, "WellPath", "Well Path ", "", "", "" );
CAF_PDM_InitFieldNoDefault( &simulationWell, "SimulationWell", "Simulation Well", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_userPolyline, "Points", "Points", "", "Use Ctrl-C for copy and Ctrl-V for paste", "" );
CAF_PDM_InitField( &m_azimuthAngle, "AzimuthAngle", 0.0, "Azimuth", "", "", "" );
m_azimuthAngle.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
CAF_PDM_InitField( &m_dipAngle, "DipAngle", 90.0, "Dip", "", "", "" );
m_dipAngle.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
CAF_PDM_InitFieldNoDefault( &m_customExtrusionPoints, "CustomExtrusionPoints", "", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_twoAzimuthPoints,
"TwoAzimuthPoints",
"Points",
"",
"Pick two points to define a line.\nUse Ctrl-C for copy and Ctrl-V for paste",
"" );
CAF_PDM_InitField( &m_branchIndex, "Branch", -1, "Branch", "", "", "" );
CAF_PDM_InitField( &m_extentLength, "ExtentLength", 200.0, "Extent Length", "", "", "" );
CAF_PDM_InitField( &m_lengthUp, "lengthUp", 1000.0, "Length Up", "", "", "" );
CAF_PDM_InitField( &m_lengthDown, "lengthDown", 1000.0, "Length Down", "", "", "" );
CAF_PDM_InitFieldNoDefault( &inputPolyLineFromViewerEnabled, "m_activateUiAppendPointsCommand", "", "", "", "" );
caf::PdmUiPushButtonEditor::configureEditorForField( &inputPolyLineFromViewerEnabled );
inputPolyLineFromViewerEnabled = false;
CAF_PDM_InitFieldNoDefault( &inputExtrusionPointsFromViewerEnabled,
"inputExtrusionPointsFromViewerEnabled",
"",
"",
"",
"" );
caf::PdmUiPushButtonEditor::configureEditorForField( &inputExtrusionPointsFromViewerEnabled );
inputExtrusionPointsFromViewerEnabled = false;
CAF_PDM_InitFieldNoDefault( &inputTwoAzimuthPointsFromViewerEnabled,
"inputTwoAzimuthPointsFromViewerEnabled",
"",
"",
"",
"" );
caf::PdmUiPushButtonEditor::configureEditorForField( &inputTwoAzimuthPointsFromViewerEnabled );
inputTwoAzimuthPointsFromViewerEnabled = false;
uiCapability()->setUiTreeChildrenHidden( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimExtrudedCurveIntersection::~RimExtrudedCurveIntersection() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue )
{
// clang-format off
if ( changedField == &m_isActive ||
changedField == &type ||
changedField == &direction ||
changedField == &wellPath ||
changedField == &simulationWell ||
changedField == &m_branchIndex ||
changedField == &m_extentLength ||
changedField == &m_lengthUp ||
changedField == &m_lengthDown ||
changedField == &m_showInactiveCells ||
changedField == &m_useSeparateDataSource ||
changedField == &m_separateDataSource )
{
rebuildGeometryAndScheduleCreateDisplayModel();
}
// clang-format on
if ( changedField == &simulationWell || changedField == &m_isActive || changedField == &type )
{
recomputeSimulationWellBranchData();
}
if ( changedField == &simulationWell || changedField == &wellPath || changedField == &m_branchIndex )
{
updateName();
}
if ( changedField == &m_name )
{
Rim2dIntersectionView* iView = correspondingIntersectionView();
if ( iView )
{
iView->updateName();
iView->updateConnectedEditors();
}
}
if ( changedField == &inputPolyLineFromViewerEnabled || changedField == &m_userPolyline )
{
if ( inputPolyLineFromViewerEnabled )
{
inputExtrusionPointsFromViewerEnabled = false;
inputTwoAzimuthPointsFromViewerEnabled = false;
}
rebuildGeometryAndScheduleCreateDisplayModel();
}
if ( changedField == &inputExtrusionPointsFromViewerEnabled || changedField == &m_customExtrusionPoints )
{
if ( inputExtrusionPointsFromViewerEnabled )
{
inputPolyLineFromViewerEnabled = false;
inputTwoAzimuthPointsFromViewerEnabled = false;
}
rebuildGeometryAndScheduleCreateDisplayModel();
}
if ( changedField == &inputTwoAzimuthPointsFromViewerEnabled || changedField == &m_twoAzimuthPoints )
{
if ( inputTwoAzimuthPointsFromViewerEnabled )
{
inputPolyLineFromViewerEnabled = false;
inputExtrusionPointsFromViewerEnabled = false;
}
rebuildGeometryAndScheduleCreateDisplayModel();
}
if ( changedField == &m_azimuthAngle )
{
updateAzimuthLine();
rebuildGeometryAndScheduleCreateDisplayModel();
}
if ( changedField == &m_dipAngle )
{
rebuildGeometryAndScheduleCreateDisplayModel();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
uiOrdering.add( &m_name );
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup( "Intersecting Geometry" );
geometryGroup->add( &type );
if ( type == CS_WELL_PATH )
{
geometryGroup->add( &wellPath );
}
else if ( type == CS_SIMULATION_WELL )
{
geometryGroup->add( &simulationWell );
updateSimulationWellCenterline();
if ( simulationWell() && m_simulationWellBranchCenterlines.size() > 1 )
{
geometryGroup->add( &m_branchIndex );
}
}
else if ( type == CS_POLYLINE )
{
geometryGroup->add( &m_userPolyline );
geometryGroup->add( &inputPolyLineFromViewerEnabled );
}
else if ( type == CS_AZIMUTHLINE )
{
geometryGroup->add( &m_twoAzimuthPoints );
geometryGroup->add( &inputTwoAzimuthPointsFromViewerEnabled );
geometryGroup->add( &m_azimuthAngle );
geometryGroup->add( &m_dipAngle );
}
caf::PdmUiGroup* optionsGroup = uiOrdering.addNewGroup( "Options" );
if ( type == CS_AZIMUTHLINE )
{
optionsGroup->add( &m_lengthUp );
optionsGroup->add( &m_lengthDown );
}
else
{
optionsGroup->add( &direction );
optionsGroup->add( &m_extentLength );
}
if ( direction == CS_TWO_POINTS )
{
optionsGroup->add( &m_customExtrusionPoints );
optionsGroup->add( &inputExtrusionPointsFromViewerEnabled );
}
optionsGroup->add( &m_showInactiveCells );
if ( type == CS_POLYLINE )
{
m_extentLength.uiCapability()->setUiReadOnly( true );
}
else
{
m_extentLength.uiCapability()->setUiReadOnly( false );
}
this->defineSeparateDataSourceUi( uiConfigName, uiOrdering );
updateWellExtentDefaultValue();
uiOrdering.skipRemainingFields( true );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo>
RimExtrudedCurveIntersection::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly )
{
QList<caf::PdmOptionItemInfo> options;
if ( fieldNeedingOptions == &wellPath )
{
RimTools::wellPathOptionItems( &options );
if ( options.size() > 0 )
{
options.push_front( caf::PdmOptionItemInfo( "None", nullptr ) );
}
}
else if ( fieldNeedingOptions == &simulationWell )
{
RimSimWellInViewCollection* coll = simulationWellCollection();
if ( coll )
{
caf::PdmChildArrayField<RimSimWellInView*>& simWells = coll->wells;
caf::QIconProvider simWellIcon( ":/Well.png" );
for ( RimSimWellInView* eclWell : simWells )
{
options.push_back( caf::PdmOptionItemInfo( eclWell->name(), eclWell, false, simWellIcon ) );
}
}
if ( options.size() == 0 )
{
options.push_front( caf::PdmOptionItemInfo( "None", nullptr ) );
}
}
else if ( fieldNeedingOptions == &m_branchIndex )
{
updateSimulationWellCenterline();
size_t branchCount = m_simulationWellBranchCenterlines.size();
options.push_back( caf::PdmOptionItemInfo( "All", -1 ) );
for ( size_t bIdx = 0; bIdx < branchCount; ++bIdx )
{
options.push_back( caf::PdmOptionItemInfo( QString::number( bIdx + 1 ), QVariant::fromValue( bIdx ) ) );
}
}
else
{
options = RimIntersection::calculateValueOptions( fieldNeedingOptions, useOptionsOnly );
}
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimSimWellInViewCollection* RimExtrudedCurveIntersection::simulationWellCollection() const
{
RimEclipseView* eclipseView = nullptr;
firstAncestorOrThisOfType( eclipseView );
if ( eclipseView )
{
return eclipseView->wellCollection();
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::updateAzimuthLine()
{
if ( m_twoAzimuthPoints().size() == 2 )
{
double currentAzimuth = azimuthInRadians( m_twoAzimuthPoints()[1] - m_twoAzimuthPoints()[0] );
double newAzimuth = cvf::Math::toRadians( m_azimuthAngle );
double rotAngle = newAzimuth - currentAzimuth;
cvf::Mat4d rotMat = cvf::Mat4d::fromRotation( -cvf::Vec3d::Z_AXIS, rotAngle );
cvf::Mat4d transFromOriginMat = cvf::Mat4d::fromTranslation( m_twoAzimuthPoints()[0] );
cvf::Mat4d transToOriginMat = cvf::Mat4d::fromTranslation( -m_twoAzimuthPoints()[0] );
m_twoAzimuthPoints.v()[1] = m_twoAzimuthPoints()[1].getTransformedPoint( transFromOriginMat * rotMat *
transToOriginMat );
m_twoAzimuthPoints.uiCapability()->updateConnectedEditors();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<std::vector<cvf::Vec3d>> RimExtrudedCurveIntersection::polyLines( cvf::Vec3d* flattenedPolylineStartPoint ) const
{
if ( flattenedPolylineStartPoint ) *flattenedPolylineStartPoint = cvf::Vec3d::ZERO;
std::vector<std::vector<cvf::Vec3d>> lines;
double horizontalProjectedLengthAlongWellPathToClipPoint = 0.0;
if ( type == CS_WELL_PATH )
{
if ( wellPath() && wellPath->wellPathGeometry() )
{
lines.push_back( wellPath->wellPathGeometry()->m_wellPathPoints );
RimCase* ownerCase = nullptr;
this->firstAncestorOrThisOfType( ownerCase );
if ( ownerCase )
{
size_t dummy;
lines[0] = RigWellPath::clipPolylineStartAboveZ( lines[0],
ownerCase->activeCellsBoundingBox().max().z(),
&horizontalProjectedLengthAlongWellPathToClipPoint,
&dummy );
}
}
}
else if ( type == CS_SIMULATION_WELL )
{
if ( simulationWell() )
{
updateSimulationWellCenterline();
int branchIndexToUse = branchIndex();
if ( 0 <= branchIndexToUse && branchIndexToUse < static_cast<int>( m_simulationWellBranchCenterlines.size() ) )
{
lines.push_back( m_simulationWellBranchCenterlines[branchIndexToUse] );
}
if ( branchIndexToUse == -1 )
{
lines = m_simulationWellBranchCenterlines;
}
}
}
else if ( type == CS_POLYLINE )
{
lines.push_back( m_userPolyline );
}
else if ( type == CS_AZIMUTHLINE )
{
lines.push_back( m_twoAzimuthPoints );
}
if ( type == CS_WELL_PATH || type == CS_SIMULATION_WELL )
{
if ( type == CS_SIMULATION_WELL && simulationWell() )
{
cvf::Vec3d top, bottom;
simulationWell->wellHeadTopBottomPosition( -1, &top, &bottom );
for ( size_t lIdx = 0; lIdx < lines.size(); ++lIdx )
{
std::vector<cvf::Vec3d>& polyLine = lines[lIdx];
polyLine.insert( polyLine.begin(), top );
}
}
for ( size_t lIdx = 0; lIdx < lines.size(); ++lIdx )
{
std::vector<cvf::Vec3d>& polyLine = lines[lIdx];
addExtents( polyLine );
}
if ( flattenedPolylineStartPoint && lines.size() && lines[0].size() > 1 )
{
( *flattenedPolylineStartPoint )[0] = horizontalProjectedLengthAlongWellPathToClipPoint - m_extentLength;
( *flattenedPolylineStartPoint )[2] = lines[0][1].z(); // Depth of first point in first polyline
}
}
else
{
if ( flattenedPolylineStartPoint && lines.size() && lines[0].size() )
{
( *flattenedPolylineStartPoint )[2] = lines[0][0].z(); // Depth of first point in first polyline
}
}
return lines;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RivExtrudedCurveIntersectionPartMgr* RimExtrudedCurveIntersection::intersectionPartMgr()
{
if ( m_crossSectionPartMgr.isNull() ) m_crossSectionPartMgr = new RivExtrudedCurveIntersectionPartMgr( this );
return m_crossSectionPartMgr.p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::rebuildGeometry()
{
m_crossSectionPartMgr = nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<cvf::Vec3d> RimExtrudedCurveIntersection::polyLinesForExtrusionDirection() const
{
return m_customExtrusionPoints;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::updateSimulationWellCenterline() const
{
if ( m_isActive() && type == CS_SIMULATION_WELL && simulationWell() )
{
if ( m_simulationWellBranchCenterlines.empty() )
{
auto branches = simulationWell->wellPipeBranches();
for ( const auto& branch : branches )
{
m_simulationWellBranchCenterlines.push_back( branch->m_wellPathPoints );
}
}
}
else
{
m_simulationWellBranchCenterlines.clear();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::addExtents( std::vector<cvf::Vec3d>& polyLine ) const
{
size_t lineVxCount = polyLine.size();
if ( lineVxCount == 0 ) return;
// Add extent at end of well
{
size_t endIdxOffset = lineVxCount > 3 ? 3 : lineVxCount;
cvf::Vec3d endDirection = ( polyLine[lineVxCount - 1] - polyLine[lineVxCount - endIdxOffset] );
endDirection[2] = 0; // Remove z. make extent length be horizontally
if ( endDirection.length() < 1e-2 )
{
endDirection = polyLine.back() - polyLine.front();
endDirection[2] = 0;
if ( endDirection.length() < 1e-2 )
{
endDirection = cvf::Vec3d::X_AXIS;
}
}
endDirection.normalize();
cvf::Vec3d newEnd = polyLine.back() + endDirection * m_extentLength();
polyLine.push_back( newEnd );
}
// Add extent at start
{
size_t endIdxOffset = lineVxCount > 3 ? 3 : lineVxCount - 1;
cvf::Vec3d startDirection = ( polyLine[0] - polyLine[endIdxOffset] );
startDirection[2] = 0; // Remove z. make extent length be horizontally
if ( startDirection.length() < 1e-2 )
{
startDirection = polyLine.front() - polyLine.back();
startDirection[2] = 0;
if ( startDirection.length() < 1e-2 )
{
startDirection = -cvf::Vec3d::X_AXIS;
}
}
startDirection.normalize();
cvf::Vec3d newStart = polyLine.front() + startDirection * m_extentLength();
polyLine.insert( polyLine.begin(), newStart );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::updateWellExtentDefaultValue()
{
RimCase* ownerCase = nullptr;
firstAncestorOrThisOfType( ownerCase );
if ( ownerCase )
{
cvf::BoundingBox caseBB = ownerCase->activeCellsBoundingBox();
if ( m_extentLength == m_extentLength.defaultValue() && caseBB.radius() < 1000 )
{
m_extentLength = caseBB.radius() * 0.1;
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::updateName()
{
if ( type == CS_SIMULATION_WELL && simulationWell() )
{
m_name = simulationWell()->name();
if ( branchIndex() != -1 )
{
m_name = m_name() + " Branch " + QString::number( branchIndex() + 1 );
}
}
else if ( type() == CS_WELL_PATH && wellPath() )
{
m_name = wellPath()->name();
}
Rim2dIntersectionView* iView = correspondingIntersectionView();
if ( iView )
{
iView->updateName();
iView->updateConnectedEditors();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RimExtrudedCurveIntersection::branchIndex() const
{
RimSimWellInViewCollection* coll = simulationWellCollection();
if ( coll && !coll->isAutoDetectingBranches() )
{
return -1;
}
if ( m_branchIndex >= static_cast<int>( m_simulationWellBranchCenterlines.size() ) )
{
return -1;
}
return m_branchIndex;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::setPushButtonText( bool buttonEnable, caf::PdmUiPushButtonEditorAttribute* attribute )
{
if ( attribute )
{
if ( buttonEnable )
{
attribute->m_buttonText = "Stop picking points";
}
else
{
attribute->m_buttonText = "Start picking points";
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::setBaseColor( bool enable, caf::PdmUiListEditorAttribute* attribute )
{
if ( attribute && enable )
{
attribute->m_baseColor.setRgb( 255, 220, 255 );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute )
{
caf::PdmUiDoubleSliderEditorAttribute* doubleSliderAttrib = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>(
attribute );
if ( doubleSliderAttrib )
{
if ( field == &m_azimuthAngle )
{
doubleSliderAttrib->m_minimum = 0;
doubleSliderAttrib->m_maximum = 360;
doubleSliderAttrib->m_sliderTickCount = 360;
}
else if ( field == &m_dipAngle )
{
doubleSliderAttrib->m_minimum = 0;
doubleSliderAttrib->m_maximum = 180;
doubleSliderAttrib->m_sliderTickCount = 180;
}
}
else if ( field == &inputPolyLineFromViewerEnabled )
{
setPushButtonText( inputPolyLineFromViewerEnabled,
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
}
else if ( field == &m_userPolyline )
{
setBaseColor( inputPolyLineFromViewerEnabled, dynamic_cast<caf::PdmUiListEditorAttribute*>( attribute ) );
}
else if ( field == &inputTwoAzimuthPointsFromViewerEnabled )
{
setPushButtonText( inputTwoAzimuthPointsFromViewerEnabled,
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
}
else if ( field == &m_twoAzimuthPoints )
{
setBaseColor( inputTwoAzimuthPointsFromViewerEnabled, dynamic_cast<caf::PdmUiListEditorAttribute*>( attribute ) );
}
else if ( field == &inputExtrusionPointsFromViewerEnabled )
{
setPushButtonText( inputExtrusionPointsFromViewerEnabled,
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
}
else if ( field == &m_customExtrusionPoints )
{
setBaseColor( inputExtrusionPointsFromViewerEnabled, dynamic_cast<caf::PdmUiListEditorAttribute*>( attribute ) );
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::appendPointToPolyLine( const cvf::Vec3d& point )
{
m_userPolyline.v().push_back( point );
m_userPolyline.uiCapability()->updateConnectedEditors();
rebuildGeometryAndScheduleCreateDisplayModel();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
Rim2dIntersectionView* RimExtrudedCurveIntersection::correspondingIntersectionView()
{
std::vector<Rim2dIntersectionView*> objects;
this->objectsWithReferringPtrFieldsOfType( objects );
for ( auto isectView : objects )
{
if ( isectView )
{
return isectView;
}
}
return nullptr;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::appendPointToExtrusionDirection( const cvf::Vec3d& point )
{
if ( m_customExtrusionPoints().size() > 1 ) m_customExtrusionPoints.v().clear();
m_customExtrusionPoints.v().push_back( point );
m_customExtrusionPoints.uiCapability()->updateConnectedEditors();
rebuildGeometryAndScheduleCreateDisplayModel();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::appendPointToAzimuthLine( const cvf::Vec3d& point )
{
if ( m_twoAzimuthPoints().empty() )
{
m_twoAzimuthPoints.v().push_back( point );
}
else if ( m_twoAzimuthPoints().size() == 1 )
{
cvf::Vec3d projectedPoint = cvf::Vec3d( point[0], point[1], m_twoAzimuthPoints.v()[0][2] );
m_twoAzimuthPoints.v().push_back( projectedPoint );
m_azimuthAngle = cvf::Math::toDegrees( azimuthInRadians( m_twoAzimuthPoints()[1] - m_twoAzimuthPoints()[0] ) );
m_azimuthAngle.uiCapability()->updateConnectedEditors();
}
else if ( m_twoAzimuthPoints().size() > 1 )
{
m_twoAzimuthPoints.v().clear();
m_twoAzimuthPoints.v().push_back( point );
}
m_twoAzimuthPoints.uiCapability()->updateConnectedEditors();
rebuildGeometryAndScheduleCreateDisplayModel();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::Vec3d RimExtrudedCurveIntersection::extrusionDirection() const
{
cvf::Vec3d dir = cvf::Vec3d::Z_AXIS;
if ( direction() == RimExtrudedCurveIntersection::CS_HORIZONTAL )
{
std::vector<std::vector<cvf::Vec3d>> lines = this->polyLines();
if ( lines.size() > 0 && lines[0].size() > 1 )
{
std::vector<cvf::Vec3d> firstLine = lines[0];
// Use first and last point of polyline to approximate orientation of polyline
// Then cross with Z axis to find extrusion direction
cvf::Vec3d polyLineDir = firstLine[firstLine.size() - 1] - firstLine[0];
cvf::Vec3d up = cvf::Vec3d::Z_AXIS;
dir = polyLineDir ^ up;
}
}
else if ( direction() == RimExtrudedCurveIntersection::CS_TWO_POINTS && m_customExtrusionPoints().size() > 1 )
{
dir = m_customExtrusionPoints()[m_customExtrusionPoints().size() - 1] - m_customExtrusionPoints()[0];
}
else if ( m_twoAzimuthPoints().size() == 2 )
{
double dipInRad = cvf::Math::toRadians( m_dipAngle );
cvf::Vec3d azimutDirection = m_twoAzimuthPoints()[1] - m_twoAzimuthPoints()[0];
cvf::Mat3d rotMat = cvf::Mat3d::fromRotation( azimutDirection, dipInRad );
cvf::Vec3d vecPerpToRotVecInHorizontalPlane = azimutDirection ^ cvf::Vec3d::Z_AXIS;
dir = vecPerpToRotVecInHorizontalPlane.getTransformedVector( rotMat );
}
return dir;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimExtrudedCurveIntersection::lengthUp() const
{
return m_lengthUp;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimExtrudedCurveIntersection::lengthDown() const
{
return m_lengthDown;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::setLengthDown( double lengthDown )
{
m_lengthDown = lengthDown;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimExtrudedCurveIntersection::extentLength()
{
return m_extentLength();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::recomputeSimulationWellBranchData()
{
if ( type() == CS_SIMULATION_WELL )
{
m_simulationWellBranchCenterlines.clear();
updateSimulationWellCenterline();
m_crossSectionPartMgr = nullptr;
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimExtrudedCurveIntersection::hasDefiningPoints() const
{
return type == CS_POLYLINE || type == CS_AZIMUTHLINE;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::setLengthUp( double lengthUp )
{
m_lengthUp = lengthUp;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimExtrudedCurveIntersection::rebuildGeometryAndScheduleCreateDisplayModel()
{
m_crossSectionPartMgr = nullptr;
Rim3dView* rimView = nullptr;
this->firstAncestorOrThisOfType( rimView );
if ( rimView )
{
rimView->scheduleCreateDisplayModelAndRedraw();
}
Rim2dIntersectionView* iview = correspondingIntersectionView();
if ( iview )
{
iview->scheduleGeometryRegen( RivCellSetEnum::ALL_CELLS );
iview->scheduleCreateDisplayModelAndRedraw();
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
double RimExtrudedCurveIntersection::azimuthInRadians( cvf::Vec3d vec )
{
return cvf::GeometryTools::getAngle( -cvf::Vec3d::Z_AXIS, cvf::Vec3d::Y_AXIS, vec );
}

View File

@ -0,0 +1,146 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafAppEnum.h"
#include "cafPdmField.h"
#include "cafPdmFieldCvfVec3d.h"
#include "cafPdmObject.h"
#include "cafPdmPtrField.h"
#include "RimIntersection.h"
#include "cvfObject.h"
#include "cvfVector3.h"
class RimWellPath;
class RivExtrudedCurveIntersectionPartMgr;
class RimIntersectionResultDefinition;
class RimSimWellInView;
class RimSimWellInViewCollection;
class Rim2dIntersectionView;
namespace caf
{
class PdmUiListEditorAttribute;
class PdmUiPushButtonEditorAttribute;
} // namespace caf
//==================================================================================================
//
//
//
//==================================================================================================
class RimExtrudedCurveIntersection : public RimIntersection
{
CAF_PDM_HEADER_INIT;
public:
enum CrossSectionEnum
{
CS_WELL_PATH,
CS_SIMULATION_WELL,
CS_POLYLINE,
CS_AZIMUTHLINE
};
enum CrossSectionDirEnum
{
CS_VERTICAL,
CS_HORIZONTAL,
CS_TWO_POINTS,
};
public:
RimExtrudedCurveIntersection();
~RimExtrudedCurveIntersection() override;
caf::PdmField<caf::AppEnum<CrossSectionEnum>> type;
caf::PdmField<caf::AppEnum<CrossSectionDirEnum>> direction;
caf::PdmPtrField<RimWellPath*> wellPath;
caf::PdmPtrField<RimSimWellInView*> simulationWell;
caf::PdmField<bool> inputPolyLineFromViewerEnabled;
caf::PdmField<bool> inputExtrusionPointsFromViewerEnabled;
caf::PdmField<bool> inputTwoAzimuthPointsFromViewerEnabled;
std::vector<std::vector<cvf::Vec3d>> polyLines( cvf::Vec3d* flattenedPolylineStartPoint = nullptr ) const;
void appendPointToPolyLine( const cvf::Vec3d& point );
Rim2dIntersectionView* correspondingIntersectionView();
RivExtrudedCurveIntersectionPartMgr* intersectionPartMgr();
void rebuildGeometry();
std::vector<cvf::Vec3d> polyLinesForExtrusionDirection() const;
void appendPointToExtrusionDirection( const cvf::Vec3d& point );
void appendPointToAzimuthLine( const cvf::Vec3d& point );
cvf::Vec3d extrusionDirection() const;
double lengthUp() const;
double lengthDown() const;
void setLengthUp( double heightUp );
void setLengthDown( double heightDown );
double extentLength();
void recomputeSimulationWellBranchData();
bool hasDefiningPoints() const;
int branchIndex() const;
void rebuildGeometryAndScheduleCreateDisplayModel();
protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
private:
caf::PdmField<int> m_branchIndex;
caf::PdmField<double> m_extentLength;
caf::PdmField<double> m_azimuthAngle;
caf::PdmField<double> m_dipAngle;
caf::PdmField<double> m_lengthUp;
caf::PdmField<double> m_lengthDown;
caf::PdmField<std::vector<cvf::Vec3d>> m_userPolyline;
caf::PdmField<std::vector<cvf::Vec3d>> m_customExtrusionPoints;
caf::PdmField<std::vector<cvf::Vec3d>> m_twoAzimuthPoints;
static void setPushButtonText( bool buttonEnable, caf::PdmUiPushButtonEditorAttribute* attribute );
static void setBaseColor( bool enable, caf::PdmUiListEditorAttribute* attribute );
RimSimWellInViewCollection* simulationWellCollection() const;
void updateAzimuthLine();
void updateSimulationWellCenterline() const;
void updateWellExtentDefaultValue();
void addExtents( std::vector<cvf::Vec3d>& polyLine ) const;
void updateName();
static double azimuthInRadians( cvf::Vec3d vec );
private:
cvf::ref<RivExtrudedCurveIntersectionPartMgr> m_crossSectionPartMgr;
mutable std::vector<std::vector<cvf::Vec3d>> m_simulationWellBranchCenterlines;
};

View File

@ -76,7 +76,7 @@ void RimFaultInView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
if ( reservoirView )
{
reservoirView->scheduleCreateDisplayModelAndRedraw();
reservoirView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
reservoirView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}
}

View File

@ -130,7 +130,7 @@ void RimFaultInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* chan
if ( &faultLabelColor == changedField )
{
parentView()->scheduleReservoirGridGeometryRegen();
parentView()->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
parentView()->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
if ( &showFaultFaces == changedField || &showOppositeFaultFaces == changedField ||
@ -139,7 +139,7 @@ void RimFaultInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* chan
&faultResult == changedField || &showNNCs == changedField || &hideNncsWhenNoResultIsAvailable == changedField )
{
parentView()->scheduleCreateDisplayModelAndRedraw();
parentView()->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
parentView()->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
if ( &showFaultLabel == changedField )

View File

@ -693,7 +693,7 @@ void RimGeoMechCase::updateFormationNamesData()
view->scheduleGeometryRegen( PROPERTY_FILTERED );
view->scheduleCreateDisplayModelAndRedraw();
geomView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
geomView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}
}

View File

@ -352,7 +352,7 @@ void RimGeoMechResultDefinition::fieldChangedByUi( const caf::PdmFieldHandle* ch
if ( view )
{
view->scheduleCreateDisplayModelAndRedraw();
view->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
view->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
if ( dynamic_cast<RimGeoMechCellColors*>( this ) )

View File

@ -289,10 +289,10 @@ void RimGeoMechView::onCreateDisplayModel()
// Cross sections
m_crossSectionVizModel->removeAllParts();
m_crossSectionCollection->rebuildGeometry();
m_crossSectionCollection->appendPartsToModel( *this, m_crossSectionVizModel.p(), scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_crossSectionVizModel.p(), isUsingOverrideViewer() );
m_intersectionVizModel->removeAllParts();
m_intersectionCollection->rebuildGeometry();
m_intersectionCollection->appendPartsToModel( *this, m_intersectionVizModel.p(), scaleTransform() );
nativeOrOverrideViewer()->addStaticModelOnce( m_intersectionVizModel.p(), isUsingOverrideViewer() );
// If the animation was active before recreating everything, make viewer view current frame
@ -304,7 +304,7 @@ void RimGeoMechView::onCreateDisplayModel()
{
onUpdateLegends();
m_vizLogic->updateStaticCellColors( -1 );
m_crossSectionCollection->applySingleColorEffect();
m_intersectionCollection->applySingleColorEffect();
m_overlayInfoConfig()->update3DInfo();
}
@ -384,17 +384,17 @@ void RimGeoMechView::onUpdateDisplayModelForCurrentTimeStep()
if ( this->cellResult()->hasResult() )
{
m_crossSectionCollection->updateCellResultColor( m_currentTimeStep );
m_intersectionCollection->updateCellResultColor( m_currentTimeStep );
}
else
{
m_crossSectionCollection->applySingleColorEffect();
m_intersectionCollection->applySingleColorEffect();
}
}
else
{
m_vizLogic->updateStaticCellColors( -1 );
m_crossSectionCollection->applySingleColorEffect();
m_intersectionCollection->applySingleColorEffect();
nativeOrOverrideViewer()->animationControl()->slotPause(); // To avoid animation timer spinning in the background
}
@ -908,7 +908,7 @@ void RimGeoMechView::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrderin
uiTreeOrdering.add( m_tensorResults() );
uiTreeOrdering.add( &m_intersectionResultDefCollection );
uiTreeOrdering.add( m_crossSectionCollection() );
uiTreeOrdering.add( m_intersectionCollection() );
uiTreeOrdering.add( m_rangeFilterCollection() );
uiTreeOrdering.add( m_propertyFilterCollection() );

View File

@ -62,9 +62,9 @@ RimGridView::RimGridView()
m_overrideRangeFilterCollection.uiCapability()->setUiHidden( true );
m_overrideRangeFilterCollection.xmlCapability()->disableIO();
CAF_PDM_InitFieldNoDefault( &m_crossSectionCollection, "CrossSections", "Intersections", "", "", "" );
m_crossSectionCollection.uiCapability()->setUiHidden( true );
m_crossSectionCollection = new RimIntersectionCollection();
CAF_PDM_InitFieldNoDefault( &m_intersectionCollection, "CrossSections", "Intersections", "", "", "" );
m_intersectionCollection.uiCapability()->setUiHidden( true );
m_intersectionCollection = new RimIntersectionCollection();
CAF_PDM_InitFieldNoDefault( &m_intersectionResultDefCollection,
"IntersectionResultDefColl",
@ -119,7 +119,7 @@ RimGridView::~RimGridView( void )
delete m_rangeFilterCollection;
delete m_overrideRangeFilterCollection;
delete m_crossSectionCollection;
delete m_intersectionCollection;
delete m_gridCollection;
}
@ -156,15 +156,15 @@ cvf::ref<cvf::UByteArray> RimGridView::currentTotalCellVisibility()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionCollection* RimGridView::crossSectionCollection() const
RimIntersectionCollection* RimGridView::intersectionCollection() const
{
return m_crossSectionCollection();
return m_intersectionCollection();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionResultsDefinitionCollection* RimGridView::separateIntersectionResultsCollection() const
RimIntersectionResultsDefinitionCollection* RimGridView::separateIntersectionResultsCollection() const
{
return m_intersectionResultDefCollection;
}
@ -425,7 +425,7 @@ void RimGridView::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
{
if ( changedField == &scaleZ )
{
m_crossSectionCollection->updateIntersectionBoxGeometry();
m_intersectionCollection->updateIntersectionBoxGeometry();
}
Rim3dView::fieldChangedByUi( changedField, oldValue, newValue );

View File

@ -45,7 +45,7 @@ public:
cvf::ref<cvf::UByteArray> currentTotalCellVisibility();
RimIntersectionCollection* crossSectionCollection() const;
RimIntersectionCollection* intersectionCollection() const;
RimIntersectionResultsDefinitionCollection* separateIntersectionResultsCollection() const;
RimAnnotationInViewCollection* annotationCollection() const;
@ -83,7 +83,7 @@ protected:
void initAfterRead() override;
protected: // Fields
caf::PdmChildField<RimIntersectionCollection*> m_crossSectionCollection;
caf::PdmChildField<RimIntersectionCollection*> m_intersectionCollection;
caf::PdmChildField<RimIntersectionResultsDefinitionCollection*> m_intersectionResultDefCollection;

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2015- Statoil ASA
// Copyright (C) 2015- Ceetron Solutions AS
// Copyright (C) 2019- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@ -16,131 +15,48 @@
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafAppEnum.h"
#include "cafPdmField.h"
#include "cafPdmFieldCvfVec3d.h"
#include "cafPdmObject.h"
#include "cafPdmPtrField.h"
#include "cvfObject.h"
#include "cvfVector3.h"
#include "RimIntersectionHandle.h"
class RimWellPath;
class RivIntersectionPartMgr;
class RimIntersectionResultDefinition;
class RimSimWellInView;
class RimSimWellInViewCollection;
class Rim2dIntersectionView;
class RivIntersectionHexGridInterface;
namespace caf
{
class PdmUiListEditorAttribute;
class PdmUiPushButtonEditorAttribute;
} // namespace caf
//==================================================================================================
//
//
//
//==================================================================================================
class RimIntersection : public RimIntersectionHandle
class RimIntersection : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
enum CrossSectionEnum
{
CS_WELL_PATH,
CS_SIMULATION_WELL,
CS_POLYLINE,
CS_AZIMUTHLINE
};
enum CrossSectionDirEnum
{
CS_VERTICAL,
CS_HORIZONTAL,
CS_TWO_POINTS,
};
public:
RimIntersection();
~RimIntersection() override;
caf::PdmField<caf::AppEnum<CrossSectionEnum>> type;
caf::PdmField<caf::AppEnum<CrossSectionDirEnum>> direction;
QString name() const;
void setName( const QString& newName );
bool isActive() const;
void setActive( bool isActive );
bool isInactiveCellsVisible() const;
caf::PdmPtrField<RimWellPath*> wellPath;
caf::PdmPtrField<RimSimWellInView*> simulationWell;
caf::PdmField<bool> inputPolyLineFromViewerEnabled;
caf::PdmField<bool> inputExtrusionPointsFromViewerEnabled;
caf::PdmField<bool> inputTwoAzimuthPointsFromViewerEnabled;
std::vector<std::vector<cvf::Vec3d>> polyLines( cvf::Vec3d* flattenedPolylineStartPoint = nullptr ) const;
void appendPointToPolyLine( const cvf::Vec3d& point );
Rim2dIntersectionView* correspondingIntersectionView();
RivIntersectionPartMgr* intersectionPartMgr();
void rebuildGeometry();
std::vector<cvf::Vec3d> polyLinesForExtrusionDirection() const;
void appendPointToExtrusionDirection( const cvf::Vec3d& point );
void appendPointToAzimuthLine( const cvf::Vec3d& point );
cvf::Vec3d extrusionDirection() const;
double lengthUp() const;
double lengthDown() const;
void setLengthUp( double heightUp );
void setLengthDown( double heightDown );
double extentLength();
void recomputeSimulationWellBranchData();
bool hasDefiningPoints() const;
int branchIndex() const;
void rebuildGeometryAndScheduleCreateDisplayModel();
RimIntersectionResultDefinition* activeSeparateResultDefinition();
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
const QVariant& oldValue,
const QVariant& newValue ) override;
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
void defineEditorAttribute( const caf::PdmFieldHandle* field,
QString uiConfigName,
caf::PdmUiEditorAttribute* attribute ) override;
caf::PdmFieldHandle* userDescriptionField() override final;
caf::PdmFieldHandle* objectToggleField() override final;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void initAfterRead() override;
private:
caf::PdmField<int> m_branchIndex;
caf::PdmField<double> m_extentLength;
caf::PdmField<double> m_azimuthAngle;
caf::PdmField<double> m_dipAngle;
caf::PdmField<double> m_lengthUp;
caf::PdmField<double> m_lengthDown;
void defineSeparateDataSourceUi( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
void updateDefaultSeparateDataSource();
caf::PdmField<std::vector<cvf::Vec3d>> m_userPolyline;
caf::PdmField<std::vector<cvf::Vec3d>> m_customExtrusionPoints;
caf::PdmField<std::vector<cvf::Vec3d>> m_twoAzimuthPoints;
static void setPushButtonText( bool buttonEnable, caf::PdmUiPushButtonEditorAttribute* attribute );
static void setBaseColor( bool enable, caf::PdmUiListEditorAttribute* attribute );
RimSimWellInViewCollection* simulationWellCollection() const;
void updateAzimuthLine();
void updateSimulationWellCenterline() const;
void updateWellExtentDefaultValue();
void addExtents( std::vector<cvf::Vec3d>& polyLine ) const;
void updateName();
static double azimuthInRadians( cvf::Vec3d vec );
private:
cvf::ref<RivIntersectionPartMgr> m_crossSectionPartMgr;
mutable std::vector<std::vector<cvf::Vec3d>> m_simulationWellBranchCenterlines;
caf::PdmField<QString> m_name;
caf::PdmField<bool> m_isActive;
caf::PdmField<bool> m_showInactiveCells;
caf::PdmField<bool> m_useSeparateDataSource;
caf::PdmPtrField<RimIntersectionResultDefinition*> m_separateDataSource;
};

View File

@ -22,15 +22,15 @@
#include "Rim2dIntersectionView.h"
#include "Rim2dIntersectionViewCollection.h"
#include "Rim3dView.h"
#include "RimBoxIntersection.h"
#include "RimCase.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimSimWellInView.h"
#include "Riu3DMainWindowTools.h"
#include "RivIntersectionBoxPartMgr.h"
#include "RivIntersectionPartMgr.h"
#include "RivBoxIntersectionPartMgr.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "cvfModelBasicList.h"
@ -77,7 +77,7 @@ void RimIntersectionCollection::applySingleColorEffect()
{
if ( !this->isActive() ) return;
for ( RimIntersection* cs : m_intersections )
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{
if ( cs->isActive() )
{
@ -85,7 +85,7 @@ void RimIntersectionCollection::applySingleColorEffect()
}
}
for ( RimIntersectionBox* cs : m_intersectionBoxes )
for ( RimBoxIntersection* cs : m_intersectionBoxes )
{
if ( cs->isActive() )
{
@ -101,7 +101,7 @@ void RimIntersectionCollection::updateCellResultColor( size_t timeStepIndex )
{
if ( !this->isActive() ) return;
for ( RimIntersection* cs : m_intersections )
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{
if ( cs->isActive() )
{
@ -109,7 +109,7 @@ void RimIntersectionCollection::updateCellResultColor( size_t timeStepIndex )
}
}
for ( RimIntersectionBox* cs : m_intersectionBoxes )
for ( RimBoxIntersection* cs : m_intersectionBoxes )
{
if ( cs->isActive() )
{
@ -127,21 +127,21 @@ void RimIntersectionCollection::appendPartsToModel( Rim3dView& view,
{
if ( !isActive() ) return;
for ( RimIntersection* cs : m_intersections )
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{
if ( cs->isActive() )
{
cs->intersectionPartMgr()->appendNativeCrossSectionFacesToModel( model, scaleTransform );
cs->intersectionPartMgr()->appendNativeIntersectionFacesToModel( model, scaleTransform );
cs->intersectionPartMgr()->appendMeshLinePartsToModel( model, scaleTransform );
cs->intersectionPartMgr()->appendPolylinePartsToModel( view, model, scaleTransform );
}
}
for ( RimIntersectionBox* cs : m_intersectionBoxes )
for ( RimBoxIntersection* cs : m_intersectionBoxes )
{
if ( cs->isActive() )
{
cs->intersectionBoxPartMgr()->appendNativeCrossSectionFacesToModel( model, scaleTransform );
cs->intersectionBoxPartMgr()->appendNativeIntersectionFacesToModel( model, scaleTransform );
cs->intersectionBoxPartMgr()->appendMeshLinePartsToModel( model, scaleTransform );
if ( cs->show3dManipulator() )
@ -159,12 +159,12 @@ void RimIntersectionCollection::appendPartsToModel( Rim3dView& view,
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::rebuildGeometry()
{
for ( RimIntersection* intersection : m_intersections )
for ( RimExtrudedCurveIntersection* intersection : m_intersections )
{
intersection->rebuildGeometry();
}
for ( RimIntersectionBox* intersectionBox : m_intersectionBoxes )
for ( RimBoxIntersection* intersectionBox : m_intersectionBoxes )
{
intersectionBox->rebuildGeometry();
}
@ -173,7 +173,7 @@ void RimIntersectionCollection::rebuildGeometry()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimIntersection*> RimIntersectionCollection::intersections() const
std::vector<RimExtrudedCurveIntersection*> RimIntersectionCollection::intersections() const
{
return m_intersections.childObjects();
}
@ -181,7 +181,7 @@ std::vector<RimIntersection*> RimIntersectionCollection::intersections() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<RimIntersectionBox*> RimIntersectionCollection::intersectionBoxes() const
std::vector<RimBoxIntersection*> RimIntersectionCollection::intersectionBoxes() const
{
return m_intersectionBoxes.childObjects();
}
@ -200,7 +200,8 @@ void RimIntersectionCollection::recomputeSimWellBranchData()
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersectionAndUpdate( RimIntersection* intersection, bool allowActiveViewChange )
void RimIntersectionCollection::appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection,
bool allowActiveViewChange )
{
m_intersections.push_back( intersection );
@ -220,7 +221,7 @@ void RimIntersectionCollection::appendIntersectionAndUpdate( RimIntersection* in
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersectionNoUpdate( RimIntersection* intersection )
void RimIntersectionCollection::appendIntersectionNoUpdate( RimExtrudedCurveIntersection* intersection )
{
m_intersections.push_back( intersection );
}
@ -240,7 +241,7 @@ void RimIntersectionCollection::syncronize2dIntersectionViews()
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::scheduleCreateDisplayModelAndRedraw2dIntersectionViews()
{
for ( RimIntersection* isection : m_intersections )
for ( RimExtrudedCurveIntersection* isection : m_intersections )
{
if ( isection->correspondingIntersectionView() )
{
@ -252,7 +253,7 @@ void RimIntersectionCollection::scheduleCreateDisplayModelAndRedraw2dIntersectio
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersectionBoxAndUpdate( RimIntersectionBox* intersectionBox )
void RimIntersectionCollection::appendIntersectionBoxAndUpdate( RimBoxIntersection* intersectionBox )
{
m_intersectionBoxes.push_back( intersectionBox );
@ -270,7 +271,7 @@ void RimIntersectionCollection::appendIntersectionBoxAndUpdate( RimIntersectionB
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::appendIntersectionBoxNoUpdate( RimIntersectionBox* intersectionBox )
void RimIntersectionCollection::appendIntersectionBoxNoUpdate( RimBoxIntersection* intersectionBox )
{
m_intersectionBoxes.push_back( intersectionBox );
}
@ -302,9 +303,10 @@ bool RimIntersectionCollection::hasActiveIntersectionForSimulationWell( const Ri
{
if ( !isActive() ) return false;
for ( RimIntersection* cs : m_intersections )
for ( RimExtrudedCurveIntersection* cs : m_intersections )
{
if ( cs->isActive() && cs->type() == RimIntersection::CS_SIMULATION_WELL && cs->simulationWell() == simWell )
if ( cs->isActive() && cs->type() == RimExtrudedCurveIntersection::CS_SIMULATION_WELL &&
cs->simulationWell() == simWell )
{
return true;
}
@ -318,7 +320,7 @@ bool RimIntersectionCollection::hasActiveIntersectionForSimulationWell( const Ri
//--------------------------------------------------------------------------------------------------
void RimIntersectionCollection::updateIntersectionBoxGeometry()
{
for ( RimIntersectionBox* intersectionBox : m_intersectionBoxes )
for ( RimBoxIntersection* intersectionBox : m_intersectionBoxes )
{
intersectionBox->updateBoxManipulatorGeometry();
}

View File

@ -24,8 +24,8 @@
#include "cafPdmObject.h"
class Rim3dView;
class RimIntersection;
class RimIntersectionBox;
class RimExtrudedCurveIntersection;
class RimBoxIntersection;
class RimEclipseCellColors;
class RimSimWellInView;
class RivTernaryScalarMapper;
@ -52,11 +52,11 @@ public:
caf::PdmField<bool> isActive;
void appendIntersectionAndUpdate( RimIntersection* intersection, bool allowActiveViewChange = true );
void appendIntersectionNoUpdate( RimIntersection* intersection );
void appendIntersectionAndUpdate( RimExtrudedCurveIntersection* intersection, bool allowActiveViewChange = true );
void appendIntersectionNoUpdate( RimExtrudedCurveIntersection* intersection );
void appendIntersectionBoxAndUpdate( RimIntersectionBox* intersectionBox );
void appendIntersectionBoxNoUpdate( RimIntersectionBox* intersectionBox );
void appendIntersectionBoxAndUpdate( RimBoxIntersection* intersectionBox );
void appendIntersectionBoxNoUpdate( RimBoxIntersection* intersectionBox );
bool hasActiveIntersectionForSimulationWell( const RimSimWellInView* simWell ) const;
@ -73,8 +73,8 @@ public:
void appendPartsToModel( Rim3dView& view, cvf::ModelBasicList* model, cvf::Transform* scaleTransform );
void rebuildGeometry();
std::vector<RimIntersection*> intersections() const;
std::vector<RimIntersectionBox*> intersectionBoxes() const;
std::vector<RimExtrudedCurveIntersection*> intersections() const;
std::vector<RimBoxIntersection*> intersectionBoxes() const;
protected:
void fieldChangedByUi( const caf::PdmFieldHandle* changedField,
@ -83,6 +83,6 @@ protected:
caf::PdmFieldHandle* objectToggleField() override;
private:
caf::PdmChildArrayField<RimIntersection*> m_intersections;
caf::PdmChildArrayField<RimIntersectionBox*> m_intersectionBoxes;
caf::PdmChildArrayField<RimExtrudedCurveIntersection*> m_intersections;
caf::PdmChildArrayField<RimBoxIntersection*> m_intersectionBoxes;
};

View File

@ -1,254 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2019- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#include "RimIntersectionHandle.h"
#include "RigEclipseCaseData.h"
#include "RigFemPartCollection.h"
#include "RigGeoMechCaseData.h"
#include "RimEclipseCase.h"
#include "RimEclipseResultDefinition.h"
#include "RimEclipseView.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechView.h"
#include "RimGridView.h"
#include "RimIntersectionResultDefinition.h"
#include "RimIntersectionResultsDefinitionCollection.h"
#include "RivHexGridIntersectionTools.h"
CAF_PDM_SOURCE_INIT( RimIntersectionHandle, "RimIntersectionHandle" );
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionHandle::RimIntersectionHandle()
{
CAF_PDM_InitField( &m_name, "UserDescription", QString( "Intersection Name" ), "Name", "", "", "" );
CAF_PDM_InitField( &m_isActive, "Active", true, "Active", "", "", "" );
m_isActive.uiCapability()->setUiHidden( true );
CAF_PDM_InitField( &m_showInactiveCells, "ShowInactiveCells", false, "Show Inactive Cells", "", "", "" );
CAF_PDM_InitField( &m_useSeparateDataSource, "UseSeparateIntersectionDataSource", true, "Enable", "", "", "" );
CAF_PDM_InitFieldNoDefault( &m_separateDataSource, "SeparateIntersectionDataSource", "Source", "", "", "" );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionHandle::~RimIntersectionHandle() {}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RimIntersectionHandle::name() const
{
return m_name();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionHandle::setName( const QString& newName )
{
m_name = newName;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimIntersectionHandle::isActive() const
{
return m_isActive();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionHandle::setActive( bool isActive )
{
m_isActive = isActive;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimIntersectionHandle::isInactiveCellsVisible() const
{
return m_showInactiveCells;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RimIntersectionResultDefinition* RimIntersectionHandle::activeSeparateResultDefinition()
{
updateDefaultSeparateDataSource();
if ( !m_useSeparateDataSource ) return nullptr;
if ( !m_separateDataSource ) return nullptr;
if ( !m_separateDataSource->isActive() ) return nullptr;
RimGridView* view;
this->firstAncestorOrThisOfTypeAsserted( view );
if ( !view->separateIntersectionResultsCollection()->isActive() ) return nullptr;
return m_separateDataSource;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QList<caf::PdmOptionItemInfo>
RimIntersectionHandle::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions, bool* useOptionsOnly )
{
QList<caf::PdmOptionItemInfo> options;
if ( fieldNeedingOptions == &m_separateDataSource )
{
RimGridView* view;
this->firstAncestorOrThisOfTypeAsserted( view );
std::vector<RimIntersectionResultDefinition*> iResDefs =
view->separateIntersectionResultsCollection()->intersectionResultsDefinitions();
for ( auto iresdef : iResDefs )
{
options.push_back( caf::PdmOptionItemInfo( iresdef->autoName(), iresdef ) );
}
}
return options;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimIntersectionHandle::userDescriptionField()
{
return &m_name;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
caf::PdmFieldHandle* RimIntersectionHandle::objectToggleField()
{
return &m_isActive;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionHandle::initAfterRead()
{
updateDefaultSeparateDataSource();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionHandle::defineSeparateDataSourceUi( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
QString inactiveText;
if ( !this->activeSeparateResultDefinition() )
{
inactiveText = " (Inactive)";
}
caf::PdmUiGroup* separateResultsGroup = uiOrdering.addNewGroup( "Separate Result Reference" + inactiveText );
separateResultsGroup->setCollapsedByDefault( true );
separateResultsGroup->add( &m_useSeparateDataSource );
separateResultsGroup->add( &m_separateDataSource );
m_separateDataSource.uiCapability()->setUiReadOnly( !m_useSeparateDataSource() );
m_separateDataSource.uiCapability()->setUiName( "Source" + inactiveText );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RimIntersectionHandle::updateDefaultSeparateDataSource()
{
if ( m_separateDataSource() == nullptr )
{
RimGridView* view;
this->firstAncestorOrThisOfType( view );
if ( view )
{
std::vector<RimIntersectionResultDefinition*> iResDefs =
view->separateIntersectionResultsCollection()->intersectionResultsDefinitions();
if ( iResDefs.size() )
{
m_separateDataSource = iResDefs[0];
}
}
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
cvf::ref<RivIntersectionHexGridInterface> RimIntersectionHandle::createHexGridInterface()
{
RimIntersectionResultDefinition* resDef = activeSeparateResultDefinition();
if ( resDef && resDef->activeCase() )
{
// Eclipse case
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( resDef->activeCase() );
if ( eclipseCase && eclipseCase->eclipseCaseData() )
{
return new RivEclipseIntersectionGrid( eclipseCase->eclipseCaseData()->mainGrid(),
eclipseCase->eclipseCaseData()->activeCellInfo(
resDef->eclipseResultDefinition()->porosityModel() ),
this->isInactiveCellsVisible() );
}
// Geomech case
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>( resDef->activeCase() );
if ( geomCase && geomCase->geoMechData() && geomCase->geoMechData()->femParts() )
{
RigFemPart* femPart = geomCase->geoMechData()->femParts()->part( 0 );
return new RivFemIntersectionGrid( femPart );
}
}
RimEclipseView* eclipseView;
this->firstAncestorOrThisOfType( eclipseView );
if ( eclipseView )
{
RigMainGrid* grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid( grid, eclipseView->currentActiveCellInfo(), this->isInactiveCellsVisible() );
}
RimGeoMechView* geoView;
this->firstAncestorOrThisOfType( geoView );
if ( geoView && geoView->femParts() && geoView->femParts()->partCount() )
{
RigFemPart* femPart = geoView->femParts()->part( 0 );
return new RivFemIntersectionGrid( femPart );
}
return nullptr;
}

View File

@ -1,62 +0,0 @@
/////////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) 2019- Equinor ASA
//
// ResInsight is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE.
//
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
// for more details.
//
/////////////////////////////////////////////////////////////////////////////////
#pragma once
#include "cafPdmField.h"
#include "cafPdmFieldCvfVec3d.h"
#include "cafPdmObject.h"
#include "cafPdmPtrField.h"
#include "cvfObject.h"
class RimIntersectionResultDefinition;
class RivIntersectionHexGridInterface;
class RimIntersectionHandle : public caf::PdmObject
{
CAF_PDM_HEADER_INIT;
public:
RimIntersectionHandle();
~RimIntersectionHandle() override;
QString name() const;
void setName( const QString& newName );
bool isActive() const;
void setActive( bool isActive );
bool isInactiveCellsVisible() const;
RimIntersectionResultDefinition* activeSeparateResultDefinition();
cvf::ref<RivIntersectionHexGridInterface> createHexGridInterface();
protected:
caf::PdmFieldHandle* userDescriptionField() override final;
caf::PdmFieldHandle* objectToggleField() override final;
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions,
bool* useOptionsOnly ) override;
void initAfterRead() override;
void defineSeparateDataSourceUi( QString uiConfigName, caf::PdmUiOrdering& uiOrdering );
void updateDefaultSeparateDataSource();
caf::PdmField<QString> m_name;
caf::PdmField<bool> m_isActive;
caf::PdmField<bool> m_showInactiveCells;
caf::PdmField<bool> m_useSeparateDataSource;
caf::PdmPtrField<RimIntersectionResultDefinition*> m_separateDataSource;
};

View File

@ -22,10 +22,10 @@
#include "RimCase.h"
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechCellColors.h"
#include "RimGridView.h"
#include "RimIntersection.h"
#include "RimIntersectionResultsDefinitionCollection.h"
#include "RimRegularLegendConfig.h"
#include "RimTernaryLegendConfig.h"
@ -287,7 +287,7 @@ void RimIntersectionResultDefinition::update2dIntersectionViews()
{
// Update 2D Intersection views
std::vector<RimIntersection*> intersections;
std::vector<RimExtrudedCurveIntersection*> intersections;
this->objectsWithReferringPtrFieldsOfType( intersections );
for ( auto intersection : intersections )

View File

@ -67,7 +67,7 @@ std::vector<RimIntersectionResultDefinition*> RimIntersectionResultsDefinitionCo
void RimIntersectionResultsDefinitionCollection::appendIntersectionResultDefinition(
RimIntersectionResultDefinition* interResDef )
{
m_intersectionResultsDefs.push_back(interResDef);
m_intersectionResultsDefs.push_back( interResDef );
}
//--------------------------------------------------------------------------------------------------
@ -92,7 +92,7 @@ void RimIntersectionResultsDefinitionCollection::fieldChangedByUi( const caf::Pd
if ( gridView )
{
gridView->scheduleCreateDisplayModelAndRedraw();
gridView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
gridView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}

View File

@ -25,7 +25,7 @@
#include "RiaCompletionTypeCalculationScheduler.h"
#include "RifTextDataTableFormatter.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimPlotCurve.h"
#include "RimWellPath.h"
#include "RimWellPathFracture.h"
@ -83,7 +83,7 @@ void RimModeledWellPath::updateWellPathVisualization()
fracture->loadDataAndUpdate();
}
std::vector<RimIntersection*> refferingIntersections;
std::vector<RimExtrudedCurveIntersection*> refferingIntersections;
this->objectsWithReferringPtrFieldsOfType( refferingIntersections );
for ( auto intersection : refferingIntersections )

View File

@ -269,7 +269,7 @@ void RimRegularLegendConfig::fieldChangedByUi( const caf::PdmFieldHandle* change
view->updateDisplayModelForCurrentTimeStepAndRedraw();
view->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
view->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
// Update stim plan templates if relevant

View File

@ -190,7 +190,7 @@ void RimScaleLegendConfig::fieldChangedByUi( const caf::PdmFieldHandle* changedF
view->updateDisplayModelForCurrentTimeStepAndRedraw();
view->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
view->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
// Update stim plan templates if relevant

View File

@ -31,7 +31,7 @@
#include "RimCellRangeFilterCollection.h"
#include "RimEclipseCase.h"
#include "RimEclipseView.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimIntersectionCollection.h"
#include "RimPropertyFilterCollection.h"
#include "RimSimWellFracture.h"
@ -473,7 +473,7 @@ bool RimSimWellInView::isWellCellsVisible() const
if ( !this->showWellCells() ) return false;
if ( reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true;
if ( reservoirView->intersectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true;
if ( reservoirView->wellCollection()->showWellsIntersectingVisibleCells() &&
reservoirView->rangeFilterCollection()->hasActiveFilters() )
@ -514,7 +514,7 @@ bool RimSimWellInView::isWellPipeVisible( size_t frameIndex ) const
if ( !this->showWellPipe() ) return false;
if ( reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true;
if ( reservoirView->intersectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true;
if ( reservoirView->wellCollection()->showWellsIntersectingVisibleCells() &&
( reservoirView->rangeFilterCollection()->hasActiveFilters() ||
@ -556,7 +556,7 @@ bool RimSimWellInView::isWellSpheresVisible( size_t frameIndex ) const
if ( !this->showWellSpheres() ) return false;
if ( reservoirView->crossSectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true;
if ( reservoirView->intersectionCollection()->hasActiveIntersectionForSimulationWell( this ) ) return true;
if ( reservoirView->wellCollection()->showWellsIntersectingVisibleCells() &&
reservoirView->rangeFilterCollection()->hasActiveFilters() )

View File

@ -495,7 +495,7 @@ void RimSimWellInViewCollection::fieldChangedByUi( const caf::PdmFieldHandle* ch
{
if ( m_reservoirView )
{
m_reservoirView->crossSectionCollection()->recomputeSimWellBranchData();
m_reservoirView->intersectionCollection()->recomputeSimWellBranchData();
}
for ( RimSimWellInView* w : wells )

View File

@ -159,7 +159,7 @@ void RimTernaryLegendConfig::fieldChangedByUi( const caf::PdmFieldHandle* change
}
view->updateDisplayModelForCurrentTimeStepAndRedraw();
view->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
view->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}

View File

@ -727,7 +727,7 @@ void RimViewController::scheduleCreateDisplayModelAndRedrawForDependentView() co
if ( this->isResultColorControlled() && this->managedView() )
{
this->managedView()->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
this->managedView()->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}

View File

@ -162,7 +162,7 @@ void RimViewLinker::updateCellResult()
}
eclipseView->scheduleCreateDisplayModelAndRedraw();
eclipseView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
eclipseView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
eclipseView->cellResult()->updateIconState();
@ -196,7 +196,7 @@ void RimViewLinker::updateCellResult()
}
geoView->scheduleCreateDisplayModelAndRedraw();
geoView->crossSectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
geoView->intersectionCollection()->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
geoView->cellResult()->updateIconState();

View File

@ -596,7 +596,7 @@ public:
// generated data (from Octave) a full display model rebuild is required
m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
m_currentReservoir->reservoirViews[i]
->crossSectionCollection()
->intersectionCollection()
->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}

View File

@ -736,7 +736,7 @@ public:
// generated data (from Octave) a full display model rebuild is required
m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
m_currentReservoir->reservoirViews[i]
->crossSectionCollection()
->intersectionCollection()
->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}
@ -1127,7 +1127,7 @@ public:
// generated data (from Octave) a full display model rebuild is required
m_currentReservoir->reservoirViews[i]->scheduleCreateDisplayModelAndRedraw();
m_currentReservoir->reservoirViews[i]
->crossSectionCollection()
->intersectionCollection()
->scheduleCreateDisplayModelAndRedraw2dIntersectionViews();
}
}

View File

@ -34,7 +34,7 @@
#include "RiuGeoMechXfTensorResultAccessor.h"
#include "RivIntersectionPartMgr.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "cafDisplayCoordTransform.h"

View File

@ -36,10 +36,10 @@
#include "RimEclipsePropertyFilter.h"
#include "RimEclipseResultDefinition.h"
#include "RimEclipseView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFaultInViewCollection.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechView.h"
#include "RimIntersection.h"
#include "RimProject.h"
#include "RimSimWellInViewCollection.h"
#include "RimViewLinker.h"

View File

@ -32,7 +32,7 @@
#include "Rim3dView.h"
#include "RimEclipseResultCase.h"
#include "RimEclipseView.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
//#include "cvfTrace.h"

View File

@ -31,7 +31,7 @@
#include "Rim3dView.h"
#include "RimEclipseResultCase.h"
#include "RimEclipseView.h"
#include "RimIntersection.h"
#include "RimExtrudedCurveIntersection.h"
//#include "cvfTrace.h"

View File

@ -33,12 +33,12 @@
#include "RimEclipseCellColors.h"
#include "RimEclipseFaultColors.h"
#include "RimEclipseView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFormationNames.h"
#include "RimIntersection.h"
#include "RimRegularLegendConfig.h"
#include "RimReservoirCellResultsStorage.h"
#include "RivIntersectionPartMgr.h"
#include "RivExtrudedCurveIntersectionPartMgr.h"
#include "cafDisplayCoordTransform.h"

View File

@ -33,10 +33,10 @@
#include "RimEclipseCase.h"
#include "RimEclipseCellColors.h"
#include "RimEclipseView.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimGeoMechCase.h"
#include "RimGeoMechResultDefinition.h"
#include "RimGeoMechView.h"
#include "RimIntersection.h"
#include "RimProject.h"
#include "Riu3dSelectionManager.h"

View File

@ -42,6 +42,7 @@
#include "RiaOptionItemFactory.h"
#include "Rim2dIntersectionView.h"
#include "RimBoxIntersection.h"
#include "RimCellEdgeColors.h"
#include "RimContextCommandBuilder.h"
#include "RimEclipseCase.h"
@ -50,6 +51,7 @@
#include "RimEclipseFaultColors.h"
#include "RimEclipseView.h"
#include "RimEllipseFractureTemplate.h"
#include "RimExtrudedCurveIntersection.h"
#include "RimFaultInView.h"
#include "RimFaultInViewCollection.h"
#include "RimFracture.h"
@ -57,8 +59,6 @@
#include "RimGeoMechCellColors.h"
#include "RimGeoMechContourMapView.h"
#include "RimGeoMechView.h"
#include "RimIntersection.h"
#include "RimIntersectionBox.h"
#include "RimIntersectionResultDefinition.h"
#include "RimLegendConfig.h"
#include "RimPerforationInterval.h"
@ -75,10 +75,10 @@
#include "RiuResultTextBuilder.h"
#include "RiuViewer.h"
#include "RivBoxIntersectionSourceInfo.h"
#include "RivExtrudedCurveIntersectionSourceInfo.h"
#include "RivFemPartGeometryGenerator.h"
#include "RivFemPickSourceInfo.h"
#include "RivIntersectionBoxSourceInfo.h"
#include "RivIntersectionSourceInfo.h"
#include "RivObjectSourceInfo.h"
#include "RivPartPriority.h"
#include "RivSimWellConnectionSourceInfo.h"
@ -270,9 +270,9 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
const RivSourceInfo* rivSourceInfo = dynamic_cast<const RivSourceInfo*>( firstHitPart->sourceInfo() );
const RivFemPickSourceInfo* femSourceInfo = dynamic_cast<const RivFemPickSourceInfo*>(
firstHitPart->sourceInfo() );
const RivIntersectionSourceInfo* crossSectionSourceInfo = dynamic_cast<const RivIntersectionSourceInfo*>(
firstHitPart->sourceInfo() );
const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo = dynamic_cast<const RivIntersectionBoxSourceInfo*>(
const RivExtrudedCurveIntersectionSourceInfo* crossSectionSourceInfo =
dynamic_cast<const RivExtrudedCurveIntersectionSourceInfo*>( firstHitPart->sourceInfo() );
const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo = dynamic_cast<const RivBoxIntersectionSourceInfo*>(
firstHitPart->sourceInfo() );
if ( rivSourceInfo || femSourceInfo || crossSectionSourceInfo || intersectionBoxSourceInfo )
@ -301,7 +301,7 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
&m_currentGridIdx );
m_currentFaceIndex = cvf::StructGridInterface::NO_FACE;
RiuSelectionItem* selItem = new RiuGeneralSelectionItem( crossSectionSourceInfo->crossSection() );
RiuSelectionItem* selItem = new RiuGeneralSelectionItem( crossSectionSourceInfo->intersection() );
Riu3dSelectionManager::instance()->setSelectedItem( selItem, Riu3dSelectionManager::RUI_TEMPORARY );
if ( gridView )
@ -723,10 +723,10 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
const RivSourceInfo* rivSourceInfo = dynamic_cast<const RivSourceInfo*>( firstHitPart->sourceInfo() );
const RivFemPickSourceInfo* femSourceInfo = dynamic_cast<const RivFemPickSourceInfo*>(
firstHitPart->sourceInfo() );
const RivIntersectionSourceInfo* crossSectionSourceInfo = dynamic_cast<const RivIntersectionSourceInfo*>(
firstHitPart->sourceInfo() );
const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo =
dynamic_cast<const RivIntersectionBoxSourceInfo*>( firstHitPart->sourceInfo() );
const RivExtrudedCurveIntersectionSourceInfo* crossSectionSourceInfo =
dynamic_cast<const RivExtrudedCurveIntersectionSourceInfo*>( firstHitPart->sourceInfo() );
const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo =
dynamic_cast<const RivBoxIntersectionSourceInfo*>( firstHitPart->sourceInfo() );
const RivSimWellPipeSourceInfo* eclipseWellSourceInfo = dynamic_cast<const RivSimWellPipeSourceInfo*>(
firstHitPart->sourceInfo() );
const RivWellConnectionSourceInfo* wellConnectionSourceInfo = dynamic_cast<const RivWellConnectionSourceInfo*>(
@ -831,7 +831,7 @@ void RiuViewerCommands::handlePickAction( int winPosX, int winPosY, Qt::Keyboard
bool allowActiveViewChange = dynamic_cast<Rim2dIntersectionView*>( m_viewer->ownerViewWindow() ) ==
nullptr;
RiuMainWindow::instance()->selectAsCurrentItem( crossSectionSourceInfo->crossSection(),
RiuMainWindow::instance()->selectAsCurrentItem( crossSectionSourceInfo->intersection(),
allowActiveViewChange );
}
else if ( intersectionBoxSourceInfo )
@ -1136,17 +1136,17 @@ void RiuViewerCommands::removeDefaultPickEventHandler( RicDefaultPickEventHandle
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RiuViewerCommands::findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionSourceInfo* crossSectionSourceInfo,
cvf::uint firstPartTriangleIndex,
size_t* cellIndex,
size_t* gridIndex )
void RiuViewerCommands::findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivExtrudedCurveIntersectionSourceInfo* crossSectionSourceInfo,
cvf::uint firstPartTriangleIndex,
size_t* cellIndex,
size_t* gridIndex )
{
CVF_ASSERT( cellIndex && gridIndex );
RimEclipseCase* eclipseCase = nullptr;
if ( RimIntersectionResultDefinition* sepInterResDef =
crossSectionSourceInfo->crossSection()->activeSeparateResultDefinition() )
crossSectionSourceInfo->intersection()->activeSeparateResultDefinition() )
{
if ( sepInterResDef->isEclipseResultDefinition() )
{
@ -1177,7 +1177,7 @@ void RiuViewerCommands::findCellAndGridIndex( Rim3dView* m
///
//--------------------------------------------------------------------------------------------------
void RiuViewerCommands::findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo,
const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo,
cvf::uint firstPartTriangleIndex,
size_t* cellIndex,
size_t* gridIndex )

View File

@ -29,11 +29,11 @@ class RicDefaultPickEventHandler;
class Ric3dViewPickEventHandler;
class RimEclipseView;
class RimGeoMechView;
class RimIntersection;
class RimExtrudedCurveIntersection;
class Rim3dView;
class RiuViewer;
class RivIntersectionBoxSourceInfo;
class RivIntersectionSourceInfo;
class RivBoxIntersectionSourceInfo;
class RivExtrudedCurveIntersectionSourceInfo;
class RiuPickItemInfo;
class QMouseEvent;
@ -70,13 +70,13 @@ public:
bool isCurrentPickInComparisonView() const;
private:
void findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionSourceInfo* crossSectionSourceInfo,
cvf::uint firstPartTriangleIndex,
size_t* cellIndex,
size_t* gridIndex );
void findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivExtrudedCurveIntersectionSourceInfo* intersectionSourceInfo,
cvf::uint firstPartTriangleIndex,
size_t* cellIndex,
size_t* gridIndex );
void findCellAndGridIndex( Rim3dView* mainOrComparisonView,
const RivIntersectionBoxSourceInfo* intersectionBoxSourceInfo,
const RivBoxIntersectionSourceInfo* intersectionBoxSourceInfo,
cvf::uint firstPartTriangleIndex,
size_t* cellIndex,
size_t* gridIndex );