[cgma-dev] r4677 - cgm/branches/merge-cubit12/geom

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Tue Mar 29 10:21:46 CDT 2011


Author: janehu
Date: 2011-03-29 10:21:46 -0500 (Tue, 29 Mar 2011)
New Revision: 4677

Modified:
   cgm/branches/merge-cubit12/geom/GeometryModifyTool.cpp
Log:
Separate finish_sm_op status and operation status for correct status report.

Modified: cgm/branches/merge-cubit12/geom/GeometryModifyTool.cpp
===================================================================
--- cgm/branches/merge-cubit12/geom/GeometryModifyTool.cpp	2011-03-29 13:58:28 UTC (rev 4676)
+++ cgm/branches/merge-cubit12/geom/GeometryModifyTool.cpp	2011-03-29 15:21:46 UTC (rev 4677)
@@ -6556,7 +6556,7 @@
   DLIList<BodySM*> new_sms;
   CubitStatus result =
       engine->intersect(tool_sm, from_sm_list, new_sms, keep_old );
-  result = finish_sm_op(tem_bodies, new_sms, new_bodies);
+  CubitStatus result2 = finish_sm_op(tem_bodies, new_sms, new_bodies);
 
   if( CubitUndo::get_undo_enabled() )
   {
@@ -6566,7 +6566,7 @@
       CubitUndo::remove_last_undo();
   }
 
-  if ( result == CUBIT_FAILURE )
+  if ( result == CUBIT_FAILURE || result2 == CUBIT_FAILURE)
   {
     PRINT_ERROR("Intersect FAILED\n" );
     return CUBIT_FAILURE;
@@ -7219,7 +7219,7 @@
   while(temporary_bridges.size())
     delete temporary_bridges.pop();
 
-   status = finish_sm_op(body_list, new_sm_list, new_body_list);
+  CubitStatus status2 = finish_sm_op(body_list, new_sm_list, new_body_list);
 
   if(process_composites)
     do_attribute_cleanup();
@@ -7231,8 +7231,13 @@
      else
        CubitUndo::remove_last_undo();
    }
+ 
+   if( status == CUBIT_SUCCESS && status2 == CUBIT_SUCCESS)
+     return status;
+ 
+   else
+     return CUBIT_FAILURE; 
 
-   return status;
 }
 
 CubitStatus GeometryModifyTool::imprint( DLIList<Surface*> &surface_list,
@@ -7400,7 +7405,7 @@
     remove_pushed_attributes(body_sm_list, old_body_list);
   }
 
-  status = finish_sm_op(old_body_list, new_sm_list, new_body_list);


More information about the cgma-dev mailing list