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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Thu Apr 7 12:22:28 CDT 2011


Author: janehu
Date: 2011-04-07 12:22:27 -0500 (Thu, 07 Apr 2011)
New Revision: 4725

Modified:
   cgm/branches/merge-cubit12/test/modify.cpp
Log:
Added a testcase from CGM trunk, fixed a bug in importing OCC geometry: For non-compound type of geometry, directly read-in all structure; for compound type, read in individual sturctures separately.

Modified: cgm/branches/merge-cubit12/test/modify.cpp
===================================================================
--- cgm/branches/merge-cubit12/test/modify.cpp	2011-04-07 16:09:33 UTC (rev 4724)
+++ cgm/branches/merge-cubit12/test/modify.cpp	2011-04-07 17:22:27 UTC (rev 4725)
@@ -1256,5 +1256,27 @@
     gti->delete_RefEntity(free_entities.get_and_step());
 
   //So far created volume 80.
+
+  // Read in the geometry from files specified on the command line
+  argv = "Cylinder_1.brep";
+  status = read_geometry(1, &argv, true);
+  argv = "Cylinder_2.brep";
+  status = read_geometry(1, &argv, true);
+  if (status == CUBIT_FAILURE) exit(1);
+  //Read in 2 volumes.
+
+  from_bodies.clean_out();
+  new_bodies.clean_out();
+  gti->bodies(from_bodies);
+  stat = gmti->imprint(from_bodies, new_bodies, CUBIT_FALSE);
+
+  num_ents_exported=0;
+  filename = "imprint.brep";
+  ref_entity_list.clean_out();
+  rsl = gti->export_solid_model(ref_entity_list, filename, filetype,
+                                 num_ents_exported, cubit_version);
+  assert(num_ents_exported == 2);
+  assert (CAST_TO(ref_entity_list.get(), Body)->num_ref_faces() == 7);
+  assert (CAST_TO(ref_entity_list.get_and_step(), Body)->num_ref_edges() == 11);
   return CUBIT_SUCCESS;
 }





















More information about the cgma-dev mailing list