mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Use polygon as data source for intersection
- Use polygon as data source for intersection - Add padlock icon - Show padlock icon on read only polygons - Add Fwk function appendMenuItems() to make it possible to define context menu content in a PdmObject - Context menu "Create Polygon Intersection" - Updates to make visualization consistent with object and object collection enabled state
This commit is contained in:
@@ -24,9 +24,10 @@
|
||||
#include "RimIntersectionEnums.h"
|
||||
|
||||
#include "cafPdmChildField.h"
|
||||
#include "cafPdmFieldCvfVec3d.h"
|
||||
#include "cafPdmProxyValueField.h"
|
||||
|
||||
#include <QString>
|
||||
#include "cvfVector3.h"
|
||||
|
||||
class RimWellPath;
|
||||
class RivExtrudedCurveIntersectionPartMgr;
|
||||
@@ -40,6 +41,7 @@ class RimSurfaceCollection;
|
||||
class RimSurfaceIntersectionCollection;
|
||||
class RimSurfaceIntersectionCurve;
|
||||
class RimSurfaceIntersectionBand;
|
||||
class RimPolygon;
|
||||
|
||||
namespace caf
|
||||
{
|
||||
@@ -62,7 +64,8 @@ public:
|
||||
CS_WELL_PATH,
|
||||
CS_SIMULATION_WELL,
|
||||
CS_POLYLINE,
|
||||
CS_AZIMUTHLINE
|
||||
CS_AZIMUTHLINE,
|
||||
CS_POLYGON,
|
||||
};
|
||||
|
||||
enum class CrossSectionDirEnum
|
||||
@@ -102,6 +105,7 @@ public:
|
||||
void configureForSimulationWell( RimSimWellInView* simWell );
|
||||
void configureForWellPath( RimWellPath* wellPath );
|
||||
void configureForPolyLine();
|
||||
void configureForProjectPolyLine( RimPolygon* polygon );
|
||||
void configureForAzimuthLine();
|
||||
|
||||
std::vector<std::vector<cvf::Vec3d>> polyLines( cvf::Vec3d* flattenedPolylineStartPoint = nullptr ) const;
|
||||
@@ -134,7 +138,7 @@ public:
|
||||
int branchIndex() const;
|
||||
void rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
|
||||
protected:
|
||||
private:
|
||||
caf::PdmFieldHandle* userDescriptionField() final;
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
@@ -143,13 +147,12 @@ protected:
|
||||
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName = "" ) override;
|
||||
|
||||
private:
|
||||
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 updateSimulationWellCenterline();
|
||||
void addExtents( std::vector<cvf::Vec3d>& polyLine ) const;
|
||||
void updateName();
|
||||
static double azimuthInRadians( cvf::Vec3d vec );
|
||||
@@ -181,6 +184,9 @@ private:
|
||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||
caf::PdmPtrField<RimSimWellInView*> m_simulationWell;
|
||||
|
||||
caf::PdmPtrField<RimPolygon*> m_projectPolygon;
|
||||
caf::PdmField<bool> m_editPolygonButton;
|
||||
|
||||
caf::PdmField<bool> m_inputPolylineFromViewerEnabled;
|
||||
caf::PdmField<bool> m_inputExtrusionPointsFromViewerEnabled;
|
||||
caf::PdmField<bool> m_inputTwoAzimuthPointsFromViewerEnabled;
|
||||
@@ -202,11 +208,11 @@ private:
|
||||
|
||||
cvf::ref<RivExtrudedCurveIntersectionPartMgr> m_crossSectionPartMgr;
|
||||
|
||||
mutable std::vector<std::vector<cvf::Vec3d>> m_simulationWellBranchCenterlines;
|
||||
std::vector<std::vector<cvf::Vec3d>> m_simulationWellBranchCenterlines;
|
||||
|
||||
caf::PdmField<bool> m_enableKFilter;
|
||||
caf::PdmField<QString> m_kFilterText;
|
||||
|
||||
caf::PdmField<bool> m_kFilterCollectionOverride;
|
||||
caf::PdmField<QString> m_kFilterCollectionText;
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user