#include "SMESH_ActorUtils.h"
#include "SMDS_Mesh.hxx"
+#include "SMDS_PolyhedralVolumeOfNodes.hxx"
#include "SMESH_Actor.h"
#include "SMESH_ControlsDef.hxx"
#include "SalomeApp_Application.h"
switch(aType){
case SMDSAbs_Volume:{
std::vector<int> aConnectivities;
- GetConnect(aNodesIter,aConnect);
// Convertions connectivities from SMDS to VTK
if (anElem->IsPoly() && aNbNodes > 3) { // POLYEDRE
- for (int k = 0; k < aNbNodes; k++) {
+
+ if ( const SMDS_PolyhedralVolumeOfNodes* ph =
+ dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*> (anElem))
+ {
+ aNbNodes = GetConnect(ph->uniqueNodesIterator(),aConnect);
+ anIdList->SetNumberOfIds( aNbNodes );
+ }
+ for (int k = 0; k < aNbNodes; k++)
aConnectivities.push_back(k);
- }
- } else if (aNbNodes == 4) {
+ } else if (aNbNodes == 4) {
static int anIds[] = {0,2,1,3};
for (int k = 0; k < aNbNodes; k++) aConnectivities.push_back(anIds[k]);
else {
}
+ if ( aConnect.empty() )
+ GetConnect(aNodesIter,aConnect);
+
if (aConnectivities.size() > 0) {
for (vtkIdType aNodeId = 0; aNodeId < aNbNodes; aNodeId++)
SetId(anIdList,mySMDS2VTKNodes,aConnect,aNodeId,aConnectivities[aNodeId]);