[MOAB-dev] r3352 - MOAB/trunk/tools/dagmc

sjackson at cae.wisc.edu sjackson at cae.wisc.edu
Mon Nov 16 15:32:41 CST 2009


Author: sjackson
Date: 2009-11-16 15:32:41 -0600 (Mon, 16 Nov 2009)
New Revision: 3352

Modified:
   MOAB/trunk/tools/dagmc/DagMC.cpp
Log:
Workaround for h5m loading failures within DagMC.

Modified: MOAB/trunk/tools/dagmc/DagMC.cpp
===================================================================
--- MOAB/trunk/tools/dagmc/DagMC.cpp	2009-11-16 20:59:08 UTC (rev 3351)
+++ MOAB/trunk/tools/dagmc/DagMC.cpp	2009-11-16 21:32:41 UTC (rev 3352)
@@ -899,6 +899,18 @@
   // what if we are using default faceting tolerance???
   char options[120] = "CGM_ATTRIBS=yes;FACET_DISTANCE_TOLERANCE=";
   strcat(options,facetTolStr);
+
+  // As of r3273, loading fails if we pass options that a file reader can't recognize.
+  // In particular, the h5m reader does not recognize the options given above.
+  // As a temporary workaround, check for an .h5m filename and throw
+  // away the options if one is found.  -- sjackson, 11/16/09
+  {
+    std::string filename(cfile);
+    if( filename.length() > 4 && filename.substr(filename.length()-4) == ".h5m"){
+      options[0]='\0';
+    }
+  }
+
     
   rval = MBI->load_file(cfile, 0, options, NULL, 0, 0);
   if (MB_SUCCESS != rval) {



More information about the moab-dev mailing list