[cgma-dev] r4689 - cgm/branches/merge-cubit12/test

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Wed Mar 30 11:40:14 CDT 2011


Author: janehu
Date: 2011-03-30 11:40:13 -0500 (Wed, 30 Mar 2011)
New Revision: 4689

Modified:
   cgm/branches/merge-cubit12/test/modify.cpp
Log:
In cubit 12 version, sweep functions don't return created body and change the test case to find it gobally.

Modified: cgm/branches/merge-cubit12/test/modify.cpp
===================================================================
--- cgm/branches/merge-cubit12/test/modify.cpp	2011-03-30 14:20:30 UTC (rev 4688)
+++ cgm/branches/merge-cubit12/test/modify.cpp	2011-03-30 16:40:13 UTC (rev 4689)
@@ -1013,7 +1013,10 @@
   RefFace* rotate_face = gmti->make_RefFace(sweep_face);
 
   gmti->sweep_translational(refentities, v_move8, 0, 1, CUBIT_FALSE, CUBIT_FALSE);  
-  body = CAST_TO(refentities.get(), Body);
+  bodies.clean_out();
+  gti->bodies(bodies); 
+  bodies.last();
+  body = bodies.get();
   d = body->measure();
   assert(d - 39.2699 < 0.0001 && d >39.2699);
 
@@ -1021,7 +1024,10 @@
   refentities.append(draft_face);
   CubitVector v_move8ii(0,0,10);
   gmti->sweep_translational(refentities, v_move8ii, 0.087, 1, CUBIT_FALSE, CUBIT_FALSE); 
-  body = CAST_TO(refentities.get(), Body);
+  bodies.clean_out();
+  gti->bodies(bodies); 
+  bodies.last();
+  body = bodies.get();
   d = body->measure();
   //d = 66.3676  theoretical calculation is 66.7833, error 0.62%
   assert(d - 66.3676 < 0.0001 && d > 66.3676);
@@ -1030,7 +1036,10 @@
   refentities.clean_out();
   refentities.append(draft_face2);
   gmti->sweep_translational(refentities, v_move8ii, 0.087, 1, CUBIT_FALSE, CUBIT_FALSE);
-  body = CAST_TO(refentities.get(), Body);
+  bodies.clean_out();
+  gti->bodies(bodies); 
+  bodies.last();
+  body = bodies.get();
   d = body->measure();
   //d = 66.3676  theoretical calculation is 66.7833, error 0.62%
   assert(d - 66.3676 < 0.0001 && d > 66.3676);
@@ -1041,7 +1050,10 @@
   refentities.clean_out();
   refentities.append(edges.get());
   gmti->sweep_translational(refentities, v_move8ii, 0.087, 1, CUBIT_FALSE, CUBIT_FALSE);
-  body = CAST_TO(refentities.get(), Body);
+  bodies.clean_out();
+  gti->bodies(bodies); 
+  bodies.last();
+  body = bodies.get();
   d = body->measure();
   //d = area = 90.1292 theoretica calculation is 90.5754, error 0.49%


More information about the cgma-dev mailing list