[cgma-dev] r5748 - cgm/branches/merge-cubit13.1/geom/OCC

janehu at mcs.anl.gov janehu at mcs.anl.gov
Mon Sep 24 12:25:39 CDT 2012


Author: janehu
Date: 2012-09-24 12:25:39 -0500 (Mon, 24 Sep 2012)
New Revision: 5748

Modified:
   cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp
   cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp
Log:
Remove check for IsMin, found that it's not the correct indication whether the result is a Minimal extreme. Corrected the mcnp2cad/rec testcase, not takes 6-8s instead of 20 minutes and gives wrong results. Passed make check for cgm/test.

Modified: cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp
===================================================================
--- cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp	2012-09-24 00:27:43 UTC (rev 5747)
+++ cgm/branches/merge-cubit13.1/geom/OCC/OCCCurve.cpp	2012-09-24 17:25:39 UTC (rev 5748)
@@ -462,14 +462,12 @@
   double sqr_dist = CUBIT_DBL_MAX;
   double pparam;
   for (int i = 1; i <= ext.NbExt(); ++i) {
-    if (ext.IsMin(i)) {
       double new_sqr_dist = p.SquareDistance( ext.Point(i).Value() );
       if (new_sqr_dist < sqr_dist) {
         sqr_dist = new_sqr_dist;
         newP = ext.Point(i).Value();
         pparam = ext.Point(i).Parameter();
       }
-    }
   }
 
     // if we didn't find any minimum...

Modified: cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp
===================================================================
--- cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp	2012-09-24 00:27:43 UTC (rev 5747)
+++ cgm/branches/merge-cubit13.1/geom/OCC/OCCModifyEngine.cpp	2012-09-24 17:25:39 UTC (rev 5748)
@@ -3276,27 +3276,23 @@
           // At this time, there must be a intersection point at least.
           if (ext.IsDone() && (ext.NbExt() > 0)) {
             for ( int i = 1 ; i <= ext.NbExt() ; i++ ) {
-              if ( ext.IsMin(i) ) {
-        	newVal = ext.Point(i).Parameter();
-		if ((newVal-lower_bound) >= -TOL && 
-                    (upper_bound - newVal) >= -TOL)
-		{
-                  Extrema_ExtPC ext(p_test, acurve2, Precision::Approximation());
-                  if (ext.IsDone() && (ext.NbExt() > 0)) { 
-                    for ( int k = 1 ; k <= ext.NbExt() ; k++ ) { 
-                      if ( ext.IsMin(i) ) { 
-                        newVal = ext.Point(i).Parameter();
-                        if ((newVal-lower_bound2) >= -TOL && 
-                            (upper_bound2 - newVal) >= -TOL)
-                        {
-                          newP[count_intersection] = p_test;
-                          count_intersection ++;
-		          break;
-                        }
-                      }
+              newVal = ext.Point(i).Parameter();
+	      if ((newVal-lower_bound) >= -TOL && 
+                  (upper_bound - newVal) >= -TOL)
+	      {
+                Extrema_ExtPC ext(p_test, acurve2, Precision::Approximation());


More information about the cgma-dev mailing list