mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
Intersection : Add Python support for triangle and result values (#8505)
Co-authored-by: magnesj <magnesj@users.noreply.github.com>
This commit is contained in:
1 parent
7c4e81f59f
commit
cf45f78aa3
18 files changed
+722
-27
No files matched your search
+34
@@ -438,6 +438,15 @@ void RivExtrudedCurveIntersectionGeometryGenerator::calculateArrays()
|
||||
point1 = point1.getTransformedPoint( invSectionCS );
|
||||
point2 = point2.getTransformedPoint( invSectionCS );
|
||||
|
||||
if ( m_isFlattened )
|
||||
{
|
||||
// The points are transformed in to the XZ-plane with Y = zero.
|
||||
// Set all y values to zero to avoid numerical issues
|
||||
point0.y() = 0.0;
|
||||
point1.y() = 0.0;
|
||||
point2.y() = 0.0;
|
||||
}
|
||||
|
||||
triangleVertices.emplace_back( point0 );
|
||||
triangleVertices.emplace_back( point1 );
|
||||
triangleVertices.emplace_back( point2 );
|
||||
@@ -643,6 +652,31 @@ const cvf::Vec3fArray* RivExtrudedCurveIntersectionGeometryGenerator::triangleVx
|
||||
return m_triangleVxes.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::Vec3fArray* RivExtrudedCurveIntersectionGeometryGenerator::cellMeshVxes() const
|
||||
{
|
||||
CVF_ASSERT( m_cellBorderLineVxes->size() );
|
||||
return m_cellBorderLineVxes.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
const cvf::Vec3fArray* RivExtrudedCurveIntersectionGeometryGenerator::faultMeshVxes() const
|
||||
{
|
||||
return m_faultCellBorderLineVxes.p();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivExtrudedCurveIntersectionGeometryGenerator::ensureGeometryIsCalculated()
|
||||
{
|
||||
calculateArrays();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
+4
@@ -81,6 +81,10 @@ public:
|
||||
const std::vector<size_t>& triangleToCellIndex() const override;
|
||||
const std::vector<RivIntersectionVertexWeights>& triangleVxToCellCornerInterpolationWeights() const override;
|
||||
const cvf::Vec3fArray* triangleVxes() const override;
|
||||
const cvf::Vec3fArray* cellMeshVxes() const override;
|
||||
const cvf::Vec3fArray* faultMeshVxes() const override;
|
||||
|
||||
void ensureGeometryIsCalculated();
|
||||
|
||||
private:
|
||||
void calculateArrays();
|
||||
|
||||
+5
-2
@@ -27,8 +27,11 @@
|
||||
class RivIntersectionGeometryGeneratorInterface
|
||||
{
|
||||
public:
|
||||
virtual bool isAnyGeometryPresent() const = 0;
|
||||
virtual const std::vector<size_t>& triangleToCellIndex() const = 0;
|
||||
virtual ~RivIntersectionGeometryGeneratorInterface() = default;
|
||||
virtual bool isAnyGeometryPresent() const = 0;
|
||||
virtual const std::vector<size_t>& triangleToCellIndex() const = 0;
|
||||
virtual const std::vector<RivIntersectionVertexWeights>& triangleVxToCellCornerInterpolationWeights() const = 0;
|
||||
virtual const cvf::Vec3fArray* triangleVxes() const = 0;
|
||||
virtual const cvf::Vec3fArray* cellMeshVxes() const { return nullptr; };
|
||||
virtual const cvf::Vec3fArray* faultMeshVxes() const { return nullptr; };
|
||||
};
|
||||
Reference in new issue
Block a user