[cgma-dev] r5473 - in cgm/branches/merge-cubit13.1/geom: OCC testing
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Tue Apr 10 11:14:55 CDT 2012
Author: janehu
Date: 2012-04-10 11:14:55 -0500 (Tue, 10 Apr 2012)
New Revision: 5473
Modified:
cgm/branches/merge-cubit13.1/geom/OCC/OCCQueryEngine.cpp
cgm/branches/merge-cubit13.1/geom/testing/CreateGeometry.cpp
cgm/branches/merge-cubit13.1/geom/testing/Makefile.am
cgm/branches/merge-cubit13.1/geom/testing/cgm_test.cpp
Log:
Fixed the build issue for geom/testing directory, made testcases work.
Modified: cgm/branches/merge-cubit13.1/geom/OCC/OCCQueryEngine.cpp
===================================================================
--- cgm/branches/merge-cubit13.1/geom/OCC/OCCQueryEngine.cpp 2012-04-09 20:23:53 UTC (rev 5472)
+++ cgm/branches/merge-cubit13.1/geom/OCC/OCCQueryEngine.cpp 2012-04-10 16:14:55 UTC (rev 5473)
@@ -384,7 +384,9 @@
//do tessellation
if(distance_tolerance == 0.0)
- distance_tolerance = 0.01;
+ distance_tolerance = 0.01;
+ if(angle_tolerance == 0.0)
+ angle_tolerance = 5;
double angle = CUBIT_PI * angle_tolerance/180;
BRepAdaptor_Curve acurve(*Topo_Edge);
GCPnts_TangentialDeflection *myMesh =
Modified: cgm/branches/merge-cubit13.1/geom/testing/CreateGeometry.cpp
===================================================================
--- cgm/branches/merge-cubit13.1/geom/testing/CreateGeometry.cpp 2012-04-09 20:23:53 UTC (rev 5472)
+++ cgm/branches/merge-cubit13.1/geom/testing/CreateGeometry.cpp 2012-04-10 16:14:55 UTC (rev 5473)
@@ -36,9 +36,9 @@
{
CubitVector center(1, 2, 4);
CubitVector axes[3] = {
- CubitVector(1, 0, .2),
- CubitVector(0, 1, .4),
- CubitVector(0.1, 0, 1)
+ CubitVector(0.707, 0.707, 0),
+ CubitVector(-0.707, 0.707, 0),
+ CubitVector(0, 0, 1)
};
CubitVector extension(3, 5, 7);
@@ -48,10 +48,15 @@
printf("failed to make brick\n");
return 1;
}
- if(!cubit_box_identical(brick->bounding_box(),
- CubitBox(CubitVector(-3.577819, -5.210785, -4.768732),
- CubitVector(5.577819, 9.210785, 12.768732)),
- GEOMETRY_RESABS*2.0, true))
+ CubitBox comp_box(CubitVector(-4.656854, -3.656854, -3.),
+ CubitVector(6.656854, 7.656854, 11.));
+ CubitBox bnd_box = brick->bounding_box();
+
+ bool identical = cubit_box_identical(bnd_box, comp_box, GEOMETRY_RESABS*2.0, true);
+ if (identical)
+ return 0;
+
+ if( bnd_box < comp_box || bnd_box > comp_box*1.09)
{
More information about the cgma-dev
mailing list