(#331) Properly shown POR values by checking for element type.

We are calculating and using an elmNode POR result to correctly
respect the element type.
This commit is contained in:
Jacob Støren
2015-09-28 07:39:57 +02:00
parent 56dae7f71a
commit 5677665dba
6 changed files with 73 additions and 5 deletions

View File

@@ -374,3 +374,17 @@ void RigFemPart::findIntersectingCells(const cvf::BoundingBox& inputBB, std::vec
m_elementSearchTree->findIntersections(inputBB, elementIndices);
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
size_t RigFemPart::elementNodeResultCount() const
{
int lastElmIdx = this->elementCount() - 1;
if (lastElmIdx < 0) return 0;
RigElementType elmType = this->elementType(lastElmIdx);
int elmNodeCount = RigFemTypes::elmentNodeCount(elmType);
size_t lastElmResultIdx = this->elementNodeResultIdx(lastElmIdx, elmNodeCount -1);
return lastElmResultIdx + 1;
}