mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve MSW export including multi lateral wells
Based on branch https://github.com/OPM/ResInsight/tree/system-msw-refactor - Move completion settings to property of well path - Rename to RimFishbones - Export implicit COMPSEGS for fishbones main bore - Add valve for each branch - Increase version number to be able to handle import of legacy project files
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "RigWellPath.h"
|
||||
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimFishbones.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RivObjectSourceInfo.h"
|
||||
@@ -37,7 +37,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivFishbonesSubsPartMgr::RivFishbonesSubsPartMgr( RimFishbonesMultipleSubs* subs )
|
||||
RivFishbonesSubsPartMgr::RivFishbonesSubsPartMgr( RimFishbones* subs )
|
||||
: m_rimFishbonesSubs( subs )
|
||||
{
|
||||
}
|
||||
@@ -90,20 +90,16 @@ void RivFishbonesSubsPartMgr::buildParts( const caf::DisplayCoordTransform* disp
|
||||
|
||||
RivPipeGeometryGenerator geoGenerator;
|
||||
|
||||
for ( auto& sub : m_rimFishbonesSubs->installedLateralIndices() )
|
||||
for ( const auto& [subIndex, lateralIndex] : m_rimFishbonesSubs->installedLateralIndices() )
|
||||
{
|
||||
for ( size_t lateralIndex : sub.lateralIndices )
|
||||
{
|
||||
std::vector<cvf::Vec3d> lateralDomainCoords =
|
||||
m_rimFishbonesSubs->coordsForLateral( sub.subIndex, lateralIndex );
|
||||
std::vector<cvf::Vec3d> lateralDomainCoords = m_rimFishbonesSubs->coordsForLateral( subIndex, lateralIndex );
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords = displayCoordTransform->transformToDisplayCoords( lateralDomainCoords );
|
||||
std::vector<cvf::Vec3d> displayCoords = displayCoordTransform->transformToDisplayCoords( lateralDomainCoords );
|
||||
|
||||
geoGenerator.cylinderWithCenterLineParts( &m_parts,
|
||||
displayCoords,
|
||||
m_rimFishbonesSubs->fishbonesColor(),
|
||||
wellPath->combinedScaleFactor() * characteristicCellSize * 0.5 );
|
||||
}
|
||||
geoGenerator.cylinderWithCenterLineParts( &m_parts,
|
||||
displayCoords,
|
||||
m_rimFishbonesSubs->fishbonesColor(),
|
||||
wellPath->combinedScaleFactor() * characteristicCellSize * 0.5 );
|
||||
}
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo( m_rimFishbonesSubs );
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace caf
|
||||
class DisplayCoordTransform;
|
||||
}
|
||||
|
||||
class RimFishbonesMultipleSubs;
|
||||
class RimFishbones;
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@@ -48,7 +48,7 @@ class RimFishbonesMultipleSubs;
|
||||
class RivFishbonesSubsPartMgr : public cvf::Object
|
||||
{
|
||||
public:
|
||||
RivFishbonesSubsPartMgr( RimFishbonesMultipleSubs* subs );
|
||||
RivFishbonesSubsPartMgr( RimFishbones* subs );
|
||||
~RivFishbonesSubsPartMgr() override;
|
||||
|
||||
void appendGeometryPartsToModel( cvf::ModelBasicList* model,
|
||||
@@ -60,6 +60,6 @@ private:
|
||||
void buildParts( const caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize );
|
||||
|
||||
private:
|
||||
caf::PdmPointer<RimFishbonesMultipleSubs> m_rimFishbonesSubs;
|
||||
cvf::Collection<cvf::Part> m_parts;
|
||||
caf::PdmPointer<RimFishbones> m_rimFishbonesSubs;
|
||||
cvf::Collection<cvf::Part> m_parts;
|
||||
};
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
#include "Rim3dWellLogCurveCollection.h"
|
||||
#include "RimEclipseCase.h"
|
||||
#include "RimEclipseView.h"
|
||||
#include "RimFishboneWellPath.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimFishbones.h"
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimImportedFishboneLaterals.h"
|
||||
#include "RimImportedFishboneLateralsCollection.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimRegularLegendConfig.h"
|
||||
@@ -371,10 +371,10 @@ void RivWellPathPartMgr::appendImportedFishbonesToModel( cvf::ModelBasicList*
|
||||
{
|
||||
if ( !m_rimWellPath || !m_rimWellPath->fishbonesCollection()->wellPathCollection()->isChecked() ) return;
|
||||
|
||||
RivPipeGeometryGenerator geoGenerator;
|
||||
std::vector<RimFishboneWellPath*> fishbonesWellPaths;
|
||||
RivPipeGeometryGenerator geoGenerator;
|
||||
std::vector<RimImportedFishboneLaterals*> fishbonesWellPaths;
|
||||
m_rimWellPath->descendantsIncludingThisOfType( fishbonesWellPaths );
|
||||
for ( RimFishboneWellPath* fbWellPath : fishbonesWellPaths )
|
||||
for ( RimImportedFishboneLaterals* fbWellPath : fishbonesWellPaths )
|
||||
{
|
||||
if ( !fbWellPath->isChecked() ) continue;
|
||||
|
||||
@@ -745,10 +745,13 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
|
||||
m_centerLinePart->setEffect( eff.p() );
|
||||
}
|
||||
|
||||
// Generate label with well-path name
|
||||
|
||||
// Generate label with well-path name at a position that is slightly offset towards the end of the well path
|
||||
// This is to avoid overlap between well path laterals.
|
||||
cvf::Vec3d textPosition = cvfCoords->get( 0 );
|
||||
cvf::Vec3d tangent = ( cvfCoords->get( cvfCoords->size() - 1 ) - cvfCoords->get( 0 ) ).getNormalized();
|
||||
|
||||
textPosition.z() += 2.2 * characteristicCellSize;
|
||||
textPosition += tangent * 2.2 * characteristicCellSize;
|
||||
|
||||
if ( wellPathCollection->showWellPathLabel() && m_rimWellPath->showWellPathLabel() && !m_rimWellPath->name().isEmpty() )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user