Improve 3D Well path plots

* Always generate in up-direction and rotate to left/right/down
* Generate a "dominant direction" by interrogating the whole curve, not
  just the first and last item.
* Improve maths:
  - Generate a projection plane spanned by UP and the dominant direction.
  - Project the tangent onto this projection plane.
  - Generate normal as the cross product between the projected tangent and
    the normal to the projection plane.
  - Rotate the normal into left/right/down if required.
This commit is contained in:
Gaute Lindkvist
2018-04-13 13:34:41 +02:00
parent 12fcb124c7
commit 6e0b7e2305
3 changed files with 108 additions and 34 deletions

View File

@@ -46,4 +46,9 @@ public:
static void calculatePairsOfClosestSamplingPointsAlongWellPath(const RigWellPath* wellPathGeometry,
const std::vector<cvf::Vec3d>& points,
std::vector<cvf::Vec3d>* closestWellPathPoints);
private:
static std::vector<cvf::Vec3d> interpolateUndefinedNormals(const cvf::Vec3d& planeNormal,
const std::vector<cvf::Vec3d>& normals,
const std::vector<cvf::Vec3d>& vertices);
static cvf::Vec3d estimateDominantDirectionInXYPlane(const RigWellPath* wellPathGeometry);
};