{
PPolyedreInfo aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,aMEntity,aGeom);
TInt aNbElem = aPolyedreInfo->GetNbElem();
+
+ int aMNbNodes = aPolyedreInfo->GetNbConn();
+ vector<TInt> aConnect(aMNbNodes);
+ aConnect = aPolyedreInfo->GetConnectivite();
if(!isCellsLoaded){
VISU::TMeshOnEntityImpl::TConnForCellType& aConnForPolyedreType = aCellsConn[aVTKGeomType];
aConnForPolyedreType.resize(aNbElem);
- int aMNbNodes = aPolyedreInfo->GetNbConn();
-
- vector<TInt> aConnect(aMNbNodes);
vector<TInt> aFacesIndex = aPolyedreInfo->GetFacesIndex();
vector<TInt> aIndex = aPolyedreInfo->GetIndex();
for (int iElem = 0; iElem < aNbElem; iElem++) {
+ set<TInt> aArrayNew;
VISU::TMeshOnEntityImpl::TConnect& anArray = aConnForPolyedreType[iElem];
- int aNbConn = aPolyedreInfo->GetNbConn(iElem);
-
- anArray.resize(aNbConn);
-
- aConnect = aPolyedreInfo->GetConnectivite();
int aInd1 = aIndex[iElem]-1;
int aInd2 = aIndex[iElem+1]-2;
- int k = 0;
for (int i=aInd1;i<=aInd2;i++){
- for (int j=aFacesIndex[i]-1;j<aFacesIndex[i+1]-1;j++){
- anArray[k] = aConnect[j]-1;
- k++;
- }
- }
- ADDMSG(MYDEBUG," k="<<k<<"; aNbConn="<<aNbConn<<endl);
+ for (int j=aFacesIndex[i]-1;j<aFacesIndex[i+1]-1;j++){
+ aArrayNew.insert(aConnect[j]);
+ }
+ }
+
+ int aNbConnNew = aArrayNew.size();
+ anArray.resize(aNbConnNew);
+ set<TInt>::iterator aIter = aArrayNew.begin();
+ for (int i=0; aIter!=aArrayNew.end();aIter++, i++)
+ anArray[i] = (*aIter)-1;
+
}
}
if(aFamily){