[cgma-dev] r4460 - in cgm/branches/merge-cubit12: . cgm_apps/ccapi/geom cgm_apps/cgm_cubit_acis cgm_apps/examples/driverc++ cgm_apps/examples/gomadrive geom geom/testing geom/testing/data itaps test util

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Fri Jan 21 13:47:05 CST 2011


Author: kraftche
Date: 2011-01-21 13:47:04 -0600 (Fri, 21 Jan 2011)
New Revision: 4460

Added:
   cgm/branches/merge-cubit12/geom/CubitCompat.cpp
   cgm/branches/merge-cubit12/geom/CubitCompat.h.in
   cgm/branches/merge-cubit12/geom/CubitCompat.hpp
Modified:
   cgm/branches/merge-cubit12/Makefile.am
   cgm/branches/merge-cubit12/cgm_apps/ccapi/geom/GeometryTool_ccapi.cpp
   cgm/branches/merge-cubit12/cgm_apps/cgm_cubit_acis/main_cubit_acis.cpp
   cgm/branches/merge-cubit12/cgm_apps/examples/driverc++/mergechk.cpp
   cgm/branches/merge-cubit12/cgm_apps/examples/gomadrive/gm_cgm_c_interface.C
   cgm/branches/merge-cubit12/configure.ac
   cgm/branches/merge-cubit12/geom/GeometryQueryTool.hpp
   cgm/branches/merge-cubit12/geom/Makefile.am
   cgm/branches/merge-cubit12/geom/testing/AngleCalc.cpp
   cgm/branches/merge-cubit12/geom/testing/CMakeLists.txt
   cgm/branches/merge-cubit12/geom/testing/CreateGeometry.cpp
   cgm/branches/merge-cubit12/geom/testing/GraphicsData.cpp
   cgm/branches/merge-cubit12/geom/testing/ReadIgesFile.cpp
   cgm/branches/merge-cubit12/geom/testing/TestConfig.h.in
   cgm/branches/merge-cubit12/geom/testing/TestUtilities.cpp
   cgm/branches/merge-cubit12/geom/testing/TestUtilities.hpp
   cgm/branches/merge-cubit12/geom/testing/cgm_test.hpp
   cgm/branches/merge-cubit12/geom/testing/data/
   cgm/branches/merge-cubit12/itaps/iGeom_CGMA.cc
   cgm/branches/merge-cubit12/test/makept.cpp
   cgm/branches/merge-cubit12/test/merge_test.cpp
   cgm/branches/merge-cubit12/test/modify.cpp
   cgm/branches/merge-cubit12/test/operation.cpp
   cgm/branches/merge-cubit12/test/r_w.cpp
   cgm/branches/merge-cubit12/test/subtract.cpp
   cgm/branches/merge-cubit12/test/test_occ.cpp
   cgm/branches/merge-cubit12/test/webcut.cpp
   cgm/branches/merge-cubit12/util/CubitDefines.h
Log:
Make CGM buildable against any of Cubit 12.0, 12.1, or 12.2
 o includes configure test for cubit version
 o includes preprocessor gunk in GeometryQueryTool to get APIs correct
 o includes CubitCompat.hpp header defining compatability versions of
     import/export functions
 o All tests except getting pre-defined tags in itaps/testgeom pass with
    cubit 12.0 and 12.1.  There are additional errors in itaps/testgeom
    with Cubit 12.2.

Details:
  o CubitCompat.h will define CUBIT_12 to be either 0, 1, or 2 depending
    on the signatures of GQT::(import|export)_solid_model
  o CubitCompat.hpp provides new functions:
     CubitCompat_import_solid_model
     CubitCompat_export_solid_model
    that can be used regardless of the version of Cubit 12 and regardless
    of whether or not CGM is even linked against Cubit
  o To write code that is compatible with this version of CGM and older
    10.x-based CGMs:
      1) include GeometryQueryTool.hpp
      2) conditionally include CubitCompat.hpp if CUBIT_12 is defined
      3) call CubitCompat_(import|export)_solid_model if CUBIT_12 is defined
         and call either GQT::(import|export)_solid_model otherwise
    



Modified: cgm/branches/merge-cubit12/Makefile.am
===================================================================
--- cgm/branches/merge-cubit12/Makefile.am	2011-01-21 17:41:51 UTC (rev 4459)
+++ cgm/branches/merge-cubit12/Makefile.am	2011-01-21 19:47:04 UTC (rev 4460)
@@ -45,7 +45,7 @@
                   geom/libcubit_geom.la \
                   util/libcubit_util.la
 else
-  CORE_CGM_LIBS = 
+  CORE_CGM_LIBS = geom/libcubit_geom.la
 endif
 
 SUBDIRS = compat util geom init . $(igeom_DIR) test cgm_apps geom/testing

Modified: cgm/branches/merge-cubit12/cgm_apps/ccapi/geom/GeometryTool_ccapi.cpp
===================================================================
--- cgm/branches/merge-cubit12/cgm_apps/ccapi/geom/GeometryTool_ccapi.cpp	2011-01-21 17:41:51 UTC (rev 4459)
+++ cgm/branches/merge-cubit12/cgm_apps/ccapi/geom/GeometryTool_ccapi.cpp	2011-01-21 19:47:04 UTC (rev 4460)
@@ -92,6 +92,7 @@
 #include "DLRefVertexList.hpp"
 #include "DLCubitEntityList.hpp"
 #include "DLTopologyEntityList.hpp"
+#include "CubitCompat.hpp"
 
 #include "copy_defines.h"
 
@@ -350,7 +351,7 @@
   DLRefEntityList temp_list;
   COPY_ARRAY_TO_LIST(*ref_entity_list, *ref_entity_list_size, temp_list);
 
-  return GTI->export_solid_model(temp_list, file_name, file_type, 
+  return CubitCompat_export_solid_model(temp_list, file_name, file_type, 
                                  CubitString(cubit_version), logfile_name);
 }
 
@@ -365,13 +366,13 @@
                                   CubitBoolean import_vertices,
                                   CubitBoolean free_surfaces)
 {
-/* < API function for GeometryTool::import_solid_model */
-  return GTI->import_solid_model(file_ptr, file_name, file_type,
-                                 logfile_name,
-                                 heal_step,
-                                 import_bodies, import_surfaces,
-                                 import_curves, import_vertices,
-                                 free_surfaces);
+  assert(file_ptr);
+  CubitCompat_import_solid_model( file_name, file_type,
+                                  logfile_name,
+                                  heal_step,
+                                  import_bodies, import_surfaces,


More information about the cgma-dev mailing list