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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Mon Feb 21 12:55:25 CST 2011


Author: janehu
Date: 2011-02-21 12:55:25 -0600 (Mon, 21 Feb 2011)
New Revision: 4515

Modified:
   cgm/branches/merge-cubit12/geom/OCC/OCCBody.cpp
   cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
   cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.hpp
   cgm/branches/merge-cubit12/geom/OCC/OCCSurface.cpp
   cgm/branches/merge-cubit12/geom/OCC/OCCSurface.hpp
Log:
Added 2 create_surface functions for merge_cubit12 specific requirement.
Added in imprint functions to get new_tbs for history track and att_tbs for composite track .
Added in OCCSurface get_points and get_hardpoints functions with are also recently added in CGM branch.
Some misc. formatting.


Modified: cgm/branches/merge-cubit12/geom/OCC/OCCBody.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCBody.cpp	2011-02-17 17:49:29 UTC (rev 4514)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCBody.cpp	2011-02-21 18:55:25 UTC (rev 4515)
@@ -903,5 +903,13 @@
        if (occ_point)
          points.append_unique(occ_point);
   }
+
+  DLIList<OCCSurface*> surfaces;
+  this->get_all_surfaces(surfaces);
+  for(int i = 0; i < surfaces.size(); i++)
+  {
+    OCCSurface* occ_surf = surfaces.get_and_step();
+    points += occ_surf->get_hardpoints();
+  }
 }
 

Modified: cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp	2011-02-17 17:49:29 UTC (rev 4514)
+++ cgm/branches/merge-cubit12/geom/OCC/OCCModifyEngine.cpp	2011-02-21 18:55:25 UTC (rev 4515)
@@ -3476,12 +3476,26 @@
   DLIList<TopoDS_Face*> face_list;
   DLIList<TopoDS_Shape*> shape_list;
   DLIList<TopoDS_Shape*> shape_list_all;
-  
+  DLIList<OCCSurface*> surfaces;
+  DLIList<OCCCurve*> curves;
+  DLIList<OCCPoint*> points;
+ 
   assert (surface_list.size() == curve_lists_list.size());
 
+  DLIList<OCCBody*> bodies;
   for(int j = 0; j < surface_list.size(); j++)
   {
     Surface* surface = surface_list.get_and_step();
+    
+    //keep record of old bodies, surfaces, curves and points
+    OCCSurface* occ_surface = CAST_TO(surface, OCCSurface);
+    occ_surface->get_bodies(bodies);
+    if(j == 0)
+    {
+      bodies.get()->get_all_surfaces(surfaces);
+      bodies.get()->get_all_curves(curves);
+      bodies.get()->get_all_points(points);
+    }
     DLIList<Surface*> ref_face_list;
     ref_face_list.append(surface);
     DLIList<Curve*> *edge_list = curve_lists_list.get_and_step();


More information about the cgma-dev mailing list