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

jiangtao_ma at yahoo.com jiangtao_ma at yahoo.com
Tue May 17 12:15:51 CDT 2011


Author: janehu
Date: 2011-05-17 12:15:50 -0500 (Tue, 17 May 2011)
New Revision: 4837

Modified:
   cgm/trunk/geom/OCC/OCCSurface.cpp
   cgm/trunk/geom/OCC/OCCSurface.hpp
Log:
Add 2nd derivative function for OCC surface in the code base. Not been used in anywhere yet.

Modified: cgm/trunk/geom/OCC/OCCSurface.cpp
===================================================================
--- cgm/trunk/geom/OCC/OCCSurface.cpp	2011-05-17 16:26:57 UTC (rev 4836)
+++ cgm/trunk/geom/OCC/OCCSurface.cpp	2011-05-17 17:15:50 UTC (rev 4837)
@@ -560,6 +560,26 @@
 }
 
 //-------------------------------------------------------------------------
+// Purpose       : Calculates the derivitives at a given parameter location.
+//
+//-------------------------------------------------------------------------
+CubitStatus OCCSurface::uv_2nd_derivitives( double u,
+                                            double v,
+                                            CubitVector &d2u,
+                                            CubitVector &d2v,
+                                            CubitVector &d2uv )
+{
+  BRepAdaptor_Surface asurface(*myTopoDSFace);
+  gp_Pnt p;
+  gp_Vec d1u, d1v, du, dv, duv ;
+  asurface.D2(u, v, p, d1u, d1v, du, dv, duv);
+  d2u = CubitVector(du.X(), du.Y(), du.Z());
+  d2v = CubitVector(dv.X(), dv.Y(), dv.Z());
+  d2uv =CubitVector(duv.X(), duv.Y(), duv.Z()); 
+  return CUBIT_SUCCESS;
+}
+
+//-------------------------------------------------------------------------
 // Purpose       : Determines whether the surface is parametrically defined.
 //                 Hopefully later this will be available.
 //

Modified: cgm/trunk/geom/OCC/OCCSurface.hpp
===================================================================
--- cgm/trunk/geom/OCC/OCCSurface.hpp	2011-05-17 16:26:57 UTC (rev 4836)
+++ cgm/trunk/geom/OCC/OCCSurface.hpp	2011-05-17 17:15:50 UTC (rev 4837)
@@ -307,6 +307,17 @@
     //- Determines the u and v derivitives from the given parameter
     //- values.
   
+  CubitStatus uv_2nd_derivitives( double u_param,
+                                  double v_param,
+                                  CubitVector &d2u,
+                                  CubitVector &d2v,
+                                  CubitVector &d2uv );
+    //R CubitStatus
+    //R- CUBIT_SUCCESS/CUBIT_FAILURE
+    //O- d2u, d2v, d2uv
+    //- Determines the u, v and uv 2nd derivitives from the given parameter
+    //- values.
+  


More information about the cgma-dev mailing list