Description: Get entities and report non-vertex entity connectivity and vertex adjacencies.
then delete edges, and write result To run: ./DeleteEdges [meshfile] [outfile]
#include <iostream>
using namespace std;
#ifndef MESH_DIR
#define MESH_DIR "."
#endif
int main(
int argc,
char** argv )
{
if( argc > 1 )
{
}
Core*
mb =
new( std::nothrow ) Core;
if( NULL ==
mb )
return 1;
Range ents;
rval =
mb->get_entities_by_handle( 0, ents );
MB_CHK_ERR( rval );
{
{
Range adjs;
rval =
mb->get_adjacencies( &( *it ), 1, 3,
false, adjs );
MB_CHK_ERR( rval );
cout <<
"Vertex " <<
mb->id_from_handle( *it ) <<
" adjacencies:" << endl;
adjs.print();
}
{
int num_connect;
rval =
mb->get_connectivity( *it, connect, num_connect );
MB_CHK_ERR( rval );
<< " vertex connectivity is: ";
for( int i = 0; i < num_connect; i++ )
cout <<
mb->id_from_handle( connect[i] ) <<
" ";
cout << endl;
}
}
return 0;
}