[MOAB-dev] r3005 - MOAB/trunk

wilsonp at engr.wisc.edu wilsonp at engr.wisc.edu
Tue Jul 14 09:57:15 CDT 2009


Author: wilsonp
Date: 2009-07-14 09:57:15 -0500 (Tue, 14 Jul 2009)
New Revision: 3005

Modified:
   MOAB/trunk/ReadCGM.cpp
   MOAB/trunk/ReadCGM.hpp
Log:
* Improve comments to describe interface options for load_file
* Prepare for being able to read CUB files


Modified: MOAB/trunk/ReadCGM.cpp
===================================================================
--- MOAB/trunk/ReadCGM.cpp	2009-07-13 23:43:10 UTC (rev 3004)
+++ MOAB/trunk/ReadCGM.cpp	2009-07-14 14:57:15 UTC (rev 3005)
@@ -148,6 +148,8 @@
     CGMApp::instance()->attrib_manager()->set_all_auto_actuate_flags( act_att );
   }
 
+  CubitStatus s;
+
   // Get CGM file type
   const char* file_type = 0;
   file_type = get_geom_file_type( cgm_file_name );
@@ -157,12 +159,13 @@
   }
   else if(!strcmp(file_type ,"CUBIT"))
   {
-     std::cerr << cgm_file_name << " : cub file are not handled here." << std::endl;
+    std::cerr << cgm_file_name << " : CUB files are currently not supported." << std::endl;
     return MB_FAILURE;
+   }
+  else {
+    s = GeometryQueryTool::instance()->import_solid_model( cgm_file_name, file_type );
   }
 
-  CubitStatus s;
-  s = GeometryQueryTool::instance()->import_solid_model( cgm_file_name, file_type );
   if (CUBIT_SUCCESS != s) {
     std::cerr << "Failed to read '" << cgm_file_name << "' of type '" << file_type << "'" << std::endl;
     return MB_FAILURE;
@@ -254,7 +257,7 @@
         return rval;
     }
   }
-  
+
     // create entity sets for all ref groups
   std::vector<MBTag> extra_name_tags;
   DLIList<CubitString*> name_list;

Modified: MOAB/trunk/ReadCGM.hpp
===================================================================
--- MOAB/trunk/ReadCGM.hpp	2009-07-13 23:43:10 UTC (rev 3004)
+++ MOAB/trunk/ReadCGM.hpp	2009-07-14 14:57:15 UTC (rev 3005)
@@ -49,7 +49,12 @@
                  std::vector<std::string>& tokens,
                  const char* delimiters );
 
-    //! load an ExoII file
+    //! load a CGM file
+    //  Supported FileOptions:
+    //  * FACET_NORMAL_TOLERANCE=<int> (default: 5)
+    //  * FACET_DISTANCE_TOLERANCE=<real> (default: 0.001)
+    //  * MAX_FACET_EDGE_LENGTH=<real> (default: 0.0)
+    //  * CGM_ATTRIBS=<yes|no>         (default: no)
   MBErrorCode load_file(const char *cgm_file_name,
                          MBEntityHandle& file_set,
                          const FileOptions& opts,



More information about the moab-dev mailing list