[cgma-dev] r2265 - cgm/trunk/test
janehu at mcs.anl.gov
janehu at mcs.anl.gov
Mon Nov 17 11:36:51 CST 2008
Author: janehu
Date: 2008-11-17 11:36:51 -0600 (Mon, 17 Nov 2008)
New Revision: 2265
Modified:
cgm/trunk/test/hollow_acis.cpp
cgm/trunk/test/makept.cpp
cgm/trunk/test/modify.cpp
cgm/trunk/test/r_w.cpp
cgm/trunk/test/sheet.cpp
cgm/trunk/test/test_occ.cpp
cgm/trunk/test/webcut.cpp
Log:
Remove unnessecary warnings from compiling.
Modified: cgm/trunk/test/hollow_acis.cpp
===================================================================
--- cgm/trunk/test/hollow_acis.cpp 2008-11-15 09:37:07 UTC (rev 2264)
+++ cgm/trunk/test/hollow_acis.cpp 2008-11-17 17:36:51 UTC (rev 2265)
@@ -53,7 +53,7 @@
// Initialize the GeometryTool
CGMApp::instance()->startup( argc, argv );
- GeometryQueryTool *gti = GeometryQueryTool::instance();
+ GeometryQueryTool::instance();
AcisQueryEngine::instance();
AcisModifyEngine::instance();
@@ -85,7 +85,7 @@
///
/// Arguments: file name(s) of geometry files in which to look
///
-CubitStatus read_geometry(int num_files, char **argv)
+CubitStatus read_geometry(int num_files, const char **argv)
{
CubitStatus status = CUBIT_SUCCESS;
GeometryQueryTool *gti = GeometryQueryTool::instance();
@@ -93,8 +93,6 @@
int i;
// For each file, open and read the geometry
- FILE *file_ptr;
-
PRINT_SEPARATOR;
for (i = 0; i < num_files; i++) {
@@ -114,7 +112,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/hollow.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/hollow.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -149,6 +147,6 @@
//Destroyed volume(s): 1
n = new_bodies.get()->num_ref_faces(); //n = 9
d = new_bodies.get()->measure(); //d = 72.4074
- return CUBIT_SUCCESS;
+ return stat ;
}
Modified: cgm/trunk/test/makept.cpp
===================================================================
--- cgm/trunk/test/makept.cpp 2008-11-15 09:37:07 UTC (rev 2264)
+++ cgm/trunk/test/makept.cpp 2008-11-17 17:36:51 UTC (rev 2265)
@@ -39,7 +39,7 @@
#define SRCPATH STRINGIFY(SRCDIR) "/"
// forward declare some functions used and defined later
-CubitStatus read_geometry(int, char **);
+CubitStatus read_geometry(int, const char **, bool local = false);
CubitStatus make_Point();
// macro for printing a separator line
#define PRINT_SEPARATOR PRINT_INFO("=======================================\n");
@@ -84,7 +84,7 @@
///
/// Arguments: file name(s) of geometry files in which to look
///
-CubitStatus read_geometry(int num_files, char **argv)
+CubitStatus read_geometry(int num_files, const char **argv, bool local)
{
CubitStatus status = CUBIT_SUCCESS;
GeometryQueryTool *gti = GeometryQueryTool::instance();
@@ -94,7 +94,7 @@
PRINT_SEPARATOR;
for (i = 0; i < num_files; i++) {
- std::string filename( SRCPATH );
+ std::string filename( local ? "./" : SRCPATH );
filename += argv[i];
status = gti->import_solid_model(filename.c_str(), "OCC");
if (status != CUBIT_SUCCESS) {
@@ -115,16 +115,16 @@
OCCModifyEngine::instance();
// Read in the geometry from files specified on the command line
- char *argv = "./66_shaver3.brep";
+ const char *argv = "66_shaver3.brep";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
- argv = "./62_shaver1.brep";
- status = read_geometry(1, &argv);
+ const char *argv2 = "62_shaver1.brep";
+ status = read_geometry(1, &argv2);
if (status == CUBIT_FAILURE) exit(1);
- argv = "./72_shaver6.brep";
- status = read_geometry(1, &argv);
+ const char *argv3 = "72_shaver6.brep";
+ status = read_geometry(1, &argv3);
if (status == CUBIT_FAILURE) exit(1);
// test create a Compound body.
Modified: cgm/trunk/test/modify.cpp
===================================================================
--- cgm/trunk/test/modify.cpp 2008-11-15 09:37:07 UTC (rev 2264)
+++ cgm/trunk/test/modify.cpp 2008-11-17 17:36:51 UTC (rev 2265)
@@ -46,7 +46,7 @@
#define SRCPATH STRINGIFY(SRCDIR) "/"
// forward declare some functions used and defined later
-CubitStatus read_geometry(int, char **, bool local = false);
+CubitStatus read_geometry(int, const char **, bool local = false);
CubitStatus make_Point();
// macro for printing a separator line
#define PRINT_SEPARATOR PRINT_INFO("=======================================\n");
@@ -91,7 +91,7 @@
///
/// Arguments: file name(s) of geometry files in which to look
///
-CubitStatus read_geometry(int num_files, char **argv, bool local)
+CubitStatus read_geometry(int num_files, const char **argv, bool local)
{
CubitStatus status = CUBIT_SUCCESS;
GeometryQueryTool *gti = GeometryQueryTool::instance();
@@ -116,7 +116,6 @@
CubitStatus make_Point()
{
- RefEntityFactory* ref = RefEntityFactory::instance();
GeometryQueryTool *gti = GeometryQueryTool::instance();
GeometryModifyTool *gmti = GeometryModifyTool::instance();
@@ -176,8 +175,7 @@
}
//create solid from surfaces
- GeometryModifyEngine *gme = gmti->get_engine(occ_surfaces.get());
- BodySM* stitched_body = NULL;
+ //GeometryModifyEngine *gme = gmti->get_engine(occ_surfaces.get());
DLIList<Body*> new_bodies;
gmti->create_solid_bodies_from_surfs(face_list, new_bodies);
//Created volume(s): 9
@@ -205,7 +203,7 @@
}
// Read in the geometry from files specified on the command line
- char *argv = "stitch.occ";
+ const char *argv = "stitch.occ";
CubitStatus status = read_geometry(1, &argv, true);
if (status == CUBIT_FAILURE) exit(1);
//Read in 1 volume.
@@ -229,8 +227,12 @@
Body* tool_body = gmti->cylinder(10, 1, 1, 1);
double d;
d = from_body->measure(); //d = 219.91
+ bodysm = from_body->get_body_sm_ptr();
+ CubitVector center1;
+ CAST_TO(bodysm, OCCBody)->mass_properties(center1, d);
d = from_body2->measure();//d = 67.02
d = tool_body->measure(); //d = 31.41
+
// test for sphere making
Body* test_body = gmti->sphere(5);
@@ -522,9 +524,6 @@
gti->get_free_ref_entities(free_entities);
assert(free_entities.size() == 0);
- OCCQueryEngine* oqe = OCCQueryEngine::instance();
- DLIList <OCCBody* > *occ_bodies = oqe->BodyList;
-
from_body = gmti->brick(4, 4, 4);
CubitVector v_move9(2,5,2);
gti->translate(from_body,v_move9);
@@ -747,7 +746,6 @@
RefFace* draft_face = gmti->make_RefFace(sweep_face);
RefFace* perp_face = gmti->make_RefFace(sweep_face);
RefFace* rotate_face = gmti->make_RefFace(sweep_face);
- RefFace* rotate_face2 = gmti->make_RefFace(sweep_face);
gmti->sweep_translational(refentities, v_move8, 0, 1, CUBIT_FALSE, CUBIT_FALSE);
body = CAST_TO(refentities.get(), Body);
d = body->measure();
Modified: cgm/trunk/test/r_w.cpp
===================================================================
--- cgm/trunk/test/r_w.cpp 2008-11-15 09:37:07 UTC (rev 2264)
+++ cgm/trunk/test/r_w.cpp 2008-11-17 17:36:51 UTC (rev 2265)
@@ -91,7 +91,7 @@
///
/// Arguments: file name(s) of geometry files in which to look
///
-CubitStatus read_geometry(int num_files, char **argv, bool local)
+CubitStatus read_geometry(int num_files, const char **argv, bool local)
{
CubitStatus status = CUBIT_SUCCESS;
GeometryQueryTool *gti = GeometryQueryTool::instance();
@@ -125,7 +125,7 @@
DLIList<RefEntity*> free_entities;
// Read in the geometry from files specified on the command line
- char *argv = "stitch.occ_name";
+ const char *argv = "stitch.occ_name";
CubitStatus status = read_geometry(1, &argv, false);
if (status == CUBIT_FAILURE) exit(1);
//Read in 2 volumes.
@@ -152,8 +152,8 @@
gti->delete_RefEntity( free_entities.get_and_step());
}
- argv = "beforesub.occ";
- status = read_geometry(1, &argv, true);
+ const char *argv1 = "beforesub.occ";
+ status = read_geometry(1, &argv1, true);
if (status == CUBIT_FAILURE) exit(1);
//Read in 2 volumes.
@@ -197,8 +197,8 @@
assert(free_entities.size() ==0);
// Read in the geometry from files specified on the command line
- argv = "unite1.occ";
- status = read_geometry(1, &argv, false);
+ const char *argv2 = "unite1.occ";
+ status = read_geometry(1, &argv2, false);
if (status == CUBIT_FAILURE) exit(1);
//Read in 2 volumes.
@@ -223,8 +223,8 @@
assert(free_entities.size() ==0);
// Read in the geometry from files specified on the command line
- argv = "unite1.occ";
- status = read_geometry(1, &argv, false);
+ const char *argv3 = "unite1.occ";
+ status = read_geometry(1, &argv3, false);
if (status == CUBIT_FAILURE) exit(1);
//Read in 2 volumes.
@@ -253,8 +253,8 @@
assert(free_entities.size() ==0);
// Read in the geometry from files specified on the command line
- argv = "unite4.occ";
- status = read_geometry(1, &argv, false);
+ const char *argv4 = "unite4.occ";
+ status = read_geometry(1, &argv4, false);
if (status == CUBIT_FAILURE) exit(1);
//Read in 2 volumes.
@@ -279,8 +279,7 @@
assert(free_entities.size() ==0);
// Read in the geometry from files specified on the command line
- argv = "unite4.occ";
- status = read_geometry(1, &argv, false);
+ status = read_geometry(1, &argv4, false);
if (status == CUBIT_FAILURE) exit(1);
//Read in 2 volumes.
Modified: cgm/trunk/test/sheet.cpp
===================================================================
--- cgm/trunk/test/sheet.cpp 2008-11-15 09:37:07 UTC (rev 2264)
+++ cgm/trunk/test/sheet.cpp 2008-11-17 17:36:51 UTC (rev 2265)
@@ -36,17 +36,6 @@
CubitStatus result = InitCGMA::initialize_cgma();
if (CUBIT_SUCCESS != result) return 1;
- GeometryQueryEngine* const gqe_list[] = {
-#ifdef HAVE_ACIS
-// AcisQueryEngine::instance(),
-#endif
-#ifdef HAVE_OCC
-// OCCQueryEngine::instance(),
-#endif
- NULL
- };
-
-
GeometryModifyEngine* const gme_list[] = {
#ifdef HAVE_ACIS
// AcisModifyEngine::instance(),
Modified: cgm/trunk/test/test_occ.cpp
===================================================================
--- cgm/trunk/test/test_occ.cpp 2008-11-15 09:37:07 UTC (rev 2264)
+++ cgm/trunk/test/test_occ.cpp 2008-11-17 17:36:51 UTC (rev 2265)
@@ -42,7 +42,7 @@
OCCQueryEngine::instance();
OCCModifyEngine::instance();
GeometryQueryTool *gti = GeometryQueryTool::instance();
- GeometryModifyTool *gmti = GeometryModifyTool::instance();
+ GeometryModifyTool::instance();
assert(gti);
// Read in the geometry from files specified on the command line
Modified: cgm/trunk/test/webcut.cpp
===================================================================
--- cgm/trunk/test/webcut.cpp 2008-11-15 09:37:07 UTC (rev 2264)
+++ cgm/trunk/test/webcut.cpp 2008-11-17 17:36:51 UTC (rev 2265)
@@ -64,7 +64,7 @@
// Initialize the GeometryTool
CGMApp::instance()->startup( argc, argv );
- GeometryQueryTool *gti = GeometryQueryTool::instance();
+ GeometryQueryTool::instance();
AcisQueryEngine::instance();
AcisModifyEngine::instance();
@@ -107,7 +107,7 @@
///
/// Arguments: file name(s) of geometry files in which to look
///
-CubitStatus read_geometry(int num_files, char **argv)
+CubitStatus read_geometry(int num_files, const char **argv)
{
CubitStatus status = CUBIT_SUCCESS;
GeometryQueryTool *gti = GeometryQueryTool::instance();
@@ -115,8 +115,6 @@
int i;
// For each file, open and read the geometry
- FILE *file_ptr;
-
PRINT_SEPARATOR;
for (i = 0; i < num_files; i++) {
@@ -136,7 +134,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model2.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model2.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -191,7 +189,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model2.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model2.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -242,7 +240,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model2.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model2.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -296,7 +294,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/huge.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/huge.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -362,7 +360,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model3.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model3.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -422,7 +420,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model3.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model3.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -493,7 +491,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model4.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model4.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -550,7 +548,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model5.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model5.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -597,7 +595,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model7.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model7.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -648,7 +646,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model6.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model6.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -698,7 +696,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model6.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model6.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
@@ -758,7 +756,7 @@
GeometryModifyTool *gmti = GeometryModifyTool::instance();
// Read in the geometry from files specified on the command line
- char *argv = STRINGIFY(SRCDIR) "/model6.sat";
+ const char *argv = STRINGIFY(SRCDIR) "/model6.sat";
CubitStatus status = read_geometry(1, &argv);
if (status == CUBIT_FAILURE) exit(1);
else if (gti->num_bodies() == 0) {
More information about the cgma-dev
mailing list