#1040 - pre-proto - Updating position of well path fractures when md is changed, and calculaing correct position when creating new well path fracture from project view

This commit is contained in:
astridkbjorke
2017-01-06 13:13:25 +01:00
parent 3f052976f5
commit 2a6cceff62
4 changed files with 53 additions and 3 deletions

View File

@@ -36,6 +36,7 @@
#include "cvfAssert.h"
#include <QAction>
#include "RimWellPath.h"
CAF_CMD_SOURCE_INIT(RicNewWellPathFractureFeature, "RicNewWellPathFractureFeature");
@@ -62,7 +63,18 @@ void RicNewWellPathFractureFeature::onActionTriggered(bool isChecked)
fractureCollection->fractures.push_back(fracture);
fracture->name = "Well Path Fracture";
float md_default = 0.0f;
fracture->measuredDepth = md_default;
RimWellPath* wellPath = nullptr;
objHandle->firstAncestorOrThisOfType(wellPath);
CVF_ASSERT(wellPath);
RigWellPath* wellPathGeometry = wellPath->wellPathGeometry();
cvf::Vec3d positionAtWellpath = wellPathGeometry->interpolatedPointAlongWellPath(md_default);
fracture->positionAtWellpath = positionAtWellpath;
RimOilField* oilfield = nullptr;
objHandle->firstAncestorOrThisOfType(oilfield);
if (!oilfield) return;