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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Tue May 24 10:44:38 CDT 2011


Author: janehu
Date: 2011-05-24 10:44:38 -0500 (Tue, 24 May 2011)
New Revision: 4863

Added:
   cgm/trunk/test/webcut.brep
Modified:
   cgm/trunk/test/Makefile.am
   cgm/trunk/test/modify.cpp
Log:
Testcase to support the webcut bug fix. Passed make distcheck.

Modified: cgm/trunk/test/Makefile.am
===================================================================
--- cgm/trunk/test/Makefile.am	2011-05-24 15:15:30 UTC (rev 4862)
+++ cgm/trunk/test/Makefile.am	2011-05-24 15:44:38 UTC (rev 4863)
@@ -82,6 +82,7 @@
              ex3.iges   \
              Cylinder_1.brep   \
              Cylinder_2.brep   \
+             webcut.brep     \
              stitch.name_occ 
 
 # Files that are created by tests, and that therefore 
@@ -124,6 +125,7 @@
         bug.brep \
         subtract.occ \
         glue.occ \
+        after_webcut.brep \
 	mmgr.log
  
 

Modified: cgm/trunk/test/modify.cpp
===================================================================
--- cgm/trunk/test/modify.cpp	2011-05-24 15:15:30 UTC (rev 4862)
+++ cgm/trunk/test/modify.cpp	2011-05-24 15:44:38 UTC (rev 4863)
@@ -1279,5 +1279,36 @@
   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);
   assert (CAST_TO(ref_entity_list.get(), Body)->num_ref_volumes() == 1);
+
+  bodies.clean_out();
+  gti->bodies(bodies);
+  //delete all entities
+  gti->delete_Body(bodies);
+
+  free_entities.clean_out();
+  gti->get_free_ref_entities(free_entities);
+  for(int i = 0; i < free_entities.size(); i++)
+    gti->delete_RefEntity(free_entities.get_and_step());
+
+  // Read in the geometry from files specified on the command line
+  argv = "webcut.brep";
+  read_geometry(1, &argv, false);
+
+  DLIList<Body*> old_bodies, junk;
+  new_bodies.clean_out();
+  gti->bodies(old_bodies);
+  CubitVector center_l(0, 0, 0);
+  CubitVector axis(0.,0.,1.);
+  double radius = 0.5;
+  rsl= gmti->webcut_with_cylinder(old_bodies,radius,axis, center_l,new_bodies,junk);


More information about the cgma-dev mailing list