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

@@ -158,13 +158,13 @@ double Riv3dWellLogPlanePartMgr::planeAngle(const Rim3dWellLogCurve::DrawPlane&
switch (drawPlane)
{
case Rim3dWellLogCurve::HORIZONTAL_LEFT:
return cvf::PI_D;
case Rim3dWellLogCurve::HORIZONTAL_RIGHT:
return 0.0;
case Rim3dWellLogCurve::VERTICAL_ABOVE:
return cvf::PI_D / 2.0;
case Rim3dWellLogCurve::VERTICAL_BELOW:
case Rim3dWellLogCurve::HORIZONTAL_RIGHT:
return -cvf::PI_D / 2.0;
case Rim3dWellLogCurve::VERTICAL_ABOVE:
return 0.0;
case Rim3dWellLogCurve::VERTICAL_BELOW:
return cvf::PI_D;
default:
return 0;
}