mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Changes based on review
This commit is contained in:
@@ -584,18 +584,15 @@ 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 )
|
||||
const double maxZ,
|
||||
double& horizontalLengthAlongWellToClipPoint,
|
||||
double& measuredDepthAtFirstClipPoint,
|
||||
size_t& indexToFirstVisibleSegment )
|
||||
{
|
||||
CVF_ASSERT( horizontalLengthAlongWellToClipPoint );
|
||||
CVF_ASSERT( indexToFirstVisibleSegment );
|
||||
|
||||
// Find first visible point, and accumulate distance along wellpath
|
||||
|
||||
*horizontalLengthAlongWellToClipPoint = 0.0;
|
||||
*indexToFirstVisibleSegment = cvf::UNDEFINED_SIZE_T;
|
||||
horizontalLengthAlongWellToClipPoint = 0.0;
|
||||
indexToFirstVisibleSegment = cvf::UNDEFINED_SIZE_T;
|
||||
|
||||
size_t firstVisiblePointIndex = cvf::UNDEFINED_SIZE_T;
|
||||
|
||||
@@ -606,13 +603,10 @@ std::vector<cvf::Vec3d> RigWellPath::clipPolylineStartAboveZ( const std::vector<
|
||||
if ( vxIdx > 0 )
|
||||
{
|
||||
cvf::Vec3d segment = polyLine[vxIdx] - polyLine[vxIdx - 1];
|
||||
if ( measuredDepthAtFirstClipPoint )
|
||||
{
|
||||
*measuredDepthAtFirstClipPoint += segment.length();
|
||||
}
|
||||
measuredDepthAtFirstClipPoint += segment.length();
|
||||
|
||||
segment[2] = 0.0;
|
||||
*horizontalLengthAlongWellToClipPoint += segment.length();
|
||||
horizontalLengthAlongWellToClipPoint += segment.length();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -641,16 +635,16 @@ std::vector<cvf::Vec3d> RigWellPath::clipPolylineStartAboveZ( const std::vector<
|
||||
{
|
||||
cvf::Vec3d segment = intersection - polyLine[firstVisiblePointIndex - 1];
|
||||
segment[2] = 0.0;
|
||||
*horizontalLengthAlongWellToClipPoint += segment.length();
|
||||
horizontalLengthAlongWellToClipPoint += segment.length();
|
||||
|
||||
clippedPolyLine.push_back( intersection );
|
||||
}
|
||||
|
||||
*indexToFirstVisibleSegment = firstVisiblePointIndex - 1;
|
||||
indexToFirstVisibleSegment = firstVisiblePointIndex - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
*indexToFirstVisibleSegment = 0;
|
||||
indexToFirstVisibleSegment = 0;
|
||||
}
|
||||
|
||||
// Add the rest of the polyline
|
||||
|
||||
Reference in New Issue
Block a user