[cgma-dev] r3459 - in cgm/branches/merge-cubit12: . geom/testing itaps test
kraftche at cae.wisc.edu
kraftche at cae.wisc.edu
Thu Jan 21 18:26:49 CST 2010
Author: kraftche
Date: 2010-01-21 18:26:49 -0600 (Thu, 21 Jan 2010)
New Revision: 3459
Modified:
cgm/branches/merge-cubit12/configure.ac
cgm/branches/merge-cubit12/geom/testing/Makefile.am
cgm/branches/merge-cubit12/itaps/iGeom_CGMA.cc
cgm/branches/merge-cubit12/test/webcut.cpp
Log:
fix build issues
Modified: cgm/branches/merge-cubit12/configure.ac
===================================================================
--- cgm/branches/merge-cubit12/configure.ac 2010-01-22 00:25:32 UTC (rev 3458)
+++ cgm/branches/merge-cubit12/configure.ac 2010-01-22 00:26:49 UTC (rev 3459)
@@ -445,6 +445,7 @@
geom/OCC/Makefile
geom/parallel/Makefile
geom/testing/Makefile
+ geom/testing/TestConfig.h
geom/virtual/Makefile
init/Makefile
compat/Makefile
Modified: cgm/branches/merge-cubit12/geom/testing/Makefile.am
===================================================================
--- cgm/branches/merge-cubit12/geom/testing/Makefile.am 2010-01-22 00:25:32 UTC (rev 3458)
+++ cgm/branches/merge-cubit12/geom/testing/Makefile.am 2010-01-22 00:26:49 UTC (rev 3459)
@@ -12,8 +12,7 @@
endif
INCLUDES = -I$(top_srcdir)/util -I$(top_srcdir)/geom -I.
-LDADD = ../../util/libcubit_util.la \
- ../libcubit_geom.la
+LDADD = ../../libcgm.la $(CGM_EXT_LDFLAGS) $(CGM_EXT_LTFLAGS)
SUFFIXES = .acis .occ
check_PROGRAMS = $(TESTS) cgm_test
Modified: cgm/branches/merge-cubit12/itaps/iGeom_CGMA.cc
===================================================================
--- cgm/branches/merge-cubit12/itaps/iGeom_CGMA.cc 2010-01-22 00:25:32 UTC (rev 3458)
+++ cgm/branches/merge-cubit12/itaps/iGeom_CGMA.cc 2010-01-22 00:26:49 UTC (rev 3459)
@@ -6397,34 +6397,20 @@
DLIList<RefEntity*>& entities,
DLIList<double>& ray_params )
{
- DLIList<Body*> bodies;
- DLIList<RefEntity*> tmp_entities;
- DLIList<double> tmp_params;
- double length = direction.length();
- CubitVector unit_dir(direction);
- unit_dir /= length;
+ const double EPSILON = 0.0;
+ CubitStatus s;
- RefEntityFactory::instance()->bodies( bodies );
- bodies.reset();
- for (int i = bodies.size(); i > 0; --i)
- {
- Body* bod = bodies.get_and_step();
- if (!iBase_intersect_ray_box(bod->bounding_box(), point, unit_dir))
- continue;
+ // get all free entities in model
+ DLIList<RefEntity*> target_entities;
+ s = GeometryQueryTool::instance()->get_free_ref_entities( target_entities );
+ if (CUBIT_SUCCESS != s) return s;
+ DLIList<Body*> bodies;
+ GeometryQueryTool::instance()->bodies( bodies );
+ CAST_LIST_TO_PARENT( bodies, target_entities );
- tmp_entities.clean_out();
- tmp_params.clean_out();
- int rval = GeometryQueryTool::instance()
- ->fire_ray( bod, point, unit_dir, tmp_params, &tmp_entities );
- if (rval == CUBIT_FAILURE)
- return CUBIT_FAILURE;
-
- entities += tmp_entities;
- tmp_params.reset();
- for (int j = tmp_params.size(); j > 0; j--)
- ray_params.append( tmp_params.get_and_step() / length );
- }
- return CUBIT_SUCCESS;
+ // do ray fire at list of free entities
+ return GeometryQueryTool::instance()->
+ fire_ray( point, direction, target_entities, ray_params, 0, EPSILON, &entities );
}
static CubitStatus
Modified: cgm/branches/merge-cubit12/test/webcut.cpp
===================================================================
--- cgm/branches/merge-cubit12/test/webcut.cpp 2010-01-22 00:25:32 UTC (rev 3458)
+++ cgm/branches/merge-cubit12/test/webcut.cpp 2010-01-22 00:26:49 UTC (rev 3459)
@@ -129,7 +129,7 @@
}
//int num_bodies = gti->num_bodies();
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies,junk;
gti->bodies(old_bodies);
old_bodies.reset();
//old_bodies.remove();
@@ -139,7 +139,7 @@
axes[1].set(0.,1.,0.);
axes[2].set(0.,0.,1.);
CubitVector extension(0.5,0.5,0.5);
- CubitStatus rsl= gmti->webcut_with_brick(old_bodies,center,axes,extension,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_brick(old_bodies,center,axes,extension,new_bodies,junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -183,14 +183,14 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
old_bodies.reset();
//old_bodies.remove();
CubitVector center(4.,4.,4.);
CubitVector axis(1.,0.,0.);
double radius = 1.0;
- CubitStatus rsl= gmti->webcut_with_cylinder(old_bodies,radius,axis, center,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_cylinder(old_bodies,radius,axis, center,new_bodies,junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -234,7 +234,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
old_bodies.reset();
@@ -243,7 +243,7 @@
axes[0].set(1.,1.,0.);
axes[1].set(0.,1.,1.);
- CubitStatus rsl= gmti->webcut_with_planar_sheet(old_bodies,center,axes,40.,40.,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_planar_sheet(old_bodies,center,axes,40.,40.,new_bodies,junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -288,7 +288,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
DLIList<RefEntity*> free_entities;
gti->get_free_ref_entities(free_entities);
@@ -308,7 +308,7 @@
axis.set(0.,-1.,0.);
CpuTimer webcut_BODYs_timer;
- CubitStatus rsl= gmti->webcut_with_sweep_curves_rotated(old_bodies,curves,center,axis,1.58,NULL,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_sweep_curves_rotated(old_bodies,curves,center,axis,1.58,NULL,new_bodies,junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -354,7 +354,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
DLIList<RefEntity*> free_entities;
gti->get_free_ref_entities(free_entities);
@@ -371,7 +371,7 @@
CubitVector axis;
axis.set(1.,0.,0.);
- CubitStatus rsl= gmti->webcut_with_sweep_curves(old_bodies,curves,axis,true,NULL,NULL,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_sweep_curves(old_bodies,curves,axis,true,NULL,NULL,new_bodies,junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -414,7 +414,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
DLIList<RefEntity*> free_entities;
gti->get_free_ref_entities(free_entities);
@@ -442,7 +442,7 @@
axis.set(1.,0.,0.);
CubitStatus rsl= gmti->webcut_with_sweep_curves(old_bodies,curves,axis,true,NULL,
- edge_to_sweep_along,new_bodies);
+ edge_to_sweep_along,new_bodies, junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -485,7 +485,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
DLIList<RefEntity*> free_entities;
gti->get_free_ref_entities(free_entities);
@@ -499,7 +499,7 @@
old_bodies.reset();
- CubitStatus rsl= gmti->webcut_with_curve_loop(old_bodies,curves,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_curve_loop(old_bodies,curves,new_bodies, junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -542,7 +542,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
old_bodies.reset();
@@ -551,8 +551,10 @@
DLIList<RefFace*> ref_faces;
old_bodies.remove()->ref_faces(ref_faces);
RefFace *refface = ref_faces.get();
+ ref_faces.clean_out();
+ ref_faces.append(refface);
int num_cut = 0;
- CubitStatus rsl= gmti->webcut_with_extended_surf(old_bodies,refface,new_bodies, num_cut);
+ CubitStatus rsl= gmti->webcut_with_extended_sheet(old_bodies,ref_faces,new_bodies, junk, num_cut);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -589,7 +591,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
old_bodies.reset();
@@ -599,11 +601,10 @@
old_bodies.remove()->ref_faces(faces);
CubitVector center(4.0,14.0,14.0);
- CubitVector axis;
- axis.set(0.,-1.,0.);
+ CubitVector axis(0.,-1.,0.);
// set 7th parameter to be false to indicate of to_next_surf = false
- CubitStatus rsl= gmti->webcut_with_sweep_surfaces_rotated(old_bodies,faces,center,axis,1.6,NULL,true,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_sweep_surfaces_rotated(old_bodies,faces,center,axis,1.6,NULL,true,new_bodies, junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -640,7 +641,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
old_bodies.reset();
@@ -653,7 +654,7 @@
CubitVector axis;
axis.set(1.,0.,0.);
- CubitStatus rsl= gmti->webcut_with_sweep_surfaces(old_bodies,faces,axis,false,true,false, false,NULL,NULL,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_sweep_surfaces(old_bodies,faces,axis,false,true,false, false,NULL,NULL,new_bodies, junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -690,7 +691,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
old_bodies.reset();
@@ -713,7 +714,7 @@
axis.set(1.,0.,0.);
CubitStatus rsl= gmti->webcut_with_sweep_surfaces(old_bodies,faces,axis,false, true,false,false,NULL,
- edge_to_sweep_along,new_bodies);
+ edge_to_sweep_along,new_bodies, junk);
if (rsl== CUBIT_FAILURE)
return rsl;
@@ -750,7 +751,7 @@
exit(ret_val);
}
- DLIList<Body*> old_bodies, new_bodies;
+ DLIList<Body*> old_bodies, new_bodies, junk;
gti->bodies(old_bodies);
old_bodies.reset();
@@ -763,7 +764,7 @@
CubitVector axis;
axis.set(1.,0.,0.);
- CubitStatus rsl= gmti->webcut_with_sweep_surfaces(old_bodies,faces,axis,true,true,true, false,NULL,NULL,new_bodies);
+ CubitStatus rsl= gmti->webcut_with_sweep_surfaces(old_bodies,faces,axis,true,true,true, false,NULL,NULL,new_bodies,junk);
if (rsl== CUBIT_FAILURE)
return rsl;
More information about the cgma-dev
mailing list