mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
#1471 Completions visualization
This commit is contained in:
@@ -28,13 +28,17 @@
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimWellPath.h"
|
||||
#include "RimWellPathCollection.h"
|
||||
#include "RimWellPathCompletion.h"
|
||||
#include "RimWellPathCompletionCollection.h"
|
||||
|
||||
#include "RivFishbonesSubsPartMgr.h"
|
||||
#include "RivPartPriority.h"
|
||||
#include "RivPipeGeometryGenerator.h"
|
||||
#include "RivWellPathSourceInfo.h"
|
||||
#include "RivObjectSourceInfo.h"
|
||||
|
||||
#include "cafEffectGenerator.h"
|
||||
#include "cafDisplayCoordTransform.h"
|
||||
|
||||
#include "cvfDrawableGeo.h"
|
||||
#include "cvfDrawableText.h"
|
||||
@@ -109,6 +113,37 @@ void RivWellPathPartMgr::appendFishbonesPartsToModel(cvf::ModelBasicList* model,
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivWellPathPartMgr::appendCompletionsToModel(cvf::ModelBasicList* model, caf::DisplayCoordTransform* displayCoordTransform, double characteristicCellSize)
|
||||
{
|
||||
if (!m_rimWellPath || !m_rimWellPath->m_completionCollection->isChecked()) return;
|
||||
|
||||
RivPipeGeometryGenerator geoGenerator;
|
||||
for (RimWellPathCompletion* completion : m_rimWellPath->m_completionCollection()->m_completions())
|
||||
{
|
||||
if (!completion->isChecked()) continue;
|
||||
|
||||
std::vector<cvf::Vec3d> displayCoords;
|
||||
for (auto lateralDomainCoords : completion->coordinates())
|
||||
{
|
||||
displayCoords.push_back(displayCoordTransform->transformToDisplayCoord(lateralDomainCoords));
|
||||
}
|
||||
|
||||
cvf::ref<RivObjectSourceInfo> objectSourceInfo = new RivObjectSourceInfo(completion);
|
||||
|
||||
cvf::Collection<cvf::Part> parts;
|
||||
geoGenerator.cylinderWithCenterLineParts(&parts, displayCoords, m_rimWellPath->wellPathColor(), m_rimWellPath->combinedScaleFactor() * characteristicCellSize * 0.5);
|
||||
for (auto part : parts)
|
||||
{
|
||||
part->setSourceInfo(objectSourceInfo.p());
|
||||
model->addPart(part.p());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// The pipe geometry needs to be rebuilt on scale change to keep the pipes round
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -296,6 +331,7 @@ void RivWellPathPartMgr::appendStaticGeometryPartsToModel(cvf::ModelBasicList* m
|
||||
}
|
||||
|
||||
appendFishbonesPartsToModel(model, displayCoordTransform, characteristicCellSize);
|
||||
appendCompletionsToModel(model, displayCoordTransform, characteristicCellSize);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user