From: eap Date: Wed, 21 Feb 2007 16:55:17 +0000 (+0000) Subject: PAL13460 (PAL EDF 301 force the mesh to go through a point) X-Git-Tag: V3_2_6a1~53 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=abbf577ef8f9761e05b222283168555ee3013498;p=modules%2Fsmesh.git PAL13460 (PAL EDF 301 force the mesh to go through a point) get only unique nodes of SMDS_PolyhedralVolumeOfNodes --- diff --git a/src/OBJECT/SMESH_Object.cxx b/src/OBJECT/SMESH_Object.cxx index 1e52ccb01..e7637a2f8 100644 --- a/src/OBJECT/SMESH_Object.cxx +++ b/src/OBJECT/SMESH_Object.cxx @@ -29,6 +29,7 @@ #include "SMESH_ActorUtils.h" #include "SMDS_Mesh.hxx" +#include "SMDS_PolyhedralVolumeOfNodes.hxx" #include "SMESH_Actor.h" #include "SMESH_ControlsDef.hxx" #include "SalomeApp_Application.h" @@ -346,14 +347,19 @@ void SMESH_VisualObjDef::buildElemPrs() switch(aType){ case SMDSAbs_Volume:{ std::vector 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 (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]); @@ -395,6 +401,9 @@ void SMESH_VisualObjDef::buildElemPrs() 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]);