mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
3D Well Log Curve: Give Plane Part Mgr more responsibility
This commit is contained in:
parent
1369b11e6e
commit
85cd8b0e1d
@ -116,8 +116,11 @@ cvf::ref<cvf::DrawableGeo> Riv3dWellLogCurveGeometryGenerator::createGrid(const
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> pointNormals;
|
std::vector<cvf::Vec3d> pointNormals;
|
||||||
|
|
||||||
|
std::vector<cvf::Vec3d> closestPoints;
|
||||||
|
calculatePairsOfClosestPointsAlongWellPath(&closestPoints, gridPoints);
|
||||||
|
|
||||||
pointNormals = calculatePointNormals(drawPlane, gridPoints);
|
pointNormals = calculateLineSegmentNormals(drawPlane, closestPoints, LINE_SEGMENTS);
|
||||||
if (pointNormals.size() != gridPoints.size()) return nullptr;
|
if (pointNormals.size() != gridPoints.size()) return nullptr;
|
||||||
|
|
||||||
std::vector<cvf::Vec3f> vertices;
|
std::vector<cvf::Vec3f> vertices;
|
||||||
@ -142,7 +145,7 @@ cvf::ref<cvf::DrawableGeo> Riv3dWellLogCurveGeometryGenerator::createGrid(const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// calculateWellPathSegmentNormals returns normals for the whole well path. Erase the part which is clipped off
|
// calculateWellPathSegmentNormals returns normals for the whole well path. Erase the part which is clipped off
|
||||||
std::vector<cvf::Vec3d> wellPathSegmentNormals = calculateWellPathSegmentNormals(drawPlane);
|
std::vector<cvf::Vec3d> wellPathSegmentNormals = calculateLineSegmentNormals(drawPlane, wellPathGeometry()->m_wellPathPoints, POLYLINE);
|
||||||
wellPathSegmentNormals.erase(wellPathSegmentNormals.begin(), wellPathSegmentNormals.end() - wellPathPoints.size());
|
wellPathSegmentNormals.erase(wellPathSegmentNormals.begin(), wellPathSegmentNormals.end() - wellPathPoints.size());
|
||||||
|
|
||||||
// Line along and close to well
|
// Line along and close to well
|
||||||
@ -161,6 +164,7 @@ cvf::ref<cvf::DrawableGeo> Riv3dWellLogCurveGeometryGenerator::createGrid(const
|
|||||||
{
|
{
|
||||||
vertices.push_back(cvf::Vec3f(displayCoordTransform->transformToDisplayCoord(
|
vertices.push_back(cvf::Vec3f(displayCoordTransform->transformToDisplayCoord(
|
||||||
wellPathPoints[i] + wellPathSegmentNormals[i] * (offsetFromWellPathCenter + gridWidth()))));
|
wellPathPoints[i] + wellPathSegmentNormals[i] * (offsetFromWellPathCenter + gridWidth()))));
|
||||||
|
|
||||||
indices.push_back(counter);
|
indices.push_back(counter);
|
||||||
indices.push_back(++counter);
|
indices.push_back(++counter);
|
||||||
}
|
}
|
||||||
@ -231,7 +235,10 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveVerticesAndIndices(const Rim
|
|||||||
|
|
||||||
resultValues.erase(resultValues.begin(), resultValues.end() - interpolatedWellPathPoints.size());
|
resultValues.erase(resultValues.begin(), resultValues.end() - interpolatedWellPathPoints.size());
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> pointNormals = calculatePointNormals(rim3dWellLogCurve->drawPlane(), interpolatedWellPathPoints);
|
std::vector<cvf::Vec3d> closestPoints;
|
||||||
|
calculatePairsOfClosestPointsAlongWellPath(&closestPoints, interpolatedWellPathPoints);
|
||||||
|
|
||||||
|
std::vector<cvf::Vec3d> pointNormals = calculateLineSegmentNormals(rim3dWellLogCurve->drawPlane(), closestPoints, LINE_SEGMENTS);
|
||||||
if (interpolatedWellPathPoints.size() != pointNormals.size()) return;
|
if (interpolatedWellPathPoints.size() != pointNormals.size()) return;
|
||||||
|
|
||||||
double maxResult = -HUGE_VAL;
|
double maxResult = -HUGE_VAL;
|
||||||
@ -279,26 +286,38 @@ void Riv3dWellLogCurveGeometryGenerator::createCurveVerticesAndIndices(const Rim
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
std::vector<cvf::Vec3d> Riv3dWellLogCurveGeometryGenerator::calculatePointNormals(Rim3dWellLogCurve::DrawPlane drawPlane,
|
std::vector<cvf::Vec3d> Riv3dWellLogCurveGeometryGenerator::calculateLineSegmentNormals(Rim3dWellLogCurve::DrawPlane drawPlane,
|
||||||
const std::vector<cvf::Vec3d>& points) const
|
const std::vector<cvf::Vec3d>& vertices,
|
||||||
|
VertexOrganization organization) const
|
||||||
{
|
{
|
||||||
std::vector<cvf::Vec3d> pointNormals;
|
std::vector<cvf::Vec3d> pointNormals;
|
||||||
|
|
||||||
if (!wellPathGeometry()) return pointNormals;
|
if (!wellPathGeometry()) return pointNormals;
|
||||||
if (points.empty()) return pointNormals;
|
if (vertices.empty()) return pointNormals;
|
||||||
|
|
||||||
pointNormals.reserve(points.size());
|
|
||||||
|
|
||||||
const cvf::Vec3d globalDirection =
|
const cvf::Vec3d globalDirection =
|
||||||
(wellPathGeometry()->m_wellPathPoints.back() - wellPathGeometry()->m_wellPathPoints.front()).getNormalized();
|
(wellPathGeometry()->m_wellPathPoints.back() - wellPathGeometry()->m_wellPathPoints.front()).getNormalized();
|
||||||
const cvf::Vec3d up(0, 0, 1);
|
const cvf::Vec3d up(0, 0, 1);
|
||||||
|
|
||||||
for (const cvf::Vec3d point : points)
|
size_t intervalSize;
|
||||||
|
if (organization == LINE_SEGMENTS)
|
||||||
{
|
{
|
||||||
cvf::Vec3d p1 = cvf::Vec3d::UNDEFINED;
|
pointNormals.reserve(vertices.size() / 2);
|
||||||
cvf::Vec3d p2 = cvf::Vec3d::UNDEFINED;
|
intervalSize = 2;
|
||||||
wellPathGeometry()->twoClosestPoints(point, &p1, &p2);
|
}
|
||||||
if (p1.isUndefined() || p2.isUndefined()) continue;
|
else //organization == POLYLINE
|
||||||
|
{
|
||||||
|
pointNormals.reserve(vertices.size());
|
||||||
|
intervalSize = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
cvf::Vec3d normal;
|
||||||
|
|
||||||
|
for (size_t i = 0; i < vertices.size() - 1; i += intervalSize)
|
||||||
|
{
|
||||||
|
cvf::Vec3d p1 = vertices[i];
|
||||||
|
cvf::Vec3d p2 = vertices[i+1];
|
||||||
|
|
||||||
cvf::Vec3d vecAlongPath = (p2 - p1).getNormalized();
|
cvf::Vec3d vecAlongPath = (p2 - p1).getNormalized();
|
||||||
|
|
||||||
@ -318,7 +337,6 @@ std::vector<cvf::Vec3d> Riv3dWellLogCurveGeometryGenerator::calculatePointNormal
|
|||||||
cvf::Vec3d Ey = (up ^ Ex).getNormalized();
|
cvf::Vec3d Ey = (up ^ Ex).getNormalized();
|
||||||
cvf::Vec3d Ez = (Ex ^ Ey).getNormalized();
|
cvf::Vec3d Ez = (Ex ^ Ey).getNormalized();
|
||||||
|
|
||||||
cvf::Vec3d normal;
|
|
||||||
|
|
||||||
switch (drawPlane)
|
switch (drawPlane)
|
||||||
{
|
{
|
||||||
@ -341,75 +359,12 @@ std::vector<cvf::Vec3d> Riv3dWellLogCurveGeometryGenerator::calculatePointNormal
|
|||||||
pointNormals.push_back(normal);
|
pointNormals.push_back(normal);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pointNormals;
|
if (organization == POLYLINE)
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
std::vector<cvf::Vec3d>
|
|
||||||
Riv3dWellLogCurveGeometryGenerator::calculateWellPathSegmentNormals(Rim3dWellLogCurve::DrawPlane drawPlane) const
|
|
||||||
{
|
|
||||||
std::vector<cvf::Vec3d> wellSegmentNormals;
|
|
||||||
|
|
||||||
if (!wellPathGeometry()) return wellSegmentNormals;
|
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> wellPathPoints = wellPathGeometry()->m_wellPathPoints;
|
|
||||||
|
|
||||||
const cvf::Vec3d globalDirection = (wellPathPoints.back() - wellPathPoints.front()).getNormalized();
|
|
||||||
const cvf::Vec3d up(0, 0, 1);
|
|
||||||
|
|
||||||
cvf::Vec3d normal;
|
|
||||||
|
|
||||||
for (size_t i = 0; i < wellPathPoints.size() - 1; i++)
|
|
||||||
{
|
{
|
||||||
cvf::Vec3d p1 = wellPathPoints[i];
|
pointNormals.push_back(normal);
|
||||||
cvf::Vec3d p2 = wellPathPoints[i + 1];
|
|
||||||
|
|
||||||
if (p1.isUndefined() || p2.isUndefined()) continue;
|
|
||||||
|
|
||||||
cvf::Vec3d vecAlongPath = (p2 - p1).getNormalized();
|
|
||||||
|
|
||||||
double dotProduct = up * vecAlongPath;
|
|
||||||
|
|
||||||
cvf::Vec3d Ex;
|
|
||||||
|
|
||||||
if (cvf::Math::abs(dotProduct) > 0.7071)
|
|
||||||
{
|
|
||||||
Ex = globalDirection;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Ex = vecAlongPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
cvf::Vec3d Ey = (up ^ Ex).getNormalized();
|
|
||||||
cvf::Vec3d Ez = (Ex ^ Ey).getNormalized();
|
|
||||||
|
|
||||||
switch (drawPlane)
|
|
||||||
{
|
|
||||||
case Rim3dWellLogCurve::HORIZONTAL_LEFT:
|
|
||||||
normal = -Ey;
|
|
||||||
break;
|
|
||||||
case Rim3dWellLogCurve::HORIZONTAL_RIGHT:
|
|
||||||
normal = Ey;
|
|
||||||
break;
|
|
||||||
case Rim3dWellLogCurve::VERTICAL_ABOVE:
|
|
||||||
normal = Ez;
|
|
||||||
break;
|
|
||||||
case Rim3dWellLogCurve::VERTICAL_BELOW:
|
|
||||||
normal = -Ez;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
wellSegmentNormals.push_back(normal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wellSegmentNormals.push_back(normal);
|
return pointNormals;
|
||||||
|
|
||||||
return wellSegmentNormals;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -417,6 +372,8 @@ std::vector<cvf::Vec3d>
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double Riv3dWellLogCurveGeometryGenerator::wellPathCenterToPlotStartOffset() const
|
double Riv3dWellLogCurveGeometryGenerator::wellPathCenterToPlotStartOffset() const
|
||||||
{
|
{
|
||||||
|
if (!m_gridView) return 0;
|
||||||
|
|
||||||
double cellSize = m_gridView->ownerCase()->characteristicCellSize();
|
double cellSize = m_gridView->ownerCase()->characteristicCellSize();
|
||||||
|
|
||||||
return m_wellPath->wellPathRadius(cellSize) * 2;
|
return m_wellPath->wellPathRadius(cellSize) * 2;
|
||||||
@ -427,7 +384,11 @@ double Riv3dWellLogCurveGeometryGenerator::wellPathCenterToPlotStartOffset() con
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
double Riv3dWellLogCurveGeometryGenerator::gridWidth() const
|
double Riv3dWellLogCurveGeometryGenerator::gridWidth() const
|
||||||
{
|
{
|
||||||
return 400;
|
if (!m_gridView) return 0;
|
||||||
|
|
||||||
|
double cellSize = m_gridView->ownerCase()->characteristicCellSize();
|
||||||
|
|
||||||
|
return m_wellPath->wellPathRadius(cellSize) * 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -437,3 +398,22 @@ const RigWellPath* Riv3dWellLogCurveGeometryGenerator::wellPathGeometry() const
|
|||||||
{
|
{
|
||||||
return m_wellPath->wellPathGeometry();
|
return m_wellPath->wellPathGeometry();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void Riv3dWellLogCurveGeometryGenerator::calculatePairsOfClosestPointsAlongWellPath(std::vector<cvf::Vec3d>* closestWellPathPoints, std::vector<cvf::Vec3d>& points) const
|
||||||
|
{
|
||||||
|
CVF_ASSERT(closestWellPathPoints != nullptr);
|
||||||
|
|
||||||
|
for (const cvf::Vec3d point : points)
|
||||||
|
{
|
||||||
|
cvf::Vec3d p1 = cvf::Vec3d::UNDEFINED;
|
||||||
|
cvf::Vec3d p2 = cvf::Vec3d::UNDEFINED;
|
||||||
|
wellPathGeometry()->twoClosestPoints(point, &p1, &p2);
|
||||||
|
if (p1.isUndefined() || p2.isUndefined()) continue;
|
||||||
|
|
||||||
|
closestWellPathPoints->push_back(p1);
|
||||||
|
closestWellPathPoints->push_back(p2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -47,10 +47,11 @@ class Riv3dWellLogCurveGeometryGenerator : public cvf::Object
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Riv3dWellLogCurveGeometryGenerator(RimWellPath* wellPath, RimGridView* gridView)
|
Riv3dWellLogCurveGeometryGenerator(RimWellPath* wellPath, RimGridView* gridView)
|
||||||
: m_wellPath(wellPath), m_gridView(gridView) {};
|
: m_wellPath(wellPath)
|
||||||
|
, m_gridView(gridView){};
|
||||||
|
|
||||||
cvf::ref<cvf::DrawableGeo> createCurveLine(const caf::DisplayCoordTransform* displayCoordTransform,
|
cvf::ref<cvf::DrawableGeo> createCurveLine(const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||||
const Rim3dWellLogCurve* rim3dWellLogCurve) const;
|
const Rim3dWellLogCurve* rim3dWellLogCurve) const;
|
||||||
|
|
||||||
cvf::ref<cvf::DrawableGeo> createGrid(const caf::DisplayCoordTransform* displayCoordTransform,
|
cvf::ref<cvf::DrawableGeo> createGrid(const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
@ -58,6 +59,13 @@ public:
|
|||||||
const Rim3dWellLogCurve::DrawPlane drawPlane,
|
const Rim3dWellLogCurve::DrawPlane drawPlane,
|
||||||
double gridIntervalSize) const;
|
double gridIntervalSize) const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
enum VertexOrganization
|
||||||
|
{
|
||||||
|
LINE_SEGMENTS,
|
||||||
|
POLYLINE
|
||||||
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createCurveVerticesAndIndices(const Rim3dWellLogCurve* rim3dWellLogCurve,
|
void createCurveVerticesAndIndices(const Rim3dWellLogCurve* rim3dWellLogCurve,
|
||||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
@ -65,16 +73,18 @@ private:
|
|||||||
std::vector<cvf::Vec3f>* vertices,
|
std::vector<cvf::Vec3f>* vertices,
|
||||||
std::vector<cvf::uint>* indices) const;
|
std::vector<cvf::uint>* indices) const;
|
||||||
|
|
||||||
std::vector<cvf::Vec3d> calculatePointNormals(Rim3dWellLogCurve::DrawPlane drawPlane,
|
std::vector<cvf::Vec3d> calculateLineSegmentNormals(Rim3dWellLogCurve::DrawPlane drawPlane,
|
||||||
const std::vector<cvf::Vec3d>& points) const;
|
const std::vector<cvf::Vec3d>& vertices,
|
||||||
|
VertexOrganization organization) const;
|
||||||
std::vector<cvf::Vec3d> calculateWellPathSegmentNormals(Rim3dWellLogCurve::DrawPlane drawPlane) const;
|
|
||||||
|
|
||||||
double wellPathCenterToPlotStartOffset() const;
|
double wellPathCenterToPlotStartOffset() const;
|
||||||
double gridWidth() const;
|
double gridWidth() const;
|
||||||
|
|
||||||
const RigWellPath* wellPathGeometry() const;
|
const RigWellPath* wellPathGeometry() const;
|
||||||
|
|
||||||
|
void calculatePairsOfClosestPointsAlongWellPath(std::vector<cvf::Vec3d>* closestWellPathPoints,
|
||||||
|
std::vector<cvf::Vec3d>& points) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmPointer<RimWellPath> m_wellPath;
|
caf::PdmPointer<RimWellPath> m_wellPath;
|
||||||
caf::PdmPointer<RimGridView> m_gridView;
|
caf::PdmPointer<RimGridView> m_gridView;
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include "Riv3dWellLogPlanePartMgr.h"
|
#include "Riv3dWellLogPlanePartMgr.h"
|
||||||
|
|
||||||
|
#include "Rim3dWellLogCurveCollection.h"
|
||||||
#include "RimGridView.h"
|
#include "RimGridView.h"
|
||||||
#include "RimWellPath.h"
|
#include "RimWellPath.h"
|
||||||
|
|
||||||
@ -41,6 +42,39 @@ Riv3dWellLogPlanePartMgr::Riv3dWellLogPlanePartMgr(RimWellPath* wellPath, RimGri
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void Riv3dWellLogPlanePartMgr::appendPlaneToModel(cvf::ModelBasicList* model,
|
||||||
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
|
const cvf::BoundingBox& wellPathClipBoundingBox)
|
||||||
|
{
|
||||||
|
if (m_wellPath.isNull()) return;
|
||||||
|
|
||||||
|
if (!m_wellPath->rim3dWellLogCurveCollection()) return;
|
||||||
|
|
||||||
|
if (!m_wellPath->rim3dWellLogCurveCollection()->showPlot()) return;
|
||||||
|
|
||||||
|
if (m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty()) return;
|
||||||
|
|
||||||
|
append3dWellLogCurvesToModel(model, displayCoordTransform, wellPathClipBoundingBox);
|
||||||
|
|
||||||
|
if (m_wellPath->rim3dWellLogCurveCollection()->showGrid())
|
||||||
|
{
|
||||||
|
std::map<Rim3dWellLogCurve::DrawPlane, bool> drawPlanes;
|
||||||
|
|
||||||
|
for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves())
|
||||||
|
{
|
||||||
|
drawPlanes[rim3dWellLogCurve->drawPlane()];
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const std::pair<Rim3dWellLogCurve::DrawPlane, bool>& drawPlane : drawPlanes)
|
||||||
|
{
|
||||||
|
appendGridToModel(model, displayCoordTransform, wellPathClipBoundingBox, drawPlane.first, 400);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -48,16 +82,16 @@ void Riv3dWellLogPlanePartMgr::append3dWellLogCurvesToModel(cvf::ModelBasicList*
|
|||||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
const cvf::BoundingBox& wellPathClipBoundingBox)
|
const cvf::BoundingBox& wellPathClipBoundingBox)
|
||||||
{
|
{
|
||||||
std::vector<Rim3dWellLogCurve*> rim3dWellLogCurves = m_wellPath->vectorOf3dWellLogCurves();
|
|
||||||
if (rim3dWellLogCurves.empty()) return;
|
|
||||||
if (m_wellPath.isNull()) return;
|
if (m_wellPath.isNull()) return;
|
||||||
|
|
||||||
|
if (m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves().empty()) return;
|
||||||
|
|
||||||
if (m_3dWellLogCurveGeometryGenerator.isNull())
|
if (m_3dWellLogCurveGeometryGenerator.isNull())
|
||||||
{
|
{
|
||||||
m_3dWellLogCurveGeometryGenerator = new Riv3dWellLogCurveGeometryGenerator(m_wellPath.p(), m_gridView);
|
m_3dWellLogCurveGeometryGenerator = new Riv3dWellLogCurveGeometryGenerator(m_wellPath.p(), m_gridView);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Rim3dWellLogCurve* rim3dWellLogCurve : rim3dWellLogCurves)
|
for (Rim3dWellLogCurve* rim3dWellLogCurve : m_wellPath->rim3dWellLogCurveCollection()->vectorOf3dWellLogCurves())
|
||||||
{
|
{
|
||||||
if (!rim3dWellLogCurve->toggleState()) continue;
|
if (!rim3dWellLogCurve->toggleState()) continue;
|
||||||
|
|
||||||
@ -99,11 +133,14 @@ cvf::ref<cvf::Part> Riv3dWellLogPlanePartMgr::createPart(cvf::Drawable* drawable
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void Riv3dWellLogPlanePartMgr::appendGridToModel(cvf::ModelBasicList* model,
|
void Riv3dWellLogPlanePartMgr::appendGridToModel(cvf::ModelBasicList* model,
|
||||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||||
double gridIntervalSize)
|
const Rim3dWellLogCurve::DrawPlane& drawPlane,
|
||||||
|
double gridIntervalSize)
|
||||||
{
|
{
|
||||||
|
if (m_wellPath.isNull()) return;
|
||||||
|
|
||||||
if (m_3dWellLogCurveGeometryGenerator.isNull())
|
if (m_3dWellLogCurveGeometryGenerator.isNull())
|
||||||
{
|
{
|
||||||
m_3dWellLogCurveGeometryGenerator = new Riv3dWellLogCurveGeometryGenerator(m_wellPath.p(), m_gridView);
|
m_3dWellLogCurveGeometryGenerator = new Riv3dWellLogCurveGeometryGenerator(m_wellPath.p(), m_gridView);
|
||||||
@ -113,19 +150,7 @@ void Riv3dWellLogPlanePartMgr::appendGridToModel(cvf::ModelBasicList*
|
|||||||
|
|
||||||
{
|
{
|
||||||
cvf::ref<cvf::Drawable> gridHorizontalDrawable = m_3dWellLogCurveGeometryGenerator->createGrid(
|
cvf::ref<cvf::Drawable> gridHorizontalDrawable = m_3dWellLogCurveGeometryGenerator->createGrid(
|
||||||
displayCoordTransform, wellPathClipBoundingBox, Rim3dWellLogCurve::HORIZONTAL_LEFT, gridIntervalSize);
|
displayCoordTransform, wellPathClipBoundingBox, drawPlane, gridIntervalSize);
|
||||||
|
|
||||||
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
|
||||||
cvf::ref<cvf::Part> part = createPart(gridHorizontalDrawable.p(), effect.p());
|
|
||||||
|
|
||||||
if (part.notNull())
|
|
||||||
{
|
|
||||||
model->addPart(part.p());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
{
|
|
||||||
cvf::ref<cvf::Drawable> gridHorizontalDrawable = m_3dWellLogCurveGeometryGenerator->createGrid(
|
|
||||||
displayCoordTransform, wellPathClipBoundingBox, Rim3dWellLogCurve::HORIZONTAL_RIGHT, gridIntervalSize);
|
|
||||||
|
|
||||||
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
cvf::ref<cvf::Effect> effect = meshEffectGen.generateCachedEffect();
|
||||||
cvf::ref<cvf::Part> part = createPart(gridHorizontalDrawable.p(), effect.p());
|
cvf::ref<cvf::Part> part = createPart(gridHorizontalDrawable.p(), effect.p());
|
||||||
|
@ -50,16 +50,19 @@ class Riv3dWellLogPlanePartMgr : public cvf::Object
|
|||||||
public:
|
public:
|
||||||
Riv3dWellLogPlanePartMgr(RimWellPath* wellPath, RimGridView* gridView);
|
Riv3dWellLogPlanePartMgr(RimWellPath* wellPath, RimGridView* gridView);
|
||||||
|
|
||||||
|
void appendPlaneToModel(cvf::ModelBasicList* model,
|
||||||
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
|
const cvf::BoundingBox& wellPathClipBoundingBox);
|
||||||
|
private:
|
||||||
void append3dWellLogCurvesToModel(cvf::ModelBasicList* model,
|
void append3dWellLogCurvesToModel(cvf::ModelBasicList* model,
|
||||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
const cvf::BoundingBox& wellPathClipBoundingBox);
|
const cvf::BoundingBox& wellPathClipBoundingBox);
|
||||||
|
|
||||||
void appendGridToModel(cvf::ModelBasicList* model,
|
void appendGridToModel(cvf::ModelBasicList* model,
|
||||||
const caf::DisplayCoordTransform* displayCoordTransform,
|
const caf::DisplayCoordTransform* displayCoordTransform,
|
||||||
const cvf::BoundingBox& wellPathClipBoundingBox,
|
const cvf::BoundingBox& wellPathClipBoundingBox,
|
||||||
double gridIntervalSize);
|
const Rim3dWellLogCurve::DrawPlane& drawPlane,
|
||||||
|
double gridIntervalSize);
|
||||||
private:
|
|
||||||
cvf::ref<cvf::Part> createPart(cvf::Drawable* drawable, cvf::Effect* effect);
|
cvf::ref<cvf::Part> createPart(cvf::Drawable* drawable, cvf::Effect* effect);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -540,22 +540,11 @@ void RivWellPathPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicList*
|
|||||||
appendPerforationsToModel(model, timeStepIndex, displayCoordTransform, characteristicCellSize, false);
|
appendPerforationsToModel(model, timeStepIndex, displayCoordTransform, characteristicCellSize, false);
|
||||||
appendVirtualTransmissibilitiesToModel(model, timeStepIndex, displayCoordTransform, characteristicCellSize);
|
appendVirtualTransmissibilitiesToModel(model, timeStepIndex, displayCoordTransform, characteristicCellSize);
|
||||||
|
|
||||||
if (!m_rimWellPath->rim3dWellLogCurveCollection()) return;
|
|
||||||
if (!m_rimWellPath->rim3dWellLogCurveCollection()->showPlot()) return;
|
|
||||||
if (m_rimWellPath->vectorOf3dWellLogCurves().empty()) return;
|
|
||||||
|
|
||||||
RimGridView* gridView = dynamic_cast<RimGridView*>(m_rimView.p());
|
RimGridView* gridView = dynamic_cast<RimGridView*>(m_rimView.p());
|
||||||
if (!gridView) return;
|
if (!gridView) return;
|
||||||
|
|
||||||
m_3dWellLogCurvePartMgr = new Riv3dWellLogPlanePartMgr(m_rimWellPath, gridView);
|
m_3dWellLogPlanePartMgr = new Riv3dWellLogPlanePartMgr(m_rimWellPath, gridView);
|
||||||
m_3dWellLogCurvePartMgr->append3dWellLogCurvesToModel(model,
|
m_3dWellLogPlanePartMgr->appendPlaneToModel(model, displayCoordTransform, wellPathClipBoundingBox);
|
||||||
displayCoordTransform,
|
|
||||||
wellPathClipBoundingBox);
|
|
||||||
|
|
||||||
if (m_rimWellPath->rim3dWellLogCurveCollection()->showGrid())
|
|
||||||
{
|
|
||||||
m_3dWellLogCurvePartMgr->appendGridToModel(model, displayCoordTransform, wellPathClipBoundingBox, 800);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -124,6 +124,6 @@ private:
|
|||||||
cvf::ref<cvf::DrawableGeo> m_centerLineDrawable;
|
cvf::ref<cvf::DrawableGeo> m_centerLineDrawable;
|
||||||
cvf::ref<cvf::Part> m_wellLabelPart;
|
cvf::ref<cvf::Part> m_wellLabelPart;
|
||||||
|
|
||||||
cvf::ref<Riv3dWellLogPlanePartMgr> m_3dWellLogCurvePartMgr;
|
cvf::ref<Riv3dWellLogPlanePartMgr> m_3dWellLogPlanePartMgr;
|
||||||
cvf::ref<RivWellConnectionFactorPartMgr> m_wellConnectionFactorPartMgr;
|
cvf::ref<RivWellConnectionFactorPartMgr> m_wellConnectionFactorPartMgr;
|
||||||
};
|
};
|
||||||
|
@ -809,14 +809,6 @@ void RimWellPath::add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve)
|
|||||||
m_3dWellLogCurves->add3dWellLogCurve(rim3dWellLogCurve);
|
m_3dWellLogCurves->add3dWellLogCurve(rim3dWellLogCurve);
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
std::vector<Rim3dWellLogCurve*> RimWellPath::vectorOf3dWellLogCurves() const
|
|
||||||
{
|
|
||||||
return m_3dWellLogCurves->vectorOf3dWellLogCurves();
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -80,7 +80,6 @@ public:
|
|||||||
const RigWellPathFormations* formationsGeometry() const;
|
const RigWellPathFormations* formationsGeometry() const;
|
||||||
|
|
||||||
void add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve);
|
void add3dWellLogCurve(Rim3dWellLogCurve* rim3dWellLogCurve);
|
||||||
std::vector<Rim3dWellLogCurve*> vectorOf3dWellLogCurves() const;
|
|
||||||
Rim3dWellLogCurveCollection* rim3dWellLogCurveCollection() const;
|
Rim3dWellLogCurveCollection* rim3dWellLogCurveCollection() const;
|
||||||
|
|
||||||
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
virtual caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user