- for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ )
- {
- const SMDS_MeshElement* aNode = aNodesIter->next();
- anIdList->SetId( aNodeId, mySMDS2VTKNodes[aNode->GetID()] );
- }
+ switch(aType){
+ case SMDSAbs_Volume:{
+ int* aConnectivities = NULL;
+ GetConnect(aNodesIter,aConnect);
+ // Convertions connectivities from SMDS to VTK
+ switch(aNbNodes){
+ case 4:{
+ static int anIds[] = {0,2,1,3};
+ aConnectivities = anIds;
+ break;
+ }
+ case 5:{
+ static int anIds[] = {0,3,2,1,4};
+ aConnectivities = anIds;
+ break;
+ }
+ case 6:{
+ static int anIds[] = {0,1,2,3,4,5};
+ aConnectivities = anIds;
+ break;
+ }
+ case 8:{
+ static int anIds[] = {0,3,2,1,4,7,6,5};
+ aConnectivities = anIds;
+ break;
+ }}
+
+ if(aConnectivities)
+ for( vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++ )
+ SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);
+
+ break;
+ }
+ default:
+ for( vtkIdType aNodeId = 0; aNodesIter->more(); aNodeId++ ){
+ const SMDS_MeshElement* aNode = aNodesIter->next();
+ anIdList->SetId( aNodeId, mySMDS2VTKNodes[aNode->GetID()] );
+ }
+ }