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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Mon Jun 6 13:13:40 CDT 2011


Author: janehu
Date: 2011-06-06 13:13:39 -0500 (Mon, 06 Jun 2011)
New Revision: 4952

Modified:
   cgm/trunk/geom/OCC/OCCBody.cpp
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
Fixed problem for mcnp2cad/hexlat2 problem and modify test. passed make check.

Modified: cgm/trunk/geom/OCC/OCCBody.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCBody.cpp	2011-06-06 18:04:13 UTC (rev 4951)
+++ cgm/trunk/geom/OCC/OCCBody.cpp	2011-06-06 18:13:39 UTC (rev 4952)
@@ -210,27 +210,54 @@
   
 void OCCBody::remove_simple_attribute_virt(CubitSimpleAttrib *csa)
 { 
+  DLIList<Lump*> my_lumps;
+  my_lumps = lumps();
+  DLIList<OCCShell*> shells = this->shells();
+  DLIList<OCCSurface*> surfaces = this->my_sheet_surfaces();
+
   if (myTopoDSShape != NULL)
   {
     OCCAttribSet::remove_attribute(csa, *myTopoDSShape);
+    if(csa)
+      csa_list.remove(csa);
+    else
+      csa_list.clean_out();
     return;
   }
  
-  if (csa == NULL)
+  else if (my_lumps.size() == 1)
   {
-    csa_list.clean_out();
+    OCCLump* lump = CAST_TO(my_lumps.get(), OCCLump);
+    TopoDS_Solid* solid = lump->get_TopoDS_Solid();
+    OCCAttribSet::remove_attribute(csa, *solid);
+    if(csa)
+      csa_list.remove(csa);
+    else
+      csa_list.clean_out();
     return;
   }
 
-  for(int i = 0; i < csa_list.size(); i++)
+  else if(shells.size() == 1)
   {
-    CubitBoolean IsEqual = CubitSimpleAttrib::equivalent(csa_list.get(), csa);
-    if (IsEqual)
-      csa_list.remove();
-    
+    TopoDS_Shell * shell = shells.get()->get_TopoDS_Shell();
+    OCCAttribSet::remove_attribute(csa, *shell);
+    if(csa)
+      csa_list.remove(csa);
     else
-      csa_list.step();
+      csa_list.clean_out();


More information about the cgma-dev mailing list