[cgma-dev] r3458 - in cgm/trunk: geom test

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Thu Jan 21 18:25:32 CST 2010


Author: kraftche
Date: 2010-01-21 18:25:32 -0600 (Thu, 21 Jan 2010)
New Revision: 3458

Modified:
   cgm/trunk/geom/GeometryModifyTool.cpp
   cgm/trunk/test/webcut.cpp
Log:
Fix bug: Boolean 'outward' argument to GME::webcut_with_sweep_surfaces is 
  treated as the not of what is should be (has the opposite meaning of 
  what it does in the Cubit implementation.)

  Fixes failing webcut test when compiled with Cubit.


Modified: cgm/trunk/geom/GeometryModifyTool.cpp
===================================================================
--- cgm/trunk/geom/GeometryModifyTool.cpp	2010-01-21 23:38:57 UTC (rev 3457)
+++ cgm/trunk/geom/GeometryModifyTool.cpp	2010-01-22 00:25:32 UTC (rev 3458)
@@ -2925,8 +2925,8 @@
   return status;
 }
 
-CubitStatus GeometryModifyTool::sweep_target(CubitPlane ref_plane,
-											 DLIList<RefEntity*>& ref_ent_list)
+CubitStatus GeometryModifyTool::sweep_target( CubitPlane ref_plane,
+                                              DLIList<RefEntity*>& ref_ent_list)
 {
 	double distance1;
 	double distance2;
@@ -3197,8 +3197,8 @@
 	return CUBIT_SUCCESS; 
 }
 
-CubitStatus GeometryModifyTool::sweep_surface_target(CubitPlane ref_plane,
-													 DLIList<RefEntity*>& ref_ent_list)
+CubitStatus GeometryModifyTool::sweep_surface_target( CubitPlane ref_plane,
+                                                      DLIList<RefEntity*>& ref_ent_list)
 {
 	DLIList<RefFace*> surface_list;
 	CAST_LIST(ref_ent_list, surface_list, RefFace);
@@ -9586,7 +9586,7 @@
 
     else if (sweep_perp )
       stat = gme->sweep_perpendicular(ref_ent_list, swept_bodies,
-                                 tmp_sweep_vector.length(),0.0,0,outward,false,
+                                 tmp_sweep_vector.length(),0.0,0,!outward,false,
                                  stop_surf, to_body);
     else
       stat = gme->sweep_translational(ref_ent_list, swept_bodies,
@@ -9594,7 +9594,7 @@
                                  to_body);
   }
 
-  if(stat == CUBIT_FAILURE && swept_bodies.size() == 0)
+  if(stat == CUBIT_FAILURE || swept_bodies.size() == 0)
     {
        //delete copied faces
        GeometryEntity * temp_entity = NULL;

Modified: cgm/trunk/test/webcut.cpp
===================================================================
--- cgm/trunk/test/webcut.cpp	2010-01-21 23:38:57 UTC (rev 3457)
+++ cgm/trunk/test/webcut.cpp	2010-01-22 00:25:32 UTC (rev 3458)
@@ -610,7 +610,7 @@
 
   CubitVector axis(1.,0.,0.);
 
-  CubitStatus rsl= gmti->webcut_with_sweep_surfaces(old_bodies,faces,axis,true,true,true, false,NULL,NULL,new_bodies);
+  CubitStatus rsl= gmti->webcut_with_sweep_surfaces(old_bodies,faces,axis,true,true,false, false,NULL,NULL,new_bodies);
   if (rsl== CUBIT_FAILURE)
      return rsl;
 



More information about the cgma-dev mailing list