From 1f9376586edc5564e9095a58d8c3525fe31c204a Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Thu, 20 Aug 2020 12:53:25 -0500 Subject: [PATCH 1/3] Simple enough way to handle the change between Cubit/Trelis 16 and 17. --- iGeom/iGeom.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/iGeom/iGeom.cpp b/iGeom/iGeom.cpp index 81e4fc66e..489b102f4 100644 --- a/iGeom/iGeom.cpp +++ b/iGeom/iGeom.cpp @@ -1454,8 +1454,15 @@ CGMTagManager::CGMTagManager() // get the tag number for CATag DLIList tag_types; int max_type = 0; - CubitAttribManager *cam = CGMApp::instance()->attrib_manager(); + +#ifdef CUBIT_17_PLUS + CubitAttribManager cam = CGMApp::instance()->attrib_manager(); + cam.get_registered_types(tag_types); + #else + CubitAttribManager* cam = CGMApp::instance()->attrib_manager(); cam->get_registered_types(tag_types); + #endif + for (int i = 0; i < tag_types.size(); i++) { int this_type = tag_types.get_and_step(); max_type = (max_type < this_type ? this_type : max_type); From e70f74888288eb61dbf01831f7ac6cb154daac5b Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Thu, 20 Aug 2020 12:58:30 -0500 Subject: [PATCH 2/3] Quick format cleanup. --- iGeom/iGeom.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iGeom/iGeom.cpp b/iGeom/iGeom.cpp index 489b102f4..40138679e 100644 --- a/iGeom/iGeom.cpp +++ b/iGeom/iGeom.cpp @@ -1458,10 +1458,10 @@ CGMTagManager::CGMTagManager() #ifdef CUBIT_17_PLUS CubitAttribManager cam = CGMApp::instance()->attrib_manager(); cam.get_registered_types(tag_types); - #else +#else CubitAttribManager* cam = CGMApp::instance()->attrib_manager(); cam->get_registered_types(tag_types); - #endif +#endif for (int i = 0; i < tag_types.size(); i++) { int this_type = tag_types.get_and_step(); From bdd6e6b840a9ed0297d688bfcf1401150f16fb26 Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 9 Oct 2020 09:47:59 -0500 Subject: [PATCH 3/3] Re-adding CUBIT_17 option after rebase. --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ed46a5e13..8e1e37eed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ option(BUILD_DAGMC_EXPORTER "Include DagMC export capability" ON) option(BUILD_MCNP_IMPORTER "Include MCNP import capability" ON) option(BUILD_IGEOM "Build iGeom library" ON) option(BUILD_IGEOM_TESTS "Include tests for iGeom" ON) +option(CUBIT_17 "Using a version of Trelis or Cubit >= 17.0" OFF) # MCNP importer and iGeom tests require iGeom if (BUILD_MCNP_IMPORTER OR BUILD_IGEOM_TESTS) @@ -76,6 +77,9 @@ if (BUILD_IGEOM) set(IGEOM_SRC_FILES iGeom/iGeom.cpp iGeom/iGeomError.cc) include_directories(iGeom) add_library(iGeom SHARED ${IGEOM_SRC_FILES}) + if(CUBIT_17) + target_compile_definitions(iGeom PUBLIC -DCUBIT_17_PLUS) + endif() target_link_libraries(iGeom ${CUBIT_LIBS}) install(TARGETS iGeom LIBRARY DESTINATION lib) list(APPEND PLUGIN_LINK_LIBS iGeom)