cgma
sheet.cpp File Reference
#include "GeometryModifyTool.hpp"
#include "GeometryModifyEngine.hpp"
#include "GeometryQueryTool.hpp"
#include "ModelQueryEngine.hpp"
#include "Body.hpp"
#include "RefFace.hpp"
#include "CubitObserver.hpp"
#include "InitCGMA.hpp"
#include "DLIList.hpp"
#include <typeinfo>

Go to the source code of this file.

Functions

int test_sheet_query (GeometryModifyEngine *engine)
int main (int argc, char **argv)

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 24 of file sheet.cpp.

{
  CubitStatus result = InitCGMA::initialize_cgma();
  if (CUBIT_SUCCESS != result) return 1;
  
  DLIList<GeometryModifyEngine*> gme_list;
  GeometryModifyTool::instance()->get_gme_list(gme_list);

  int exit_val = 0;
  for (int i = 0; i < gme_list.size(); ++i)
    exit_val += test_sheet_query( gme_list[i] );

  return exit_val;
}

Definition at line 40 of file sheet.cpp.

{
  Body *sphere = 0, *sheet = 0;
  
  sphere = GeometryModifyTool::instance()->sphere( 1.0 );
  if (!sphere) {
    fprintf(stderr,"Sphere creation failed for engine (%s)\n", 
      typeid(*engine).name());
    return 1;
  }

  sheet = GeometryModifyTool::instance()->planar_sheet( 
    CubitVector(0,0,0), CubitVector(1,0,0), 
    CubitVector(1,1,0), CubitVector(0,1,0) );
  if (!sheet) {
    fprintf(stderr,"Planar sheet creation failed for engine (%s)\n", 
      typeid(*engine).name());
    return 1;
  }
  
  if (sphere->is_sheet_body()) {
    fprintf(stderr,"Solid sphere reported as sheet body (%s).\n", 
      typeid(*engine).name());
    return 1;
  }
  
  if (!sheet->is_sheet_body()) {
    fprintf(stderr,"Planar sheet reported as non-sheet body (%s).\n", 
      typeid(*engine).name());
    return 1;
  }
  
  printf("Success (%s)\n",typeid(*engine).name());
  return 0;
}
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines