1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // Author : Anthony Geay (CEA/DEN)
21 #ifndef _QUADRATICPLANARINTERPTEST_HXX_
22 #define _QUADRATICPLANARINTERPTEST_HXX_
24 #include <cppunit/extensions/HelperMacros.h>
26 #include "InterpKernelTestExport.hxx"
27 #include "InterpKernelGeo2DEdgeArcCircle.hxx"
28 #include "InterpKernelGeo2DQuadraticPolygon.hxx"
32 class INTERPKERNELTEST_EXPORT QuadraticPlanarInterpTest : public CppUnit::TestFixture
34 CPPUNIT_TEST_SUITE( QuadraticPlanarInterpTest );
35 CPPUNIT_TEST( ReadWriteInXfigElementary );
36 CPPUNIT_TEST( ReadWriteInXfigGlobal );
37 CPPUNIT_TEST( BasicGeometricTools );
38 CPPUNIT_TEST( IntersectionBasics );
39 CPPUNIT_TEST( EdgeLinUnitary );
40 CPPUNIT_TEST( IntersectionEdgeOverlapUnitarySegSeg );
41 CPPUNIT_TEST( IntersectionPointOnlyUnitarySegSeg );
42 CPPUNIT_TEST( IntersectArcCircleBase );
43 CPPUNIT_TEST( IntersectArcCircleFull );
44 CPPUNIT_TEST( IntersectArcCircleSegumentBase );
45 CPPUNIT_TEST( checkInOutDetection );
46 CPPUNIT_TEST( checkAssemblingBases1 );
47 CPPUNIT_TEST( checkAssemblingBases2 );
48 CPPUNIT_TEST( checkPolygonsIntersection1 );
49 CPPUNIT_TEST( checkPolygonsIntersection2 );
50 CPPUNIT_TEST( checkAreasCalculations );
51 CPPUNIT_TEST( checkBarycenterCalculations );
52 CPPUNIT_TEST( checkHighLevelFunctionTest1 );
53 CPPUNIT_TEST( check1DInterpLin );
54 CPPUNIT_TEST( checkEpsilonCoherency1 );
55 CPPUNIT_TEST( checkNonRegression1 );
56 CPPUNIT_TEST( checkNonRegression2 );
57 CPPUNIT_TEST( checkNonRegression3 );
58 CPPUNIT_TEST( checkNonRegression4 );
59 CPPUNIT_TEST( checkNonRegression5 );
60 CPPUNIT_TEST( checkNonRegression6 );
61 CPPUNIT_TEST( checkNonRegression7 );
62 CPPUNIT_TEST( checkNonRegression8 );
63 CPPUNIT_TEST( checkNonRegression9 );
64 CPPUNIT_TEST( checkNonRegression10 );
65 CPPUNIT_TEST( checkNonRegression11 );
66 CPPUNIT_TEST( checkNonRegression12 );
67 CPPUNIT_TEST ( checkNonRegression13 );
68 CPPUNIT_TEST ( checkNonRegression14 );
69 CPPUNIT_TEST ( checkNonRegression15 );
70 CPPUNIT_TEST ( checkNonRegression16 );
71 CPPUNIT_TEST ( checkNonRegression17 );
73 CPPUNIT_TEST ( checkNonRegressionOmar0000 );
74 CPPUNIT_TEST ( checkNonRegressionOmar0001 );
75 CPPUNIT_TEST ( checkNonRegressionOmar0002 );
76 CPPUNIT_TEST ( checkNonRegressionOmar0003 );
77 CPPUNIT_TEST ( checkNonRegressionOmar0004 );
78 CPPUNIT_TEST ( checkNonRegressionOmar0005 );
79 CPPUNIT_TEST ( checkNonRegressionOmar0006 );
80 CPPUNIT_TEST ( checkNonRegressionOmar0007 );
81 CPPUNIT_TEST ( checkNonRegressionOmar0008 );
82 CPPUNIT_TEST ( checkNonRegressionOmar0009 );
83 CPPUNIT_TEST ( checkNonRegressionOmar0010 );
84 CPPUNIT_TEST ( checkNonRegressionOmar0011 );
85 CPPUNIT_TEST ( checkNonRegressionOmar2511 );
86 CPPUNIT_TEST ( checkNonRegressionOmar0012 );
87 CPPUNIT_TEST ( checkNonRegressionOmar0013 );
88 CPPUNIT_TEST ( checkNonRegressionOmar0014 );
89 CPPUNIT_TEST ( checkNonRegressionOmar0015 );
90 CPPUNIT_TEST ( checkNonRegressionOmar0016 );
91 CPPUNIT_TEST ( checkNonRegressionOmar0017 );
92 CPPUNIT_TEST ( checkNonRegressionOmar0018 );
93 CPPUNIT_TEST ( checkNonRegressionOmar0019 );
94 CPPUNIT_TEST ( checkNonRegressionOmar0020 );
95 CPPUNIT_TEST ( checkNonRegressionOmar0021 );
96 CPPUNIT_TEST ( checkNonRegressionOmar0022 );
97 CPPUNIT_TEST ( checkNonRegressionOmar0023 );
98 CPPUNIT_TEST ( checkNonRegressionOmar0024 );
99 CPPUNIT_TEST ( checkNonRegressionOmar2524 );
100 CPPUNIT_TEST ( checkNonRegressionOmar0025 );
101 CPPUNIT_TEST ( checkNonRegressionOmar0026 );
102 CPPUNIT_TEST ( checkNonRegressionOmar0027 );
103 CPPUNIT_TEST ( checkNonRegressionOmar0028 );
104 CPPUNIT_TEST ( checkNonRegressionOmar0029 );
105 CPPUNIT_TEST ( checkNonRegressionOmar0030 );
107 CPPUNIT_TEST( checkNormalize );
108 CPPUNIT_TEST( checkMakePartitionAbs1 );
110 CPPUNIT_TEST( checkIsInOrOut );
111 CPPUNIT_TEST( checkGetMiddleOfPoints );
112 CPPUNIT_TEST( checkGetMiddleOfPointsOriented );
113 CPPUNIT_TEST_SUITE_END();
119 void ReadWriteInXfigElementary();
120 void ReadWriteInXfigGlobal();
121 void BasicGeometricTools();
122 void IntersectionBasics();
123 void EdgeLinUnitary();
124 void IntersectionEdgeOverlapUnitarySegSeg();
125 void IntersectionPointOnlyUnitarySegSeg();
127 void IntersectArcCircleBase();
128 void IntersectArcCircleFull();
129 void IntersectArcCircleSegumentBase();
131 void checkInOutDetection();
133 void checkAssemblingBases1();
134 void checkAssemblingBases2();
136 void checkPolygonsIntersection1();
137 void checkPolygonsIntersection2();
138 void checkAreasCalculations();
139 void checkBarycenterCalculations();
141 void checkHighLevelFunctionTest1();
143 void check1DInterpLin();
145 void checkEpsilonCoherency1();
147 void checkNonRegression1();
148 void checkNonRegression2();
149 void checkNonRegression3();
150 void checkNonRegression4();
151 void checkNonRegression5();
152 void checkNonRegression6();
153 void checkNonRegression7();
154 void checkNonRegression8();
155 void checkNonRegression9();
156 void checkNonRegression10();
157 void checkNonRegression11();
158 void checkNonRegression12();
159 void checkNonRegression13();
160 void checkNonRegression14();
161 void checkNonRegression15();
162 void checkNonRegression16();
163 void checkNonRegression17();
165 void checkNonRegressionOmar0000();
166 void checkNonRegressionOmar0001();
167 void checkNonRegressionOmar0002();
168 void checkNonRegressionOmar0003();
169 void checkNonRegressionOmar0004();
170 void checkNonRegressionOmar0005();
171 void checkNonRegressionOmar0006();
172 void checkNonRegressionOmar0007();
173 void checkNonRegressionOmar0008();
174 void checkNonRegressionOmar0009();
175 void checkNonRegressionOmar0010();
176 void checkNonRegressionOmar0011();
177 void checkNonRegressionOmar2511();
178 void checkNonRegressionOmar0012();
179 void checkNonRegressionOmar0013();
180 void checkNonRegressionOmar0014();
181 void checkNonRegressionOmar0015();
182 void checkNonRegressionOmar0016();
183 void checkNonRegressionOmar0017();
184 void checkNonRegressionOmar0018();
185 void checkNonRegressionOmar0019();
186 void checkNonRegressionOmar0020();
187 void checkNonRegressionOmar0021();
188 void checkNonRegressionOmar0022();
189 void checkNonRegressionOmar0023();
190 void checkNonRegressionOmar0024();
191 void checkNonRegressionOmar2524();
192 void checkNonRegressionOmar0025();
193 void checkNonRegressionOmar0026();
194 void checkNonRegressionOmar0027();
195 void checkNonRegressionOmar0028();
196 void checkNonRegressionOmar0029();
197 void checkNonRegressionOmar0030();
199 void checkNormalize();
200 void checkMakePartitionAbs1();
202 void checkIsInOrOut();
203 void checkGetMiddleOfPoints();
204 void checkGetMiddleOfPointsOriented();
207 INTERP_KERNEL::QuadraticPolygon *buildQuadraticPolygonCoarseInfo(const double *coords, const int *conn, int lgth);
208 INTERP_KERNEL::EdgeArcCircle *buildArcOfCircle(const double *center, double radius, double alphaStart, double alphaEnd);
209 double btw2NodesAndACenter(const INTERP_KERNEL::Node& n1, const INTERP_KERNEL::Node& n2, const double *center);
210 void checkBasicsOfPolygons(INTERP_KERNEL::QuadraticPolygon& pol1, INTERP_KERNEL::QuadraticPolygon& pol2, bool checkDirection);