Back to index

salome-med  6.5.0
QuadraticPlanarInterpTest.hxx
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 #ifndef _QUADRATICPLANARINTERPTEST_HXX_
00021 #define _QUADRATICPLANARINTERPTEST_HXX_
00022 
00023 #include <cppunit/extensions/HelperMacros.h>
00024 
00025 #include "InterpKernelTestExport.hxx"
00026 #include "InterpKernelGeo2DEdgeArcCircle.hxx"
00027 #include "InterpKernelGeo2DQuadraticPolygon.hxx"
00028 
00029 using namespace INTERP_KERNEL;
00030 
00031 namespace INTERP_TEST
00032 {
00033   class INTERPKERNELTEST_EXPORT QuadraticPlanarInterpTest : public CppUnit::TestFixture
00034   {
00035     CPPUNIT_TEST_SUITE( QuadraticPlanarInterpTest );
00036     CPPUNIT_TEST( ReadWriteInXfigElementary );
00037     CPPUNIT_TEST( ReadWriteInXfigGlobal );
00038     CPPUNIT_TEST( BasicGeometricTools );
00039     CPPUNIT_TEST( IntersectionBasics );
00040     CPPUNIT_TEST( EdgeLinUnitary );
00041     CPPUNIT_TEST( IntersectionEdgeOverlapUnitarySegSeg );
00042     CPPUNIT_TEST( IntersectionPointOnlyUnitarySegSeg );
00043     CPPUNIT_TEST( IntersectArcCircleBase );
00044     CPPUNIT_TEST( IntersectArcCircleFull );
00045     CPPUNIT_TEST( IntersectArcCircleSegumentBase );
00046     CPPUNIT_TEST( checkInOutDetection );
00047     CPPUNIT_TEST( checkAssemblingBases1 );
00048     CPPUNIT_TEST( checkAssemblingBases2 );
00049     CPPUNIT_TEST( checkPolygonsIntersection1 );
00050     CPPUNIT_TEST( checkPolygonsIntersection2 );
00051     CPPUNIT_TEST( checkAreasCalculations );
00052     CPPUNIT_TEST( checkBarycenterCalculations );
00053     CPPUNIT_TEST( checkHighLevelFunctionTest1 );
00054     CPPUNIT_TEST( check1DInterpLin );
00055     CPPUNIT_TEST( checkEpsilonCoherency1 );
00056     CPPUNIT_TEST( checkNonRegression1 );
00057     CPPUNIT_TEST( checkNonRegression2 );
00058     CPPUNIT_TEST( checkNonRegression3 );
00059     CPPUNIT_TEST( checkNonRegression4 );
00060     CPPUNIT_TEST( checkNonRegression5 );
00061     CPPUNIT_TEST( checkNonRegression6 );
00062     CPPUNIT_TEST( checkNonRegression7 );
00063     CPPUNIT_TEST( checkNonRegression8 );
00064     CPPUNIT_TEST( checkNonRegression9 );
00065     CPPUNIT_TEST( checkNonRegression10 );
00066     CPPUNIT_TEST( checkNonRegression11 );
00067     CPPUNIT_TEST( checkNonRegression12 );
00068     CPPUNIT_TEST ( checkNonRegression13 );
00069     CPPUNIT_TEST ( checkNonRegression14 );
00070     CPPUNIT_TEST ( checkNonRegression15 );
00071     CPPUNIT_TEST ( checkNonRegression16 );
00072     CPPUNIT_TEST ( checkNonRegression17 );
00073     //
00074     CPPUNIT_TEST ( checkNonRegressionOmar0000 );
00075     CPPUNIT_TEST ( checkNonRegressionOmar0001 );
00076     CPPUNIT_TEST ( checkNonRegressionOmar0002 );
00077     CPPUNIT_TEST ( checkNonRegressionOmar0003 );
00078     CPPUNIT_TEST ( checkNonRegressionOmar0004 );
00079     CPPUNIT_TEST ( checkNonRegressionOmar0005 );
00080     CPPUNIT_TEST ( checkNonRegressionOmar0006 );
00081     CPPUNIT_TEST ( checkNonRegressionOmar0007 );
00082     CPPUNIT_TEST ( checkNonRegressionOmar0008 );
00083     CPPUNIT_TEST ( checkNonRegressionOmar0009 );
00084     CPPUNIT_TEST ( checkNonRegressionOmar0010 );
00085     CPPUNIT_TEST ( checkNonRegressionOmar0011 );
00086     CPPUNIT_TEST ( checkNonRegressionOmar2511 );
00087     CPPUNIT_TEST ( checkNonRegressionOmar0012 );
00088     CPPUNIT_TEST ( checkNonRegressionOmar0013 );
00089     CPPUNIT_TEST ( checkNonRegressionOmar0014 );
00090     CPPUNIT_TEST ( checkNonRegressionOmar0015 );
00091     CPPUNIT_TEST ( checkNonRegressionOmar0016 );
00092     CPPUNIT_TEST ( checkNonRegressionOmar0017 );
00093     CPPUNIT_TEST ( checkNonRegressionOmar0018 );
00094     CPPUNIT_TEST ( checkNonRegressionOmar0019 );
00095     CPPUNIT_TEST ( checkNonRegressionOmar0020 );
00096     CPPUNIT_TEST ( checkNonRegressionOmar0021 );
00097     CPPUNIT_TEST ( checkNonRegressionOmar0022 );
00098     CPPUNIT_TEST ( checkNonRegressionOmar0023 );
00099     CPPUNIT_TEST ( checkNonRegressionOmar0024 );
00100     CPPUNIT_TEST ( checkNonRegressionOmar2524 );
00101     CPPUNIT_TEST ( checkNonRegressionOmar0025 );
00102     CPPUNIT_TEST ( checkNonRegressionOmar0026 );
00103     CPPUNIT_TEST ( checkNonRegressionOmar0027 );
00104     CPPUNIT_TEST ( checkNonRegressionOmar0028 );
00105     CPPUNIT_TEST ( checkNonRegressionOmar0029 );
00106     CPPUNIT_TEST ( checkNonRegressionOmar0030 );
00107     //
00108     CPPUNIT_TEST( checkNormalize );
00109     CPPUNIT_TEST( checkMakePartitionAbs1 );
00110     CPPUNIT_TEST_SUITE_END();
00111   public:  
00112     void setUp();
00113     void tearDown();
00114     void cleanUp();
00115     //
00116     void ReadWriteInXfigElementary();
00117     void ReadWriteInXfigGlobal();
00118     void BasicGeometricTools();
00119     void IntersectionBasics();
00120     void EdgeLinUnitary();
00121     void IntersectionEdgeOverlapUnitarySegSeg();
00122     void IntersectionPointOnlyUnitarySegSeg();
00123     //
00124     void IntersectArcCircleBase();
00125     void IntersectArcCircleFull();
00126     void IntersectArcCircleSegumentBase();
00127     //
00128     void checkInOutDetection();
00129     //
00130     void checkAssemblingBases1();
00131     void checkAssemblingBases2();
00132     //
00133     void checkPolygonsIntersection1();
00134     void checkPolygonsIntersection2();
00135     void checkAreasCalculations();
00136     void checkBarycenterCalculations();
00137     //
00138     void checkHighLevelFunctionTest1();
00139     //
00140     void check1DInterpLin();
00141     //
00142     void checkEpsilonCoherency1();
00143     //
00144     void checkNonRegression1();
00145     void checkNonRegression2();
00146     void checkNonRegression3();
00147     void checkNonRegression4();
00148     void checkNonRegression5();
00149     void checkNonRegression6();
00150     void checkNonRegression7();
00151     void checkNonRegression8();
00152     void checkNonRegression9();
00153     void checkNonRegression10();
00154     void checkNonRegression11();
00155     void checkNonRegression12();
00156     void checkNonRegression13();
00157     void checkNonRegression14();
00158     void checkNonRegression15();
00159     void checkNonRegression16();
00160     void checkNonRegression17();
00161     //
00162     void checkNonRegressionOmar0000();
00163     void checkNonRegressionOmar0001();
00164     void checkNonRegressionOmar0002();
00165     void checkNonRegressionOmar0003();
00166     void checkNonRegressionOmar0004();
00167     void checkNonRegressionOmar0005();
00168     void checkNonRegressionOmar0006();
00169     void checkNonRegressionOmar0007();
00170     void checkNonRegressionOmar0008();
00171     void checkNonRegressionOmar0009();
00172     void checkNonRegressionOmar0010();
00173     void checkNonRegressionOmar0011();
00174     void checkNonRegressionOmar2511();
00175     void checkNonRegressionOmar0012();
00176     void checkNonRegressionOmar0013();
00177     void checkNonRegressionOmar0014();
00178     void checkNonRegressionOmar0015();
00179     void checkNonRegressionOmar0016();
00180     void checkNonRegressionOmar0017();
00181     void checkNonRegressionOmar0018();
00182     void checkNonRegressionOmar0019();
00183     void checkNonRegressionOmar0020();
00184     void checkNonRegressionOmar0021();
00185     void checkNonRegressionOmar0022();
00186     void checkNonRegressionOmar0023();
00187     void checkNonRegressionOmar0024();
00188     void checkNonRegressionOmar2524();
00189     void checkNonRegressionOmar0025();
00190     void checkNonRegressionOmar0026();
00191     void checkNonRegressionOmar0027();
00192     void checkNonRegressionOmar0028();
00193     void checkNonRegressionOmar0029();
00194     void checkNonRegressionOmar0030();
00195     //
00196     void checkNormalize();
00197     void checkMakePartitionAbs1();
00198   private:
00199     QuadraticPolygon *buildQuadraticPolygonCoarseInfo(const double *coords, const int *conn, int lgth);
00200     EdgeArcCircle *buildArcOfCircle(const double *center, double radius, double alphaStart, double alphaEnd);
00201     double btw2NodesAndACenter(const Node& n1, const Node& n2, const double *center);
00202     void checkBasicsOfPolygons(QuadraticPolygon& pol1, QuadraticPolygon& pol2, bool checkDirection);
00203   };
00204 }
00205 
00206 #endif