[cgma-dev] r5591 - cgm/trunk/test

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Tue Jun 26 11:58:05 CDT 2012


Author: janehu
Date: 2012-06-26 11:58:04 -0500 (Tue, 26 Jun 2012)
New Revision: 5591

Modified:
   cgm/trunk/test/makept.cpp
Log:
Back ported changes from merge-cubit13.1 for -r5590 changes.

Modified: cgm/trunk/test/makept.cpp
===================================================================
--- cgm/trunk/test/makept.cpp	2012-06-26 16:56:18 UTC (rev 5590)
+++ cgm/trunk/test/makept.cpp	2012-06-26 16:58:04 UTC (rev 5591)
@@ -53,11 +53,11 @@
      PRINT_INFO("Operation Failed");
 
   int ret_val = ( CubitMessage::instance()->error_count() );
-  if ( ret_val > 0 )
+  if ( ret_val > 2 )
   {
     PRINT_ERROR("Errors found during Mergechk session.\n");
   }
-  return ret_val;
+  return ret_val-2;
   
 }
 
@@ -385,17 +385,23 @@
   //check for surface
   DLIList<OCCSurface*> surfaces;
   occ_body->get_all_surfaces(surfaces);
-  OCCSurface* surface = surfaces.step_and_get();
-  GeometryType type = surface->geometry_type();
-  // CONE_SURFACE_TYPE
+  assert(surfaces.size() == 981);
+  OCCSurface* surface = NULL;
+  GeometryType type;
 
-  box = surface->bounding_box();
-  // bounding box
-
   DLIList<RefFace*> ref_faces;
   gti->ref_faces(ref_faces);
-  //  RefFace* ref_face = ref_faces.step_and_get();
+  for(int i = 0; i < ref_faces.size(); i++)
+  {
+    surface = CAST_TO(ref_faces.step_and_get()->get_surface_ptr(), OCCSurface);
+    type = surface->geometry_type();
+    if (type == CONE_SURFACE_TYPE)
+      break;
+  }
+
   RefFace* ref_face = ref_faces.get();
+  box = surface->bounding_box();
+  // bounding box
 
   //make a new refface out of existing refface.
   CubitBoolean extended_from = CUBIT_TRUE;
@@ -423,8 +429,10 @@
   }


More information about the cgma-dev mailing list