- if (!theFace) return false;
- const SMDS_FaceOfNodes* F = dynamic_cast<const SMDS_FaceOfNodes*>( theFace );
- if (!F) return false;
-
- const SMDS_MeshNode* aNodes [4], *tmpNode;
- int i = 0;
- SMDS_ElemIteratorPtr it = theFace->nodesIterator();
- while ( it->more() )
- aNodes[ i++ ] = static_cast<const SMDS_MeshNode*>( it->next() );
-
- // exchange nodes with indeces 0 and 2
- tmpNode = aNodes[ 0 ];
- aNodes[ 0 ] = aNodes[ 2 ];
- aNodes[ 2 ] = tmpNode;
-
- //MESSAGE( theFace );
-
- GetMeshDS()->ChangeElementNodes( theFace, aNodes, theFace->NbNodes() );