]> https://gitweb.dealii.org/ - dealii.git/commitdiff
closest_point_and_differential_forms and push_forward_and_differential_forms in openc...
authoramola <amola@terminus.sissa.it>
Fri, 15 Apr 2016 13:38:09 +0000 (15:38 +0200)
committeramola <amola@terminus.sissa.it>
Mon, 18 Apr 2016 10:42:44 +0000 (12:42 +0200)
include/deal.II/opencascade/utilities.h
source/opencascade/boundary_lib.cc
source/opencascade/utilities.cc

index edaa4288479c8cdef8409f2ffc503da804dff111..081ce6e84f0429687f537fe17cb820aad62b9837 100644 (file)
@@ -274,9 +274,9 @@ namespace OpenCASCADE
   /**
    * Given a TopoDS_Face @p face and the reference coordinates within this
    * face, returns the corresponding point in real space, the normal to the
-   * surface at that point and the mean curvature as a tuple.
+   * surface at that point and the min and max curvatures as a tuple.
    */
-  std_cxx11::tuple<Point<3>, Point<3>, double >
+  std_cxx11::tuple<Point<3>, Point<3>, double, double>
   push_forward_and_differential_forms(const TopoDS_Face &face,
                                       const double u,
                                       const double v,
@@ -285,12 +285,12 @@ namespace OpenCASCADE
 
   /**
    * Get the closest point to the given topological shape, together with the
-   * normal and the mean curvature at that point. If the shape is not
+   * normal and the min and max curvatures at that point. If the shape is not
    * elementary, all its sub-faces (only the faces) are iterated, faces first,
    * and only the closest point is returned. This function will throw an
    * exception if the @p in_shape does not contain at least one face.
    */
-  std_cxx11::tuple<Point<3>, Point<3>, double>
+  std_cxx11::tuple<Point<3>, Point<3>, double, double>
   closest_point_and_differential_forms(const TopoDS_Shape &in_shape,
                                        const Point<3> &origin,
                                        const double tolerance=1e-7);
index 1ddca44a186cbb96c8b42423bb47010def9f8670..afa45dc34e9cc1bda8408983c19778bd31f4317c 100644 (file)
@@ -169,7 +169,7 @@ namespace OpenCASCADE
       {
         for (unsigned int i=0; i<surrounding_points.size(); ++i)
           {
-            std_cxx11::tuple<Point<3>, Point<3>, double>
+            std_cxx11::tuple<Point<3>, Point<3>, double, double>
             p_and_diff_forms =
               closest_point_and_differential_forms(sh,
                                                    surrounding_points[i],
index 45050ee428d844e5a05205a5efa99b946694cdb9..ce15798b03f21cfb942a3c0483e0865ae665d876 100644 (file)
@@ -546,7 +546,7 @@ namespace OpenCASCADE
     return std_cxx11::get<0>(ref);
   }
 
-  std_cxx11::tuple<Point<3>, Point<3>, double>
+  std_cxx11::tuple<Point<3>, Point<3>, double, double>
   closest_point_and_differential_forms(const TopoDS_Shape &in_shape,
                                        const Point<3> &origin,
                                        const double tolerance)
@@ -601,7 +601,7 @@ namespace OpenCASCADE
     return Point<3>();
   }
 
-  std_cxx11::tuple<Point<3>, Point<3>, double >
+  std_cxx11::tuple<Point<3>, Point<3>, double, double>
   push_forward_and_differential_forms(const TopoDS_Face &face,
                                       const double u,
                                       const double v,
@@ -613,7 +613,8 @@ namespace OpenCASCADE
     Assert(props.IsNormalDefined(), ExcMessage("Normal is not well defined!"));
     gp_Dir Normal = props.Normal();
     Assert(props.IsCurvatureDefined(), ExcMessage("Curvature is not well defined!"));
-    Standard_Real Mean_Curvature = props.MeanCurvature();
+    Standard_Real Min_Curvature = props.MinCurvature();
+    Standard_Real Max_Curvature = props.MaxCurvature();
     Point<3> normal = Point<3>(Normal.X(),Normal.Y(),Normal.Z());
 
     // In the case your manifold changes from convex to concave or viceversa
@@ -623,10 +624,11 @@ namespace OpenCASCADE
     if (face.Orientation()==TopAbs_REVERSED)
       {
         normal *= -1;
-        Mean_Curvature *= -1;
+        Min_Curvature *= -1;
+        Max_Curvature *= -1;
       }
 
-    return std_cxx11::tuple<Point<3>, Point<3>, double>(point(Value), normal, Mean_Curvature);
+    return std_cxx11::tuple<Point<3>, Point<3>, double, double>(point(Value), normal, Min_Curvature, Max_Curvature);
   }
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.