mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Polygonfilter updates2 (#7286)
* Make sure all contourmap copies are getting the correct case set for cell filters when creating/copying maps. * Rewrite polyline part manager to be more generic, not just linked to annotations. * Add new partmgr for cell filters to draw polygon filter outlines in both eclipse and geomech views * Show lines/spheres for polygon filter outline * Add color edit for line and spheres * Add support for z plane lock in poygon filter outline * Add new flags for enabling filter and/or polyline display * Add K range filter to polygon filter * Enable picking automatically when creating a new polygon filter
This commit is contained in:
@@ -19,8 +19,11 @@
|
||||
#include "RimPolylinesAnnotationInView.h"
|
||||
#include "RimAnnotationCollectionBase.h"
|
||||
#include "RimAnnotationGroupCollection.h"
|
||||
#include "RimAnnotationInViewCollection.h"
|
||||
#include "RimPolylinesAnnotation.h"
|
||||
|
||||
#include "RigPolyLinesData.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimPolylinesAnnotationInView, "RimPolylinesAnnotationInView" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -122,3 +125,21 @@ caf::PdmFieldHandle* RimPolylinesAnnotationInView::userDescriptionField()
|
||||
{
|
||||
return m_sourceAnnotation ? m_sourceAnnotation->userDescriptionField() : nullptr;
|
||||
}
|
||||
|
||||
cvf::ref<RigPolyLinesData> RimPolylinesAnnotationInView::polyLinesData() const
|
||||
{
|
||||
auto retval = m_sourceAnnotation->polyLinesData();
|
||||
if ( !isVisible() )
|
||||
{
|
||||
retval->setVisibility( false, false );
|
||||
}
|
||||
|
||||
RimAnnotationInViewCollection* coll;
|
||||
firstAncestorOrThisOfType( coll );
|
||||
if ( coll )
|
||||
{
|
||||
retval->setZPlaneLock( coll->snapAnnotations(), coll->annotationPlaneZ() );
|
||||
}
|
||||
|
||||
return retval;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
|
||||
#include "RimAnnotationLineAppearance.h"
|
||||
|
||||
#include "RimPolylinesDataInterface.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
#include "cafPdmChildArrayField.h"
|
||||
#include "cafPdmField.h"
|
||||
@@ -46,7 +48,7 @@ class RimPolylinesAnnotation;
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimPolylinesAnnotationInView : public caf::PdmObject
|
||||
class RimPolylinesAnnotationInView : public caf::PdmObject, public RimPolylinesDataInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@@ -60,6 +62,8 @@ public:
|
||||
|
||||
bool isVisible() const;
|
||||
|
||||
cvf::ref<RigPolyLinesData> polyLinesData() const override;
|
||||
|
||||
protected:
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
@@ -143,6 +143,11 @@ void RimPolylinesFromFileAnnotation::readPolyLinesFile( QString* errorMessage )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::ref<RigPolyLinesData> RimPolylinesFromFileAnnotation::polyLinesData()
|
||||
{
|
||||
auto ap = appearance();
|
||||
m_polyLinesData->setVisibility( m_showLines(), m_showSpheres() );
|
||||
m_polyLinesData->setSphereAppearance( ap->sphereRadiusFactor(), ap->sphereColor() );
|
||||
m_polyLinesData->setLineAppearance( ap->thickness(), ap->color(), m_closePolyline );
|
||||
|
||||
return m_polyLinesData;
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,12 @@ cvf::ref<RigPolyLinesData> RimUserDefinedPolylinesAnnotation::polyLinesData()
|
||||
{
|
||||
line.push_back( target->targetPointXYZ() );
|
||||
}
|
||||
pld->setPolyLines( { line } );
|
||||
pld->setPolyLine( line );
|
||||
|
||||
auto ap = appearance();
|
||||
pld->setVisibility( m_showLines(), m_showSpheres() );
|
||||
pld->setSphereAppearance( ap->sphereRadiusFactor(), ap->sphereColor() );
|
||||
pld->setLineAppearance( ap->thickness(), ap->color(), m_closePolyline );
|
||||
|
||||
return pld;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user