mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 01:12:11 -05:00
Use project polygons from polygon cell filter
* Use RimPolygonInView to edit locally defined polygon * Add scaling to polygon in view * Move polygon line visualization to RimGridView * Rename to polygonInViewCollection * Show appearance for local polygon
This commit is contained in:
1 parent
055c0d4c8c
commit
a3d520e26e
32 files changed
+582
-645
No files matched your search
@@ -260,6 +260,7 @@ RimPolygonFilter* RimCellFilterCollection::addNewPolygonFilter( RimCase* srcCase
|
||||
RimPolygonFilter* pFilter = new RimPolygonFilter();
|
||||
pFilter->setCase( srcCase );
|
||||
addFilter( pFilter );
|
||||
pFilter->configurePolygonEditor();
|
||||
pFilter->enablePicking( true );
|
||||
onFilterUpdated( pFilter );
|
||||
return pFilter;
|
||||
@@ -485,3 +486,21 @@ void RimCellFilterCollection::updateCellVisibilityByIndex( cvf::UByteArray* incl
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPolygonInView*> RimCellFilterCollection::cellFilterPolygons() const
|
||||
{
|
||||
std::vector<RimPolygonInView*> polyInView;
|
||||
|
||||
for ( const auto& filter : m_cellFilters )
|
||||
{
|
||||
if ( auto polygonFilter = dynamic_cast<RimPolygonFilter*>( filter.p() ) )
|
||||
{
|
||||
polyInView.push_back( polygonFilter->polygonInView() );
|
||||
}
|
||||
}
|
||||
|
||||
return polyInView;
|
||||
}
|
||||
@@ -32,6 +32,7 @@ class RimPolygonFilter;
|
||||
class RimUserDefinedFilter;
|
||||
class RimUserDefinedIndexFilter;
|
||||
class RimCase;
|
||||
class RimPolygonInView;
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
@@ -69,7 +70,8 @@ public:
|
||||
void compoundCellRangeFilter( cvf::CellRangeFilter* cellRangeFilter, size_t gridIndex ) const;
|
||||
void updateCellVisibilityByIndex( cvf::UByteArray* cellsIncluded, cvf::UByteArray* cellsExcluded, size_t gridIndex ) const;
|
||||
|
||||
std::vector<RimCellFilter*> filters() const;
|
||||
std::vector<RimPolygonInView*> cellFilterPolygons() const;
|
||||
std::vector<RimCellFilter*> filters() const;
|
||||
|
||||
bool hasActiveFilters() const;
|
||||
bool hasActiveIncludeIndexFilters() const;
|
||||
|
||||
@@ -20,39 +20,28 @@
|
||||
|
||||
#include "RigCellGeometryTools.h"
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigFemPart.h"
|
||||
#include "RigFemPartCollection.h"
|
||||
#include "RigFemPartGrid.h"
|
||||
#include "RigGeoMechCaseData.h"
|
||||
#include "RigMainGrid.h"
|
||||
#include "RigPolyLinesData.h"
|
||||
#include "RigReservoirGridTools.h"
|
||||
|
||||
#include "Rim3dView.h"
|
||||
#include "RimCase.h"
|
||||
#include "RimCellFilterCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimPolylineTarget.h"
|
||||
#include "RimTools.h"
|
||||
|
||||
#include "Polygons/RimPolygon.h"
|
||||
#include "Polygons/RimPolygonCollection.h"
|
||||
#include "Polygons/RimPolygonInView.h"
|
||||
#include "Polygons/RimPolygonTools.h"
|
||||
|
||||
#include "Riu3DMainWindowTools.h"
|
||||
|
||||
#include "WellPathCommands/PointTangentManipulator/RicPolyline3dEditor.h"
|
||||
#include "WellPathCommands/RicPolylineTargetsPickEventHandler.h"
|
||||
|
||||
#include "RiuViewerCommands.h"
|
||||
|
||||
#include "RiaStdStringTools.h"
|
||||
|
||||
#include "cafCmdFeatureMenuBuilder.h"
|
||||
#include "cafPdmUiLineEditor.h"
|
||||
#include "cafPdmUiPushButtonEditor.h"
|
||||
#include "cafPdmUiTableViewEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include <cafPdmUiDoubleSliderEditor.h>
|
||||
|
||||
#include "cvfBoundingBox.h"
|
||||
#include "cvfStructGrid.h"
|
||||
|
||||
#include <QValidator>
|
||||
|
||||
#include <limits>
|
||||
|
||||
@@ -75,44 +64,24 @@ void caf::AppEnum<RimPolygonFilter::PolygonIncludeType>::setUp()
|
||||
setDefault( RimPolygonFilter::PolygonIncludeType::CENTER );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RimPolygonFilter::GeometricalShape>::setUp()
|
||||
{
|
||||
addItem( RimPolygonFilter::GeometricalShape::AREA, "AREA", "Area Filter" );
|
||||
addItem( RimPolygonFilter::GeometricalShape::LINE, "LINE", "Line Filter" );
|
||||
setDefault( RimPolygonFilter::GeometricalShape::AREA );
|
||||
}
|
||||
|
||||
template <>
|
||||
void caf::AppEnum<RimPolygonFilter::PolygonDataSource>::setUp()
|
||||
{
|
||||
addItem( RimPolygonFilter::PolygonDataSource::DEFINED_IN_FILTER, "DEFINED_IN_FILTER", "Defined in Filter" );
|
||||
addItem( RimPolygonFilter::PolygonDataSource::GLOBAL_POLYGON, "GLOBAL_POLYGON", "Polygon in Project" );
|
||||
setDefault( RimPolygonFilter::PolygonDataSource::DEFINED_IN_FILTER );
|
||||
}
|
||||
|
||||
} // namespace caf
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class ThicknessValidator : public QValidator
|
||||
{
|
||||
public:
|
||||
State validate( QString& input, int& pos ) const override
|
||||
{
|
||||
if ( input.isEmpty() ) return State::Intermediate;
|
||||
|
||||
int val = RiaStdStringTools::toInt( input.toStdString() );
|
||||
if ( val > 0 && val < 8 )
|
||||
return State::Acceptable;
|
||||
else
|
||||
return State::Invalid;
|
||||
}
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
class RadiusValidator : public QValidator
|
||||
{
|
||||
public:
|
||||
State validate( QString& input, int& pos ) const override
|
||||
{
|
||||
if ( input.isEmpty() ) return State::Intermediate;
|
||||
|
||||
double val = RiaStdStringTools::toDouble( input.toStdString() );
|
||||
if ( val > 0.001 && val <= 2.0 )
|
||||
return State::Acceptable;
|
||||
else
|
||||
return State::Invalid;
|
||||
}
|
||||
};
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimPolygonFilter, "PolygonFilter", "PolyLineFilter" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -128,70 +97,45 @@ RimPolygonFilter::RimPolygonFilter()
|
||||
CAF_PDM_InitFieldNoDefault( &m_polyFilterMode, "PolygonFilterType", "Vertical Filter" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_polyIncludeType, "PolyIncludeType", "Cells to include" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_polygonDataSource, "PolygonDataSource", "Data Source" );
|
||||
|
||||
CAF_PDM_InitField( &m_enablePicking, "EnablePicking", false, "" );
|
||||
caf::PdmUiPushButtonEditor::configureEditorForField( &m_enablePicking );
|
||||
m_enablePicking.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosType::HIDDEN );
|
||||
CAF_PDM_InitFieldNoDefault( &m_geometricalShape, "GeometricalShape", "" );
|
||||
m_geometricalShape.registerGetMethod( this, &RimPolygonFilter::geometricalShape );
|
||||
m_geometricalShape.registerSetMethod( this, &RimPolygonFilter::setGeometricalShape );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_targets, "Targets", "Targets" );
|
||||
m_targets.uiCapability()->setUiEditorTypeName( caf::PdmUiTableViewEditor::uiEditorTypeName() );
|
||||
m_targets.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_targets.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||
m_targets.uiCapability()->setCustomContextMenuEnabled( true );
|
||||
CAF_PDM_InitFieldNoDefault( &m_internalPolygon, "InternalPolygon", "Polygon For Filter" );
|
||||
m_internalPolygon = new RimPolygon;
|
||||
m_internalPolygon->setName( "Polygon For Filter" );
|
||||
m_internalPolygon->uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
CAF_PDM_InitField( &m_showLines, "ShowLines", true, "Show Lines" );
|
||||
CAF_PDM_InitField( &m_showSpheres, "ShowSpheres", false, "Show Spheres" );
|
||||
CAF_PDM_InitField( &m_closePolygon, "ClosePolygon", true, "Closed Polygon" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_cellFilterPolygon, "Polygon", "Polygon" );
|
||||
|
||||
CAF_PDM_InitField( &m_lineThickness, "LineThickness", 3, "Line Thickness" );
|
||||
CAF_PDM_InitField( &m_sphereRadiusFactor, "SphereRadiusFactor", 0.15, "Sphere Radius Factor" );
|
||||
|
||||
CAF_PDM_InitField( &m_lineColor, "LineColor", cvf::Color3f( cvf::Color3f::WHITE ), "Line Color" );
|
||||
CAF_PDM_InitField( &m_sphereColor, "SphereColor", cvf::Color3f( cvf::Color3f::WHITE ), "Sphere Color" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_polygonEditor, "PolygonEditor", "Polygon Editor" );
|
||||
m_polygonEditor = new RimPolygonInView;
|
||||
m_polygonEditor->uiCapability()->setUiTreeHidden( true );
|
||||
m_polygonEditor.xmlCapability()->disableIO();
|
||||
|
||||
CAF_PDM_InitField( &m_enableFiltering, "EnableFiltering", false, "Enable Filter" );
|
||||
|
||||
CAF_PDM_InitField( &m_enableKFilter, "EnableKFilter", false, "Enable K Range Filter" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_kFilterStr, "KRangeFilter", "K Range Filter", "", "Example: 2,4-6,10-20:2", "" );
|
||||
|
||||
CAF_PDM_InitField( &m_polygonPlaneDepth, "PolygonPlaneDepth", 0.0, "Polygon Plane Depth" );
|
||||
CAF_PDM_InitField( &m_lockPolygonToPlane, "LockPolygon", false, "Lock Polygon to Plane" );
|
||||
CAF_PDM_InitField( &m_editPolygonButton, "EditPolygonButton", false, "Edit" );
|
||||
m_editPolygonButton.uiCapability()->setUiEditorTypeName( caf::PdmUiPushButtonEditor::uiEditorTypeName() );
|
||||
m_editPolygonButton.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::HIDDEN );
|
||||
|
||||
m_polygonPlaneDepth.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||
m_polygonPlaneDepth.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosType::TOP );
|
||||
|
||||
setUi3dEditorTypeName( RicPolyline3dEditor::uiEditorTypeName() );
|
||||
uiCapability()->setUiTreeChildrenHidden( true );
|
||||
CAF_PDM_InitFieldNoDefault( &m_OBSOLETE_targets, "Targets", "Targets" );
|
||||
m_OBSOLETE_targets.uiCapability()->setUiTreeChildrenHidden( true );
|
||||
m_OBSOLETE_targets.uiCapability()->setUiTreeHidden( true );
|
||||
m_OBSOLETE_targets.uiCapability()->setUiHidden( true );
|
||||
m_OBSOLETE_targets.xmlCapability()->setIOWritable( false );
|
||||
|
||||
m_propagateToSubGrids = false;
|
||||
|
||||
updateIconState();
|
||||
setDeletable( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPolygonFilter::~RimPolygonFilter()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::updateVisualization()
|
||||
{
|
||||
updateCells();
|
||||
filterChanged.send();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::updateEditorsAndVisualization()
|
||||
{
|
||||
updateConnectedEditors();
|
||||
updateVisualization();
|
||||
setUi3dEditorTypeName( RicPolyline3dEditor::uiEditorTypeName() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -238,32 +182,23 @@ QString RimPolygonFilter::fullName() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPolylineTarget*> RimPolygonFilter::activeTargets() const
|
||||
void RimPolygonFilter::initAfterRead()
|
||||
{
|
||||
return m_targets.childrenByType();
|
||||
}
|
||||
RimCellFilter::initAfterRead();
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::insertTarget( const RimPolylineTarget* targetToInsertBefore, RimPolylineTarget* targetToInsert )
|
||||
{
|
||||
size_t index = m_targets.indexOf( targetToInsertBefore );
|
||||
if ( index < m_targets.size() )
|
||||
m_targets.insert( index, targetToInsert );
|
||||
else
|
||||
m_targets.push_back( targetToInsert );
|
||||
// Move existing polygons to global polygon
|
||||
if ( !m_OBSOLETE_targets.empty() )
|
||||
{
|
||||
std::vector<cvf::Vec3d> points;
|
||||
for ( const auto& target : m_OBSOLETE_targets )
|
||||
{
|
||||
points.push_back( target->targetPointXYZ() );
|
||||
}
|
||||
|
||||
updateCells();
|
||||
}
|
||||
m_internalPolygon->setPointsInDomainCoords( points );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::deleteTarget( RimPolylineTarget* targetToDelete )
|
||||
{
|
||||
m_targets.removeChild( targetToDelete );
|
||||
delete targetToDelete;
|
||||
configurePolygonEditor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -271,68 +206,17 @@ void RimPolygonFilter::deleteTarget( RimPolylineTarget* targetToDelete )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
||||
{
|
||||
if ( field == &m_enablePicking )
|
||||
if ( auto attrib = dynamic_cast<RicPolyline3dEditorAttribute*>( attribute ) )
|
||||
{
|
||||
auto* pbAttribute = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute );
|
||||
if ( pbAttribute )
|
||||
{
|
||||
if ( !m_enablePicking )
|
||||
{
|
||||
pbAttribute->m_buttonText = "Start Picking Points";
|
||||
}
|
||||
else
|
||||
{
|
||||
pbAttribute->m_buttonText = "Stop Picking Points";
|
||||
}
|
||||
}
|
||||
attrib->pickEventHandler = m_pickTargetsEventHandler;
|
||||
attrib->enablePicking = m_polygonEditor->pickingEnabled();
|
||||
}
|
||||
else if ( field == &m_targets )
|
||||
{
|
||||
auto tvAttribute = dynamic_cast<caf::PdmUiTableViewEditorAttribute*>( attribute );
|
||||
if ( tvAttribute )
|
||||
{
|
||||
tvAttribute->resizePolicy = caf::PdmUiTableViewEditorAttribute::RESIZE_TO_FIT_CONTENT;
|
||||
|
||||
if ( m_enablePicking )
|
||||
{
|
||||
tvAttribute->baseColor.setRgb( 255, 220, 255 );
|
||||
tvAttribute->alwaysEnforceResizePolicy = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( field == &m_lineThickness )
|
||||
if ( field == &m_editPolygonButton )
|
||||
{
|
||||
auto myAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
if ( auto attrib = dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) )
|
||||
{
|
||||
myAttr->validator = new ThicknessValidator();
|
||||
}
|
||||
}
|
||||
else if ( field == &m_lineThickness )
|
||||
{
|
||||
auto myAttr = dynamic_cast<caf::PdmUiLineEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
myAttr->validator = new RadiusValidator();
|
||||
}
|
||||
}
|
||||
else if ( field == &m_polygonPlaneDepth )
|
||||
{
|
||||
auto* attr = dynamic_cast<caf::PdmUiDoubleSliderEditorAttribute*>( attribute );
|
||||
|
||||
if ( attr )
|
||||
{
|
||||
if ( m_srcCase )
|
||||
{
|
||||
auto bb = m_srcCase->allCellsBoundingBox();
|
||||
attr->m_minimum = -bb.max().z();
|
||||
attr->m_maximum = -bb.min().z();
|
||||
}
|
||||
else
|
||||
{
|
||||
attr->m_minimum = 0;
|
||||
attr->m_maximum = 10000;
|
||||
}
|
||||
attrib->m_buttonText = "Edit";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -340,14 +224,12 @@ void RimPolygonFilter::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget )
|
||||
void RimPolygonFilter::childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField )
|
||||
{
|
||||
caf::CmdFeatureMenuBuilder menuBuilder;
|
||||
// When interactive edit of polyline coordinates in enabled in RimPolygonInView::m_enablePicking, the editors to RimPolygonFilter must
|
||||
// be updated to trigger calls to RimPolylinePickerInterface
|
||||
|
||||
menuBuilder << "RicDeletePolylineTargetFeature";
|
||||
menuBuilder << "RicAppendPointsToPolygonFilterFeature";
|
||||
|
||||
menuBuilder.appendToMenu( menu );
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -357,36 +239,30 @@ void RimPolygonFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
{
|
||||
uiOrdering.add( &m_name );
|
||||
|
||||
auto dataSourceGroup = uiOrdering.addNewGroup( "Polygon Data Source" );
|
||||
dataSourceGroup->add( &m_polygonDataSource );
|
||||
if ( !isPolygonDefinedLocally() )
|
||||
{
|
||||
dataSourceGroup->add( &m_cellFilterPolygon );
|
||||
dataSourceGroup->add( &m_editPolygonButton, { .newRow = false } );
|
||||
}
|
||||
|
||||
auto group = uiOrdering.addNewGroup( "General" );
|
||||
group->add( &m_filterMode );
|
||||
group->add( &m_geometricalShape );
|
||||
group->add( &m_enableFiltering );
|
||||
group->add( &m_closePolygon );
|
||||
|
||||
auto group1 = uiOrdering.addNewGroup( "Polygon Selection" );
|
||||
group1->add( &m_polyFilterMode );
|
||||
if ( m_closePolygon() ) group1->add( &m_polyIncludeType );
|
||||
group1->add( &m_targets );
|
||||
group1->add( &m_enablePicking );
|
||||
|
||||
bool isPolygonClosed = m_cellFilterPolygon() ? m_cellFilterPolygon->isClosed() : false;
|
||||
if ( isPolygonClosed )
|
||||
{
|
||||
group1->add( &m_polyIncludeType );
|
||||
}
|
||||
|
||||
m_polyIncludeType.uiCapability()->setUiName( "Cells to " + modeString() );
|
||||
|
||||
auto group2 = uiOrdering.addNewGroup( "Appearance" );
|
||||
group2->add( &m_showLines );
|
||||
group2->add( &m_showSpheres );
|
||||
if ( m_showLines )
|
||||
{
|
||||
group2->add( &m_lineThickness );
|
||||
group2->add( &m_lineColor );
|
||||
}
|
||||
if ( m_showSpheres )
|
||||
{
|
||||
group2->add( &m_sphereRadiusFactor );
|
||||
group2->add( &m_sphereColor );
|
||||
}
|
||||
group2->add( &m_lockPolygonToPlane );
|
||||
if ( m_lockPolygonToPlane ) group2->add( &m_polygonPlaneDepth );
|
||||
group2->setCollapsedByDefault();
|
||||
|
||||
auto group3 = uiOrdering.addNewGroup( "Advanced Filter Settings" );
|
||||
group3->add( &m_enableKFilter );
|
||||
group3->add( &m_kFilterStr );
|
||||
@@ -402,7 +278,7 @@ void RimPolygonFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
objField->uiCapability()->setUiReadOnly( readOnlyState );
|
||||
}
|
||||
|
||||
if ( !m_closePolygon() )
|
||||
if ( !isPolygonClosed )
|
||||
{
|
||||
m_polyFilterMode = RimPolygonFilter::PolygonFilterModeType::INDEX_K;
|
||||
m_polyFilterMode.uiCapability()->setUiReadOnly( true );
|
||||
@@ -411,6 +287,30 @@ void RimPolygonFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
{
|
||||
m_polyFilterMode.uiCapability()->setUiReadOnly( readOnlyState );
|
||||
}
|
||||
|
||||
if ( isPolygonDefinedLocally() )
|
||||
{
|
||||
caf::PdmUiGroup* polyDefinitionGroup = uiOrdering.addNewGroup( "Polygon Definition" );
|
||||
m_polygonEditor()->uiOrderingForLocalPolygon( uiConfigName, *polyDefinitionGroup );
|
||||
|
||||
caf::PdmUiGroup* appearanceGroup = uiOrdering.addNewGroup( "Appearance" );
|
||||
appearanceGroup->setCollapsedByDefault();
|
||||
m_internalPolygon->uiOrderingForLocalPolygon( uiConfigName, *appearanceGroup );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QList<caf::PdmOptionItemInfo> RimPolygonFilter::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
if ( fieldNeedingOptions == &m_cellFilterPolygon )
|
||||
{
|
||||
RimTools::polygonOptionItems( &options );
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -418,20 +318,39 @@ void RimPolygonFilter::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_enablePicking )
|
||||
if ( changedField == &m_editPolygonButton )
|
||||
{
|
||||
updateConnectedEditors();
|
||||
RimPolygonTools::selectPolygonInView( m_cellFilterPolygon(), this );
|
||||
|
||||
enableFilter( !m_enablePicking() );
|
||||
filterChanged.send();
|
||||
m_editPolygonButton = false;
|
||||
|
||||
return;
|
||||
}
|
||||
else if ( ( changedField == &m_showLines ) || ( changedField == &m_showSpheres ) || ( changedField == &m_sphereColor ) ||
|
||||
( changedField == &m_sphereRadiusFactor ) || ( changedField == &m_lineThickness ) || ( changedField == &m_lineColor ) ||
|
||||
( changedField == &m_lockPolygonToPlane ) || ( changedField == &m_polygonPlaneDepth ) )
|
||||
|
||||
if ( changedField == &m_polygonDataSource )
|
||||
{
|
||||
filterChanged.send();
|
||||
if ( !isPolygonDefinedLocally() )
|
||||
{
|
||||
if ( m_cellFilterPolygon() == nullptr || m_cellFilterPolygon() == m_internalPolygon )
|
||||
{
|
||||
auto polygonCollection = RimTools::polygonCollection();
|
||||
if ( polygonCollection && !polygonCollection->allPolygons().empty() )
|
||||
{
|
||||
m_cellFilterPolygon = polygonCollection->allPolygons().front();
|
||||
}
|
||||
}
|
||||
}
|
||||
configurePolygonEditor();
|
||||
updateAllRequiredEditors();
|
||||
}
|
||||
else if ( changedField != &m_name )
|
||||
|
||||
if ( changedField == &m_cellFilterPolygon )
|
||||
{
|
||||
configurePolygonEditor();
|
||||
updateAllRequiredEditors();
|
||||
}
|
||||
|
||||
if ( changedField != &m_name )
|
||||
{
|
||||
updateCells();
|
||||
filterChanged.send();
|
||||
@@ -444,26 +363,10 @@ void RimPolygonFilter::fieldChangedByUi( const caf::PdmFieldHandle* changedField
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::enablePicking( bool enable )
|
||||
{
|
||||
m_enablePicking = enable;
|
||||
m_polygonEditor->enablePicking( enable );
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPolygonFilter::pickingEnabled() const
|
||||
{
|
||||
return m_enablePicking();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PickEventHandler* RimPolygonFilter::pickEventHandler() const
|
||||
{
|
||||
return m_pickTargetsEventHandler.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -583,7 +486,7 @@ void RimPolygonFilter::updateCellsKIndexEclipse( const std::vector<cvf::Vec3d>&
|
||||
const int gIdx = static_cast<int>( grid->gridIndex() );
|
||||
|
||||
std::list<size_t> foundCells;
|
||||
const bool closedPolygon = m_closePolygon();
|
||||
const bool closedPolygon = isPolygonClosed();
|
||||
|
||||
// find all cells in the K layer that matches the polygon
|
||||
#pragma omp parallel for
|
||||
@@ -591,8 +494,8 @@ void RimPolygonFilter::updateCellsKIndexEclipse( const std::vector<cvf::Vec3d>&
|
||||
{
|
||||
for ( size_t j = 0; j < grid->cellCountJ(); j++ )
|
||||
{
|
||||
size_t cellIdx = grid->cellIndexFromIJK( i, j, K );
|
||||
RigCell cell = grid->cell( cellIdx );
|
||||
size_t cellIdx = grid->cellIndexFromIJK( i, j, K );
|
||||
const RigCell& cell = grid->cell( cellIdx );
|
||||
// valid cell?
|
||||
if ( cell.isInvalid() ) continue;
|
||||
|
||||
@@ -634,7 +537,7 @@ void RimPolygonFilter::updateCellsKIndexEclipse( const std::vector<cvf::Vec3d>&
|
||||
// get the cell index
|
||||
size_t newIdx = grid->cellIndexFromIJK( ci, cj, k );
|
||||
// valid cell?
|
||||
RigCell cell = grid->cell( newIdx );
|
||||
const RigCell& cell = grid->cell( newIdx );
|
||||
if ( cell.isInvalid() ) continue;
|
||||
|
||||
m_cells[gIdx].push_back( newIdx );
|
||||
@@ -652,7 +555,7 @@ void RimPolygonFilter::updateCellsForEclipse( const std::vector<cvf::Vec3d>& poi
|
||||
|
||||
if ( m_polyFilterMode == PolygonFilterModeType::DEPTH_Z )
|
||||
{
|
||||
if ( !m_closePolygon() ) return;
|
||||
if ( !isPolygonClosed() ) return;
|
||||
|
||||
for ( size_t gridIndex = 0; gridIndex < data->gridCount(); gridIndex++ )
|
||||
{
|
||||
@@ -720,7 +623,7 @@ void RimPolygonFilter::updateCellsDepthGeoMech( const std::vector<cvf::Vec3d>& p
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::updateCellsKIndexGeoMech( const std::vector<cvf::Vec3d>& points, const RigFemPartGrid* grid, int partId )
|
||||
{
|
||||
const bool closedPolygon = m_closePolygon();
|
||||
const bool closedPolygon = isPolygonClosed();
|
||||
|
||||
// we need to find the K layer we hit with the first point
|
||||
size_t nk;
|
||||
@@ -839,7 +742,7 @@ void RimPolygonFilter::updateCellsForGeoMech( const std::vector<cvf::Vec3d>& poi
|
||||
|
||||
if ( m_polyFilterMode == PolygonFilterModeType::DEPTH_Z )
|
||||
{
|
||||
if ( m_closePolygon() )
|
||||
if ( isPolygonClosed() )
|
||||
{
|
||||
updateCellsDepthGeoMech( points, grid, i );
|
||||
}
|
||||
@@ -865,16 +768,17 @@ void RimPolygonFilter::updateCells()
|
||||
|
||||
// get polyline as vector
|
||||
std::vector<cvf::Vec3d> points;
|
||||
for ( auto& target : m_targets )
|
||||
|
||||
for ( auto target : m_polygonEditor->activeTargets() )
|
||||
{
|
||||
points.push_back( target->targetPointXYZ() );
|
||||
}
|
||||
|
||||
// We need at least three points to make a closed polygon, or just 2 for a polyline
|
||||
if ( ( !m_closePolygon() && ( points.size() < 2 ) ) || ( m_closePolygon() && ( points.size() < 3 ) ) ) return;
|
||||
if ( ( !isPolygonClosed() && ( points.size() < 2 ) ) || ( isPolygonClosed() && ( points.size() < 3 ) ) ) return;
|
||||
|
||||
// make sure first and last point is the same (req. by closed polygon methods used later)
|
||||
if ( m_closePolygon() ) points.push_back( points.front() );
|
||||
if ( isPolygonClosed() ) points.push_back( points.front() );
|
||||
|
||||
RimEclipseCase* eCase = eclipseCase();
|
||||
RimGeoMechCase* gCase = geoMechCase();
|
||||
@@ -892,30 +796,114 @@ void RimPolygonFilter::updateCells()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RigPolyLinesData> RimPolygonFilter::polyLinesData() const
|
||||
void RimPolygonFilter::configurePolygonEditor()
|
||||
{
|
||||
cvf::ref<RigPolyLinesData> pld = new RigPolyLinesData;
|
||||
std::vector<cvf::Vec3d> line;
|
||||
for ( const RimPolylineTarget* target : m_targets )
|
||||
{
|
||||
line.push_back( target->targetPointXYZ() );
|
||||
}
|
||||
pld->setPolyLine( line );
|
||||
RimPolygon* polygon = nullptr;
|
||||
if ( isPolygonDefinedLocally() )
|
||||
polygon = m_internalPolygon();
|
||||
else
|
||||
polygon = m_cellFilterPolygon();
|
||||
|
||||
pld->setLineAppearance( m_lineThickness, m_lineColor, m_closePolygon );
|
||||
pld->setSphereAppearance( m_sphereRadiusFactor, m_sphereColor );
|
||||
pld->setZPlaneLock( m_lockPolygonToPlane, -m_polygonPlaneDepth );
|
||||
m_polygonEditor->setPolygon( polygon );
|
||||
|
||||
if ( isActive() )
|
||||
// Must connect the signals after polygon is assigned to the polygon editor
|
||||
// When assigning an object to a ptr field, all signals are disconnected
|
||||
connectObjectSignals( polygon );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimPolygonInView* RimPolygonFilter::polygonInView() const
|
||||
{
|
||||
return m_polygonEditor();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::insertTarget( const RimPolylineTarget* targetToInsertBefore, RimPolylineTarget* targetToInsert )
|
||||
{
|
||||
m_polygonEditor->insertTarget( targetToInsertBefore, targetToInsert );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::deleteTarget( RimPolylineTarget* targetToDelete )
|
||||
{
|
||||
m_polygonEditor->deleteTarget( targetToDelete );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::updateEditorsAndVisualization()
|
||||
{
|
||||
updateConnectedEditors();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::updateVisualization()
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPolylineTarget*> RimPolygonFilter::activeTargets() const
|
||||
{
|
||||
return m_polygonEditor->activeTargets();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPolygonFilter::pickingEnabled() const
|
||||
{
|
||||
return m_polygonEditor->pickingEnabled();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PickEventHandler* RimPolygonFilter::pickEventHandler() const
|
||||
{
|
||||
return m_pickTargetsEventHandler.get();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::AppEnum<RimPolygonFilter::GeometricalShape> RimPolygonFilter::geometricalShape() const
|
||||
{
|
||||
if ( isPolygonDefinedLocally() )
|
||||
{
|
||||
pld->setVisibility( m_showLines, m_showSpheres );
|
||||
if ( !m_internalPolygon->isClosed() ) return GeometricalShape::LINE;
|
||||
}
|
||||
else
|
||||
{
|
||||
pld->setVisibility( false, false );
|
||||
if ( m_cellFilterPolygon && !m_cellFilterPolygon->isClosed() ) return GeometricalShape::LINE;
|
||||
}
|
||||
|
||||
return pld;
|
||||
return GeometricalShape::AREA;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::setGeometricalShape( const caf::AppEnum<GeometricalShape>& shape )
|
||||
{
|
||||
if ( isPolygonDefinedLocally() )
|
||||
{
|
||||
m_internalPolygon->setIsClosed( shape == GeometricalShape::AREA );
|
||||
}
|
||||
else if ( m_cellFilterPolygon() )
|
||||
{
|
||||
m_cellFilterPolygon->setIsClosed( shape == GeometricalShape::AREA );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -932,6 +920,53 @@ void RimPolygonFilter::initializeCellList()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPolygonFilter::isPolygonClosed() const
|
||||
{
|
||||
if ( isPolygonDefinedLocally() ) return m_internalPolygon->isClosed();
|
||||
|
||||
if ( m_cellFilterPolygon() ) return m_cellFilterPolygon->isClosed();
|
||||
|
||||
return true;
|
||||
}
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimPolygonFilter::isPolygonDefinedLocally() const
|
||||
{
|
||||
return m_polygonDataSource() == PolygonDataSource::DEFINED_IN_FILTER;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::connectObjectSignals( RimPolygon* polygon )
|
||||
{
|
||||
if ( m_cellFilterPolygon() )
|
||||
{
|
||||
m_cellFilterPolygon()->objectChanged.disconnect( this );
|
||||
}
|
||||
|
||||
if ( polygon )
|
||||
{
|
||||
m_cellFilterPolygon = polygon;
|
||||
|
||||
polygon->objectChanged.connect( this, &RimPolygonFilter::onObjectChanged );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimPolygonFilter::onObjectChanged( const caf::SignalEmitter* emitter )
|
||||
{
|
||||
updateCells();
|
||||
filterChanged.send();
|
||||
updateIconState();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Find which K layer we hit, in any of the grids, for any of the selected points
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -21,42 +21,42 @@
|
||||
#include "RimCellFilter.h"
|
||||
#include "RimCellFilterIntervalTool.h"
|
||||
#include "RimPolylinePickerInterface.h"
|
||||
#include "RimPolylinesDataInterface.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
#include "cafPdmFieldCvfColor.h"
|
||||
#include "cafPdmFieldCvfVec3d.h"
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmObject.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
#include "cafPickEventHandler.h"
|
||||
|
||||
#include "cvfColor3.h"
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
||||
class RicPolylineTargetsPickEventHandler;
|
||||
class RimPolygon;
|
||||
class RimPolylineTarget;
|
||||
class RimCase;
|
||||
class RimEclipseCase;
|
||||
class RimGeoMechCase;
|
||||
class RigGridBase;
|
||||
class RigMainGrid;
|
||||
class RigFemPartGrid;
|
||||
class RigPolylinesData;
|
||||
class RimPolygonInView;
|
||||
class RigEclipseCaseData;
|
||||
class RicPolylineTargetsPickEventHandler;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimPolygonFilter : public RimCellFilter, public RimPolylinePickerInterface, public RimPolylinesDataInterface
|
||||
class RimPolygonFilter : public RimCellFilter, public RimPolylinePickerInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
enum class PolygonDataSource
|
||||
{
|
||||
DEFINED_IN_FILTER,
|
||||
GLOBAL_POLYGON
|
||||
};
|
||||
|
||||
enum class GeometricalShape
|
||||
{
|
||||
AREA,
|
||||
LINE
|
||||
};
|
||||
|
||||
enum class PolygonFilterModeType
|
||||
{
|
||||
DEPTH_Z,
|
||||
@@ -71,38 +71,31 @@ public:
|
||||
};
|
||||
|
||||
RimPolygonFilter();
|
||||
~RimPolygonFilter() override;
|
||||
|
||||
void enableFilter( bool bEnable );
|
||||
void enableKFilter( bool bEnable );
|
||||
|
||||
bool isFilterEnabled() const override;
|
||||
|
||||
void updateVisualization() override;
|
||||
void updateEditorsAndVisualization() override;
|
||||
void insertTarget( const RimPolylineTarget* targetToInsertBefore, RimPolylineTarget* targetToInsert ) override;
|
||||
void deleteTarget( RimPolylineTarget* targetToDelete ) override;
|
||||
void enablePicking( bool enable );
|
||||
|
||||
std::vector<RimPolylineTarget*> activeTargets() const override;
|
||||
bool pickingEnabled() const override;
|
||||
caf::PickEventHandler* pickEventHandler() const override;
|
||||
|
||||
void updateCellIndexFilter( cvf::UByteArray* includeVisibility, cvf::UByteArray* excludeVisibility, int gridIndex ) override;
|
||||
void onGridChanged() override;
|
||||
|
||||
cvf::ref<RigPolyLinesData> polyLinesData() const override;
|
||||
void configurePolygonEditor();
|
||||
RimPolygonInView* polygonInView() const;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
||||
void initAfterRead() override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
void childFieldChangedByUi( const caf::PdmFieldHandle* changedChildField ) override;
|
||||
|
||||
QString fullName() const override;
|
||||
|
||||
private:
|
||||
void defineCustomContextMenu( const caf::PdmFieldHandle* fieldNeedingMenu, QMenu* menu, QWidget* fieldEditorWidget ) override;
|
||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
||||
|
||||
void updateCells();
|
||||
void updateCellsForEclipse( const std::vector<cvf::Vec3d>& points, RimEclipseCase* eCase );
|
||||
void updateCellsForGeoMech( const std::vector<cvf::Vec3d>& points, RimGeoMechCase* gCase );
|
||||
@@ -118,26 +111,45 @@ private:
|
||||
|
||||
void initializeCellList();
|
||||
|
||||
caf::PdmField<bool> m_enablePicking;
|
||||
caf::PdmChildArrayField<RimPolylineTarget*> m_targets;
|
||||
caf::PdmField<caf::AppEnum<PolygonFilterModeType>> m_polyFilterMode;
|
||||
caf::PdmField<caf::AppEnum<PolygonIncludeType>> m_polyIncludeType;
|
||||
caf::PdmField<bool> m_enableFiltering;
|
||||
caf::PdmField<bool> m_showLines;
|
||||
caf::PdmField<bool> m_showSpheres;
|
||||
caf::PdmField<int> m_lineThickness;
|
||||
caf::PdmField<double> m_sphereRadiusFactor;
|
||||
caf::PdmField<cvf::Color3f> m_lineColor;
|
||||
caf::PdmField<cvf::Color3f> m_sphereColor;
|
||||
caf::PdmField<double> m_polygonPlaneDepth;
|
||||
caf::PdmField<bool> m_lockPolygonToPlane;
|
||||
caf::PdmField<bool> m_enableKFilter;
|
||||
caf::PdmField<QString> m_kFilterStr;
|
||||
caf::PdmField<bool> m_closePolygon;
|
||||
bool isPolygonClosed() const;
|
||||
bool isPolygonDefinedLocally() const;
|
||||
|
||||
std::shared_ptr<RicPolylineTargetsPickEventHandler> m_pickTargetsEventHandler;
|
||||
void connectObjectSignals( RimPolygon* polygon );
|
||||
void onObjectChanged( const caf::SignalEmitter* emitter );
|
||||
|
||||
// RimPolylinePickerInterface used to forward events to m_polygonEditor
|
||||
void insertTarget( const RimPolylineTarget* targetToInsertBefore, RimPolylineTarget* targetToInsert ) override;
|
||||
void deleteTarget( RimPolylineTarget* targetToDelete ) override;
|
||||
void updateEditorsAndVisualization() override;
|
||||
void updateVisualization() override;
|
||||
std::vector<RimPolylineTarget*> activeTargets() const override;
|
||||
bool pickingEnabled() const override;
|
||||
caf::PickEventHandler* pickEventHandler() const override;
|
||||
|
||||
caf::AppEnum<GeometricalShape> geometricalShape() const;
|
||||
void setGeometricalShape( const caf::AppEnum<GeometricalShape>& shape );
|
||||
|
||||
private:
|
||||
caf::PdmField<caf::AppEnum<PolygonFilterModeType>> m_polyFilterMode;
|
||||
caf::PdmField<caf::AppEnum<PolygonIncludeType>> m_polyIncludeType;
|
||||
caf::PdmField<caf::AppEnum<PolygonDataSource>> m_polygonDataSource;
|
||||
caf::PdmProxyValueField<caf::AppEnum<GeometricalShape>> m_geometricalShape;
|
||||
|
||||
caf::PdmField<bool> m_enableFiltering;
|
||||
caf::PdmField<bool> m_enableKFilter;
|
||||
caf::PdmField<QString> m_kFilterStr;
|
||||
|
||||
std::vector<std::vector<size_t>> m_cells;
|
||||
|
||||
RimCellFilterIntervalTool m_intervalTool;
|
||||
|
||||
// Local polygon and polygon editor
|
||||
caf::PdmPtrField<RimPolygon*> m_cellFilterPolygon;
|
||||
caf::PdmChildField<RimPolygon*> m_internalPolygon;
|
||||
caf::PdmChildField<RimPolygonInView*> m_polygonEditor;
|
||||
caf::PdmField<bool> m_editPolygonButton;
|
||||
|
||||
std::shared_ptr<RicPolylineTargetsPickEventHandler> m_pickTargetsEventHandler;
|
||||
|
||||
caf::PdmChildArrayField<RimPolylineTarget*> m_OBSOLETE_targets;
|
||||
};
|
||||
Reference in new issue
Block a user