[cgma-dev] r4259 - cgm/trunk/geom/OCC
jiangtao_ma at yahoo.com
jiangtao_ma at yahoo.com
Wed Nov 10 11:52:45 CST 2010
Author: janehu
Date: 2010-11-10 11:52:44 -0600 (Wed, 10 Nov 2010)
New Revision: 4259
Modified:
cgm/trunk/geom/OCC/OCCModifyEngine.cpp
Log:
Fix for mcnp2cad/tests/hexlat. The qualified points could be more than 2, so change to use a DLIList instead of using an array of two.
Modified: cgm/trunk/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2010-11-09 21:38:43 UTC (rev 4258)
+++ cgm/trunk/geom/OCC/OCCModifyEngine.cpp 2010-11-10 17:52:44 UTC (rev 4259)
@@ -2704,7 +2704,7 @@
gp_Pnt pt1(0,0,0), pt2(0,0,0);
gp_Pnt intsec_pnt[2] = {pt1, pt2} ;
- for(int j = 0; j < edge_list->size(); j++)
+ for(int kk = 0; kk < edge_list->size(); kk++)
{
TopoDS_Edge* edge = edge_list->get_and_step();
BRepAdaptor_Curve acurve(*edge);
@@ -2720,7 +2720,9 @@
double lower_bound2 = acurve2.FirstParameter();
double upper_bound2 = acurve2.LastParameter();
BRepExtrema_DistShapeShape distShapeShape(*edge, from_edge);
- CubitBoolean qualified[2] = {CUBIT_FALSE, CUBIT_FALSE};
+ DLIList<CubitBoolean> qualified;
+ //CubitBoolean qualified[2] = {CUBIT_FALSE, CUBIT_FALSE};
+
if (distShapeShape.IsDone() && distShapeShape.Value() < TOL)
{
newP[0] = distShapeShape.PointOnShape1(1);
@@ -2737,7 +2739,7 @@
if ((newVal[j]-lower_bound) >= -TOL &&
(upper_bound - newVal[j]) >= -TOL)
{
- qualified[j] = CUBIT_TRUE;
+ qualified.append(CUBIT_TRUE);
break;
}
}
@@ -2746,9 +2748,9 @@
}
for(int j = 0; j < distShapeShape.NbSolution(); j++)
{
- if (qualified[j])
+ if (qualified.get())
{
- qualified[j] = CUBIT_FALSE;
+ qualified.change_to( CUBIT_FALSE );
Extrema_ExtPC ext(newP[j], acurve2, Precision::Approximation());
double newVal;
if (ext.IsDone() && (ext.NbExt() > 0)) {
@@ -2758,17 +2760,18 @@
if ((newVal-lower_bound2) >= -TOL &&
(upper_bound2 - newVal) >= -TOL)
{
- qualified[j] = CUBIT_TRUE;
+ qualified.change_to( CUBIT_TRUE);
More information about the cgma-dev
mailing list