Salome HOME
Improve swig generation process on Windows platform.
[tools/medcoupling.git] / src / INTERP_KERNEL / InterpolationOptions.cxx
index d2677dcb3c0f6f78c0d1efd7fc3be51aaa3404fd..23c2e353dc7293bd9d7bf3810045fd683ffd68ec 100644 (file)
@@ -1,9 +1,9 @@
-// Copyright (C) 2007-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2016  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
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -19,6 +19,7 @@
 // Author : Anthony Geay (CEA/DEN)
 
 #include "InterpolationOptions.hxx"
+#include "InterpKernelGeo2DPrecision.hxx"
 #include "InterpKernelException.hxx"
 
 #include <sstream>
@@ -33,6 +34,8 @@ const double INTERP_KERNEL::InterpolationOptions::DFT_MIN_DOT_BTW_3DSURF_INTERSE
 
 const char INTERP_KERNEL::InterpolationOptions::PRECISION_STR[]="Precision";
 
+const char INTERP_KERNEL::InterpolationOptions::ARC_DETECTION_PRECISION_STR[]="ArcDetectionPrecision";
+
 const char INTERP_KERNEL::InterpolationOptions::MEDIANE_PLANE_STR[]="MedianPlane";
 
 const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_STR[]="BoundingBoxAdjustment";
@@ -91,6 +94,16 @@ void INTERP_KERNEL::InterpolationOptions::init()
   _splitting_policy=PLANAR_FACE_5;
 }
 
+double INTERP_KERNEL::InterpolationOptions::getArcDetectionPrecision() const
+{
+  return INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision;
+}
+
+void INTERP_KERNEL::InterpolationOptions::setArcDetectionPrecision(double p)
+{
+  INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=p;
+}
+
 std::string INTERP_KERNEL::InterpolationOptions::getIntersectionTypeRepr() const
 {
   if(_intersection_type==INTERP_KERNEL::Triangulation)
@@ -116,6 +129,11 @@ bool INTERP_KERNEL::InterpolationOptions::setOptionDouble(const std::string& key
       setPrecision(value);
       return true;
     }
+  if(key==ARC_DETECTION_PRECISION_STR)
+    {
+      setArcDetectionPrecision(value);
+      return true;
+    }
   else if(key==MEDIANE_PLANE_STR) 
     {
       setMedianPlane(value);
@@ -284,6 +302,7 @@ std::string INTERP_KERNEL::InterpolationOptions::printOptions() const
   oss << "Print level : " << _print_level << std::endl;
   oss << "Intersection type : " << getIntersectionTypeRepr() << std::endl;
   oss << "Precision : " << _precision << std::endl;
+  oss << "Arc Detection Precision : " << getArcDetectionPrecision() << std::endl;
   oss << "Median plane : " << _median_plane << std::endl;
   oss << "Do Rotate status : " << std::boolalpha << _do_rotate << std::endl;
   oss << "Bounding box adj : " << _bounding_box_adjustment << std::endl;