[cgma-dev] r5573 - cgm/branches/merge-cubit13.1/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Wed Jun 13 09:25:33 CDT 2012


Author: janehu
Date: 2012-06-13 09:25:32 -0500 (Wed, 13 Jun 2012)
New Revision: 5573

Added:
   cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp_5528
   cgm/branches/merge-cubit13.1/geom/OCC/OCCSurface.cpp_5466
Modified:
   cgm/branches/merge-cubit13.1/geom/OCC/OCCBody.cpp
   cgm/branches/merge-cubit13.1/geom/OCC/OCCLump.cpp
   cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp
   cgm/branches/merge-cubit13.1/geom/OCC/OCCQueryEngine.cpp
   cgm/branches/merge-cubit13.1/geom/OCC/OCCSurface.cpp
Log:
Fixed mcnp2cad failed cases, brings it to still 7 failed ones out of 47 cases. Added some logics when boolean operation yields a void entitiy as well as entity map updates for compound situation. Passed cgm make check.

Modified: cgm/branches/merge-cubit13.1/geom/OCC/OCCBody.cpp
===================================================================
--- cgm/branches/merge-cubit13.1/geom/OCC/OCCBody.cpp	2012-06-13 14:17:37 UTC (rev 5572)
+++ cgm/branches/merge-cubit13.1/geom/OCC/OCCBody.cpp	2012-06-13 14:25:32 UTC (rev 5573)
@@ -646,14 +646,17 @@
       for(; it.More(); it.Next())
       {
         shape = it.Value();
-        OCCQueryEngine::instance()->copy_attributes(old_shape, shape);
+        OCCQueryEngine::instance()->copy_attributes(solid, shape);
       } 
       shape = shapes.First();
     }
+
     else if(op->IsDeleted(solid))
     {
-       if (M_new.Extent()== 1)
+       if (M_new.Extent()== 1 && ii == 1)
          shape = M_new(1);
+       else if(M_new.Extent()== 1 && ii > 1)
+         shape.Nullify();
        else if(M_new.Extent() > 1)
        {
          GProp_GProps myProps;

Modified: cgm/branches/merge-cubit13.1/geom/OCC/OCCLump.cpp
===================================================================
--- cgm/branches/merge-cubit13.1/geom/OCC/OCCLump.cpp	2012-06-13 14:17:37 UTC (rev 5572)
+++ cgm/branches/merge-cubit13.1/geom/OCC/OCCLump.cpp	2012-06-13 14:25:32 UTC (rev 5573)
@@ -385,6 +385,15 @@
       shapes.Assign(op->Generated(*get_TopoDS_Solid()));
     if(shapes.Extent() > 1)
     { 
+      //update all attributes first.
+      TopTools_ListIteratorOfListOfShape it;
+      it.Initialize(shapes);
+      for(; it.More(); it.Next())
+      {
+        shape = it.Value();
+        OCCQueryEngine::instance()->copy_attributes(*get_TopoDS_Solid(), 
+                                                    shape);
+      }
       shape = shapes.First();
     }
     else if (shapes.Extent() == 1)
@@ -475,6 +484,14 @@
 
     else if(shapes.Extent() > 1)
     {
+      //update all attributes first.
+      TopTools_ListIteratorOfListOfShape it;


More information about the cgma-dev mailing list