mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8186 Show coordinates with depth(positive Z) instead of signed Z
This commit is contained in:
parent
cb26131102
commit
8a8019427d
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
#include "RimExtrudedCurveIntersection.h"
|
#include "RimExtrudedCurveIntersection.h"
|
||||||
|
|
||||||
|
#include "RiaVec3Tools.h"
|
||||||
|
|
||||||
#include "RigEclipseCaseData.h"
|
#include "RigEclipseCaseData.h"
|
||||||
#include "RigWellPath.h"
|
#include "RigWellPath.h"
|
||||||
|
|
||||||
@ -197,7 +199,11 @@ RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
|
|||||||
CAF_PDM_InitFieldNoDefault( &m_direction, "Direction", "Direction", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_direction, "Direction", "Direction", "", "", "" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_wellPath, "WellPath", "Well Path ", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_wellPath, "WellPath", "Well Path ", "", "", "" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_simulationWell, "SimulationWell", "Simulation Well", "", "", "" );
|
CAF_PDM_InitFieldNoDefault( &m_simulationWell, "SimulationWell", "Simulation Well", "", "", "" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_userPolyline, "Points", "Points", "", "Use Ctrl-C for copy and Ctrl-V for paste", "" );
|
CAF_PDM_InitFieldNoDefault( &m_userPolylineXyz, "Points", "Points", "", "Use Ctrl-C for copy and Ctrl-V for paste", "" );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_userPolylineXydForUi, "PointsUi", "Points", "", "Use Ctrl-C for copy and Ctrl-V for paste", "" );
|
||||||
|
m_userPolylineXydForUi.registerSetMethod( this, &RimExtrudedCurveIntersection::setPointsFromXYD );
|
||||||
|
m_userPolylineXydForUi.registerGetMethod( this, &RimExtrudedCurveIntersection::pointsXYD );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_azimuthAngle, "AzimuthAngle", 0.0, "Azimuth", "", "", "" );
|
CAF_PDM_InitField( &m_azimuthAngle, "AzimuthAngle", 0.0, "Azimuth", "", "", "" );
|
||||||
m_azimuthAngle.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
m_azimuthAngle.uiCapability()->setUiEditorTypeName( caf::PdmUiDoubleSliderEditor::uiEditorTypeName() );
|
||||||
@ -314,7 +320,8 @@ void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle*
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( changedField == &m_inputPolylineFromViewerEnabled || changedField == &m_userPolyline )
|
if ( changedField == &m_inputPolylineFromViewerEnabled || changedField == &m_userPolylineXyz ||
|
||||||
|
changedField == &m_userPolylineXydForUi )
|
||||||
{
|
{
|
||||||
if ( m_inputPolylineFromViewerEnabled )
|
if ( m_inputPolylineFromViewerEnabled )
|
||||||
{
|
{
|
||||||
@ -383,7 +390,7 @@ void RimExtrudedCurveIntersection::defineUiOrdering( QString uiConfigName, caf::
|
|||||||
}
|
}
|
||||||
else if ( type() == CrossSectionEnum::CS_POLYLINE )
|
else if ( type() == CrossSectionEnum::CS_POLYLINE )
|
||||||
{
|
{
|
||||||
geometryGroup->add( &m_userPolyline );
|
geometryGroup->add( &m_userPolylineXydForUi );
|
||||||
geometryGroup->add( &m_inputPolylineFromViewerEnabled );
|
geometryGroup->add( &m_inputPolylineFromViewerEnabled );
|
||||||
}
|
}
|
||||||
else if ( type() == CrossSectionEnum::CS_AZIMUTHLINE )
|
else if ( type() == CrossSectionEnum::CS_AZIMUTHLINE )
|
||||||
@ -591,7 +598,7 @@ std::vector<std::vector<cvf::Vec3d>> RimExtrudedCurveIntersection::polyLines( cv
|
|||||||
}
|
}
|
||||||
else if ( type() == CrossSectionEnum::CS_POLYLINE )
|
else if ( type() == CrossSectionEnum::CS_POLYLINE )
|
||||||
{
|
{
|
||||||
lines.push_back( m_userPolyline );
|
lines.push_back( m_userPolylineXyz );
|
||||||
}
|
}
|
||||||
else if ( type() == CrossSectionEnum::CS_AZIMUTHLINE )
|
else if ( type() == CrossSectionEnum::CS_AZIMUTHLINE )
|
||||||
{
|
{
|
||||||
@ -842,7 +849,7 @@ void RimExtrudedCurveIntersection::defineEditorAttribute( const caf::PdmFieldHan
|
|||||||
setPushButtonText( m_inputPolylineFromViewerEnabled,
|
setPushButtonText( m_inputPolylineFromViewerEnabled,
|
||||||
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
dynamic_cast<caf::PdmUiPushButtonEditorAttribute*>( attribute ) );
|
||||||
}
|
}
|
||||||
else if ( field == &m_userPolyline )
|
else if ( field == &m_userPolylineXydForUi )
|
||||||
{
|
{
|
||||||
setBaseColor( m_inputPolylineFromViewerEnabled, dynamic_cast<caf::PdmUiListEditorAttribute*>( attribute ) );
|
setBaseColor( m_inputPolylineFromViewerEnabled, dynamic_cast<caf::PdmUiListEditorAttribute*>( attribute ) );
|
||||||
}
|
}
|
||||||
@ -869,11 +876,11 @@ void RimExtrudedCurveIntersection::defineEditorAttribute( const caf::PdmFieldHan
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimExtrudedCurveIntersection::appendPointToPolyLine( const cvf::Vec3d& point )
|
void RimExtrudedCurveIntersection::appendPointToPolyLine( const cvf::Vec3d& pointXyz )
|
||||||
{
|
{
|
||||||
m_userPolyline.v().push_back( point );
|
m_userPolylineXyz.v().push_back( pointXyz );
|
||||||
|
|
||||||
m_userPolyline.uiCapability()->updateConnectedEditors();
|
m_userPolylineXyz.uiCapability()->updateConnectedEditors();
|
||||||
|
|
||||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||||
}
|
}
|
||||||
@ -1135,3 +1142,19 @@ void RimExtrudedCurveIntersection::onSurfaceIntersectionsChanged( const caf::Sig
|
|||||||
updateAllRequiredEditors();
|
updateAllRequiredEditors();
|
||||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<cvf::Vec3d> RimExtrudedCurveIntersection::pointsXYD() const
|
||||||
|
{
|
||||||
|
return RiaVec3Tools::invertZSign( m_userPolylineXyz() );
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimExtrudedCurveIntersection::setPointsFromXYD( const std::vector<cvf::Vec3d>& pointsXYD )
|
||||||
|
{
|
||||||
|
m_userPolylineXyz = RiaVec3Tools::invertZSign( pointsXYD );
|
||||||
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "RimIntersection.h"
|
#include "RimIntersection.h"
|
||||||
|
|
||||||
#include "cafPdmChildField.h"
|
#include "cafPdmChildField.h"
|
||||||
|
#include "cafPdmProxyValueField.h"
|
||||||
#include "cafPdmPtrArrayField.h"
|
#include "cafPdmPtrArrayField.h"
|
||||||
|
|
||||||
class RimWellPath;
|
class RimWellPath;
|
||||||
@ -89,7 +90,7 @@ public:
|
|||||||
void configureForAzimuthLine();
|
void configureForAzimuthLine();
|
||||||
|
|
||||||
std::vector<std::vector<cvf::Vec3d>> polyLines( cvf::Vec3d* flattenedPolylineStartPoint = nullptr ) const;
|
std::vector<std::vector<cvf::Vec3d>> polyLines( cvf::Vec3d* flattenedPolylineStartPoint = nullptr ) const;
|
||||||
void appendPointToPolyLine( const cvf::Vec3d& point );
|
void appendPointToPolyLine( const cvf::Vec3d& pointXyz );
|
||||||
|
|
||||||
Rim2dIntersectionView* correspondingIntersectionView() const;
|
Rim2dIntersectionView* correspondingIntersectionView() const;
|
||||||
RivExtrudedCurveIntersectionPartMgr* intersectionPartMgr();
|
RivExtrudedCurveIntersectionPartMgr* intersectionPartMgr();
|
||||||
@ -147,6 +148,9 @@ private:
|
|||||||
|
|
||||||
void onSurfaceIntersectionsChanged( const caf::SignalEmitter* emitter );
|
void onSurfaceIntersectionsChanged( const caf::SignalEmitter* emitter );
|
||||||
|
|
||||||
|
std::vector<cvf::Vec3d> pointsXYD() const;
|
||||||
|
void setPointsFromXYD( const std::vector<cvf::Vec3d>& pointsXYD );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<QString> m_name;
|
caf::PdmField<QString> m_name;
|
||||||
|
|
||||||
@ -167,7 +171,9 @@ private:
|
|||||||
caf::PdmField<double> m_lengthUp;
|
caf::PdmField<double> m_lengthUp;
|
||||||
caf::PdmField<double> m_lengthDown;
|
caf::PdmField<double> m_lengthDown;
|
||||||
|
|
||||||
caf::PdmField<std::vector<cvf::Vec3d>> m_userPolyline;
|
caf::PdmProxyValueField<std::vector<cvf::Vec3d>> m_userPolylineXydForUi;
|
||||||
|
|
||||||
|
caf::PdmField<std::vector<cvf::Vec3d>> m_userPolylineXyz;
|
||||||
caf::PdmField<std::vector<cvf::Vec3d>> m_customExtrusionPoints;
|
caf::PdmField<std::vector<cvf::Vec3d>> m_customExtrusionPoints;
|
||||||
caf::PdmField<std::vector<cvf::Vec3d>> m_twoAzimuthPoints;
|
caf::PdmField<std::vector<cvf::Vec3d>> m_twoAzimuthPoints;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user