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

janehu at mcs.anl.gov janehu at mcs.anl.gov
Mon Dec 1 14:15:47 CST 2008


Author: janehu
Date: 2008-12-01 14:15:47 -0600 (Mon, 01 Dec 2008)
New Revision: 2292

Modified:
   cgm/trunk/geom/OCC/OCCLump.cpp
   cgm/trunk/geom/OCC/OCCShell.cpp
   cgm/trunk/geom/OCC/OCCSurface.cpp
Log:
Fixed the problem of keeping old coedges undeleted problem for geometry operation that involves number of shells or loops to change.

Modified: cgm/trunk/geom/OCC/OCCLump.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCLump.cpp	2008-11-28 23:06:10 UTC (rev 2291)
+++ cgm/trunk/geom/OCC/OCCLump.cpp	2008-12-01 20:15:47 UTC (rev 2292)
@@ -458,6 +458,12 @@
         shape2 = TopoDS::Shell(M2(1)); 
       if(M2.Extent() == 1 && !shape.IsSame(shape2))
          shape = shape2;
+      else if(M2.Extent() > 1)
+      {
+         shapes.Clear(); 
+         for(int jj = 0; jj < M2.Extent(); jj++) 
+           shapes.Append(M2(jj));
+      }
     }
 
     else if(shapes.Extent() > 1)

Modified: cgm/trunk/geom/OCC/OCCShell.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCShell.cpp	2008-11-28 23:06:10 UTC (rev 2291)
+++ cgm/trunk/geom/OCC/OCCShell.cpp	2008-12-01 20:15:47 UTC (rev 2292)
@@ -228,7 +228,7 @@
       {
         TopTools_ListIteratorOfListOfShape it;
         it.Initialize(shapes);
-        for(it; it.More(); it.Next())
+        for(; it.More(); it.Next())
         {
           shape = it.Value();
           OCCQueryEngine::instance()->copy_attributes(*get_TopoDS_Shell(), 
@@ -302,7 +302,7 @@
     {
       TopTools_ListIteratorOfListOfShape it;
       it.Initialize(shapes);
-      for(it; it.More(); it.Next())
+      for(; it.More(); it.Next())
       {
         shape = it.Value();
         OCCQueryEngine::instance()->copy_attributes(face, shape);

Modified: cgm/trunk/geom/OCC/OCCSurface.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCSurface.cpp	2008-11-28 23:06:10 UTC (rev 2291)
+++ cgm/trunk/geom/OCC/OCCSurface.cpp	2008-12-01 20:15:47 UTC (rev 2292)
@@ -865,7 +865,7 @@
        if(shapes.Extent() == 0)
          shapes.Assign(op->Generated(wire));
        if(!new_surface.IsNull())
-       TopExp::MapShapes(new_surface,TopAbs_WIRE, M2);
+         TopExp::MapShapes(new_surface,TopAbs_WIRE, M2);
      }
      else if(sp)
        shapes.Assign(sp->DescendantShapes(wire));
@@ -879,6 +879,8 @@
          if(!shape.IsSame(shape2))
            shape = shape2;
        }
+       else if(M2.Extent() > 1)
+         shape.Nullify();
      }
      else if(shapes.Extent() > 1)
        shape.Nullify();




More information about the cgma-dev mailing list