#include <map>
#include <fstream>
#include <cstdio>
-#include <stdlib.h>
+#include <cstdlib>
using namespace std;
using SMESH::TPythonDump;
return error_array._retn();
}
-//
//================================================================================
/*!
* \brief Return mesh elements preventing computation of a subshape
return result._retn();
}
+//================================================================================
+/*!
+ * \brief Create a group of elements preventing computation of a sub-shape
+ */
+//================================================================================
+
+SMESH::ListOfGroups*
+SMESH_Gen_i::MakeGroupsOfBadInputElements( SMESH::SMESH_Mesh_ptr theMesh,
+ CORBA::Short theSubShapeID,
+ const char* theGroupName )
+ throw ( SALOME::SALOME_Exception )
+{
+ Unexpect aCatch(SALOME_SalomeException);
+
+ SMESH::ListOfGroups_var groups;
+
+ if ( CORBA::is_nil( theMesh ) )
+ THROW_SALOME_CORBA_EXCEPTION( "bad Mesh reference",SALOME::BAD_PARAM );
+
+ try {
+ if ( SMESH_Mesh_i* meshServant = SMESH::DownCast<SMESH_Mesh_i*>( theMesh ))
+ {
+ groups = meshServant->MakeGroupsOfBadInputElements( theSubShapeID, theGroupName );
+ TPythonDump() << groups << " = " << this
+ << ".MakeGroupsOfBadInputElements( "
+ << theMesh << ", " << theSubShapeID << ", '" << theGroupName << "' )";
+ }
+ }
+ catch ( SALOME_Exception& S_ex ) {
+ INFOS( "catch exception "<< S_ex.what() );
+ }
+ return groups._retn();
+}
+
//================================================================================
/*!
* \brief Returns errors of hypotheses definintion
CORBA::Short theSubShapeID )
throw ( SALOME::SALOME_Exception );
+ // Create groups of elements preventing computation of a sub-shape
+ SMESH::ListOfGroups* MakeGroupsOfBadInputElements( SMESH::SMESH_Mesh_ptr theMesh,
+ CORBA::Short theSubShapeID,
+ const char* theGroupName)
+ throw ( SALOME::SALOME_Exception );
+
// Get sub-shapes unique ID's list
SMESH::long_array* GetSubShapesId( GEOM::GEOM_Object_ptr theMainShapeObject,
const SMESH::object_array& theListOfSubShape )