mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-24 23:36:50 -06:00
#2552 Small refactorings
This commit is contained in:
parent
e314450e2e
commit
1fa898b798
@ -26,7 +26,9 @@
|
||||
///
|
||||
/// Returns size_t(-1) if no point is found
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
size_t RivSectionFlattner::indexToNextValidPoint(const std::vector<cvf::Vec3d>& polyLine, const cvf::Vec3d extrDir, size_t idxToStartOfLineSegment)
|
||||
size_t RivSectionFlattner::indexToNextValidPoint(const std::vector<cvf::Vec3d>& polyLine,
|
||||
const cvf::Vec3d extrDir,
|
||||
size_t idxToStartOfLineSegment)
|
||||
{
|
||||
size_t lineCount = polyLine.size();
|
||||
if ( !(idxToStartOfLineSegment + 1 < lineCount) ) return -1;
|
||||
@ -51,7 +53,10 @@ size_t RivSectionFlattner::indexToNextValidPoint(const std::vector<cvf::Vec3d>&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// Returns one CS pr point, valid for the next segment
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<cvf::Mat4d> RivSectionFlattner::calculateFlatteningCSsForPolyline(const std::vector<cvf::Vec3d> & polyLine, const cvf::Vec3d& extrusionDir, const cvf::Vec3d& startOffset, cvf::Vec3d* endOffset)
|
||||
std::vector<cvf::Mat4d> RivSectionFlattner::calculateFlatteningCSsForPolyline(const std::vector<cvf::Vec3d> & polyLine,
|
||||
const cvf::Vec3d& extrusionDir,
|
||||
const cvf::Vec3d& startOffset,
|
||||
cvf::Vec3d* endOffset)
|
||||
{
|
||||
CVF_ASSERT(endOffset);
|
||||
size_t pointCount = polyLine.size();
|
||||
|
@ -103,6 +103,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
const RigWellResultFrame& wellResultFrame = well->simWellData()->wellResultFrame(frameIndex);
|
||||
|
||||
double pipeRadius = m_rimWell->pipeRadius();
|
||||
int pipeCrossSectionVxCount = m_rimWell->pipeCrossSectionVertexCount();
|
||||
|
||||
if (wellResultFrame.m_isOpen)
|
||||
{
|
||||
@ -125,7 +126,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
|
||||
cvf::ref<RivPipeGeometryGenerator> pipeGeomGenerator = new RivPipeGeometryGenerator;
|
||||
pipeGeomGenerator->setPipeCenterCoords(wellHeadPipeCoords.p());
|
||||
pipeGeomGenerator->setCrossSectionVertexCount(m_rimReservoirView->wellCollection()->pipeCrossSectionVertexCount());
|
||||
pipeGeomGenerator->setCrossSectionVertexCount(pipeCrossSectionVxCount);
|
||||
|
||||
|
||||
pipeGeomGenerator->setRadius(pipeRadius);
|
||||
@ -207,7 +208,7 @@ void RivWellHeadPartMgr::buildWellHeadParts(size_t frameIndex)
|
||||
gen.setShaftRelativeRadius(0.5f);
|
||||
gen.setHeadRelativeRadius(1.0f);
|
||||
gen.setHeadRelativeLength(0.4f);
|
||||
gen.setNumSlices(m_rimReservoirView->wellCollection()->pipeCrossSectionVertexCount());
|
||||
gen.setNumSlices(pipeCrossSectionVxCount);
|
||||
gen.generate(&builder);
|
||||
|
||||
cvf::ref<cvf::Vec3fArray> vertices = builder.vertices();
|
||||
|
@ -668,10 +668,10 @@ void Rim3dView::addDynamicWellPathsToModel(cvf::ModelBasicList* wellPathModelBas
|
||||
}
|
||||
|
||||
m_wellPathsPartManager->appendDynamicGeometryPartsToModel(wellPathModelBasicList,
|
||||
currentTimeStamp,
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
transForm.p());
|
||||
currentTimeStamp,
|
||||
this->ownerCase()->characteristicCellSize(),
|
||||
wellPathClipBoundingBox,
|
||||
transForm.p());
|
||||
|
||||
wellPathModelBasicList->updateBoundingBoxesRecursive();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user