[cgma-dev] r4726 - cgm/branches/merge-cubit12/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Thu Apr 7 12:23:35 CDT 2011


Author: janehu
Date: 2011-04-07 12:23:34 -0500 (Thu, 07 Apr 2011)
New Revision: 4726

Modified:
   cgm/branches/merge-cubit12/geom/OCC/OCCQueryEngine.cpp
Log:
Fixed a bug in importing OCC geometry: For non-compound type of geometry, directly read-in all structure; for compound type, read in individual sturctures separately.

Modified: cgm/branches/merge-cubit12/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCQueryEngine.cpp	2011-04-07 17:22:27 UTC (rev 4725)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCQueryEngine.cpp	2011-04-07 17:23:34 UTC (rev 4726)
@@ -1493,6 +1493,12 @@
     
   //All read in shapes are wrapped inside a compound shape. Ignore this one
   TopoDS_Iterator it(*aShape);
+  if(aShape->ShapeType() != TopAbs_COMPOUND)
+  {
+    imported_entities += populate_topology_bridge(*aShape);
+    return CUBIT_SUCCESS;
+  }
+
   for(;it.More();it.Next())
   {
     TopoDS_Shape shape = it.Value();
@@ -1512,6 +1518,12 @@
   
   //All read in shapes are wrapped inside a compound shape. Ignore this one
   TopoDS_Iterator it(*aShape);
+  if(aShape->ShapeType() != TopAbs_COMPOUND)
+  {
+    imported_entities += populate_topology_bridge(*aShape);
+    return CUBIT_SUCCESS;
+  }
+
   for(;it.More();it.Next())
   {
     TopoDS_Shape shape = it.Value();























More information about the cgma-dev mailing list