File indexing completed on 2025-01-18 09:12:50
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/execution_monitor.hpp>
0010 #include <boost/test/tools/assertion_result.hpp>
0011 #include <boost/test/unit_test.hpp>
0012
0013 #include "Acts/Geometry/GeometryContext.hpp"
0014 #include "Acts/Surfaces/AnnulusBounds.hpp"
0015 #include "Acts/Surfaces/DiscSurface.hpp"
0016 #include "Acts/Surfaces/PlanarBounds.hpp"
0017 #include "Acts/Surfaces/PlaneSurface.hpp"
0018 #include "Acts/Surfaces/RectangleBounds.hpp"
0019 #include "Acts/Surfaces/RegularSurface.hpp"
0020 #include "Acts/Surfaces/TrapezoidBounds.hpp"
0021
0022 #include <iostream>
0023 #include <limits>
0024
0025 namespace Acts::Test {
0026
0027 GeometryContext gctx;
0028
0029 std::size_t matrixResolution = 80;
0030
0031 struct TestMatrix : public std::vector<std::vector<std::uint8_t>> {
0032 TestMatrix()
0033 : std::vector<std::vector<std::uint8_t>>(
0034 matrixResolution, std::vector<std::uint8_t>(matrixResolution, 0)) {
0035 };
0036 };
0037
0038 std::pair<Vector2, Vector2> boundingBox(const RegularSurface& surface,
0039 double relMargin) {
0040 Vector2 min{std::numeric_limits<double>::max(),
0041 std::numeric_limits<double>::max()};
0042 Vector2 max{std::numeric_limits<double>::lowest(),
0043 std::numeric_limits<double>::lowest()};
0044
0045 std::vector<Vector2> vertices;
0046 if (const auto* pBounds =
0047 dynamic_cast<const PlanarBounds*>(&surface.bounds());
0048 pBounds) {
0049 vertices = pBounds->vertices();
0050 } else if (const auto* dBounds =
0051 dynamic_cast<const DiscBounds*>(&surface.bounds());
0052 dBounds) {
0053 vertices = dBounds->vertices();
0054 } else {
0055 throw std::runtime_error("Unsupported bounds type");
0056 }
0057
0058 for (const auto& vertex : vertices) {
0059 min = min.cwiseMin(vertex);
0060 max = max.cwiseMax(vertex);
0061 }
0062
0063 Vector2 size = max - min;
0064
0065 min = min - relMargin * size;
0066 max = max + relMargin * size;
0067
0068 Vector3 min3 = surface.transform(gctx) * Vector3{min[0], min[1], 0};
0069 Vector3 max3 = surface.transform(gctx) * Vector3{max[0], max[1], 0};
0070
0071 return {min3.head<2>(), max3.head<2>()};
0072 }
0073
0074 TestMatrix makeTestMatrix(const RegularSurface& surface,
0075 const BoundaryTolerance& tolerance,
0076 double relMargin = 0.1) {
0077 auto [min, max] = boundingBox(surface, relMargin);
0078 Vector2 delta = max - min;
0079
0080 TestMatrix testMatrix;
0081
0082 Vector2 step = delta / (matrixResolution - 1);
0083
0084 for (std::size_t i = 0; i < matrixResolution; ++i) {
0085 for (std::size_t j = 0; j < matrixResolution; ++j) {
0086 Vector2 query = min + Vector2(j, i).cwiseProduct(step);
0087 Vector2 local =
0088 surface.globalToLocal(gctx, Vector3{query[0], query[1], 0}).value();
0089 bool inside = surface.bounds().inside(local, tolerance);
0090 testMatrix.at(i).at(j) = inside ? 1 : 0;
0091 }
0092 }
0093
0094 return testMatrix;
0095 }
0096
0097 void printTestMatrix(const TestMatrix& matrix) {
0098 for (const auto& row : matrix) {
0099 for (std::uint8_t inside : row) {
0100 std::cout << (inside == 1 ? "X" : ".");
0101 }
0102 std::cout << std::endl;
0103 }
0104 }
0105
0106 TestMatrix parseMatrix(const std::string& matrix) {
0107 TestMatrix result;
0108
0109 std::size_t i = 0;
0110 std::size_t j = 0;
0111
0112 for (auto it = matrix.find_first_not_of("\n "); it < matrix.size(); it++) {
0113 const char c = matrix.at(it);
0114 if (c == ' ') {
0115 continue;
0116 }
0117 if (c == '\n') {
0118 i += 1;
0119 j = 0;
0120 continue;
0121 }
0122 if (c == '.') {
0123 result.at(i).at(j) = 0;
0124 } else {
0125 result.at(i).at(j) = 1;
0126 }
0127 j += 1;
0128 }
0129
0130 return result;
0131 }
0132
0133 void printMatrixDiff(const TestMatrix& ref, const TestMatrix& act) {
0134 static const std::string s_ref = "-";
0135 static const std::string s_act = "+";
0136 static const std::string s_in = "X";
0137 static const std::string s_out = ".";
0138
0139 bool tty = isatty(fileno(stdout)) != 0;
0140
0141
0142
0143 bool refEmpty = std::ranges::all_of(ref, [](const auto& row) {
0144 return std::ranges::all_of(row, [](const auto& v) { return v == 0; });
0145 });
0146
0147 auto red = [tty](const std::string& s) {
0148 if (!tty) {
0149 return s;
0150 }
0151 return "\033[1;31m" + s + "\033[0m";
0152 };
0153
0154 auto green = [tty](const std::string& s) {
0155 if (!tty) {
0156 return s;
0157 }
0158 return "\033[1;32m" + s + "\033[0m";
0159 };
0160
0161 for (std::size_t i = 0; i <= matrixResolution - 1; ++i) {
0162 for (std::size_t j = 0; j <= matrixResolution - 1; ++j) {
0163 bool insideRef = ref.at(i).at(j) == 1;
0164 bool insideAct = act.at(i).at(j) == 1;
0165
0166 if (refEmpty) {
0167 std::cout << (insideAct ? s_in : s_out);
0168 continue;
0169 }
0170
0171 if (!insideRef && !insideAct) {
0172 std::cout << s_out;
0173 }
0174 if (insideRef && !insideAct) {
0175 std::cout << red(s_ref);
0176 }
0177 if (!insideRef && insideAct) {
0178 std::cout << green(s_act);
0179 }
0180 if (insideRef && insideAct) {
0181 std::cout << s_in;
0182 }
0183 }
0184 std::cout << std::endl;
0185 }
0186
0187 if (!refEmpty) {
0188 std::cout << red(s_ref + ": inside reference but not inside actual")
0189 << std::endl;
0190 std::cout << green(s_act + ": not inside reference but inside actual")
0191 << std::endl;
0192 std::cout << s_in + ": inside both" << std::endl;
0193 std::cout << s_out + ": outside both" << std::endl;
0194 } else {
0195 std::cout << red("REFERENCE IS EMPTY") << std::endl;
0196 std::cout << s_in + ": inside actual" << std::endl;
0197 std::cout << s_out + ": outside actual" << std::endl;
0198 }
0199 }
0200
0201 boost::test_tools::predicate_result checkMatrices(const TestMatrix& val,
0202 const TestMatrix& ref) {
0203 if (val == ref) {
0204 return true;
0205 }
0206 printMatrixDiff(ref, val);
0207 boost::test_tools::predicate_result res(false);
0208 res.message() << "Actual test matrix differs from reference";
0209 return res;
0210 }
0211
0212 BOOST_AUTO_TEST_SUITE(Surfaces)
0213
0214 BOOST_AUTO_TEST_CASE(Rectangle) {
0215 auto bounds = std::make_shared<RectangleBounds>(10, 20);
0216 auto surface =
0217 Surface::makeShared<PlaneSurface>(Transform3::Identity(), bounds);
0218
0219 BOOST_TEST_CONTEXT("None") {
0220 std::string reference = R"X(
0221 ................................................................................
0222 ................................................................................
0223 ................................................................................
0224 ................................................................................
0225 ................................................................................
0226 ................................................................................
0227 ................................................................................
0228 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0229 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0230 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0231 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0232 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0233 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0234 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0235 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0236 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0237 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0238 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0239 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0240 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0241 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0242 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0243 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0244 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0245 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0246 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0247 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0248 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0249 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0250 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0251 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0252 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0253 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0254 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0255 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0256 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0257 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0258 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0259 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0260 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0261 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0262 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0263 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0264 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0265 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0266 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0267 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0268 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0269 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0270 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0271 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0272 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0273 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0274 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0275 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0276 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0277 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0278 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0279 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0280 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0281 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0282 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0283 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0284 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0285 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0286 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0287 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0288 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0289 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0290 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0291 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0292 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0293 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0294 ................................................................................
0295 ................................................................................
0296 ................................................................................
0297 ................................................................................
0298 ................................................................................
0299 ................................................................................
0300 ................................................................................
0301 )X";
0302
0303 BoundaryTolerance tolerance = BoundaryTolerance::None();
0304 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
0305 parseMatrix(reference)));
0306 }
0307
0308 BOOST_TEST_CONTEXT("AbsoluteEuclidean(2)") {
0309 std::string reference = R"X(
0310 ................................................................................
0311 ................................................................................
0312 ................................................................................
0313 ................................................................................
0314 ................................................................................
0315 ................................................................................
0316 ................................................................................
0317 ................................................................................
0318 ................................................................................
0319 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
0320 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0321 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0322 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0323 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0324 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0325 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0326 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0327 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0328 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0329 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0330 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0331 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0332 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0333 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0334 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0335 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0336 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0337 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0338 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0339 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0340 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0341 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0342 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0343 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0344 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0345 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0346 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0347 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0348 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0349 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0350 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0351 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0352 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0353 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0354 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0355 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0356 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0357 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0358 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0359 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0360 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0361 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0362 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0363 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0364 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0365 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0366 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0367 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0368 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0369 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0370 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0371 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0372 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0373 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0374 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0375 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0376 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0377 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0378 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
0379 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0380 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
0381 ................................................................................
0382 ................................................................................
0383 ................................................................................
0384 ................................................................................
0385 ................................................................................
0386 ................................................................................
0387 ................................................................................
0388 ................................................................................
0389 ................................................................................
0390 )X";
0391
0392 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteEuclidean(2);
0393 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.2),
0394 parseMatrix(reference)));
0395 }
0396
0397 BOOST_TEST_CONTEXT("AbsoluteEuclidean(-2)") {
0398 std::string reference = R"X(
0399 ................................................................................
0400 ................................................................................
0401 ................................................................................
0402 ................................................................................
0403 ................................................................................
0404 ................................................................................
0405 ................................................................................
0406 ................................................................................
0407 ................................................................................
0408 ................................................................................
0409 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0410 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0411 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0412 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0413 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0414 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0415 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0416 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0417 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0418 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0419 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0420 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0421 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0422 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0423 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0424 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0425 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0426 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0427 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0428 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0429 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0430 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0431 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0432 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0433 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0434 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0435 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0436 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0437 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0438 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0439 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0440 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0441 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0442 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0443 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0444 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0445 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0446 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0447 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0448 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0449 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0450 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0451 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0452 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0453 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0454 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0455 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0456 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0457 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0458 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0459 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0460 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0461 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0462 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0463 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0464 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0465 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0466 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0467 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0468 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
0469 ................................................................................
0470 ................................................................................
0471 ................................................................................
0472 ................................................................................
0473 ................................................................................
0474 ................................................................................
0475 ................................................................................
0476 ................................................................................
0477 ................................................................................
0478 ................................................................................
0479 )X";
0480
0481 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteEuclidean(-2);
0482 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
0483 parseMatrix(reference)));
0484 }
0485
0486 BOOST_TEST_CONTEXT("Chi2Bound(eye, 0.1)") {
0487 std::string reference = R"X(
0488 ................................................................................
0489 ................................................................................
0490 ................................................................................
0491 ................................................................................
0492 ................................................................................
0493 ................................................................................
0494 ................................................................................
0495 ................................................................................
0496 ................................................................................
0497 ................................................................................
0498 ................................................................................
0499 ................................................................................
0500 ................................................................................
0501 ................................................................................
0502 ................................................................................
0503 ................................................................................
0504 ................................................................................
0505 ................................................................................
0506 ................................................................................
0507 ................................................................................
0508 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0509 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0510 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0511 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0512 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0513 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0514 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0515 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0516 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0517 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0518 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0519 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0520 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0521 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0522 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0523 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0524 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0525 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0526 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0527 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0528 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0529 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0530 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0531 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0532 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0533 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0534 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0535 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0536 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0537 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0538 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0539 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0540 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0541 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0542 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0543 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0544 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0545 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0546 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0547 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
0548 ................................................................................
0549 ................................................................................
0550 ................................................................................
0551 ................................................................................
0552 ................................................................................
0553 ................................................................................
0554 ................................................................................
0555 ................................................................................
0556 ................................................................................
0557 ................................................................................
0558 ................................................................................
0559 ................................................................................
0560 ................................................................................
0561 ................................................................................
0562 ................................................................................
0563 ................................................................................
0564 ................................................................................
0565 ................................................................................
0566 ................................................................................
0567 ................................................................................
0568 )X";
0569
0570 BoundaryTolerance tolerance =
0571 BoundaryTolerance::Chi2Bound(SquareMatrix2::Identity(), 0.1);
0572 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.5),
0573 parseMatrix(reference)));
0574 }
0575
0576 BOOST_TEST_CONTEXT("Chi2Bound(eye, -0.1)") {
0577 std::string reference = R"X(
0578 ................................................................................
0579 ................................................................................
0580 ................................................................................
0581 ................................................................................
0582 ................................................................................
0583 ................................................................................
0584 ................................................................................
0585 ................................................................................
0586 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0587 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0588 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0589 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0590 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0591 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0592 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0593 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0594 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0595 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0596 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0597 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0598 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0599 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0600 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0601 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0602 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0603 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0604 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0605 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0606 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0607 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0608 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0609 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0610 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0611 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0612 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0613 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0614 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0615 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0616 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0617 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0618 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0619 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0620 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0621 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0622 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0623 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0624 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0625 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0626 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0627 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0628 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0629 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0630 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0631 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0632 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0633 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0634 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0635 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0636 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0637 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0638 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0639 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0640 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0641 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0642 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0643 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0644 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0645 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0646 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0647 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0648 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0649 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
0650 ................................................................................
0651 ................................................................................
0652 ................................................................................
0653 ................................................................................
0654 ................................................................................
0655 ................................................................................
0656 ................................................................................
0657 ................................................................................
0658 )X";
0659
0660 BoundaryTolerance tolerance =
0661 BoundaryTolerance::Chi2Bound(SquareMatrix2::Identity(), -0.1);
0662 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
0663 parseMatrix(reference)));
0664 }
0665
0666 BOOST_TEST_CONTEXT("AbsoluteBound(0.8, 0.05)") {
0667 std::string reference = R"X(
0668 ................................................................................
0669 ................................................................................
0670 ................................................................................
0671 ................................................................................
0672 ................................................................................
0673 ................................................................................
0674 ................................................................................
0675 ................................................................................
0676 ................................................................................
0677 ................................................................................
0678 ................................................................................
0679 ................................................................................
0680 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0681 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0682 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0683 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0684 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0685 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0686 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0687 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0688 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0689 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0690 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0691 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0692 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0693 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0694 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0695 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0696 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0697 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0698 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0699 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0700 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0701 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0702 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0703 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0704 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0705 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0706 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0707 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0708 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0709 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0710 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0711 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0712 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0713 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0714 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0715 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0716 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0717 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0718 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0719 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0720 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0721 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0722 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0723 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0724 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0725 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0726 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0727 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0728 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0729 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0730 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0731 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0732 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0733 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0734 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0735 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0736 ................................................................................
0737 ................................................................................
0738 ................................................................................
0739 ................................................................................
0740 ................................................................................
0741 ................................................................................
0742 ................................................................................
0743 ................................................................................
0744 ................................................................................
0745 ................................................................................
0746 ................................................................................
0747 ................................................................................
0748 )X";
0749
0750 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(0.8, 0.05);
0751 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.2),
0752 parseMatrix(reference)));
0753 }
0754
0755 BOOST_TEST_CONTEXT("AbsoluteBound(1, 0)") {
0756 std::string reference = R"X(
0757 ................................................................................
0758 ................................................................................
0759 ................................................................................
0760 ................................................................................
0761 ................................................................................
0762 ................................................................................
0763 ................................................................................
0764 ................................................................................
0765 ................................................................................
0766 ................................................................................
0767 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0768 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0769 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0770 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0771 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0772 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0773 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0774 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0775 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0776 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0777 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0778 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0779 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0780 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0781 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0782 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0783 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0784 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0785 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0786 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0787 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0788 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0789 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0790 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0791 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0792 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0793 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0794 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0795 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0796 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0797 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0798 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0799 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0800 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0801 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0802 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0803 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0804 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0805 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0806 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0807 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0808 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0809 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0810 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0811 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0812 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0813 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0814 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0815 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0816 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0817 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0818 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0819 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0820 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0821 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0822 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0823 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0824 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0825 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0826 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
0827 ................................................................................
0828 ................................................................................
0829 ................................................................................
0830 ................................................................................
0831 ................................................................................
0832 ................................................................................
0833 ................................................................................
0834 ................................................................................
0835 ................................................................................
0836 ................................................................................
0837 )X";
0838
0839 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(1, 0);
0840 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.15),
0841 parseMatrix(reference)));
0842 }
0843
0844 BOOST_TEST_CONTEXT("AbsoluteCartesian(1, 1)") {
0845 std::string reference = R"X(
0846 ................................................................................
0847 ................................................................................
0848 ................................................................................
0849 ................................................................................
0850 ................................................................................
0851 ................................................................................
0852 ................................................................................
0853 ................................................................................
0854 ................................................................................
0855 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0856 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0857 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0858 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0859 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0860 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0861 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0862 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0863 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0864 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0865 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0866 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0867 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0868 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0869 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0870 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0871 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0872 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0873 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0874 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0875 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0876 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0877 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0878 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0879 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0880 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0881 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0882 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0883 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0884 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0885 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0886 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0887 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0888 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0889 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0890 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0891 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0892 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0893 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0894 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0895 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0896 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0897 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0898 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0899 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0900 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0901 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0902 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0903 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0904 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0905 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0906 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0907 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0908 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0909 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0910 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0911 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0912 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0913 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0914 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0915 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0916 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
0917 ................................................................................
0918 ................................................................................
0919 ................................................................................
0920 ................................................................................
0921 ................................................................................
0922 ................................................................................
0923 ................................................................................
0924 ................................................................................
0925 ................................................................................
0926 )X";
0927
0928 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(0, 0.1);
0929 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.15),
0930 parseMatrix(reference)));
0931 }
0932
0933 BOOST_TEST_CONTEXT("AbsoluteCartesian(1, 1)") {
0934 std::string reference = R"X(
0935 ................................................................................
0936 ................................................................................
0937 ................................................................................
0938 ................................................................................
0939 ................................................................................
0940 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
0941 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
0942 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
0943 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1009 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1010 ................................................................................
1011 ................................................................................
1012 ................................................................................
1013 ................................................................................
1014 ................................................................................
1015 )X";
1016
1017 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteCartesian(1, 1.2);
1018 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
1019 parseMatrix(reference)));
1020 }
1021
1022 BOOST_TEST_CONTEXT("AbsoluteCartesian(1, 0.01)") {
1023 std::string reference = R"X(
1024 ................................................................................
1025 ................................................................................
1026 ................................................................................
1027 ................................................................................
1028 ................................................................................
1029 ................................................................................
1030 ................................................................................
1031 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1032 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1033 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1034 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1035 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1036 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1037 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1038 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1091 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1092 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1093 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1094 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1095 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1096 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
1097 ................................................................................
1098 ................................................................................
1099 ................................................................................
1100 ................................................................................
1101 ................................................................................
1102 ................................................................................
1103 ................................................................................
1104 )X";
1105
1106 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteCartesian(1, 0.01);
1107 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
1108 parseMatrix(reference)));
1109 }
1110
1111 BOOST_TEST_CONTEXT("AbsoluteCartesian(0.01, 1)") {
1112 std::string reference = R"X(
1113 ................................................................................
1114 ................................................................................
1115 ................................................................................
1116 ................................................................................
1117 ................................................................................
1118 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1119 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1120 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1121 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1122 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1123 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1124 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1125 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1126 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1127 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1128 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1129 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1130 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1131 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1132 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1133 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1134 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1135 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1136 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1137 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1138 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1139 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1140 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1141 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1142 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1143 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1144 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1145 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1146 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1147 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1148 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1149 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1150 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1151 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1152 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1153 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1154 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1155 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1156 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1157 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1158 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1159 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1160 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1161 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1162 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1163 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1164 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1165 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1166 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1167 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1168 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1169 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1170 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1171 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1172 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1173 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1174 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1175 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1176 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1177 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1178 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1179 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1180 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1181 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1182 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1183 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1184 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1185 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1186 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1187 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1188 ................................................................................
1189 ................................................................................
1190 ................................................................................
1191 ................................................................................
1192 ................................................................................
1193 )X";
1194
1195 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteCartesian(0.01, 1);
1196 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
1197 parseMatrix(reference)));
1198 }
1199
1200 BOOST_TEST_CONTEXT("AbsoluteCartesian(0, 0)") {
1201 std::string reference = R"X(
1202 ................................................................................
1203 ................................................................................
1204 ................................................................................
1205 ................................................................................
1206 ................................................................................
1207 ................................................................................
1208 ................................................................................
1209 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1210 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1211 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1212 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1213 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1214 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1215 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1216 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1217 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1218 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1219 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1220 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1221 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1222 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1223 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1224 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1225 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1226 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1227 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1228 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1229 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1230 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1231 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1232 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1233 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1234 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1235 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1236 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1237 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1238 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1239 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1240 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1241 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1242 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1243 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1244 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1245 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1246 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1247 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1248 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1249 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1250 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1251 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1252 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1253 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1254 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1255 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1256 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1257 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1258 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1259 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1260 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1261 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1262 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1263 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1264 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1265 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1266 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1267 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1268 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1269 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1270 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1271 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1272 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1273 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1274 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1275 ................................................................................
1276 ................................................................................
1277 ................................................................................
1278 ................................................................................
1279 ................................................................................
1280 ................................................................................
1281 ................................................................................
1282 )X";
1283
1284 BoundaryTolerance tolerance =
1285 BoundaryTolerance::AbsoluteCartesian(0.0, 0.0);
1286 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
1287 parseMatrix(reference)));
1288 }
1289 }
1290
1291 BOOST_AUTO_TEST_CASE(Trapezoid) {
1292 auto bounds = std::make_shared<TrapezoidBounds>(10, 20, 5, 0.1);
1293 auto surface =
1294 Surface::makeShared<PlaneSurface>(Transform3::Identity(), bounds);
1295
1296 BOOST_TEST_CONTEXT("None") {
1297 std::string reference = R"X(
1298 ................................................................................
1299 ................................................................................
1300 ................................................................................
1301 ................................................................................
1302 ................................................................................
1303 ................................................................................
1304 ................................................................................
1305 .....................................................XX.........................
1306 ..................................................XXXXX.........................
1307 ...............................................XXXXXXXXX........................
1308 ............................................XXXXXXXXXXXX........................
1309 ........................................XXXXXXXXXXXXXXXXX.......................
1310 .....................................XXXXXXXXXXXXXXXXXXXX.......................
1311 ..................................XXXXXXXXXXXXXXXXXXXXXXX.......................
1312 ...............................XXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1313 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1314 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1315 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1316 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1317 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1318 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1319 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1320 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1321 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1322 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1323 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1324 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1325 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1326 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1327 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1328 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1329 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1330 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1331 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1332 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1333 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1334 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1335 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1336 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1337 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1338 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1339 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1340 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1341 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1342 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1343 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1344 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1345 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1346 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1347 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
1348 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
1349 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
1350 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
1351 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1352 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1353 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1354 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1355 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1356 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
1357 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
1358 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................................
1359 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................
1360 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
1361 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................................
1362 .........XXXXXXXXXXXXXXXXXXXXXXXXX..............................................
1363 .........XXXXXXXXXXXXXXXXXXXXXX.................................................
1364 .........XXXXXXXXXXXXXXXXXXX....................................................
1365 .........XXXXXXXXXXXXXXXX.......................................................
1366 ........XXXXXXXXXXXXX...........................................................
1367 ........XXXXXXXXXX..............................................................
1368 ........XXXXXXX.................................................................
1369 .......XXXXX....................................................................
1370 .......X........................................................................
1371 ................................................................................
1372 ................................................................................
1373 ................................................................................
1374 ................................................................................
1375 ................................................................................
1376 ................................................................................
1377 ................................................................................
1378 )X";
1379 BoundaryTolerance tolerance = BoundaryTolerance::None();
1380 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
1381 parseMatrix(reference)));
1382 }
1383
1384 BOOST_TEST_CONTEXT("AbsoluteEuclidean(2)") {
1385 std::string reference = R"X(
1386 ................................................................................
1387 ................................................................................
1388 ................................................................................
1389 ...................................................XXX..........................
1390 ................................................XXXXXX..........................
1391 .............................................XXXXXXXXXX.........................
1392 .........................................XXXXXXXXXXXXXX.........................
1393 ......................................XXXXXXXXXXXXXXXXX.........................
1394 ...................................XXXXXXXXXXXXXXXXXXXXX........................
1395 ................................XXXXXXXXXXXXXXXXXXXXXXXX........................
1396 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1397 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1398 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1399 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1400 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1401 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1402 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1403 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1404 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1405 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1406 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1407 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1408 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1409 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1410 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1411 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1412 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1413 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1414 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1415 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1416 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1417 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1418 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1419 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1420 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1421 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1422 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1423 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1424 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1425 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1426 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1427 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1428 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1429 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1430 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1431 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1432 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1433 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1434 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1435 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1436 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1437 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1438 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1439 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1440 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1441 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1442 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1443 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1444 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1445 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1446 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1447 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1448 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1449 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1450 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
1451 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............................
1452 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
1453 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
1454 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................................
1455 .........XXXXXXXXXXXXXXXXXXXXXXXXXXX............................................
1456 .........XXXXXXXXXXXXXXXXXXXXXXXX...............................................
1457 .........XXXXXXXXXXXXXXXXXXXXX..................................................
1458 .........XXXXXXXXXXXXXXXXX......................................................
1459 ..........XXXXXXXXXXXXX.........................................................
1460 ..........XXXXXXXXXX............................................................
1461 ..........XXXXXXX...............................................................
1462 ...........XX...................................................................
1463 ................................................................................
1464 ................................................................................
1465 ................................................................................
1466 )X";
1467 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteEuclidean(2);
1468 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.2),
1469 parseMatrix(reference)));
1470 }
1471
1472 BOOST_TEST_CONTEXT("AbsoluteEuclidean(-2)") {
1473 std::string reference = R"X(
1474 ................................................................................
1475 ................................................................................
1476 ................................................................................
1477 ................................................................................
1478 ................................................................................
1479 ................................................................................
1480 ................................................................................
1481 ................................................................................
1482 ................................................................................
1483 ................................................................................
1484 ................................................................................
1485 ................................................................................
1486 ................................................................................
1487 ................................................................................
1488 ................................................................................
1489 ................................................................................
1490 ................................................................................
1491 ................................................................................
1492 ...................................................XXX..........................
1493 ................................................XXXXXXX.........................
1494 ............................................XXXXXXXXXXX.........................
1495 .........................................XXXXXXXXXXXXXX.........................
1496 ......................................XXXXXXXXXXXXXXXXXX........................
1497 ...................................XXXXXXXXXXXXXXXXXXXXX........................
1498 ...............................XXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1499 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1500 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1501 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1502 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1503 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1504 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1505 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1506 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1507 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1508 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1509 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1510 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1511 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1512 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1513 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1514 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1515 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1516 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1517 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1518 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1519 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1520 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1521 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1522 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
1523 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
1524 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................................
1525 .................XXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
1526 .................XXXXXXXXXXXXXXXXXXXXXXX........................................
1527 .................XXXXXXXXXXXXXXXXXXXX...........................................
1528 ................XXXXXXXXXXXXXXXXXX..............................................
1529 ................XXXXXXXXXXXXXX..................................................
1530 ................XXXXXXXXXXX.....................................................
1531 ...............XXXXXXXXX........................................................
1532 ...............XXXXXX...........................................................
1533 ...............XX...............................................................
1534 ................................................................................
1535 ................................................................................
1536 ................................................................................
1537 ................................................................................
1538 ................................................................................
1539 ................................................................................
1540 ................................................................................
1541 ................................................................................
1542 ................................................................................
1543 ................................................................................
1544 ................................................................................
1545 ................................................................................
1546 ................................................................................
1547 ................................................................................
1548 ................................................................................
1549 ................................................................................
1550 ................................................................................
1551 ................................................................................
1552 ................................................................................
1553 ................................................................................
1554 )X";
1555
1556 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteEuclidean(-2);
1557 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
1558 parseMatrix(reference)));
1559 }
1560
1561 BOOST_TEST_CONTEXT("Chi2Bound(eye, 0.1)") {
1562 std::string reference = R"X(
1563 ................................................................................
1564 ................................................................................
1565 ................................................................................
1566 ................................................................................
1567 ................................................................................
1568 ................................................................................
1569 ................................................................................
1570 ................................................................................
1571 ................................................................................
1572 ................................................................................
1573 ................................................................................
1574 ................................................................................
1575 ................................................................................
1576 ................................................................................
1577 ................................................................................
1578 ................................................................................
1579 ................................................................................
1580 ................................................................................
1581 ................................................................................
1582 ...............................................XX...............................
1583 ............................................XXXXXX..............................
1584 ........................................XXXXXXXXXX..............................
1585 .....................................XXXXXXXXXXXXX..............................
1586 ..................................XXXXXXXXXXXXXXXXX.............................
1587 ...............................XXXXXXXXXXXXXXXXXXXX.............................
1588 .............................XXXXXXXXXXXXXXXXXXXXXXX............................
1589 .............................XXXXXXXXXXXXXXXXXXXXXXX............................
1590 ............................XXXXXXXXXXXXXXXXXXXXXXXX............................
1591 ............................XXXXXXXXXXXXXXXXXXXXXXXXX...........................
1592 ............................XXXXXXXXXXXXXXXXXXXXXXXXX...........................
1593 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
1594 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
1595 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
1596 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1597 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1598 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1599 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1600 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1601 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1602 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1603 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1604 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1605 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1606 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1607 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1608 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1609 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1610 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1611 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1612 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1613 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1614 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
1615 ......................XXXXXXXXXXXXXXXXXXXXXXXXXX................................
1616 .....................XXXXXXXXXXXXXXXXXXXXXXXX...................................
1617 .....................XXXXXXXXXXXXXXXXXXXXX......................................
1618 .....................XXXXXXXXXXXXXXXXX..........................................
1619 .....................XXXXXXXXXXXXXX.............................................
1620 ....................XXXXXXXXXXXX................................................
1621 ....................XXXXXXXXX...................................................
1622 ....................XXXXXX......................................................
1623 ....................XX..........................................................
1624 ................................................................................
1625 ................................................................................
1626 ................................................................................
1627 ................................................................................
1628 ................................................................................
1629 ................................................................................
1630 ................................................................................
1631 ................................................................................
1632 ................................................................................
1633 ................................................................................
1634 ................................................................................
1635 ................................................................................
1636 ................................................................................
1637 ................................................................................
1638 ................................................................................
1639 ................................................................................
1640 ................................................................................
1641 ................................................................................
1642 ................................................................................
1643 )X";
1644
1645 BoundaryTolerance tolerance =
1646 BoundaryTolerance::Chi2Bound(SquareMatrix2::Identity(), 0.1);
1647 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.5),
1648 parseMatrix(reference)));
1649 }
1650
1651 BOOST_TEST_CONTEXT("Chi2Bound(eye, -0.1)") {
1652 std::string reference = R"X(
1653 ................................................................................
1654 ................................................................................
1655 ................................................................................
1656 ................................................................................
1657 ................................................................................
1658 ................................................................................
1659 ................................................................................
1660 ................................................................................
1661 ................................................................................
1662 ......................................................X.........................
1663 ...................................................XXXX.........................
1664 ................................................XXXXXXX.........................
1665 .............................................XXXXXXXXXXX........................
1666 .........................................XXXXXXXXXXXXXXX........................
1667 ......................................XXXXXXXXXXXXXXXXXXX.......................
1668 ...................................XXXXXXXXXXXXXXXXXXXXXX.......................
1669 ................................XXXXXXXXXXXXXXXXXXXXXXXXX.......................
1670 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1671 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1672 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1673 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1674 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1675 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1676 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1677 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1678 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1679 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1680 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1681 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1682 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1683 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1684 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1685 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1686 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1687 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1688 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1689 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1690 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1691 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1692 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1693 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1694 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1695 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1696 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1697 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1698 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1699 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1700 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1701 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1702 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1703 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
1704 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1705 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1706 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1707 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1708 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1709 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
1710 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
1711 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
1712 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
1713 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................................
1714 ...........XXXXXXXXXXXXXXXXXXXXXXXXXX...........................................
1715 ...........XXXXXXXXXXXXXXXXXXXXXX...............................................
1716 ...........XXXXXXXXXXXXXXXXXXX..................................................
1717 ..........XXXXXXXXXXXXXXXXX.....................................................
1718 ..........XXXXXXXXXXXXXX........................................................
1719 ..........XXXXXXXXXX............................................................
1720 .........XXXXXXXX...............................................................
1721 .........XXXXX..................................................................
1722 .........XX.....................................................................
1723 ................................................................................
1724 ................................................................................
1725 ................................................................................
1726 ................................................................................
1727 ................................................................................
1728 ................................................................................
1729 ................................................................................
1730 ................................................................................
1731 ................................................................................
1732 ................................................................................
1733 )X";
1734
1735 BoundaryTolerance tolerance =
1736 BoundaryTolerance::Chi2Bound(SquareMatrix2::Identity(), -0.1);
1737 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
1738 parseMatrix(reference)));
1739 }
1740
1741 BOOST_TEST_CONTEXT("AbsoluteBound(0.8, 0.05)") {
1742 std::string reference = R"X(
1743 ................................................................................
1744 ................................................................................
1745 ................................................................................
1746 ...................................................XXX..........................
1747 ................................................XXXXXX..........................
1748 .............................................XXXXXXXXX..........................
1749 .........................................XXXXXXXXXXXXX..........................
1750 ......................................XXXXXXXXXXXXXXXX..........................
1751 ...................................XXXXXXXXXXXXXXXXXXX..........................
1752 ................................XXXXXXXXXXXXXXXXXXXXXX..........................
1753 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1754 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1755 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1756 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1757 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1758 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1759 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1760 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1761 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1762 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1763 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1764 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1765 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1766 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1767 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1768 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1769 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1770 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1771 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1772 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1773 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1774 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1775 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1776 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1777 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1778 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1779 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1780 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1781 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1782 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1783 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1784 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1785 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1786 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1787 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1788 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1789 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1790 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1791 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1792 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1793 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1794 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1795 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1796 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1797 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1798 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1799 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1800 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1801 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1802 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1803 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1804 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1805 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1806 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1807 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
1808 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............................
1809 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
1810 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
1811 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................................
1812 ...........XXXXXXXXXXXXXXXXXXXXXXXXX............................................
1813 ...........XXXXXXXXXXXXXXXXXXXXXX...............................................
1814 ...........XXXXXXXXXXXXXXXXXXX..................................................
1815 ...........XXXXXXXXXXXXXXX......................................................
1816 ...........XXXXXXXXXXXX.........................................................
1817 ...........XXXXXXXXX............................................................
1818 ...........XXXXXX...............................................................
1819 ...........XX...................................................................
1820 ................................................................................
1821 ................................................................................
1822 ................................................................................
1823 )X";
1824
1825 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(0.8, 2);
1826 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.2),
1827 parseMatrix(reference)));
1828 }
1829
1830 BOOST_TEST_CONTEXT("AbsoluteBound(1, 0)") {
1831 std::string reference = R"X(
1832 ................................................................................
1833 ................................................................................
1834 ................................................................................
1835 ................................................................................
1836 ................................................................................
1837 ................................................................................
1838 ................................................................................
1839 ................................................................................
1840 ................................................................................
1841 ......................................................X.........................
1842 ...................................................XXXX.........................
1843 ................................................XXXXXXX.........................
1844 ............................................XXXXXXXXXXX.........................
1845 .........................................XXXXXXXXXXXXXX.........................
1846 ......................................XXXXXXXXXXXXXXXXXX........................
1847 ...................................XXXXXXXXXXXXXXXXXXXXX........................
1848 ...............................XXXXXXXXXXXXXXXXXXXXXXXXX........................
1849 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1850 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1851 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1852 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1853 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1854 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1855 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1856 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1857 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1858 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1859 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1860 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1861 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1862 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1863 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1864 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1865 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1866 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1867 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1868 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1869 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1870 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1871 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1872 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1873 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1874 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1875 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1876 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1877 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1878 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1879 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1880 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1881 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1882 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1883 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1884 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1885 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1886 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1887 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1888 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
1889 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
1890 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
1891 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................................
1892 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................................
1893 ............XXXXXXXXXXXXXXXXXXXXXXXXXX..........................................
1894 ............XXXXXXXXXXXXXXXXXXXXXXX.............................................
1895 ...........XXXXXXXXXXXXXXXXXXXXX................................................
1896 ...........XXXXXXXXXXXXXXXXXX...................................................
1897 ...........XXXXXXXXXXXXXX.......................................................
1898 ...........XXXXXXXXXXX..........................................................
1899 ..........XXXXXXXXX.............................................................
1900 ..........XXXXXX................................................................
1901 ..........XX....................................................................
1902 ................................................................................
1903 ................................................................................
1904 ................................................................................
1905 ................................................................................
1906 ................................................................................
1907 ................................................................................
1908 ................................................................................
1909 ................................................................................
1910 ................................................................................
1911 ................................................................................
1912 )X";
1913
1914 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(1, 0);
1915 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.15),
1916 parseMatrix(reference)));
1917 }
1918
1919 BOOST_TEST_CONTEXT("AbsoluteBound(0, 0.1)") {
1920 std::string reference = R"X(
1921 ................................................................................
1922 ................................................................................
1923 ................................................................................
1924 ................................................................................
1925 ................................................................................
1926 ................................................................................
1927 ................................................................................
1928 ................................................................................
1929 ................................................................................
1930 .....................................................X..........................
1931 .................................................XXXXX..........................
1932 ..............................................XXXXXXXX..........................
1933 ...........................................XXXXXXXXXXXX.........................
1934 ........................................XXXXXXXXXXXXXXX.........................
1935 ....................................XXXXXXXXXXXXXXXXXXXX........................
1936 .................................XXXXXXXXXXXXXXXXXXXXXXX........................
1937 ..............................XXXXXXXXXXXXXXXXXXXXXXXXXX........................
1938 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1939 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
1940 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1941 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1942 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
1943 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1944 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1945 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1946 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1947 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
1948 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1949 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
1950 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1951 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1952 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
1953 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1954 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1955 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1956 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1957 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
1958 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1959 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
1960 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1961 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1962 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1963 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1964 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
1965 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1966 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1967 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
1968 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1969 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1970 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1971 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1972 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
1973 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
1974 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
1975 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
1976 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
1977 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
1978 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
1979 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
1980 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
1981 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
1982 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXX........................................
1983 ............XXXXXXXXXXXXXXXXXXXXXXXXX...........................................
1984 ...........XXXXXXXXXXXXXXXXXXXXXX...............................................
1985 ...........XXXXXXXXXXXXXXXXXXX..................................................
1986 ...........XXXXXXXXXXXXXXXX.....................................................
1987 ...........XXXXXXXXXXX..........................................................
1988 ..........XXXXXXXXX.............................................................
1989 ..........XXXXXX................................................................
1990 ..........XXX...................................................................
1991 ..........X.....................................................................
1992 ................................................................................
1993 ................................................................................
1994 ................................................................................
1995 ................................................................................
1996 ................................................................................
1997 ................................................................................
1998 ................................................................................
1999 ................................................................................
2000 ................................................................................
2001 )X";
2002
2003 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(0, 0.1);
2004 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.15),
2005 parseMatrix(reference)));
2006 }
2007
2008 BOOST_TEST_CONTEXT("AbsoluteCartesian(1, 1.2)") {
2009 std::string reference = R"X(
2010 ................................................................................
2011 .....................................................XXX........................
2012 ..................................................XXXXXXX.......................
2013 ...............................................XXXXXXXXXX.......................
2014 ...........................................XXXXXXXXXXXXXX.......................
2015 ........................................XXXXXXXXXXXXXXXXXX......................
2016 .....................................XXXXXXXXXXXXXXXXXXXXX......................
2017 ..................................XXXXXXXXXXXXXXXXXXXXXXXXX.....................
2018 ..............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2019 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2020 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2021 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2022 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2023 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2024 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2025 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2026 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2027 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2028 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2029 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2030 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2031 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2032 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2033 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2034 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2035 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2036 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2037 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2038 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2039 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2040 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2041 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2042 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2043 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2044 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2045 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2046 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2047 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2048 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2049 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2050 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2051 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2052 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2053 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2054 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2055 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
2056 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
2057 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
2058 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
2059 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
2060 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2061 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2062 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2063 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2064 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2065 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2066 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2067 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2068 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
2069 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2070 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2071 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2072 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2073 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2074 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2075 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2076 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
2077 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................................
2078 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
2079 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................................
2080 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................................
2081 .....XXXXXXXXXXXXXXXXXXXXXXXXXXX................................................
2082 .....XXXXXXXXXXXXXXXXXXXXXXX....................................................
2083 .....XXXXXXXXXXXXXXXXXXXX.......................................................
2084 .....XXXXXXXXXXXXXXXXX..........................................................
2085 ......XXXXXXXXXXXXX.............................................................
2086 ......XXXXXXXXX.................................................................
2087 ......XXXXXX....................................................................
2088 ......XXX.......................................................................
2089 ................................................................................
2090 )X";
2091
2092 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteCartesian(1, 1.2);
2093 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2094 parseMatrix(reference)));
2095 }
2096
2097 BOOST_TEST_CONTEXT("AbsoluteCartesian(1, 0.01)") {
2098 std::string reference = R"X(
2099 ................................................................................
2100 ................................................................................
2101 ................................................................................
2102 ................................................................................
2103 ................................................................................
2104 ................................................................................
2105 ................................................................................
2106 .....................................................XXX........................
2107 ..................................................XXXXXXX.......................
2108 ...............................................XXXXXXXXXX.......................
2109 ............................................XXXXXXXXXXXXX.......................
2110 ........................................XXXXXXXXXXXXXXXXX.......................
2111 .....................................XXXXXXXXXXXXXXXXXXXX.......................
2112 ..................................XXXXXXXXXXXXXXXXXXXXXXX.......................
2113 ...............................XXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2114 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2115 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2116 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2117 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2118 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2119 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2120 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2121 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2122 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2123 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2124 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2125 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2126 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2127 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2128 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2129 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2130 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2131 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2132 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2133 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2134 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2135 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2136 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2137 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2138 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2139 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2140 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2141 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2142 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2143 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2144 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2145 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2146 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2147 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2148 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2149 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2150 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2151 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2152 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2153 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2154 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2155 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2156 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2157 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2158 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2159 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................................
2160 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................
2161 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
2162 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................................
2163 .........XXXXXXXXXXXXXXXXXXXXXXXXXX.............................................
2164 .........XXXXXXXXXXXXXXXXXXXXXX.................................................
2165 .........XXXXXXXXXXXXXXXXXXX....................................................
2166 ........XXXXXXXXXXXXXXXXX.......................................................
2167 ........XXXXXXXXXXXXXX..........................................................
2168 ........XXXXXXXXXX..............................................................
2169 ........XXXXXXX.................................................................
2170 .......XXXXX....................................................................
2171 .......XX.......................................................................
2172 ................................................................................
2173 ................................................................................
2174 ................................................................................
2175 ................................................................................
2176 ................................................................................
2177 ................................................................................
2178 ................................................................................
2179 )X";
2180
2181 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteCartesian(1, 0.01);
2182 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2183 parseMatrix(reference)));
2184 }
2185
2186 BOOST_TEST_CONTEXT("AbsoluteCartesian(0.01, 1)") {
2187 std::string reference = R"X(
2188 ................................................................................
2189 ................................................................................
2190 .....................................................XX.........................
2191 ..................................................XXXXX.........................
2192 ...............................................XXXXXXXX.........................
2193 ...........................................XXXXXXXXXXXX.........................
2194 ........................................XXXXXXXXXXXXXXX.........................
2195 .....................................XXXXXXXXXXXXXXXXXX.........................
2196 ..................................XXXXXXXXXXXXXXXXXXXXX.........................
2197 ..............................XXXXXXXXXXXXXXXXXXXXXXXXXX........................
2198 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2199 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2200 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2201 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2202 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2203 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2204 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2205 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2206 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2207 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2208 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2209 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2210 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2211 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2212 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2213 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2214 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2215 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2216 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2217 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2218 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2219 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2220 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2221 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2222 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2223 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2224 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2225 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2226 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2227 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2228 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2229 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2230 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2231 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2232 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2233 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2234 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2235 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2236 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2237 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2238 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2239 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2240 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2241 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2242 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2243 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2244 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2245 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2246 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2247 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2248 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2249 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2250 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2251 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2252 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2253 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
2254 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................
2255 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
2256 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................................
2257 ........XXXXXXXXXXXXXXXXXXXXXXXXXXX.............................................
2258 ........XXXXXXXXXXXXXXXXXXXXXXX.................................................
2259 .......XXXXXXXXXXXXXXXXXXXXX....................................................
2260 .......XXXXXXXXXXXXXXXXXX.......................................................
2261 .......XXXXXXXXXXXXXXX..........................................................
2262 .......XXXXXXXXXXXX.............................................................
2263 .......XXXXXXXX.................................................................
2264 .......XXXXX....................................................................
2265 .......XX.......................................................................
2266 ................................................................................
2267 ................................................................................
2268 )X";
2269
2270 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteCartesian(0.01, 1);
2271 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2272 parseMatrix(reference)));
2273 }
2274
2275 BOOST_TEST_CONTEXT("AbsoluteCartesian(0, 0)") {
2276 std::string reference = R"X(
2277 ................................................................................
2278 ................................................................................
2279 ................................................................................
2280 ................................................................................
2281 ................................................................................
2282 ................................................................................
2283 ................................................................................
2284 .....................................................XX.........................
2285 ..................................................XXXXX.........................
2286 ...............................................XXXXXXXXX........................
2287 ............................................XXXXXXXXXXXX........................
2288 ........................................XXXXXXXXXXXXXXXXX.......................
2289 .....................................XXXXXXXXXXXXXXXXXXXX.......................
2290 ..................................XXXXXXXXXXXXXXXXXXXXXXX.......................
2291 ...............................XXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2292 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2293 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2294 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2295 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2296 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2297 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2298 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2299 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2300 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2301 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2302 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2303 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2304 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2305 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2306 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2307 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2308 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2309 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2310 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2311 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2312 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2313 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2314 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2315 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2316 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2317 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2318 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2319 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2320 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2321 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2322 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2323 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2324 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2325 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2326 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2327 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2328 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2329 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2330 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2331 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2332 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2333 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2334 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2335 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2336 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2337 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................................
2338 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................
2339 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
2340 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................................
2341 .........XXXXXXXXXXXXXXXXXXXXXXXXX..............................................
2342 .........XXXXXXXXXXXXXXXXXXXXXX.................................................
2343 .........XXXXXXXXXXXXXXXXXXX....................................................
2344 .........XXXXXXXXXXXXXXXX.......................................................
2345 ........XXXXXXXXXXXXX...........................................................
2346 ........XXXXXXXXXX..............................................................
2347 ........XXXXXXX.................................................................
2348 .......XXXXX....................................................................
2349 .......X........................................................................
2350 ................................................................................
2351 ................................................................................
2352 ................................................................................
2353 ................................................................................
2354 ................................................................................
2355 ................................................................................
2356 ................................................................................
2357 )X";
2358
2359 BoundaryTolerance tolerance =
2360 BoundaryTolerance::AbsoluteCartesian(0.0, 0.0);
2361 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2362 parseMatrix(reference)));
2363 }
2364 }
2365
2366 BOOST_AUTO_TEST_CASE(Annulus) {
2367 const double minRadius = 7.2;
2368 const double maxRadius = 12.0;
2369 const double minPhi = 0.74195;
2370 const double maxPhi = 1.33970;
2371
2372 const Vector2 offset(-2., 2.);
2373
2374 auto bounds = std::make_shared<AnnulusBounds>(minRadius, maxRadius, minPhi,
2375 maxPhi, offset);
2376 auto surface =
2377 Surface::makeShared<DiscSurface>(Transform3::Identity(), bounds);
2378
2379 {
2380 std::string reference = R"X(
2381 ................................................................................
2382 ................................................................................
2383 ................................................................................
2384 ................................................................................
2385 ................................................................................
2386 ................................................................................
2387 ................................................................................
2388 ....................................X...........................................
2389 ...................................XXX..........................................
2390 ...................................XXXX.........................................
2391 ..................................XXXXXXX.......................................
2392 ..................................XXXXXXXX......................................
2393 .................................XXXXXXXXXXX....................................
2394 ................................XXXXXXXXXXXXX...................................
2395 ................................XXXXXXXXXXXXXX..................................
2396 ...............................XXXXXXXXXXXXXXXXX................................
2397 ..............................XXXXXXXXXXXXXXXXXXX...............................
2398 ..............................XXXXXXXXXXXXXXXXXXXXX.............................
2399 .............................XXXXXXXXXXXXXXXXXXXXXXX............................
2400 ............................XXXXXXXXXXXXXXXXXXXXXXXXX...........................
2401 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2402 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2403 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2404 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2405 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2406 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2407 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2408 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2409 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2410 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2411 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2412 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2413 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2414 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2415 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2416 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2417 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2418 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2419 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2420 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2421 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2422 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2423 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2424 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2425 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2426 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2427 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2428 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2429 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2430 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2431 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2432 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2433 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2434 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2435 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
2436 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2437 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
2438 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
2439 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................................
2440 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................................
2441 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................
2442 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXX......................................
2443 ...............XXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
2444 ................XXXXXXXXXXXXXXXXXXXXXXX.........................................
2445 ................XXXXXXXXXXXXXXXXXXXXX...........................................
2446 ................XXXXXXXXXXXXXXXXXXX.............................................
2447 ................XXXXXXXXXXXXXXXXX...............................................
2448 .................XXXXXXXXXXXXXX.................................................
2449 .................XXXXXXXXXXXX...................................................
2450 .................XXXXXXXXXX.....................................................
2451 ..................XXXXXXX.......................................................
2452 ..................XXXX..........................................................
2453 ..................XX............................................................
2454 ................................................................................
2455 ................................................................................
2456 ................................................................................
2457 ................................................................................
2458 ................................................................................
2459 ................................................................................
2460 ................................................................................
2461 )X";
2462
2463 BoundaryTolerance tolerance = BoundaryTolerance::None();
2464 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2465 parseMatrix(reference)));
2466 }
2467
2468 {
2469 std::string reference = R"X(
2470 ................................................................................
2471 ................................................................................
2472 ................................................................................
2473 ................................................................................
2474 ................................................................................
2475 ................................................................................
2476 ................................................................................
2477 ................................................................................
2478 ................................................................................
2479 ...................................XXX..........................................
2480 ................................XXXXXXXXX.......................................
2481 ...............................XXXXXXXXXXX......................................
2482 ..............................XXXXXXXXXXXXX.....................................
2483 ..............................XXXXXXXXXXXXXXX...................................
2484 .............................XXXXXXXXXXXXXXXXXX.................................
2485 .............................XXXXXXXXXXXXXXXXXXX................................
2486 ............................XXXXXXXXXXXXXXXXXXXXXX..............................
2487 ............................XXXXXXXXXXXXXXXXXXXXXXX.............................
2488 ...........................XXXXXXXXXXXXXXXXXXXXXXXXX............................
2489 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2490 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2491 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2492 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2493 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2494 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2495 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2496 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2497 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2498 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2499 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2500 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2501 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2502 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2503 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2504 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2505 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2506 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2507 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2508 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2509 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2510 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2511 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2512 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2513 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2514 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2515 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2516 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2517 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2518 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2519 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2520 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2521 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2522 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2523 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2524 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2525 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2526 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
2527 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2528 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
2529 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
2530 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................................
2531 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................................
2532 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
2533 ................XXXXXXXXXXXXXXXXXXXXXXXXX.......................................
2534 ................XXXXXXXXXXXXXXXXXXXXXXXX........................................
2535 ................XXXXXXXXXXXXXXXXXXXXXX..........................................
2536 .................XXXXXXXXXXXXXXXXXX.............................................
2537 .................XXXXXXXXXXXXXXXX...............................................
2538 ..................XXXXXXXXXXXXX.................................................
2539 ....................XXXXXXXX....................................................
2540 ................................................................................
2541 ................................................................................
2542 ................................................................................
2543 ................................................................................
2544 ................................................................................
2545 ................................................................................
2546 ................................................................................
2547 ................................................................................
2548 ................................................................................
2549 ................................................................................
2550 )X";
2551
2552 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteEuclidean(1);
2553 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.3),
2554 parseMatrix(reference)));
2555 }
2556
2557 {
2558 std::string reference = R"X(
2559 ................................................................................
2560 ................................................................................
2561 ................................................................................
2562 ................................................................................
2563 ................................................................................
2564 ................................................................................
2565 ................................................................................
2566 ................................................................................
2567 ................................................................................
2568 ................................................................................
2569 ................................................................................
2570 ................................................................................
2571 ................................................................................
2572 ................................................................................
2573 ................................................................................
2574 ................................................................................
2575 ................................................................................
2576 ................................................................................
2577 ................................................................................
2578 ................................................................................
2579 .......................................X........................................
2580 ......................................XXX.......................................
2581 .....................................XXXXXX.....................................
2582 ....................................XXXXXXXX....................................
2583 ....................................XXXXXXXXXX..................................
2584 ...................................XXXXXXXXXXXX.................................
2585 ..................................XXXXXXXXXXXXXX................................
2586 .................................XXXXXXXXXXXXXXXXX..............................
2587 ................................XXXXXXXXXXXXXXXXXXX.............................
2588 ...............................XXXXXXXXXXXXXXXXXXXXXX...........................
2589 ..............................XXXXXXXXXXXXXXXXXXXXXXXX..........................
2590 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2591 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2592 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2593 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2594 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2595 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2596 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2597 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2598 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2599 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2600 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2601 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
2602 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
2603 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2604 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
2605 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXX...............................
2606 .....................XXXXXXXXXXXXXXXXXXXXXXXXXX.................................
2607 .....................XXXXXXXXXXXXXXXXXXXXXXXXX..................................
2608 ......................XXXXXXXXXXXXXXXXXXXXXXX...................................
2609 ......................XXXXXXXXXXXXXXXXXXXXX.....................................
2610 ......................XXXXXXXXXXXXXXXXXXXX......................................
2611 ......................XXXXXXXXXXXXXXXXXXX.......................................
2612 .......................XXXXXXXXXXXXXXXX.........................................
2613 .......................XXXXXXXXXXXXXXX..........................................
2614 .......................XXXXXXXXXXXXX............................................
2615 ........................XXXXXXXXXX..............................................
2616 ........................XXXXXXXXX...............................................
2617 ........................XXXXXXX.................................................
2618 .........................XXXX...................................................
2619 .........................XX.....................................................
2620 ................................................................................
2621 ................................................................................
2622 ................................................................................
2623 ................................................................................
2624 ................................................................................
2625 ................................................................................
2626 ................................................................................
2627 ................................................................................
2628 ................................................................................
2629 ................................................................................
2630 ................................................................................
2631 ................................................................................
2632 ................................................................................
2633 ................................................................................
2634 ................................................................................
2635 ................................................................................
2636 ................................................................................
2637 ................................................................................
2638 ................................................................................
2639 )X";
2640
2641 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteEuclidean(-1);
2642 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2643 parseMatrix(reference)));
2644 }
2645
2646 {
2647 std::string reference = R"X(
2648 ................................................................................
2649 ................................................................................
2650 ................................................................................
2651 ................................................................................
2652 ................................................................................
2653 ................................................................................
2654 ................................................................................
2655 ................................................................................
2656 ................................................................................
2657 ................................................................................
2658 ................................................................................
2659 ................................................................................
2660 ................................................................................
2661 ................................................................................
2662 ................................................................................
2663 ................................................................................
2664 ................................................................................
2665 .....................................X..........................................
2666 ....................................XX.XX.......................................
2667 ....................................XXXXXXX.....................................
2668 ....................................XXXXXXXX....................................
2669 ...................................XXXXXXXXXXX..................................
2670 ..................................XXXXXXXXXXXXXX................................
2671 ..................................XXXXXXXXXXXXXXXX..............................
2672 .................................XXXXXXXXXXXXXXXXXX.............................
2673 ................................XXXXXXXXXXXXXXXXXXXXX...........................
2674 ................................XXXXXXXXXXXXXXXXXXXXXXX.........................
2675 ...............................XXXXXXXXXXXXXXXXXXXXXXXXX........................
2676 ..............................XXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2677 .............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2678 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2679 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2680 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2681 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2682 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2683 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2684 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2685 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2686 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2687 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2688 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2689 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2690 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2691 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2692 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2693 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2694 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
2695 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2696 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
2697 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............................
2698 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
2699 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
2700 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXX...................................
2701 ..................XXXXXXXXXXXXXXXXXXXXXXXXX.....................................
2702 ..................XXXXXXXXXXXXXXXXXXXXXXXX......................................
2703 ..................XXXXXXXXXXXXXXXXXXXXXX........................................
2704 ...................XXXXXXXXXXXXXXXXXXX..........................................
2705 ...................XXXXXXXXXXXXXXXXX............................................
2706 ...................XXXXXXXXXXXXXXX..............................................
2707 ...................XXXXXXXXXXXX.................................................
2708 ...................XXXXXXXXXX...................................................
2709 .......................XXX......................................................
2710 ................................................................................
2711 ................................................................................
2712 ................................................................................
2713 ................................................................................
2714 ................................................................................
2715 ................................................................................
2716 ................................................................................
2717 ................................................................................
2718 ................................................................................
2719 ................................................................................
2720 ................................................................................
2721 ................................................................................
2722 ................................................................................
2723 ................................................................................
2724 ................................................................................
2725 ................................................................................
2726 ................................................................................
2727 ................................................................................
2728 )X";
2729
2730 BoundaryTolerance tolerance =
2731 BoundaryTolerance::Chi2Bound(SquareMatrix2::Identity(), 0.1);
2732 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.5),
2733 parseMatrix(reference)));
2734 }
2735
2736 {
2737 std::string reference = R"X(
2738 ................................................................................
2739 ................................................................................
2740 ................................................................................
2741 ................................................................................
2742 ................................................................................
2743 ................................................................................
2744 ................................................................................
2745 ................................................................................
2746 ................................................................................
2747 ................................................................................
2748 ................................................................................
2749 ................................................................................
2750 ................................................................................
2751 ................................................................................
2752 ...................................X............................................
2753 ..................................XXX...........................................
2754 ..................................XXXX..........................................
2755 .................................XXXXXX.........................................
2756 ................................XXXXXXXX........................................
2757 ...............................XXXXXXXXXXX......................................
2758 ...............................XXXXXXXXXXXX.....................................
2759 ..............................XXXXXXXXXXXXXX....................................
2760 .............................XXXXXXXXXXXXXXXX...................................
2761 ............................XXXXXXXXXXXXXXXXXX..................................
2762 ...........................XXXXXXXXXXXXXXXXXXXX.................................
2763 ..........................XXXXXXXXXXXXXXXXXXXXXX................................
2764 .........................XXXXXXXXXXXXXXXXXXXXXXXXX..............................
2765 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2766 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
2767 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
2768 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2769 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2770 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2771 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2772 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2773 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2774 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2775 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2776 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2777 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2778 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2779 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2780 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2781 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2782 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2783 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2784 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2785 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2786 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2787 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2788 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
2789 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
2790 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2791 ........................XXXXXXXXXXXXXXXXXXXXXXXXXX..............................
2792 ........................XXXXXXXXXXXXXXXXXXXXXXXX................................
2793 .........................XXXXXXXXXXXXXXXXXXXXXX.................................
2794 .........................XXXXXXXXXXXXXXXXXXXXX..................................
2795 ..........................XXXXXXXXXXXXXXXXXX....................................
2796 ..........................XXXXXXXXXXXXXXXXX.....................................
2797 ..........................XXXXXXXXXXXXXXX.......................................
2798 ...........................XXXXXXXXXXXX.........................................
2799 ...........................XXXXXXXXXXX..........................................
2800 ............................XXXXXXXX............................................
2801 ............................XXXXXX..............................................
2802 .............................XXX................................................
2803 .............................X..................................................
2804 ................................................................................
2805 ................................................................................
2806 ................................................................................
2807 ................................................................................
2808 ................................................................................
2809 ................................................................................
2810 ................................................................................
2811 ................................................................................
2812 ................................................................................
2813 ................................................................................
2814 ................................................................................
2815 ................................................................................
2816 ................................................................................
2817 ................................................................................
2818 )X";
2819
2820 BoundaryTolerance tolerance =
2821 BoundaryTolerance::Chi2Bound(SquareMatrix2::Identity(), -0.1);
2822 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2823 parseMatrix(reference)));
2824 }
2825
2826 {
2827 std::string reference = R"X(
2828 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2829 XXXXXXXXXXXX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XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2903 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2904 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2905 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2906 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2907 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
2908 )X";
2909
2910 BoundaryTolerance tolerance = BoundaryTolerance::Infinite();
2911 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance),
2912 parseMatrix(reference)));
2913 }
2914
2915 {
2916 std::string reference = R"X(
2917 ................................................................................
2918 ................................................................................
2919 ................................................................................
2920 ................................................................................
2921 ................................................................................
2922 ................................................................................
2923 ...............................XX...............................................
2924 ...............................XXX..............................................
2925 ...............................XXXXX............................................
2926 ..............................XXXXXXX...........................................
2927 ..............................XXXXXXXXX.........................................
2928 .............................XXXXXXXXXXX........................................
2929 .............................XXXXXXXXXXXXX......................................
2930 ............................XXXXXXXXXXXXXXXX....................................
2931 ............................XXXXXXXXXXXXXXXXX...................................
2932 ...........................XXXXXXXXXXXXXXXXXXXX.................................
2933 ..........................XXXXXXXXXXXXXXXXXXXXXX................................
2934 ..........................XXXXXXXXXXXXXXXXXXXXXXXX..............................
2935 .........................XXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2936 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
2937 .......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2938 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2939 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
2940 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2941 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2942 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2943 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2944 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2945 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2946 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2947 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2948 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2949 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2950 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2951 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
2952 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2953 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
2954 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
2955 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
2956 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2957 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
2958 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
2959 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
2960 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
2961 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
2962 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
2963 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
2964 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
2965 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
2966 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
2967 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
2968 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
2969 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
2970 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
2971 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
2972 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
2973 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
2974 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
2975 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
2976 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
2977 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
2978 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
2979 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
2980 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................................
2981 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
2982 ...............XXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
2983 ...............XXXXXXXXXXXXXXXXXXXXXXXX.........................................
2984 ................XXXXXXXXXXXXXXXXXXXXX...........................................
2985 ................XXXXXXXXXXXXXXXXXXX.............................................
2986 ................XXXXXXXXXXXXXXXXX...............................................
2987 ................XXXXXXXXXXXXXXX.................................................
2988 .................XXXXXXXXXXX....................................................
2989 .................XXXXXXXXX......................................................
2990 .................XXXXXX.........................................................
2991 .................XXX............................................................
2992 ................................................................................
2993 ................................................................................
2994 ................................................................................
2995 ................................................................................
2996 ................................................................................
2997 )X";
2998
2999 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(0.8, 0.05);
3000 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.2),
3001 parseMatrix(reference)));
3002 }
3003
3004 {
3005 std::string reference = R"X(
3006 ................................................................................
3007 ................................................................................
3008 ................................................................................
3009 ................................................................................
3010 ................................................................................
3011 ............................XX..................................................
3012 ............................XXXX................................................
3013 ...........................XXXXXX...............................................
3014 ...........................XXXXXXXX.............................................
3015 ..........................XXXXXXXXXX............................................
3016 ..........................XXXXXXXXXXX...........................................
3017 .........................XXXXXXXXXXXXXX.........................................
3018 .........................XXXXXXXXXXXXXXX........................................
3019 ........................XXXXXXXXXXXXXXXXXX......................................
3020 .......................XXXXXXXXXXXXXXXXXXXX.....................................
3021 .......................XXXXXXXXXXXXXXXXXXXXX....................................
3022 ......................XXXXXXXXXXXXXXXXXXXXXXXX..................................
3023 .....................XXXXXXXXXXXXXXXXXXXXXXXXXX.................................
3024 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............................
3025 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
3026 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
3027 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
3028 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
3029 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
3030 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
3031 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
3032 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
3033 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
3034 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
3035 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
3036 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
3037 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
3038 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
3039 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
3040 .........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
3041 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
3042 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
3043 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
3044 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
3045 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...
3046 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....
3047 ...........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
3048 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
3049 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
3050 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
3051 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
3052 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
3053 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
3054 .............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
3055 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
3056 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
3057 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
3058 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
3059 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
3060 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
3061 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
3062 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
3063 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................
3064 ................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
3065 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
3066 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
3067 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
3068 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................
3069 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
3070 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............................
3071 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXXXX................................
3072 ...................XXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
3073 ...................XXXXXXXXXXXXXXXXXXXXXXXXX....................................
3074 ....................XXXXXXXXXXXXXXXXXXXXXXX.....................................
3075 ....................XXXXXXXXXXXXXXXXXXXXX.......................................
3076 ....................XXXXXXXXXXXXXXXXXXX.........................................
3077 ....................XXXXXXXXXXXXXXXXX...........................................
3078 .....................XXXXXXXXXXXXXX.............................................
3079 .....................XXXXXXXXXXX................................................
3080 .....................XXXXXXXXX..................................................
3081 ......................XXXXXX....................................................
3082 ......................XXX.......................................................
3083 ................................................................................
3084 ................................................................................
3085 ................................................................................
3086 )X";
3087
3088 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(1, 0);
3089 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.15),
3090 parseMatrix(reference)));
3091 }
3092
3093 {
3094 std::string reference = R"X(
3095 ................................................................................
3096 ................................................................................
3097 ................................................................................
3098 ................................................................................
3099 ................................................................................
3100 ......................................X.........................................
3101 ......................................XXX.......................................
3102 .....................................XXXXXX.....................................
3103 .....................................XXXXXXX....................................
3104 ....................................XXXXXXXXXX..................................
3105 ....................................XXXXXXXXXXXX................................
3106 ...................................XXXXXXXXXXXXXX...............................
3107 ...................................XXXXXXXXXXXXXXXX.............................
3108 ..................................XXXXXXXXXXXXXXXXXXX...........................
3109 ..................................XXXXXXXXXXXXXXXXXXXXX.........................
3110 .................................XXXXXXXXXXXXXXXXXXXXXXX........................
3111 ................................XXXXXXXXXXXXXXXXXXXXXXXXXX......................
3112 ................................XXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
3113 ...............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
3114 ..............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
3115 .............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
3116 .............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
3117 ............................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
3118 ...........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
3119 ..........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
3120 .........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
3121 ........................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
3122 ......................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....
3123 .....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......
3124 ....................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
3125 ..................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......
3126 .................XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........
3127 ...............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
3128 ..............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........
3129 ............XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........
3130 ..........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
3131 ........XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........
3132 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX............
3133 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............
3134 ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............
3135 ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............
3136 ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX................
3137 ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
3138 ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................
3139 ...XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................
3140 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...................
3141 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................
3142 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX......................
3143 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................
3144 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX........................
3145 ....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................
3146 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................
3147 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...........................
3148 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.............................
3149 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..............................
3150 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX...............................
3151 .....XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.................................
3152 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..................................
3153 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX....................................
3154 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.....................................
3155 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.......................................
3156 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.........................................
3157 ......XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX..........................................
3158 .......XXXXXXXXXXXXXXXXXXXXXXXXXXXXX............................................
3159 .......XXXXXXXXXXXXXXXXXXXXXXXXXXX..............................................
3160 .......XXXXXXXXXXXXXXXXXXXXXXXXX................................................
3161 .......XXXXXXXXXXXXXXXXXXXXXXX..................................................
3162 .......XXXXXXXXXXXXXXXXXXXX.....................................................
3163 .......XXXXXXXXXXXXXXXXXX.......................................................
3164 ........XXXXXXXXXXXXXX..........................................................
3165 ........XXXXXXXXXXXX............................................................
3166 ........XXXXXXXXX...............................................................
3167 ........XXXXXX..................................................................
3168 ........XX......................................................................
3169 ................................................................................
3170 ................................................................................
3171 ................................................................................
3172 ................................................................................
3173 ................................................................................
3174 ................................................................................
3175 )X";
3176
3177 BoundaryTolerance tolerance = BoundaryTolerance::AbsoluteBound(0, 0.1);
3178 BOOST_CHECK(checkMatrices(makeTestMatrix(*surface, tolerance, 0.15),
3179 parseMatrix(reference)));
3180 }
3181 }
3182
3183 BOOST_AUTO_TEST_SUITE_END()
3184 }