mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-14 01:13:52 -06:00
pre-proto - Fixing include error (and starting method to calculate fracture lenght)
This commit is contained in:
parent
08da3e926a
commit
66e2bcd6d8
@ -21,7 +21,8 @@
|
||||
#include "cvfStructGrid.h"
|
||||
#include "cvfGeometryTools.h"
|
||||
|
||||
#include "cafHexGridIntersectionTools\cafHexGridIntersectionTools.h"
|
||||
#include "cafHexGridIntersectionTools/cafHexGridIntersectionTools.h"
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
@ -179,5 +180,32 @@ void RigCellGeometryTools::findCellLocalXYZ(cvf::Vec3d * hexCorners, cvf::Vec3d
|
||||
localYdirection = faceCenterCenterVectorJ - crossPoductIZ;
|
||||
localYdirection.normalize();
|
||||
|
||||
//TODO: Check if we end up with 0-vectors, and handle this case...
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigCellGeometryTools::polygonAreaWeightedLength(cvf::Vec3d directionOfLength, std::vector<cvf::Vec3d> polygon2d)
|
||||
{
|
||||
//TODO: Check that polygon is in xy plane
|
||||
|
||||
//Find bounding box
|
||||
cvf::BoundingBox polygonBBox;
|
||||
for (cvf::Vec3d nodeCoord : polygon2d) polygonBBox.add(nodeCoord);
|
||||
cvf::Vec3d bboxCorners[8];
|
||||
polygonBBox.cornerVertices(bboxCorners);
|
||||
|
||||
|
||||
//Split bounding box in multplie polygons (2D)
|
||||
int resolutionOfLengthCalc = 20;
|
||||
|
||||
|
||||
//Use clipper to find overlap between bbpolygon and fracture
|
||||
|
||||
//Calculate length (max-min) and area
|
||||
|
||||
//Calculate area-weighted average of above vectors.
|
||||
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,6 @@ public:
|
||||
static void createPolygonFromLineSegments(std::list<std::pair<cvf::Vec3d, cvf::Vec3d>> &intersectionLineSegments, std::vector<std::vector<cvf::Vec3d>> &polygons);
|
||||
|
||||
static void findCellLocalXYZ(cvf::Vec3d * hexCorners, cvf::Vec3d &localXdirection, cvf::Vec3d &localYdirection, cvf::Vec3d &localZdirection);
|
||||
|
||||
|
||||
|
||||
static void polygonAreaWeightedLength(cvf::Vec3d directionOfLength, std::vector<cvf::Vec3d> polygon2d);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user