[cgma-dev] r4486 - cgm/branches/merge-cubit12/geom/OCC

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Tue Feb 8 13:51:57 CST 2011


Author: janehu
Date: 2011-02-08 13:51:57 -0600 (Tue, 08 Feb 2011)
New Revision: 4486

Modified:
   cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
   cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.hpp
Log:
1. Added separate_surfaces function for merge_cubit12 requirement. 2. Added get_new_tbs to include all generated surfaces, curves and points by imprinting and added IMPRINT feature on them. 3. Added get_att_tbs to put all new bodies' composite entity in att_tbs.

Modified: cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp	2011-02-04 17:53:07 UTC (rev 4485)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp	2011-02-08 19:51:57 UTC (rev 4486)
@@ -130,6 +130,7 @@
 #include "OCCBody.hpp"
 #include "OCCCurve.hpp"
 #include "OCCPoint.hpp"
+#include "OCCAttribSet.hpp"
 #include "CubitFileIOWrapper.hpp"
 #include "Body.hpp"
 #include "GfxDebug.hpp"
@@ -3125,6 +3126,13 @@
   CubitStatus success = CUBIT_SUCCESS;
   DLIList<TopoDS_Shape*> shape_list;
   DLIList<CubitBoolean> is_vo;
+
+  //keep record of all vertices and edges and faces in the from_body_list,
+  //for comparison to generated new_tbs and att_tbs.
+  DLIList<OCCSurface*> surfaces;
+  DLIList<OCCCurve*> curves;
+  DLIList<OCCPoint*> points;
+
   CubitStatus stat = get_shape_list(from_body_list, shape_list, is_vo,keep_old);
 
   if(!stat)
@@ -3141,11 +3149,22 @@
      AppUtil::instance()->progress_tool()->start(0, total_imprints, message);
   }
   
-  //DLIList<ENTITY*> att_ENTITIES;
   for(int i = 0; i < size; i++)
   {
     TopoDS_Shape* shape1 = shape_list[i];
     CubitBoolean modified = CUBIT_FALSE;
+
+    if(new_tbs || att_tbs)
+    {
+      OCCBody* from_body = CAST_TO(from_body_list.get_and_step(), OCCBody);
+      surfaces.clean_out();
+      curves.clean_out();
+      points.clean_out();
+      from_body->get_all_surfaces(surfaces);
+      from_body->get_all_curves(curves);
+      from_body->get_all_points(points);
+    }
+
     for(int j = i+1; j < size+i; j ++)
     {
        if (CubitMessage::instance()->Interrupt())
@@ -3165,6 +3184,22 @@


More information about the cgma-dev mailing list