[cgma-dev] r5746 - cgm/branches/merge-cubit13.1/geom/OCC

janehu at mcs.anl.gov janehu at mcs.anl.gov
Fri Sep 21 12:40:02 CDT 2012


Author: janehu
Date: 2012-09-21 12:40:02 -0500 (Fri, 21 Sep 2012)
New Revision: 5746

Modified:
   cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp
Log:
Re-logic on check_intersection function, solved the problem in hexlat test under mcnp2cad, before, it only imprints 9 out of 25 tubes and now it imprints all 25 tubes onto the outside box. Now with this change, lat4,holes used to pass, and it failed. Need to check it out. Still out of 47 testcases in mcnp2cad, passes 39 and 8 failed. Rec test took longer and generates more curves, but passes here, need to check out too.

Modified: cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp	2012-09-21 17:34:04 UTC (rev 5745)
+++ cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp	2012-09-21 17:40:02 UTC (rev 5746)
@@ -2339,13 +2339,16 @@
                     &cutter, keep_old);
       else
       {
+/*
         if(!keep_old)
           OCCQueryEngine::instance()->delete_solid_model_entities(from_body);
         from_shape->Nullify();
+*/
+        from_shape = NULL;
       }
 
       int stat;
-      if(!has_changed && !from_shape->IsNull())
+      if(!has_changed && from_shape && !from_shape->IsNull())
       {
         //Add imprint code here 
         DLIList<TopoDS_Face*> face_list;
@@ -2363,9 +2366,9 @@
     }
 
     //ok, we're done with all cuts, construct new Body'
-    if (count < tool_bodies_copy.size() && !from_shape->IsNull())
+    if (count < tool_bodies_copy.size() && from_shape && !from_shape->IsNull())
       tbs += OCCQueryEngine::instance()->populate_topology_bridge(*from_shape);
-    else if (!from_shape->IsNull())
+    else if (from_shape && !from_shape->IsNull())
     {
       PRINT_INFO("The %d body did not change because cutting tools are not interscting with it.\n", i+1);
       from_bodies.change_to(NULL);
@@ -2906,7 +2909,7 @@
         face_created = CUBIT_FALSE;
       }
       DLIList<DLIList<TopoDS_Edge*>*> edge_lists;
-      if ( total_edges >= 1)
+      if ( total_edges >= 1) 
 	{      
 	  CubitStatus stat = CUBIT_SUCCESS;
           if(curve_list.size() > 0)
@@ -3243,8 +3246,7 @@
 {
   int  count_intersection = 0;
 
-  gp_Pnt pt1(0,0,0), pt2(0,0,0); 
-  gp_Pnt intsec_pnt[2] = {pt1, pt2} ;
+  gp_Pnt newP[2] , p_test ;
   for(int kk = 0; kk < edge_list->size(); kk++)


More information about the cgma-dev mailing list