From e5a211e09f60f290540c943f6fd8b8ef5458433e Mon Sep 17 00:00:00 2001 From: amola Date: Fri, 15 Apr 2016 15:38:09 +0200 Subject: [PATCH] closest_point_and_differential_forms and push_forward_and_differential_forms in opencascade/utilities have been changed. they now return both min and max curvature instead of the mean one. --- include/deal.II/opencascade/utilities.h | 8 ++++---- source/opencascade/boundary_lib.cc | 2 +- source/opencascade/utilities.cc | 12 +++++++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/include/deal.II/opencascade/utilities.h b/include/deal.II/opencascade/utilities.h index edaa428847..081ce6e84f 100644 --- a/include/deal.II/opencascade/utilities.h +++ b/include/deal.II/opencascade/utilities.h @@ -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>, double > + std_cxx11::tuple, 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>, double> + std_cxx11::tuple, Point<3>, double, double> closest_point_and_differential_forms(const TopoDS_Shape &in_shape, const Point<3> &origin, const double tolerance=1e-7); diff --git a/source/opencascade/boundary_lib.cc b/source/opencascade/boundary_lib.cc index 1ddca44a18..afa45dc34e 100644 --- a/source/opencascade/boundary_lib.cc +++ b/source/opencascade/boundary_lib.cc @@ -169,7 +169,7 @@ namespace OpenCASCADE { for (unsigned int i=0; i, Point<3>, double> + std_cxx11::tuple, Point<3>, double, double> p_and_diff_forms = closest_point_and_differential_forms(sh, surrounding_points[i], diff --git a/source/opencascade/utilities.cc b/source/opencascade/utilities.cc index 45050ee428..ce15798b03 100644 --- a/source/opencascade/utilities.cc +++ b/source/opencascade/utilities.cc @@ -546,7 +546,7 @@ namespace OpenCASCADE return std_cxx11::get<0>(ref); } - std_cxx11::tuple, Point<3>, double> + std_cxx11::tuple, 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>, double > + std_cxx11::tuple, 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>, double>(point(Value), normal, Mean_Curvature); + return std_cxx11::tuple, Point<3>, double, double>(point(Value), normal, Min_Curvature, Max_Curvature); } -- 2.39.5