Пример #1
0
inline int 
iMesh::getGeometricDimension() const
{
  int err, result;
  iMesh_getGeometricDimension( mInstance, &result, &err );
  return iBase_SUCCESS == err ? result : -err;
}
Пример #2
0
void test_existinterface()
{
    // test construction of an imesh instance from a core instance
  moab::Core *core = new moab::Core();
  MBiMesh *mesh = new MBiMesh(core);
  iMesh_Instance imesh = reinterpret_cast<iMesh_Instance>(mesh);
  
    // make sure we can call imesh functions
  int dim, err;
  iMesh_getGeometricDimension(imesh, &dim, &err);
  CHECK_EQUAL( iBase_SUCCESS, err );

    // now make sure we can delete the instance without it deleting the MOAB instance
  iMesh_dtor(imesh, &err);
  CHECK_EQUAL(err, iBase_SUCCESS);
  
  ErrorCode rval = core->get_number_entities_by_dimension(0, 0, dim);
  CHECK_EQUAL(moab::MB_SUCCESS, rval);

    // finally, delete the MOAB instance
  delete core;
}