mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Compute measured depth at the first visible well path geometry
This commit is contained in:
@@ -86,14 +86,16 @@ bool Riv3dWellLogDrawSurfaceGenerator::createDrawSurface( const caf::DisplayCoor
|
||||
size_t indexToFirstVisibleSegment = 0u;
|
||||
if ( wellPathCollection->wellPathClip )
|
||||
{
|
||||
double clipZDistance = wellPathCollection->wellPathClipZDistance;
|
||||
cvf::Vec3d clipLocation = wellPathClipBoundingBox.max() + clipZDistance * cvf::Vec3d( 0, 0, 1 );
|
||||
clipLocation = displayCoordTransform->transformToDisplayCoord( clipLocation );
|
||||
double horizontalLengthAlongWellToClipPoint;
|
||||
double clipZDistance = wellPathCollection->wellPathClipZDistance;
|
||||
cvf::Vec3d clipLocation = wellPathClipBoundingBox.max() + clipZDistance * cvf::Vec3d( 0, 0, 1 );
|
||||
clipLocation = displayCoordTransform->transformToDisplayCoord( clipLocation );
|
||||
double horizontalLengthAlongWellToClipPoint = 0.0;
|
||||
double measuredDepthAtFirstClipPoint = 0.0;
|
||||
|
||||
wellPathDisplayCoords = RigWellPath::clipPolylineStartAboveZ( wellPathDisplayCoords,
|
||||
clipLocation.z(),
|
||||
&horizontalLengthAlongWellToClipPoint,
|
||||
&measuredDepthAtFirstClipPoint,
|
||||
&indexToFirstVisibleSegment );
|
||||
}
|
||||
|
||||
|
||||
@@ -19,19 +19,19 @@
|
||||
#pragma once
|
||||
|
||||
#include "cvfObject.h"
|
||||
|
||||
#include <cvfVector3.h>
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
class DrawableGeo;
|
||||
}
|
||||
} // namespace cvf
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RivPolylineGenerator : public cvf::Object
|
||||
class RivPolylineGenerator
|
||||
{
|
||||
public:
|
||||
static cvf::ref<cvf::DrawableGeo> createLineAlongPolylineDrawable( const std::vector<cvf::Vec3d>& polyLine, bool closeLine = false );
|
||||
|
||||
@@ -620,6 +620,7 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
|
||||
m_pipeGeomGenerator->setCrossSectionVertexCount( wellPathCollection->wellPathCrossSectionVertexCount() );
|
||||
|
||||
double horizontalLengthAlongWellToClipPoint = 0.0;
|
||||
double measuredDepthAtFirstClipPoint = 0.0;
|
||||
size_t idxToFirstVisibleSegment = 0;
|
||||
if ( wellPathCollection->wellPathClip )
|
||||
{
|
||||
@@ -627,6 +628,7 @@ void RivWellPathPartMgr::buildWellPathParts( const caf::DisplayCoordTransform* d
|
||||
clippedWellPathCenterLine = RigWellPath::clipPolylineStartAboveZ( wellpathCenterLine,
|
||||
maxZClipHeight,
|
||||
&horizontalLengthAlongWellToClipPoint,
|
||||
&measuredDepthAtFirstClipPoint,
|
||||
&idxToFirstVisibleSegment );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -761,9 +761,11 @@ std::vector<std::vector<cvf::Vec3d>> RimExtrudedCurveIntersection::polyLines( cv
|
||||
if ( ownerCase && ownerCase->activeCellsBoundingBox().isValid() )
|
||||
{
|
||||
size_t dummy;
|
||||
double dummyDouble;
|
||||
lines[0] = RigWellPath::clipPolylineStartAboveZ( lines[0],
|
||||
ownerCase->activeCellsBoundingBox().max().z(),
|
||||
&horizontalProjectedLengthAlongWellPathToClipPoint,
|
||||
&dummyDouble,
|
||||
&dummy );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -586,6 +586,7 @@ bool RigWellPath::isAnyPointInsideBoundingBox( const std::vector<cvf::Vec3d>& po
|
||||
std::vector<cvf::Vec3d> RigWellPath::clipPolylineStartAboveZ( const std::vector<cvf::Vec3d>& polyLine,
|
||||
double maxZ,
|
||||
double* horizontalLengthAlongWellToClipPoint,
|
||||
double* measuredDepthAtFirstClipPoint,
|
||||
size_t* indexToFirstVisibleSegment )
|
||||
{
|
||||
CVF_ASSERT( horizontalLengthAlongWellToClipPoint );
|
||||
@@ -605,7 +606,12 @@ std::vector<cvf::Vec3d> RigWellPath::clipPolylineStartAboveZ( const std::vector<
|
||||
if ( vxIdx > 0 )
|
||||
{
|
||||
cvf::Vec3d segment = polyLine[vxIdx] - polyLine[vxIdx - 1];
|
||||
segment[2] = 0.0;
|
||||
if ( measuredDepthAtFirstClipPoint )
|
||||
{
|
||||
*measuredDepthAtFirstClipPoint += segment.length();
|
||||
}
|
||||
|
||||
segment[2] = 0.0;
|
||||
*horizontalLengthAlongWellToClipPoint += segment.length();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,7 @@ public:
|
||||
static std::vector<cvf::Vec3d> clipPolylineStartAboveZ( const std::vector<cvf::Vec3d>& polyLine,
|
||||
double maxZ,
|
||||
double* horizontalLengthAlongWellToClipPoint,
|
||||
double* measuredDepthAtFirstClipPoint,
|
||||
size_t* indexToFirstVisibleSegment );
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user