XYZ aVec13( p3 - p1 );
XYZ cross = aVec12.Crossed( aVec13 );
+ if ( myFaceNbNodes[ faceIndex ] == 4 ) {
+ XYZ p4 ( myFaceNodes[3] );
+ XYZ aVec14( p4 - p1 );
+ XYZ cross2 = aVec13.Crossed( aVec14 );
+ cross.x += cross2.x;
+ cross.y += cross2.y;
+ cross.z += cross2.z;
+ }
+
double size = cross.Magnitude();
if ( size <= DBL_MIN )
return false;
// set face nodes
myFaceNodes = new const SMDS_MeshNode* [myFaceNbNodes + 1];
- for ( int iNode = 0; iNode <= myFaceNbNodes; iNode++ )
+ for ( int iNode = 0; iNode < myFaceNbNodes; iNode++ )
myFaceNodes[ iNode ] = myVolumeNodes[ myFaceNodeIndices[ iNode ]];
+ myFaceNodes[ myFaceNbNodes ] = myFaceNodes[ 0 ];
}
myCurFace = faceIndex;