[cgma-dev] r4735 - in cgm/trunk: geom/OCC test

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Wed Apr 13 10:11:01 CDT 2011


Author: janehu
Date: 2011-04-13 10:11:00 -0500 (Wed, 13 Apr 2011)
New Revision: 4735

Modified:
   cgm/trunk/geom/OCC/OCCQueryEngine.cpp
   cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
   cgm/trunk/test/modify.cpp
   cgm/trunk/test/stitch.name_occ
   cgm/trunk/test/test_occ.cpp
   cgm/trunk/test/unite1.occ
   cgm/trunk/test/unite4.occ
Log:
Added bug fix and attribute format changes from merge-cubit12 branch, corresponding testcases have been updated too. This is still on Opencascade6.3.0.

Modified: cgm/trunk/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCQueryEngine.cpp	2011-04-13 14:49:37 UTC (rev 4734)
+++ cgm/trunk/geom/OCC/OCCQueryEngine.cpp	2011-04-13 15:11:00 UTC (rev 4735)
@@ -1506,6 +1506,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();
@@ -1525,6 +1531,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();

Modified: cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp	2011-04-13 14:49:37 UTC (rev 4734)
+++ cgm/trunk/geom/OCC/OCCShapeAttributeSet.cpp	2011-04-13 15:11:00 UTC (rev 4735)
@@ -420,62 +420,55 @@
   DLIList<CubitString*> strings;
   DLIList<double> doubles;
   DLIList<int> ints;
+  int c_num, length;
+  char s;
   do {
-    IS >> buffer; 
-    std::string::size_type i = buffer.find_first_of("*");
-    type = buffer.substr( 0, i );
+    IS >> c_num; //length of name string
+    IS.get(); //' '
+    type.clear();
+    for(int j = 0; j < c_num; j ++)
+    {
+      IS.get(s);


More information about the cgma-dev mailing list