This commit is contained in:
Magne Sjaastad
2018-04-23 23:06:21 +02:00
parent a9b1883dc8
commit 9ac3d806e2
3 changed files with 6 additions and 8 deletions

View File

@@ -111,7 +111,7 @@ bool RivWellPathPartMgr::isWellPathWithinBoundingBox(const cvf::BoundingBox& wel
relevantWellpathBBox.add(casemax + addSize); relevantWellpathBBox.add(casemax + addSize);
relevantWellpathBBox.add(casemin - addSize); relevantWellpathBBox.add(casemin - addSize);
if (!RigWellPath::isPolylineTouchingBBox(wellpathCenterLine, relevantWellpathBBox)) if (!RigWellPath::isAnyPointInsideBoundingBox(wellpathCenterLine, relevantWellpathBBox))
{ {
return false; return false;
} }

View File

@@ -282,18 +282,16 @@ std::vector<cvf::Vec3d> RigWellPath::wellPathPointsIncludingInterpolatedIntersec
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RigWellPath::isPolylineTouchingBBox(const std::vector<cvf::Vec3d> &polyLine, bool RigWellPath::isAnyPointInsideBoundingBox(const std::vector<cvf::Vec3d>& points, const cvf::BoundingBox& boundingBox)
const cvf::BoundingBox& caseBB)
{ {
for ( const cvf::Vec3d& point : polyLine ) for (const cvf::Vec3d& point : points)
{ {
if ( caseBB.contains(point) ) return true; if (boundingBox.contains(point)) return true;
} }
return false; return false;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@@ -60,8 +60,8 @@ public:
std::vector<cvf::Vec3d> wellPathPointsIncludingInterpolatedIntersectionPoint(double intersectionMeasuredDepth) const; std::vector<cvf::Vec3d> wellPathPointsIncludingInterpolatedIntersectionPoint(double intersectionMeasuredDepth) const;
static bool isPolylineTouchingBBox(const std::vector<cvf::Vec3d> &polyLine, static bool isAnyPointInsideBoundingBox(const std::vector<cvf::Vec3d>& points, const cvf::BoundingBox& boundingBox);
const cvf::BoundingBox& caseBB);
static std::vector<cvf::Vec3d> clipPolylineStartAboveZ(const std::vector<cvf::Vec3d> &polyLine, static std::vector<cvf::Vec3d> clipPolylineStartAboveZ(const std::vector<cvf::Vec3d> &polyLine,
double maxZ, double maxZ,
double * horizontalLengthAlongWellToClipPoint, double * horizontalLengthAlongWellToClipPoint,