-// Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
// File : SMESH_subMesh_i.cxx
// Author : Paul RASCLE, EDF
//=============================================================================
SMESH_subMesh_i::SMESH_subMesh_i( PortableServer::POA_ptr thePOA,
- SMESH_Gen_i* gen_i,
- SMESH_Mesh_i* mesh_i,
- int localId )
+ SMESH_Gen_i* gen_i,
+ SMESH_Mesh_i* mesh_i,
+ int localId )
: SALOME::GenericObj_i( thePOA )
{
MESSAGE("SMESH_subMesh_i::SMESH_subMesh_i");
TopoDS_Shape S = _mesh_i->_mapSubMesh[ _localId ]->GetSubShape();
if ( !S.IsNull() ) {
aShapeObj = _gen_i->ShapeToGeomObject( S );
- //mzn: N7PAL16232, N7PAL16233
- //In some cases it's possible that GEOM_Client contains the shape same to S, but
- //with another orientation.
- if (aShapeObj->_is_nil())
- aShapeObj = _gen_i->ShapeToGeomObject( S.Reversed() );
+ //mzn: N7PAL16232, N7PAL16233
+ //In some cases it's possible that GEOM_Client contains the shape same to S, but
+ //with another orientation.
+ if (aShapeObj->_is_nil())
+ aShapeObj = _gen_i->ShapeToGeomObject( S.Reversed() );
}
}
}
for (int i = SMESH::Entity_Node; i < SMESH::Entity_Last; i++)
aRes[i] = 0;
- ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
- SMESHDS_SubMesh* aSubMeshDS = 0;
- if (aSubMesh) aSubMeshDS = aSubMesh->GetSubMeshDS();
- if (!aSubMeshDS)
- return aRes._retn();
-
- // get own number of nodes
- aRes[ SMESH::Entity_Node ] = aSubMeshDS->NbNodes();
+ // get number of nodes
+ aRes[ SMESH::Entity_Node ] = GetNumberOfNodes(true);
- // get own elements statistic
- SMESH_Mesh_i::CollectMeshInfo( aSubMeshDS->GetElements(), aRes );
+ ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId];
// get statistic from child sub-meshes
TListOfSubMeshes smList;
if ( getSubMeshes( aSubMesh, smList ) )
for ( TListOfSubMeshes::iterator sm = smList.begin(); sm != smList.end(); ++sm )
- {
- aRes[ SMESH::Entity_Node ]+= (*sm)->NbNodes();
SMESH_Mesh_i::CollectMeshInfo( (*sm)->GetElements(), aRes );
- }
return aRes._retn();
}