0021275: EDF 1681 SMESH: Find the number of nodes of any group

0021359: [CEA] Mesh information
This commit is contained in:
vsr 2011-10-04 13:14:47 +00:00
parent 4fc70c1e15
commit 5d42bfdbec
4 changed files with 46 additions and 0 deletions

View File

@ -306,6 +306,12 @@ module SMESH
void Clear() void Clear()
raises (SALOME::SALOME_Exception); raises (SALOME::SALOME_Exception);
/*!
* Get the list of sub-meshes existing in the mesh
*/
submesh_array GetSubMeshes()
raises (SALOME::SALOME_Exception);
/*! /*!
* Remove all nodes and elements of submesh * Remove all nodes and elements of submesh
*/ */

View File

@ -76,6 +76,7 @@
<parameter name="auto_groups" value="false"/> <parameter name="auto_groups" value="false"/>
<parameter name="show_result_notification" value="2"/> <parameter name="show_result_notification" value="2"/>
<parameter name="mesh_elem_info" value="1"/> <parameter name="mesh_elem_info" value="1"/>
<parameter name="info_groups_nodes_limit" value="100000"/>
<parameter name="segmentation" value="10"/> <parameter name="segmentation" value="10"/>
<parameter name="nb_segments_per_edge" value="15"/> <parameter name="nb_segments_per_edge" value="15"/>
<parameter name="quadratic_mode" value="0"/> <parameter name="quadratic_mode" value="0"/>

View File

@ -665,6 +665,42 @@ throw(SALOME::SALOME_Exception)
return aList._retn(); return aList._retn();
} }
SMESH::submesh_array* SMESH_Mesh_i::GetSubMeshes() throw (SALOME::SALOME_Exception)
{
Unexpect aCatch(SALOME_SalomeException);
if (MYDEBUG) MESSAGE("GetSubMeshes");
SMESH::submesh_array_var aList = new SMESH::submesh_array();
// Python Dump
TPythonDump aPythonDump;
if ( !_mapSubMeshIor.empty() )
aPythonDump << "[ ";
try {
aList->length( _mapSubMeshIor.size() );
int i = 0;
map<int, SMESH::SMESH_subMesh_ptr>::iterator it = _mapSubMeshIor.begin();
for ( ; it != _mapSubMeshIor.end(); it++ ) {
if ( CORBA::is_nil( it->second )) continue;
aList[i++] = SMESH::SMESH_subMesh::_duplicate( it->second );
// Python Dump
if (i > 1) aPythonDump << ", ";
aPythonDump << it->second;
}
aList->length( i );
}
catch(SALOME_Exception & S_ex) {
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
}
// Update Python script
if ( !_mapSubMeshIor.empty() )
aPythonDump << " ] = " << _this() << ".GetSubMeshes()";
return aList._retn();
}
//============================================================================= //=============================================================================
/*! /*!
* *

View File

@ -88,6 +88,9 @@ public:
SMESH::ListOfHypothesis* GetHypothesisList(GEOM::GEOM_Object_ptr aSubShapeObject) SMESH::ListOfHypothesis* GetHypothesisList(GEOM::GEOM_Object_ptr aSubShapeObject)
throw (SALOME::SALOME_Exception); throw (SALOME::SALOME_Exception);
SMESH::submesh_array* GetSubMeshes()
throw (SALOME::SALOME_Exception);
SMESH::SMESH_subMesh_ptr GetSubMesh(GEOM::GEOM_Object_ptr aSubShapeObject, const char* theName) SMESH::SMESH_subMesh_ptr GetSubMesh(GEOM::GEOM_Object_ptr aSubShapeObject, const char* theName)
throw (SALOME::SALOME_Exception); throw (SALOME::SALOME_Exception);