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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Wed Apr 6 11:34:37 CDT 2011


Author: janehu
Date: 2011-04-06 11:34:36 -0500 (Wed, 06 Apr 2011)
New Revision: 4717

Removed:
   cgm/branches/merge-cubit12/geom/OCC/OCCHistory.lo
   cgm/branches/merge-cubit12/geom/OCC/OCCHistory.o
Modified:
   cgm/branches/merge-cubit12/geom/OCC/OCCShapeAttributeSet.cpp
Log:
Changes the way CGM attributes are written and read for OCC engine. Passed testcases under cubit 12 trunk test directory.

Deleted: cgm/branches/merge-cubit12/geom/OCC/OCCHistory.lo
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCHistory.lo	2011-04-06 16:32:00 UTC (rev 4716)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCHistory.lo	2011-04-06 16:34:36 UTC (rev 4717)
@@ -1,12 +0,0 @@
-# OCCHistory.lo - a libtool object file
-# Generated by ltmain.sh (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=none
-
-# Name of the non-PIC object
-non_pic_object='OCCHistory.o'
-

Deleted: cgm/branches/merge-cubit12/geom/OCC/OCCHistory.o
===================================================================
(Binary files differ)

Modified: cgm/branches/merge-cubit12/geom/OCC/OCCShapeAttributeSet.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCShapeAttributeSet.cpp	2011-04-06 16:32:00 UTC (rev 4716)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCShapeAttributeSet.cpp	2011-04-06 16:34:36 UTC (rev 4717)
@@ -420,62 +420,69 @@
   DLIList<CubitString*> strings;
   DLIList<double> doubles;
   DLIList<int> ints;
+  int c_num, length;
+
   do {
+    IS >> c_num; //length of name string
     IS >> buffer; 
-    std::string::size_type i = buffer.find_first_of("*");
-    type = buffer.substr( 0, i );
+    if(buffer.length() >= c_num)
+      type = buffer.substr( 0, c_num ); //attribute name string
+    else
+    {
+      c_num -= buffer.length();
+      type.append( buffer );
+      do{
+        IS >> buffer;
+        type.push_back(' ');
+        type.append(buffer.substr( 0, c_num )); 
+        c_num -= (buffer.length() + 1);
+      }while (c_num > 0);
+    }
 


More information about the cgma-dev mailing list