[cgma-dev] r5590 - cgm/trunk/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Tue Jun 26 11:56:19 CDT 2012


Author: janehu
Date: 2012-06-26 11:56:18 -0500 (Tue, 26 Jun 2012)
New Revision: 5590

Modified:
   cgm/trunk/geom/OCC/OCCAttribSet.cpp
   cgm/trunk/geom/OCC/OCCAttribSet.hpp
   cgm/trunk/geom/OCC/OCCBody.cpp
   cgm/trunk/geom/OCC/OCCCurve.cpp
   cgm/trunk/geom/OCC/OCCLoop.cpp
   cgm/trunk/geom/OCC/OCCLump.cpp
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
   cgm/trunk/geom/OCC/OCCModifyEngine.hpp
   cgm/trunk/geom/OCC/OCCPoint.cpp
   cgm/trunk/geom/OCC/OCCQueryEngine.cpp
   cgm/trunk/geom/OCC/OCCShell.cpp
   cgm/trunk/geom/OCC/OCCSurface.cpp
Log:
Back ported changes from merge-cubit13.1. Changes including Attribite search, save; new unite logics and bug fixes.

Modified: cgm/trunk/geom/OCC/OCCAttribSet.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCAttribSet.cpp	2012-06-26 15:56:30 UTC (rev 5589)
+++ cgm/trunk/geom/OCC/OCCAttribSet.cpp	2012-06-26 16:56:18 UTC (rev 5590)
@@ -70,6 +70,7 @@
   //Add attributes on child of myLabel
   //1. add shape attribute, first check to make sure there's no shape attribute
   CubitBoolean found = CUBIT_FALSE;
+  int result = 1;
   TDF_Label aLabel, lab;
   Handle_TDataStd_Name attr_name;
   CubitString* type = csa->string_data_list()->get_and_step();
@@ -101,17 +102,20 @@
   else
   {
     TCollection_ExtendedString name_string;
-    found = CUBIT_FALSE;
     for (TDF_ChildIterator it(aLabel,CUBIT_FALSE); it.More(); it.Next()) 
     {
       lab = it.Value();
-      found = find_attribute(lab, csa);
-      if(found)
+      result = find_attribute(lab, csa);
+      if(result != 1)
         break;
     }
   }
   //if not exist,  create new child label
-  if (!found)
+  Handle_TDataStd_ExtStringArray attr_string;
+  DLIList<CubitString*>* strings = csa->string_data_list();
+  int size = strings->size()-1;
+ 
+  if (result == 1)
   {
     lab = aLabel.NewChild();
     attr_name = TDataStd_Name::Set(lab, cstring);
@@ -119,13 +123,62 @@
     assert(lab.IsAttribute(TDataStd_Name::GetID()));
   }
      
-  else//nothing to do
+  else if(result == 3)//nothing to do
     return;
 
+  else if(result == 2) 
+  //adding the name strings
+  {
+    lab.FindAttribute(TDataStd_ExtStringArray::GetID(), attr_string);
+    TCollection_ExtendedString name1, name2;
+    DLIList<CubitString*>* strings = csa->string_data_list();


More information about the cgma-dev mailing list