Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / INTERP_KERNEL / Interpolation2DCurve.cxx
1 // Copyright (C) 2007-2012  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.
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
20 #include "Interpolation2DCurve.hxx"
21 #include "InterpolationCurve.txx"
22
23 namespace INTERP_KERNEL
24 {
25   Interpolation2DCurve::Interpolation2DCurve()
26   {
27     // to have non-zero default thickness of target element
28     InterpolationOptions::setBoundingBoxAdjustmentAbs( InterpolationOptions::getPrecision() );
29   }
30
31   Interpolation2DCurve::Interpolation2DCurve
32     (const InterpolationOptions& io):InterpolationCurve<Interpolation2DCurve>(io)
33   {
34     // to have non-zero default thickness of target element
35     InterpolationOptions::setBoundingBoxAdjustmentAbs( InterpolationOptions::getPrecision() );
36   }
37
38   /**
39    *  \brief  Function used to set the options for the intersection calculation
40    * \details The following options can be modified:
41    *  -# Precision: Level of precision of the computations.
42    *   - Values: positive real number.
43    *   - Default: 1.0E-12.
44    *  -# Tolerance: Thickness of target element.
45    *   - Values: positive real number.
46    *   - Default: 1.0E-12.
47    *  -# Median line: Position of the median line where both segments will be projected.
48    *   - Values: real number between 0.0 and 1.0.
49    *   - Default: 0.5
50    */
51   void Interpolation2DCurve::setOptions (double precision,
52                                          double tolerance,
53                                          double medianLine)
54   {
55     InterpolationOptions::setPrecision(precision);
56     InterpolationOptions::setBoundingBoxAdjustmentAbs(tolerance);
57     InterpolationOptions::setMedianPlane(medianLine);
58   }
59 }