[cgma-dev] r1535 - cgm/trunk/geom/OCC

janehu at mcs.anl.gov janehu at mcs.anl.gov
Thu Jan 17 13:52:19 CST 2008


Author: janehu
Date: 2008-01-17 13:52:19 -0600 (Thu, 17 Jan 2008)
New Revision: 1535

Modified:
   cgm/trunk/geom/OCC/OCCSurface.cpp
Log:
small change on the logic of gettign curvature vector.

Modified: cgm/trunk/geom/OCC/OCCSurface.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCSurface.cpp	2008-01-17 07:48:09 UTC (rev 1534)
+++ cgm/trunk/geom/OCC/OCCSurface.cpp	2008-01-17 19:52:19 UTC (rev 1535)
@@ -245,8 +245,8 @@
 //-------------------------------------------------------------------------
 // Purpose       : Computes the closest_point on the surface to the input 
 //                 location.  Optionally, it also computes and returns
-//                 the normal to the surface and the principal curvatures
-//                 at closest_location.
+//                 the normal to the surface at closest_location and the 
+//                 principal curvatures(1-min, 2-max)
 //
 //-------------------------------------------------------------------------
 CubitStatus OCCSurface::closest_point( CubitVector const& location, 
@@ -283,11 +283,13 @@
   
         gp_Dir MaxD, MinD;
         if (SLP.IsCurvatureDefined())
+        {
 	   SLP.CurvatureDirections(MaxD, MinD);
-        if (curvature_1 != NULL)
-           *curvature_1 = CubitVector(MaxD.X(), MaxD.Y(), MaxD.Z());
-        if (curvature_2 != NULL)
-           *curvature_2 = CubitVector(MinD.X(), MinD.Y(), MinD.Z());
+           if (curvature_1 != NULL)
+              *curvature_1 = CubitVector(MinD.X(), MinD.Y(), MinD.Z());
+           if (curvature_2 != NULL)
+              *curvature_2 = CubitVector(MaxD.X(), MaxD.Y(), MaxD.Z());
+        }
   	return CUBIT_SUCCESS;
   }
   return CUBIT_FAILURE;




More information about the cgma-dev mailing list