]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Addition of setArcDetectionPrecision in InterpolationOption for users of Geometric2D...
authorgeay <anthony.geay@cea.fr>
Thu, 27 Mar 2014 14:52:23 +0000 (15:52 +0100)
committergeay <anthony.geay@cea.fr>
Thu, 27 Mar 2014 14:52:23 +0000 (15:52 +0100)
src/INTERP_KERNEL/InterpolationOptions.cxx
src/INTERP_KERNEL/InterpolationOptions.hxx

index 70a65a7cd8b7c90765536fe0c9f3594733d814ec..c7d551f95475966ee7581e6708df8e4c77bd1707 100644 (file)
@@ -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;
index 587ee66610e1b842b8c11cb84d02a4ff35a29c91..841466b17a2da06d7f3f72cf42cc4945eeda3d30 100644 (file)
@@ -66,6 +66,9 @@ namespace INTERP_KERNEL
     double getPrecision() const { return _precision; }
     void setPrecision(double p) { _precision=p; }
 
+    double getArcDetectionPrecision() const;
+    void setArcDetectionPrecision(double p);
+
     double getMedianPlane() const { return _median_plane; }
     void setMedianPlane(double mp) { _median_plane=mp; }
     
@@ -123,6 +126,7 @@ namespace INTERP_KERNEL
     static const double DFT_MIN_DOT_BTW_3DSURF_INTERSECT;
   public:
     static const char PRECISION_STR[];
+    static const char ARC_DETECTION_PRECISION_STR[];
     static const char MEDIANE_PLANE_STR[];
     static const char BOUNDING_BOX_ADJ_STR[];
     static const char BOUNDING_BOX_ADJ_ABS_STR[];