Salome HOME
Attempt of Management of profiles in spliter
[tools/medcoupling.git] / src / INTERP_KERNEL / InterpolationOptions.cxx
index a48f86fdd34677ede328dc4878a650a31f4c3b93..63998d9338e251920589a8ad365829aa221b656a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2019  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -19,6 +19,7 @@
 // Author : Anthony Geay (CEA/DEN)
 
 #include "InterpolationOptions.hxx"
+#include "InterpKernelGeo2DPrecision.hxx"
 #include "InterpKernelException.hxx"
 
 #include <sstream>
@@ -29,6 +30,8 @@ const double INTERP_KERNEL::InterpolationOptions::DFT_SURF3D_ADJ_EPS=1.e-4;
 
 const double INTERP_KERNEL::InterpolationOptions::DFT_MAX_DIST_3DSURF_INTERSECT=-1.;
 
+const double INTERP_KERNEL::InterpolationOptions::DFT_MIN_DOT_BTW_3DSURF_INTERSECT=-1.;
+
 const char INTERP_KERNEL::InterpolationOptions::PRECISION_STR[]="Precision";
 
 const char INTERP_KERNEL::InterpolationOptions::MEDIANE_PLANE_STR[]="MedianPlane";
@@ -39,6 +42,8 @@ const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_ABS_STR[]="Boun
 
 const char INTERP_KERNEL::InterpolationOptions::MAX_DISTANCE_3DSURF_INSECT_STR[]="MaxDistance3DSurfIntersect";
 
+const char INTERP_KERNEL::InterpolationOptions::MIN_DOT_BTW_3DSURF_INSECT_STR[]="MinDotBetween3DSurfIntersect";
+
 const char INTERP_KERNEL::InterpolationOptions::PRINT_LEV_STR[]="PrintLevel";
 
 const char INTERP_KERNEL::InterpolationOptions::DO_ROTATE_STR[]="DoRotate";
@@ -81,6 +86,7 @@ void INTERP_KERNEL::InterpolationOptions::init()
   _bounding_box_adjustment=DFT_SURF3D_ADJ_EPS;
   _bounding_box_adjustment_abs=0.;
   _max_distance_for_3Dsurf_intersect=DFT_MAX_DIST_3DSURF_INTERSECT;
+  _min_dot_btw_3Dsurf_intersect=DFT_MIN_DOT_BTW_3DSURF_INTERSECT;
   _orientation=0;
   _measure_abs=true;
   _splitting_policy=PLANAR_FACE_5;
@@ -131,6 +137,11 @@ bool INTERP_KERNEL::InterpolationOptions::setOptionDouble(const std::string& key
       setMaxDistance3DSurfIntersect(value);
       return true;
     }
+  else if(key==MIN_DOT_BTW_3DSURF_INSECT_STR)
+    {
+      setMinDotBtwPlane3DSurfIntersect(value);
+      return true;
+    }
   else
     return false;
 }
@@ -279,6 +290,7 @@ std::string INTERP_KERNEL::InterpolationOptions::printOptions() const
   oss << "Bounding box adj : " << _bounding_box_adjustment << std::endl;
   oss << "Bounding box adj abs : " << _bounding_box_adjustment_abs << std::endl;
   oss << "Max distance for 3DSurf intersect : " << _max_distance_for_3Dsurf_intersect << std::endl;
+  oss << "Min dot between plane for 3DSurf intersect : " << _min_dot_btw_3Dsurf_intersect << std::endl;
   oss << "Orientation : " << _orientation << std::endl;
   oss << "Measure abs : " << _measure_abs << std::endl;
   oss << "Splitting policy : " << getSplittingPolicyRepr() << std::endl;