#1159 Fixed inaccurate position of new fracture when clicking in 3D view

This commit is contained in:
Magne Sjaastad
2017-02-02 07:36:22 +01:00
parent 49e0709dc6
commit 6d95d00863
5 changed files with 61 additions and 26 deletions

View File

@@ -80,8 +80,7 @@ void RicNewWellPathFractureAtPosFeature::onActionTriggered(bool isChecked)
RimWellPathFracture* fracture = new RimWellPathFracture();
fractureCollection->fractures.push_back(fracture);
fracture->setAnchorPosition(wellPathItem->m_pipeCenterlineIntersectionInDomainCoords);
fracture->measuredDepth = wellPathItem->m_measuredDepth;
fracture->setMeasuredDepth(wellPathItem->m_measuredDepth);
RimOilField* oilfield = nullptr;
objHandle->firstAncestorOrThisOfType(oilfield);

View File

@@ -63,7 +63,7 @@ void RicNewWellPathFractureFeature::onActionTriggered(bool isChecked)
fractureCollection->fractures.push_back(fracture);
float md_default = 0.0f;
fracture->measuredDepth = md_default;
fracture->setMeasuredDepth(md_default);
RimWellPath* wellPath = nullptr;
objHandle->firstAncestorOrThisOfType(wellPath);

View File

@@ -63,6 +63,10 @@ bool RicWellPathViewerEventHandler::handleEvent(cvf::Object* eventObject)
cvf::Vec3d domainCoord = transForm->transformToDomainCoord(uiEvent->globalIntersectionPoint);
double measuredDepth = wellPathSourceInfo->measuredDepth(uiEvent->firstPartTriangleIndex, domainCoord);
// NOTE: This computation was used to find the location for a fracture when clicking on a well path
// It turned out that the computation was a bit inaccurate
// Consider to use code in RigSimulationWellCoordsAndMD instead
cvf::Vec3d trueVerticalDepth = wellPathSourceInfo->trueVerticalDepth(uiEvent->firstPartTriangleIndex, domainCoord);
QString wellPathText;