mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
This commit is contained in:
parent
bef7535eff
commit
06ae9cf155
@ -310,16 +310,18 @@ cvf::ref<cvf::DrawableGeo> RivFemPartGeometryGenerator::createMeshDrawableFromSi
|
||||
|
||||
const int* elmNodeIndices = part->connectivities(elmIdx);
|
||||
|
||||
cvf::Vec3d displayOffset = part->boundingBox().min();
|
||||
|
||||
for (int lfIdx = 0; lfIdx < faceCount; ++lfIdx)
|
||||
{
|
||||
int faceNodeCount = 0;
|
||||
const int* localElmNodeIndicesForFace = RigFemTypes::localElmNodeIndicesForFace(eType, lfIdx, &faceNodeCount);
|
||||
if (faceNodeCount == 4)
|
||||
{
|
||||
vertices.push_back(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[0]]]);
|
||||
vertices.push_back(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[1]]]);
|
||||
vertices.push_back(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[2]]]);
|
||||
vertices.push_back(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[3]]]);
|
||||
vertices.push_back(cvf::Vec3f(cvf::Vec3d(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[0]]]) - displayOffset));
|
||||
vertices.push_back(cvf::Vec3f(cvf::Vec3d(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[1]]]) - displayOffset));
|
||||
vertices.push_back(cvf::Vec3f(cvf::Vec3d(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[2]]]) - displayOffset));
|
||||
vertices.push_back(cvf::Vec3f(cvf::Vec3d(nodeCoordinates[elmNodeIndices[localElmNodeIndicesForFace[3]]]) - displayOffset));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user