mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 13:47:12 -05:00
#13466 Allow display of intersection bands and curves without intersection geometry
Add a "Show Intersection Geometry" checkbox to RimExtrudedCurveIntersection that controls visibility of intersection faces and mesh lines independently from the surface intersection bands and curves. When unchecked, the intersection geometry is hidden but bands and curves continue to display based on their individual checked states. Fixes #13466.
This commit is contained in:
committed by
Magne Sjaastad
parent
fff6c7d64a
commit
414cf1df04
+4
@@ -802,6 +802,8 @@ cvf::ref<cvf::Part> RivExtrudedCurveIntersectionPartMgr::createCurvePart( const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivExtrudedCurveIntersectionPartMgr::appendIntersectionFacesToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
|
||||
{
|
||||
if ( m_rimIntersection.isNull() || !m_rimIntersection->showIntersectionGeometry() ) return;
|
||||
|
||||
if ( m_intersectionFaces.notNull() )
|
||||
{
|
||||
m_intersectionFaces->setTransform( scaleTransform );
|
||||
@@ -814,6 +816,8 @@ void RivExtrudedCurveIntersectionPartMgr::appendIntersectionFacesToModel( cvf::M
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivExtrudedCurveIntersectionPartMgr::appendMeshLinePartsToModel( cvf::ModelBasicList* model, cvf::Transform* scaleTransform )
|
||||
{
|
||||
if ( m_rimIntersection.isNull() || !m_rimIntersection->showIntersectionGeometry() ) return;
|
||||
|
||||
if ( m_intersectionGridLines.notNull() )
|
||||
{
|
||||
m_intersectionGridLines->setTransform( scaleTransform );
|
||||
|
||||
@@ -205,6 +205,8 @@ RimExtrudedCurveIntersection::RimExtrudedCurveIntersection()
|
||||
CAF_PDM_InitScriptableObject( "Intersection", ":/CrossSection16x16.png" );
|
||||
CAF_PDM_InitScriptableFieldWithScriptKeyword( &m_name, "UserDescription", "Name", QString( "Intersection Name" ), "Name" );
|
||||
|
||||
CAF_PDM_InitField( &m_showIntersectionGeometry, "ShowIntersectionGeometry", true, "Show Intersection Geometry" );
|
||||
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_type, "Type", "Type" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_direction, "Direction", "Direction" );
|
||||
CAF_PDM_InitScriptableFieldNoDefault( &m_wellPath, "WellPath", "Well Path " );
|
||||
@@ -446,11 +448,12 @@ void RimExtrudedCurveIntersection::setKFilterOverride( bool collectionOverride,
|
||||
void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue )
|
||||
{
|
||||
if ( changedField == &m_isActive || changedField == &m_type || changedField == &m_direction || changedField == &m_wellPath ||
|
||||
changedField == &m_simulationWell || changedField == &m_branchIndex || changedField == &m_extentLength || changedField == &m_lengthUp ||
|
||||
changedField == &m_lengthDown || changedField == &m_showInactiveCells || changedField == &m_useSeparateDataSource ||
|
||||
changedField == &m_separateDataSource || changedField == &m_depthUpperThreshold || changedField == &m_depthLowerThreshold ||
|
||||
changedField == &m_depthThresholdOverridden || changedField == &m_depthFilterType || changedField == &m_enableKFilter ||
|
||||
changedField == &m_kFilterText || changedField == &m_kFilterCollectionOverride || changedField == &m_projectPolygon )
|
||||
changedField == &m_simulationWell || changedField == &m_branchIndex || changedField == &m_extentLength ||
|
||||
changedField == &m_lengthUp || changedField == &m_lengthDown || changedField == &m_showInactiveCells ||
|
||||
changedField == &m_useSeparateDataSource || changedField == &m_separateDataSource || changedField == &m_depthUpperThreshold ||
|
||||
changedField == &m_depthLowerThreshold || changedField == &m_depthThresholdOverridden || changedField == &m_depthFilterType ||
|
||||
changedField == &m_enableKFilter || changedField == &m_kFilterText || changedField == &m_kFilterCollectionOverride ||
|
||||
changedField == &m_projectPolygon || changedField == &m_showIntersectionGeometry )
|
||||
{
|
||||
rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
}
|
||||
@@ -536,6 +539,7 @@ void RimExtrudedCurveIntersection::fieldChangedByUi( const caf::PdmFieldHandle*
|
||||
void RimExtrudedCurveIntersection::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
uiOrdering.add( &m_name );
|
||||
uiOrdering.add( &m_showIntersectionGeometry );
|
||||
caf::PdmUiGroup* geometryGroup = uiOrdering.addNewGroup( "Intersecting Geometry" );
|
||||
geometryGroup->add( &m_type );
|
||||
|
||||
@@ -1272,6 +1276,14 @@ bool RimExtrudedCurveIntersection::hasDefiningPoints() const
|
||||
return m_type() == CrossSectionEnum::CS_POLYLINE || m_type() == CrossSectionEnum::CS_AZIMUTHLINE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimExtrudedCurveIntersection::showIntersectionGeometry() const
|
||||
{
|
||||
return m_showIntersectionGeometry();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -134,6 +134,8 @@ public:
|
||||
RimSurfaceIntersectionCurve* addIntersectionCurve();
|
||||
RimSurfaceIntersectionBand* addIntersectionBand();
|
||||
|
||||
bool showIntersectionGeometry() const;
|
||||
|
||||
int branchIndex() const;
|
||||
void rebuildGeometryAndScheduleCreateDisplayModel();
|
||||
|
||||
@@ -168,6 +170,7 @@ private:
|
||||
|
||||
private:
|
||||
caf::PdmField<QString> m_name;
|
||||
caf::PdmField<bool> m_showIntersectionGeometry;
|
||||
|
||||
caf::PdmField<caf::AppEnum<RimIntersectionFilterEnum>> m_depthFilterType;
|
||||
caf::PdmField<double> m_depthUpperThreshold;
|
||||
|
||||
Reference in New Issue
Block a user