if ( aMeshDimension == 2 && anIsZDimension ) // 2D only if mesh is in XOY plane
aMeshDimension = 3;
// PAL18941(a saved study with a mesh belong Z is opened and the mesh is belong X)
- if ( aMeshDimension == 1 && !anIsXDimension ) // 1D only if mesh is along OX
+ if ( aMeshDimension == 1 && !anIsXDimension ) {// 1D only if mesh is along OX
if ( anIsYDimension ) {
aMeshDimension = 2;
anIsXDimension = true;
} else {
aMeshDimension = 3;
}
+ }
}
SMDS_NodeIteratorPtr aNodesIter = myMesh->nodesIterator(/*idInceasingOrder=*/true);
int myFacesDefaultFamilyId = 0;
int myVolumesDefaultFamilyId = 0;
int nbNodes = myMesh->NbNodes();
- int nb0DElements = myMesh->Nb0DElements();
+ //int nb0DElements = myMesh->Nb0DElements();
int nbEdges = myMesh->NbEdges();
int nbFaces = myMesh->NbFaces();
int nbVolumes = myMesh->NbVolumes();
nbElemInfo.NbHexas( ORDER_QUADRATIC ),
SMDSAbs_Volume));
if ( polyTypesSupported ) {
+ //MESSAGE("polyTypesSupported");
aTElemTypeDatas.push_back( TElemTypeData(anEntity,
ePOLYEDRE,
nbElemInfo.NbPolyhedrons(),
// ----------------
else if (aElemTypeData->_geomType == ePOLYEDRE )
{
+ //MESSAGE("_geomType == ePOLYEDRE");
if ( nbPolyhedronNodes == 0 ) {
// Count nb of nodes
while ( const SMDS_MeshElement* anElem = elemIterator->next() ) {
- const SMDS_PolyhedralVolumeOfNodes* aPolyedre =
- dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*>( anElem );
- if ( aPolyedre ) {
+ const SMDS_VtkVolume *aPolyedre = dynamic_cast<const SMDS_VtkVolume*>(anElem);
+ if ( aPolyedre && aPolyedre->IsPoly()) {
nbPolyhedronNodes += aPolyedre->NbNodes();
nbPolyhedronFaces += aPolyedre->NbFaces();
if ( ++iElem == aElemTypeData->_nbElems )
break;
}
}
+ //MESSAGE("nbPolyhedronNodes=" << nbPolyhedronNodes);
+ //MESSAGE("nbPolyhedronFaces=" << nbPolyhedronFaces);
+ //MESSAGE("_nbElems="<< aElemTypeData->_nbElems);
}
else {
// Store in med file
TInt iFace = 0, iNode = 0;
while ( const SMDS_MeshElement* anElem = elemIterator->next() )
{
- const SMDS_PolyhedralVolumeOfNodes* aPolyedre =
- dynamic_cast<const SMDS_PolyhedralVolumeOfNodes*>( anElem );
+ const SMDS_VtkVolume *aPolyedre = dynamic_cast<const SMDS_VtkVolume*>(anElem);
if ( !aPolyedre )
continue;
-
+ if ( !aPolyedre->IsPoly() )
+ continue;
+ //MESSAGE("index[" << iElem << "]=" << index[iElem] << " iElem=" << iElem);
// index
TInt aNbFaces = aPolyedre->NbFaces();
index[ iElem+1 ] = index[ iElem ] + aNbFaces;
+ //MESSAGE("index[" << iElem+1 << "]=" << index[iElem+1] << " iElem=" << iElem);
// face index
for (TInt f = 1; f <= aNbFaces; ++f, ++iFace ) {
int aNbFaceNodes = aPolyedre->NbFaceNodes( f );
faces[ iFace+1 ] = faces[ iFace ] + aNbFaceNodes;
+ //MESSAGE("faces[" << iFace+1 << "]=" << faces[iFace+1] << " iFace=" << iFace);
}
// connectivity
SMDS_ElemIteratorPtr nodeIt = anElem->nodesIterator();
const SMDS_MeshElement* aNode = nodeIt->next();
#ifdef _EDF_NODE_IDS_
conn[ iNode ] = aNodeIdMap[aNode->GetID()];
+ //MESSAGE("conn["<< iNode << "]=" << conn[iNode] << " aNode->GetID()=" << aNode->GetID());
#else
conn[ iNode ] = aNode->GetID();
+ //MESSAGE("conn["<< iNode << "]=" << conn[iNode]);
#endif
++iNode;
}
}
catch(const std::exception& exc) {
- INFOS("Follow exception was cought:\n\t"<<exc.what());
+ INFOS("The following exception was caught:\n\t"<<exc.what());
throw;
}
catch(...) {
- INFOS("Unknown exception was cought !!!");
+ INFOS("Unknown exception was caught !!!");
throw;
}