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

janehu at mcs.anl.gov janehu at mcs.anl.gov
Mon Apr 7 13:01:09 CDT 2008


Author: janehu
Date: 2008-04-07 13:01:09 -0500 (Mon, 07 Apr 2008)
New Revision: 1744

Modified:
   cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
Added on copy_body for shell body copy. Tested on single surface body imprinting on body, if it makes a surfaces into two surfaces, it works, now has to add a check for making a scar case, directly error out, otherwise the splitor will crash.

Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-04-04 19:12:40 UTC (rev 1743)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp	2008-04-07 18:01:09 UTC (rev 1744)
@@ -1445,6 +1445,16 @@
   
   if (theCS == NULL) //sheet body
   {
+    OCCShell* occ_shell = occ_body->shell();
+    if (occ_shell != NULL)
+    {
+      TopoDS_Shell* shell = occ_shell->get_TopoDS_Shell();
+      BRepBuilderAPI_Copy api_copy(*shell);
+      TopoDS_Shape newShape = api_copy.ModifiedShape(*shell);
+      TopoDS_Shell newShell = TopoDS::Shell(newShape);
+      return OCCQueryEngine::instance()->populate_topology_bridge(newShell, CUBIT_TRUE)->my_body();
+    }
+ 
     Surface* surface = make_Surface(occ_body->my_sheet_surface());
     if (surface == NULL)
     {




More information about the cgma-dev mailing list