Salome HOME
Update copyrights
[tools/medcoupling.git] / src / INTERP_KERNEL / Interpolation2DCurve.cxx
1 // Copyright (C) 2007-2019  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 // Author : Anthony Geay (CEA/DEN)
20
21 #include "Interpolation2DCurve.hxx"
22 #include "InterpolationCurve.txx"
23
24 namespace INTERP_KERNEL
25 {
26   Interpolation2DCurve::Interpolation2DCurve()
27   {
28     // to have non-zero default thickness of target element
29     InterpolationOptions::setBoundingBoxAdjustmentAbs( InterpolationOptions::getPrecision() );
30   }
31
32   Interpolation2DCurve::Interpolation2DCurve
33     (const InterpolationOptions& io):InterpolationCurve<Interpolation2DCurve>(io)
34   {
35     // to have non-zero default thickness of target element
36     InterpolationOptions::setBoundingBoxAdjustmentAbs( InterpolationOptions::getPrecision() );
37   }
38
39   /**
40    *  \brief  Function used to set the options for the intersection calculation
41    * \details The following options can be modified:
42    *  -# Precision: Level of precision of the computations.
43    *   - Values: positive real number.
44    *   - Default: 1.0E-12.
45    *  -# Tolerance: Thickness of target element.
46    *   - Values: positive real number.
47    *   - Default: 1.0E-12.
48    *  -# Median line: Position of the median line where both segments will be projected.
49    *   - Values: real number between 0.0 and 1.0.
50    *   - Default: 0.5
51    */
52   void Interpolation2DCurve::setOptions (double precision,
53                                          double tolerance,
54                                          double medianLine)
55   {
56     InterpolationOptions::setPrecision(precision);
57     InterpolationOptions::setBoundingBoxAdjustmentAbs(tolerance);
58     InterpolationOptions::setMedianPlane(medianLine);
59   }
60 }