[cgma-dev] r3210 - in cgm/trunk: itaps test

tautges at mcs.anl.gov tautges at mcs.anl.gov
Sun Oct 18 14:55:17 CDT 2009


Author: tautges
Date: 2009-10-18 14:55:17 -0500 (Sun, 18 Oct 2009)
New Revision: 3210

Modified:
   cgm/trunk/itaps/Makefile.am
   cgm/trunk/test/brick.cpp
   cgm/trunk/test/sheet.cpp
   cgm/trunk/test/webcut.cpp
Log:
Updating cgm init process in tests; better reference to .la file in itaps 
build.



Modified: cgm/trunk/itaps/Makefile.am
===================================================================
--- cgm/trunk/itaps/Makefile.am	2009-10-16 16:44:15 UTC (rev 3209)
+++ cgm/trunk/itaps/Makefile.am	2009-10-18 19:55:17 UTC (rev 3210)
@@ -35,7 +35,7 @@
 
 libiGeom_la_includedir = $(includedir)
 
-libiGeom_la_LIBADD = ../libcgm.la
+libiGeom_la_LIBADD = $(top_builddir)/libcgm.la
 
 INCLUDES = -I$(top_srcdir)/util \
            -I$(top_srcdir)/geom \

Modified: cgm/trunk/test/brick.cpp
===================================================================
--- cgm/trunk/test/brick.cpp	2009-10-16 16:44:15 UTC (rev 3209)
+++ cgm/trunk/test/brick.cpp	2009-10-18 19:55:17 UTC (rev 3210)
@@ -8,16 +8,8 @@
 #include "AppUtil.hpp"
 #include "Loop.hpp"
 #include "CoEdge.hpp"
+#include "InitCGMA.hpp"
 
-#ifdef HAVE_OCC
-#  include "OCCQueryEngine.hpp"
-#  include "OCCModifyEngine.hpp"
-#endif
-#ifdef HAVE_ACIS
-#  include "AcisQueryEngine.hpp"
-#  include "AcisModifyEngine.hpp"
-#endif
-
 #include <assert.h>
 #include <algorithm>
 
@@ -35,17 +27,8 @@
 int main( int argc, char* argv[] )
 {
     // Start up CGM
-  AppUtil::instance()->startup(argc, argv);
-  CGMApp::instance()->startup(argc, argv);
-  CubitObserver::init_static_observers();
-#ifdef HAVE_OCC
-  OCCQueryEngine::instance();
-  OCCModifyEngine::instance();
-#endif
-#ifdef HAVE_ACIS
-  AcisQueryEngine::instance();
-  AcisModifyEngine::instance();
-#endif
+  CubitStatus result = InitCGMA::initialize_cgma();
+  if (CUBIT_SUCCESS != result) return 1;
 
     // Create a brick
   Body* brick = GeometryModifyTool::instance()->brick( 2, 2, 2 );

Modified: cgm/trunk/test/sheet.cpp
===================================================================
--- cgm/trunk/test/sheet.cpp	2009-10-16 16:44:15 UTC (rev 3209)
+++ cgm/trunk/test/sheet.cpp	2009-10-18 19:55:17 UTC (rev 3210)
@@ -14,20 +14,11 @@
 #include "RefFace.hpp"
 #include "CubitObserver.hpp"
 #include "InitCGMA.hpp"
+#include "DLIList.hpp"
 
 #include <typeinfo>
 #include <assert.h>
 
-#ifdef HAVE_ACIS
-//#include "AcisModifyEngine.hpp"
-//#include "AcisQueryEngine.hpp"
-#endif
-
-#ifdef HAVE_OCC
-#include "OCCModifyEngine.hpp"
-#include "OCCQueryEngine.hpp"
-#endif
-
 int test_sheet_query( GeometryModifyEngine* engine );
 
 // main program - initialize, then send to proper function
@@ -36,18 +27,11 @@
   CubitStatus result = InitCGMA::initialize_cgma();
   if (CUBIT_SUCCESS != result) return 1;
   
-  GeometryModifyEngine* const gme_list[] = {
-#ifdef HAVE_ACIS
-//    AcisModifyEngine::instance(),
-#endif
-#ifdef HAVE_OCC
-//    OCCModifyEngine::instance(),
-#endif
-    NULL
-  };
+  DLIList<GeometryModifyEngine*> gme_list;
+  GeometryModifyTool::instance()->get_gme_list(gme_list);
 
   int exit_val = 0;
-  for (int i = 0; gme_list[i]; ++i)
+  for (int i = 0; i < gme_list.size(); ++i)
     exit_val += test_sheet_query( gme_list[i] );
 
   return exit_val;
@@ -56,9 +40,6 @@
 
 int test_sheet_query( GeometryModifyEngine* engine )
 {
-//  CubitStatus rval = GeometryModifyTool::instance()->set_default_gme( engine );
-//  assert(rval);
-  
   Body *sphere = 0, *sheet = 0;
   
   sphere = GeometryModifyTool::instance()->sphere( 1.0 );

Modified: cgm/trunk/test/webcut.cpp
===================================================================
--- cgm/trunk/test/webcut.cpp	2009-10-16 16:44:15 UTC (rev 3209)
+++ cgm/trunk/test/webcut.cpp	2009-10-18 19:55:17 UTC (rev 3210)
@@ -13,7 +13,6 @@
 #include "CpuTimer.hpp"
 #include "GeometryModifyTool.hpp"
 #include "GeometryQueryTool.hpp"
-#include "AcisQueryEngine.hpp"
 #include "MergeTool.hpp"
 #include "CubitUtil.hpp"
 #include "CubitMessage.hpp"
@@ -26,11 +25,10 @@
 #include "RefVertex.hpp"
 #include "CubitObserver.hpp"
 #include "CastTo.hpp"
-#include "AcisQueryEngine.hpp"
-#include "AcisModifyEngine.hpp"
 #include "AppUtil.hpp"
 #include "RefEntityFactory.hpp"
 #include "RefEdge.hpp"
+#include "InitCGMA.hpp"
 
 #define STRINGIFY(S) XSTRINGIFY(S)
 #define XSTRINGIFY(S) #S
@@ -59,25 +57,11 @@
 // main program - initialize, then send to proper function
 int main (int argc, char **argv)
 {
-
-  CubitObserver::init_static_observers();
-    // Initialize the GeometryTool
+  CubitStatus result = InitCGMA::initialize_cgma();
+  if (CUBIT_SUCCESS != result) return 1;
   
-  CGMApp::instance()->startup( argc, argv );
-  GeometryQueryTool::instance();
-  AcisQueryEngine::instance();
-  AcisModifyEngine::instance();
-
-    // If there aren't any file arguments, print usage and exit
-  //if (argc == 1) {
-  //  PRINT_INFO("Usage: mergechk <geom_file> [<geom_file> ...]\n");
-  //  exit(0);
-  //}
-  
   CubitStatus status = CUBIT_SUCCESS;
 
-
-
   //Do brick webcut.
   status = webcut_with_brick();
   status = webcut_with_cylinder();



More information about the cgma-dev mailing list