X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FInterpolationOptions.cxx;h=23c2e353dc7293bd9d7bf3810045fd683ffd68ec;hb=d426837c21eca9b56b9b8a7a7434aaf3969c8977;hp=ebd37d1a1d533d4b06a2c4faa4bd55e7e9f2cec2;hpb=e197fcb8cc603df9c360df1798e4fce8ca12366e;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/InterpolationOptions.cxx b/src/INTERP_KERNEL/InterpolationOptions.cxx index ebd37d1a1..23c2e353d 100644 --- a/src/INTERP_KERNEL/InterpolationOptions.cxx +++ b/src/INTERP_KERNEL/InterpolationOptions.cxx @@ -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 @@ -29,8 +30,12 @@ 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::ARC_DETECTION_PRECISION_STR[]="ArcDetectionPrecision"; + const char INTERP_KERNEL::InterpolationOptions::MEDIANE_PLANE_STR[]="MedianPlane"; const char INTERP_KERNEL::InterpolationOptions::BOUNDING_BOX_ADJ_STR[]="BoundingBoxAdjustment"; @@ -39,6 +44,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,11 +88,22 @@ 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; } +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) @@ -111,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); @@ -131,6 +154,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; } @@ -274,11 +302,13 @@ 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; 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;