[cgma-dev] r3411 - cgm/trunk/itaps

hongjun at mcs.anl.gov hongjun at mcs.anl.gov
Thu Dec 10 09:44:24 CST 2009


Author: hongjun
Date: 2009-12-10 09:44:23 -0600 (Thu, 10 Dec 2009)
New Revision: 3411

Modified:
   cgm/trunk/itaps/iGeom_CGMA.cc
Log:
o ".step", ".STEP", ".iges", ".IGES", ".BREP" and ".OCC" are added as parsing word for OCC geometry loading


Modified: cgm/trunk/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/trunk/itaps/iGeom_CGMA.cc	2009-12-08 22:14:00 UTC (rev 3410)
+++ cgm/trunk/itaps/iGeom_CGMA.cc	2009-12-10 15:44:23 UTC (rev 3411)
@@ -351,10 +351,26 @@
       }
     }
     else {
-      if (strstr(name, ".brep") != NULL || strstr(name, ".occ") != NULL)
-	status = gqt->read_geometry_file(name, NULL, "OCC");
-      else
-	status = gqt->read_geometry_file(name);
+      std::string file_type;
+      if (strstr(name, ".brep") != NULL ||
+	  strstr(name, ".BREP") != NULL ||
+	  strstr(name, ".occ") != NULL ||
+	  strstr(name, ".OCC") != NULL)
+	file_type = "OCC";
+      else if (strstr(name, ".stp") != NULL ||
+	       strstr(name, ".STP") != NULL ||
+	       strstr(name, ".step") != NULL ||
+	       strstr(name, ".STEP") != NULL)
+	file_type = "STEP";
+      else if (strstr(name, ".igs") != NULL ||
+	       strstr(name, ".IGS") != NULL ||
+	       strstr(name, ".iges") != NULL ||
+	       strstr(name, ".IGES") != NULL)
+	file_type = "IGES";
+      
+      if (file_type.empty()) status = gqt->read_geometry_file(name);
+      else status = gqt->read_geometry_file(name, NULL, file_type.c_str());
+
       if (CUBIT_SUCCESS != status) {
 	ERROR(iBase_FILE_NOT_FOUND, "Trouble loading geometry file.");
       }



More information about the cgma-dev mailing list