[cgma-dev] r5292 - cgm/trunk/test
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Fri Jan 6 12:24:47 CST 2012
Author: janehu
Date: 2012-01-06 12:24:46 -0600 (Fri, 06 Jan 2012)
New Revision: 5292
Modified:
cgm/trunk/test/imprint_bug.cpp
Log:
Added test for imprint mesh bug filed by Boyd Tidwell, the bug is acctually in finding shell's parent, so simply test in the file to just test the get_parents functoin.
Modified: cgm/trunk/test/imprint_bug.cpp
===================================================================
--- cgm/trunk/test/imprint_bug.cpp 2012-01-06 18:08:22 UTC (rev 5291)
+++ cgm/trunk/test/imprint_bug.cpp 2012-01-06 18:24:46 UTC (rev 5292)
@@ -16,6 +16,7 @@
#include "CubitMessage.hpp"
#include "Body.hpp"
#include "RefVolume.hpp"
+#include "Shell.hpp"
#include "RefFace.hpp"
#include "RefEdge.hpp"
#include "RefVertex.hpp"
@@ -57,7 +58,7 @@
PRINT_INFO("Operation Failed");
int ret_val = ( CubitMessage::instance()->error_count() );
- if ( ret_val != 7 )
+ if ( ret_val != 0 )
{
PRINT_ERROR("Errors found during Mergechk session.\n");
}
@@ -119,5 +120,25 @@
gti->bodies(from_bodies);
//Bug 247 test, when this bug get fixed, the comment should be removed.
// status = gmti->imprint(from_bodies, new_bodies, CUBIT_FALSE);
+
+ DLIList<Body*> bodies;
+ bodies.clean_out();
+ gti->bodies(bodies);
+ //delete all entities
+ gti->delete_Body(bodies);
+
+ DLIList<RefEntity*> free_entities;
+ gti->get_free_ref_entities(free_entities);
+ for(int i = 0; i < free_entities.size(); i++)
+ gti->delete_RefEntity(free_entities.get_and_step());
+
+ Body* body = gmti->brick(10, 10, 10);
+ DLIList<Shell*> shells;
+ body->shells(shells);
+ ShellSM* shell = shells.get()->get_shell_sm_ptr();
+ OCCShell* occ_shell = CAST_TO(shell, OCCShell);
+ DLIList<TopologyBridge*> parents;
+ occ_shell->get_parents_virt(parents);
+ assert (parents.size() == 1);
return status;
}
More information about the cgma-dev
mailing list