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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Wed Mar 18 12:38:21 CDT 2009


Author: janehu
Date: 2009-03-18 12:38:20 -0500 (Wed, 18 Mar 2009)
New Revision: 2725

Modified:
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
   cgm/trunk/geom/OCC/OCCSurface.cpp
Log:
Some changes made from testing fillet creation. still in testing.

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2009-03-17 20:22:58 UTC (rev 2724)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2009-03-18 17:38:20 UTC (rev 2725)
@@ -5972,8 +5972,8 @@
                       new_bodysm_ptr , keep_old_body, CUBIT_FALSE, CUBIT_FALSE);
     if(stat && new_bodysm_ptr)
     {
-      count++;
-      new_bodysm_list.append(new_bodysm_ptr);
+      new_bodysm_list.append_unique(new_bodysm_ptr);
+      count = new_bodysm_list.size();
     }
   }
 
@@ -6055,8 +6055,8 @@
                         new_bodysm_ptr , keep_old_body, CUBIT_FALSE);
     if(stat && new_bodysm_ptr)
     {
-      count++;
-      new_bodysm_list.append(new_bodysm_ptr);
+      new_bodysm_list.append_unique(new_bodysm_ptr);
+      count = new_bodysm_list.size();
     }
   }
 

Modified: cgm/trunk/geom/OCC/OCCSurface.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCSurface.cpp	2009-03-17 20:22:58 UTC (rev 2724)
+++ cgm/trunk/geom/OCC/OCCSurface.cpp	2009-03-18 17:38:20 UTC (rev 2725)
@@ -918,7 +918,15 @@
          shapes.Assign(sp->DescendantShapes(edge));
 
        if (shapes.Extent() == 1)
-         shape_edge = shapes.First();
+       {
+        //in fillet creating mothod, one edge could generated a face, so check
+        //it here.
+         TopAbs_ShapeEnum type = shapes.First().TShape()->ShapeType(); 
+         if(type != TopAbs_EDGE)
+           shape_edge.Nullify();
+         else
+           shape_edge = shapes.First();
+       }
        else if (shapes.Extent() > 1)
        {
          //update all attributes first.



More information about the cgma-dev mailing list