From f4c6cc3ca2f53982af523bfc339ee10c7a9a1e19 Mon Sep 17 00:00:00 2001 From: pca006132 Date: Mon, 9 Dec 2024 13:32:54 +0800 Subject: [PATCH] smaller example --- test/boolean_complex_test.cpp | 25 ++ test/models/Offset3.obj | 629 ++++++++++++++++++++++++++++++++++ test/models/Offset4.obj | 600 ++++++++++++++++++++++++++++++++ 3 files changed, 1254 insertions(+) create mode 100644 test/models/Offset3.obj create mode 100644 test/models/Offset4.obj diff --git a/test/boolean_complex_test.cpp b/test/boolean_complex_test.cpp index f0fa5b5f2..2cef5f607 100644 --- a/test/boolean_complex_test.cpp +++ b/test/boolean_complex_test.cpp @@ -1045,4 +1045,29 @@ TEST(BooleanComplex, DISABLED_OffsetTriangulationFailure) { ManifoldParams().intermediateChecks = intermediateChecks; } +TEST(BooleanComplex, DISABLED_OffsetSelfIntersect) { + const bool intermediateChecks = ManifoldParams().intermediateChecks; + ManifoldParams().intermediateChecks = true; + std::string file = __FILE__; + std::string dir = file.substr(0, file.rfind('/')); + MeshGL64 a, b; + std::ifstream f; + try { + f.open(dir + "/models/Offset3.obj"); + a = ImportMeshGL64(f); + f.close(); + f.open(dir + "/models/Offset4.obj"); + b = ImportMeshGL64(f); + f.close(); + } catch (std::exception& err) { + std::cout << err.what() << std::endl; + FAIL(); + } + Manifold x(a); + Manifold y(b); + Manifold result = x + y; + EXPECT_EQ(result.Status(), Manifold::Error::NoError); + ManifoldParams().intermediateChecks = intermediateChecks; +} + #endif diff --git a/test/models/Offset3.obj b/test/models/Offset3.obj new file mode 100644 index 000000000..e08757e77 --- /dev/null +++ b/test/models/Offset3.obj @@ -0,0 +1,629 @@ +# ======= begin mesh ====== +# tolerance = 5.5669873237609865e-11 +v -26.25 -32.475952036813261 -4.3301267623901367 +v -34.999999851891147 -25.980762370065214 -11.339746327110875 +v -33.749999851891147 -23.815698512032988 -15.669873089501012 +v -37.499999851891147 -21.650635607675078 -11.339746327110875 +v -34.999999851891147 -21.650635607675078 -7.0096195647207384 +v -33.749999851891147 -23.815698512032988 -7.0096195647207384 +v -33.749999851891147 -19.485572703317168 -7.0096195647207384 +v -27.5 -30.310889132455351 -4.3301267623901367 +v -26.25 -28.145826228097441 -4.3301267623901367 +v -46.250000148108846 -2.1650629043579106 -28.169873385718716 +v -47.500000148108846 -6.6576698839795792e-16 -28.169873385718716 +v -46.250000148108846 2.1650629043579102 -28.169873385718716 +v -41.250000296217706 -2.1650629043579106 -34.330127058607843 +v -42.500000296217706 -4.3301267623901367 -30.000000296217703 +v -42.500000296217706 -3.2776109912184307e-16 -34.330127058607843 +v -41.250000296217706 2.1650629043579097 -34.330127058607843 +v -42.500000296217706 4.3301267623901367 -30.000000296217703 +v -47.500000148108846 -4.3301267623901385 -23.839746623328576 +v -50.000000148108846 -1.3355617058949227e-15 -23.839746623328576 +v -47.500000148108846 4.3301267623901367 -23.83974662332858 +v -47.500000148108846 -1.3355617058949227e-15 -19.509619860938439 +v -46.250000148108846 2.1650629043579088 -19.509619860938439 +v -15 -38.971143426831794 -30.310889132455351 +v -13.75 -36.806079568799568 -34.641015894845488 +v -15 -34.641016664441658 -34.641015894845488 +v -13.75 -32.475953760083748 -34.641015894845488 +v -17.5 -34.641016664441658 -30.310889132455351 +v -17.999999668236171 -44.167295582745083 -19.918584820628766 +v -15 -30.310889902051521 -30.310889132455351 +v -22.499999703782297 -38.971143426831794 -17.320508588752887 +v -24.999999703782297 -34.641016664441658 -17.320508588752887 +v -22.499999703782297 -34.641016664441658 -12.99038182636275 +v -21.249999703782297 -36.806079568799568 -12.99038182636275 +v -21.249999703782297 -32.475953760083748 -12.99038182636275 +v -16.749999668236171 -42.002231724712857 -15.588458058238629 +v -22.499999703782297 -30.310889902051521 -17.320508588752887 +v -27.5 -34.641015894845488 0 +v -30 -30.310889132455351 0 +v -27.5 -25.980762370065214 0 +v -27.5 -30.310889132455351 4.3301270189221928 +v -41.250000296217699 -2.1650629043579097 25.669873533827563 +v -42.500000296217699 6.662498124243837e-16 25.669873533827563 +v -41.250000296217699 2.165062904357911 25.669873533827563 +v -45.000000296217699 6.662498124243837e-16 30.000000296217699 +v -42.500000296217699 -4.3301267623901358 30.000000296217699 +v -41.250000296217699 -2.1650629043579088 34.330127058607843 +v -42.500000296217699 4.3301267623901376 30.000000296217703 +v -42.500000296217699 1.3315339767959158e-15 34.330127058607843 +v -41.250000296217699 2.1650629043579115 34.330127058607843 +v -18.929491924311225 -40.825316942202292 8.3493651619210887 +v -22.679491924311225 -38.660254037844382 12.679491924311225 +v -20.179491924311225 -42.990380800234519 12.679491924311225 +v -18.929491924311225 -40.825316942202292 17.009618686701362 +v -20.179491924311225 -38.660254037844382 17.009618686701362 +v -18.929491924311225 -36.495191133486472 17.009618686701362 +v -25 -25.980762370065214 4.3301270189221928 +v -25 -30.310889132455351 8.6602537813123295 +v -23.75 -28.145826228097441 8.6602537813123295 +v -39.767281160153182 6.4453042139092176 -30.64107185798472 +v -41.017281160153182 8.6103680719414442 -26.310945095594583 +v -39.767281160153182 6.4453042139092176 -21.980818333204446 +v -30 17.320508845284941 -4.3301270189221928 +v -26.24999999671385 23.815699471399075 -15.245190263195603 +v -27.49999999671385 25.980762375756985 -15.245190263195603 +v -26.24999999671385 28.145825280114895 -15.245190263195603 +v -29.99999999671385 25.980762375756985 -10.915063500805466 +v -27.49999999671385 30.310889138147122 -10.915063500805466 +v -32.5 21.650635607675078 -4.3301270189221928 +v -28.75 19.485572703317168 -8.6602537813123295 +v -30 21.650635607675078 -8.6602537813123295 +v -13.749999703782295 41.136207284864021 -25.980762370065214 +v -14.999999703782295 38.971143426831794 -21.650635607675078 +v -14.999999703782295 43.301270189221931 -25.980762370065214 +v -17.499999703782294 43.301270189221931 -21.650635607675078 +v -14.999999703782295 51.339746475219727 -25.980762370065214 +v -13.749999703782295 53.504809379577637 -25.980762370065214 +v -17.499999703782294 51.339746475219727 -21.650635607675078 +v -14.999999703782295 55.669873237609863 -21.650635607675078 +v -18.283666269606627 38.971143426831794 -15.963158280552122 +v -17.033666269606627 41.136207284864021 -11.633031518161985 +v -23.75 32.475952036813261 -8.6602537813123295 +v -25 34.641015894845488 -4.3301270189221928 +v -20.783666269606627 43.301270189221931 -15.963158280552122 +v -18.283666269606627 47.631396951612068 -15.963158280552122 +v -18.283666269606627 43.301270189221931 -11.633031518161985 +v -17.033666269606627 45.466333093579841 -11.633031518161985 +v -13.749999703782295 53.504809379577637 -17.320508845284941 +v -28.75 19.485572703317168 -2.5653205604214691e-07 +v -30 21.650635607675078 -2.5653205604214691e-07 +v -27.5 30.310889132455351 4.3301270189221928 +v -27.5 30.310889132455351 17.5 +v -23.75 28.145826228097441 2.5653205604214691e-07 +v -25 30.310889132455351 2.5653205604214691e-07 +v -25 30.310889132455351 -2.5653205604214691e-07 +v -25 25.980762370065214 4.3301270189221928 +v -25 25.980762370065214 17.5 +v -23.75 28.145826228097441 21.830126762390137 +v -25 30.310889132455351 21.830126762390137 +v -23.75 32.475952036813261 2.5653205604214691e-07 +v -23.75 32.475952036813261 -2.5653205604214691e-07 +v -25 34.641015894845488 4.3301270189221928 +v -21.170632852272416 41.273674612076832 17.045573237184993 +v -20.833333135854865 41.857894858290607 15.877132744757448 +v -17.083333135854865 44.022957762648517 11.547005982367311 +v -18.333333135854865 46.188021620680743 15.877132744757448 +v -18.670632852272416 45.603801374466968 17.045573237184993 +v -25 34.641015894845488 17.5 +v -23.75 32.475952036813261 21.830126762390137 +v -17.420632852272416 43.438737516434742 21.375699999575129 +v 15 -38.971143426831794 -30.310889132455351 +v 13.75 -36.806079568799568 -34.641015894845488 +v 13.75 -32.475953760083748 -34.641015894845488 +v 15 -34.641016664441658 -34.641015894845488 +v 17.5 -34.641016664441658 -30.310889132455351 +v 17.999999668236171 -44.167295582745083 -19.918584820628766 +v 15 -30.310889902051521 -30.310889132455351 +v 16.749999668236171 -42.002231724712857 -15.588458058238629 +v 22.499999703782297 -38.971143426831794 -17.320508588752887 +v 24.999999703782297 -34.641016664441658 -17.320508588752887 +v 21.249999703782297 -36.806079568799568 -12.99038182636275 +v 21.249999703782297 -32.475953760083748 -12.99038182636275 +v 22.499999703782297 -34.641016664441658 -12.99038182636275 +v 22.499999703782297 -30.310889902051521 -17.320508588752887 +v 26.25 -32.475952036813261 -4.3301267623901367 +v 34.999999851891147 -25.980762370065214 -11.339746327110875 +v 33.749999851891147 -23.815698512032988 -15.669873089501012 +v 37.499999851891147 -21.650635607675078 -11.339746327110875 +v 27.5 -30.310889132455351 -4.3301267623901367 +v 26.25 -28.145826228097441 -4.3301267623901367 +v 33.749999851891147 -23.815698512032988 -7.0096195647207384 +v 33.749999851891147 -19.485572703317168 -7.0096195647207384 +v 34.999999851891147 -21.650635607675078 -7.0096195647207384 +v 41.250000296217706 -2.1650629043579106 -34.330127058607843 +v 42.500000296217706 -4.3301267623901367 -30.000000296217703 +v 41.250000296217706 2.1650629043579097 -34.330127058607843 +v 42.500000296217706 -3.2776109912184307e-16 -34.330127058607843 +v 42.500000296217706 4.3301267623901367 -30.000000296217703 +v 46.250000148108853 -2.1650629043579106 -28.169873385718716 +v 46.250000148108853 2.1650629043579097 -28.169873385718716 +v 47.500000148108853 -6.6576698839795792e-16 -28.169873385718716 +v 47.500000148108853 -4.3301267623901376 -23.83974662332858 +v 50.000000148108853 -6.6576698839795792e-16 -23.83974662332858 +v 47.500000148108853 4.3301267623901358 -23.83974662332858 +v 46.250000148108853 2.1650629043579097 -19.509619860938443 +v 47.500000148108853 -6.6576698839795792e-16 -19.509619860938443 +v 18.929491924311225 -40.825316942202292 8.3493651619210887 +v 20.179491924311225 -42.990380800234519 12.679491924311225 +v 22.679491924311225 -38.660254037844382 12.679491924311225 +v 18.929491924311225 -40.825316942202292 17.009618686701362 +v 20.179491924311225 -38.660254037844382 17.009618686701362 +v 18.929491924311225 -36.495191133486472 17.009618686701362 +v 25 -25.980762370065214 4.3301270189221928 +v 25 -30.310889132455351 8.6602537813123295 +v 23.75 -28.145826228097441 8.6602537813123295 +v 27.5 -34.641015894845488 0 +v 27.5 -25.980762370065214 0 +v 30 -30.310889132455351 0 +v 27.5 -30.310889132455351 4.3301270189221928 +v 41.250000296217706 -2.1650629043579088 25.669873533827566 +v 41.250000296217699 2.165062904357911 25.669873533827563 +v 42.500000296217699 6.662498124243837e-16 25.669873533827563 +v 42.500000296217699 -4.3301267623901358 30.000000296217699 +v 41.250000296217706 -2.1650629043579088 34.330127058607843 +v 42.500000296217706 4.3301267623901376 30.000000296217703 +v 41.250000296217706 2.1650629043579115 34.330127058607843 +v 42.500000296217706 1.3315339767959158e-15 34.330127058607843 +v 45.000000296217706 1.3315339767959158e-15 30.000000296217703 +v 13.749999703782295 41.136207284864021 -25.980762370065214 +v 14.999999703782295 38.971143426831794 -21.650635607675078 +v 14.999999703782295 43.301270189221931 -25.980762370065214 +v 17.499999703782294 43.301270189221931 -21.650635607675078 +v 14.999999703782297 51.339746475219727 -25.980762370065214 +v 13.749999703782297 53.504809379577637 -25.980762370065214 +v 14.999999703782297 55.669873237609863 -21.650635607675078 +v 17.499999703782297 51.339746475219727 -21.650635607675078 +v 18.283666269606627 38.971143426831794 -15.963158280552122 +v 17.033666269606627 41.136207284864021 -11.633031518161985 +v 23.75 32.475952036813261 -8.6602537813123295 +v 25 34.641015894845488 -4.3301270189221928 +v 18.283666269606627 47.631396951612068 -15.963158280552122 +v 17.033666269606627 45.466333093579841 -11.633031518161985 +v 18.283666269606627 43.301270189221931 -11.633031518161985 +v 13.749999703782297 53.504809379577637 -17.320508845284941 +v 20.783666269606627 43.301270189221931 -15.963158280552122 +v 39.767281160153182 6.4453042139092176 -30.64107185798472 +v 41.017281160153182 8.6103680719414442 -26.310945095594583 +v 39.767281160153182 6.4453042139092176 -21.980818333204446 +v 30 17.320508845284941 -4.3301270189221928 +v 26.24999999671385 23.815699471399075 -15.245190263195603 +v 27.49999999671385 25.980762375756985 -15.245190263195603 +v 26.24999999671385 28.145825280114895 -15.245190263195603 +v 27.49999999671385 30.310889138147122 -10.915063500805466 +v 29.99999999671385 25.980762375756985 -10.915063500805466 +v 28.75 19.485572703317168 -8.6602537813123295 +v 30 21.650635607675078 -8.6602537813123295 +v 32.5 21.650635607675078 -4.3301270189221928 +v 23.75 28.145826228097441 2.5653205604214691e-07 +v 25 30.310889132455351 2.5653205604214691e-07 +v 25 30.310889132455351 -2.5653205604214691e-07 +v 25 25.980762370065214 4.3301270189221928 +v 25 25.980762370065214 17.5 +v 23.75 28.145826228097441 21.830126762390137 +v 25 30.310889132455351 21.830126762390137 +v 23.75 32.475952036813261 2.5653205604214691e-07 +v 23.75 32.475952036813261 -2.5653205604214691e-07 +v 25 34.641015894845488 4.3301270189221928 +v 21.170632852272416 41.273674612076832 17.045573237184993 +v 20.833333135854865 41.857894858290607 15.877132744757448 +v 17.083333135854865 44.022957762648517 11.547005982367311 +v 18.333333135854865 46.188021620680743 15.877132744757448 +v 18.670632852272416 45.603801374466968 17.045573237184993 +v 25 34.641015894845488 17.5 +v 23.75 32.475952036813261 21.830126762390137 +v 17.420632852272416 43.438737516434742 21.375699999575129 +v 28.75 19.485572703317168 -2.5653205604214691e-07 +v 30 21.650635607675078 -2.5653205604214691e-07 +v 27.5 30.310889132455351 4.3301270189221928 +v 27.5 30.310889132455351 17.5 +f 8 37 38 +f 1 37 8 +f 2 5 4 +f 6 5 2 +f 8 38 39 +f 9 1 8 +f 39 9 8 +f 19 18 4 +f 18 14 2 +f 2 14 13 +f 13 11 15 +f 18 11 10 +f 13 14 18 +f 18 10 13 +f 10 11 13 +f 12 11 20 +f 12 15 11 +f 17 16 20 +f 20 16 12 +f 16 15 12 +f 59 16 60 +f 60 16 17 +f 19 11 18 +f 20 11 19 +f 20 19 21 +f 22 60 20 +f 20 21 22 +f 61 60 22 +f 3 2 13 +f 19 5 21 +f 4 5 19 +f 4 18 2 +f 22 5 7 +f 21 5 22 +f 23 27 25 +f 25 27 29 +f 25 24 23 +f 26 24 25 +f 26 25 29 +f 31 27 30 +f 36 27 31 +f 30 23 28 +f 30 27 23 +f 29 27 36 +f 23 24 110 +f 26 29 112 +f 112 24 26 +f 28 23 115 +f 36 123 29 +f 30 28 33 +f 31 30 32 +f 32 30 33 +f 31 32 36 +f 36 32 34 +f 33 28 35 +f 35 117 33 +f 120 32 33 +f 34 32 121 +f 35 28 117 +f 34 123 36 +f 3 126 2 +f 125 6 2 +f 129 1 9 +f 156 9 39 +f 130 5 6 +f 7 5 131 +f 13 126 3 +f 13 15 133 +f 135 15 16 +f 59 185 16 +f 61 22 187 +f 131 22 7 +f 37 51 38 +f 51 40 38 +f 38 40 39 +f 39 40 56 +f 56 40 57 +f 45 42 41 +f 45 44 42 +f 45 48 44 +f 46 48 45 +f 43 42 47 +f 47 42 44 +f 48 47 44 +f 49 47 48 +f 52 51 37 +f 52 37 50 +f 50 37 1 +f 54 51 52 +f 52 53 54 +f 54 53 55 +f 54 40 51 +f 57 40 54 +f 55 57 54 +f 56 57 58 +f 58 57 55 +f 124 50 1 +f 52 50 147 +f 147 53 52 +f 55 53 151 +f 39 56 156 +f 58 154 56 +f 55 154 58 +f 41 42 159 +f 160 42 43 +f 41 159 45 +f 45 163 46 +f 46 163 48 +f 164 43 47 +f 48 163 49 +f 49 164 47 +f 60 17 20 +f 70 64 69 +f 69 64 63 +f 65 64 67 +f 70 66 64 +f 64 66 67 +f 65 67 81 +f 62 70 69 +f 68 70 62 +f 68 66 70 +f 68 62 89 +f 89 62 88 +f 82 66 68 +f 67 66 82 +f 89 94 68 +f 68 94 82 +f 81 67 82 +f 60 185 59 +f 61 186 60 +f 63 194 69 +f 64 191 63 +f 65 191 64 +f 81 191 65 +f 194 62 69 +f 88 62 215 +f 74 79 83 +f 72 74 73 +f 71 72 73 +f 72 79 74 +f 73 74 75 +f 75 74 77 +f 77 74 83 +f 83 84 78 +f 75 77 78 +f 78 76 75 +f 78 77 83 +f 84 87 78 +f 168 72 71 +f 73 170 71 +f 72 169 79 +f 75 170 73 +f 76 170 75 +f 174 76 78 +f 78 87 174 +f 79 85 83 +f 80 85 79 +f 82 94 100 +f 83 85 84 +f 86 87 84 +f 84 85 86 +f 79 177 80 +f 179 81 82 +f 205 82 100 +f 86 181 87 +f 80 181 85 +f 85 181 86 +f 88 94 89 +f 93 95 90 +f 95 91 90 +f 96 91 95 +f 96 98 91 +f 101 93 90 +f 90 91 103 +f 91 98 107 +f 93 92 95 +f 215 94 88 +f 95 92 200 +f 93 204 92 +f 95 201 96 +f 96 97 98 +f 98 97 108 +f 201 97 96 +f 101 99 93 +f 90 105 101 +f 101 105 99 +f 103 105 90 +f 99 105 104 +f 91 102 103 +f 102 106 103 +f 103 106 105 +f 99 204 93 +f 100 94 205 +f 104 204 99 +f 104 105 209 +f 105 106 210 +f 98 108 107 +f 107 106 91 +f 108 106 107 +f 91 106 102 +f 109 106 108 +f 108 97 213 +f 213 109 108 +f 214 106 109 +f 115 23 110 +f 110 24 111 +f 111 24 113 +f 113 24 112 +f 117 28 115 +f 112 29 116 +f 29 123 116 +f 113 110 111 +f 113 112 116 +f 114 110 113 +f 116 114 113 +f 118 115 110 +f 116 123 114 +f 118 117 115 +f 119 110 114 +f 118 110 119 +f 114 123 119 +f 33 117 120 +f 121 123 34 +f 122 32 120 +f 121 32 122 +f 124 1 128 +f 2 126 125 +f 128 1 129 +f 129 9 156 +f 130 6 125 +f 132 5 130 +f 131 5 132 +f 120 117 118 +f 119 122 118 +f 118 122 120 +f 123 122 119 +f 121 122 123 +f 133 126 13 +f 133 15 136 +f 136 15 135 +f 16 185 135 +f 187 22 131 +f 128 155 124 +f 157 155 128 +f 127 132 125 +f 156 128 129 +f 157 128 156 +f 132 130 125 +f 125 126 133 +f 133 134 125 +f 125 134 141 +f 141 142 127 +f 135 139 136 +f 135 185 186 +f 186 137 135 +f 136 140 133 +f 141 134 133 +f 133 138 141 +f 133 140 138 +f 138 140 141 +f 136 139 140 +f 137 143 135 +f 143 139 135 +f 140 139 143 +f 187 144 186 +f 141 140 142 +f 144 143 186 +f 142 140 143 +f 142 143 145 +f 145 143 144 +f 125 141 127 +f 127 142 132 +f 132 144 131 +f 132 142 145 +f 131 144 187 +f 132 145 144 +f 146 50 124 +f 147 50 146 +f 149 53 147 +f 150 53 149 +f 151 53 150 +f 151 154 55 +f 156 56 152 +f 56 154 152 +f 124 147 146 +f 155 148 147 +f 155 147 124 +f 147 148 150 +f 149 147 150 +f 148 158 150 +f 150 158 153 +f 153 154 150 +f 150 154 151 +f 152 154 153 +f 159 42 161 +f 161 42 160 +f 45 159 162 +f 162 163 45 +f 160 43 164 +f 49 163 165 +f 165 164 49 +f 157 148 155 +f 157 158 148 +f 152 158 156 +f 156 158 157 +f 153 158 152 +f 159 161 162 +f 162 161 167 +f 162 167 166 +f 166 163 162 +f 160 164 161 +f 161 164 167 +f 167 164 166 +f 165 163 166 +f 166 164 165 +f 186 185 60 +f 187 186 61 +f 188 62 194 +f 215 62 188 +f 189 194 63 +f 63 191 189 +f 169 72 168 +f 71 170 168 +f 79 169 176 +f 173 170 76 +f 173 76 174 +f 174 87 183 +f 168 170 169 +f 170 171 169 +f 169 171 184 +f 176 169 184 +f 172 170 173 +f 175 171 170 +f 175 170 172 +f 184 171 175 +f 174 172 173 +f 174 175 172 +f 180 175 174 +f 184 175 180 +f 176 177 79 +f 177 181 80 +f 178 191 81 +f 178 81 179 +f 179 82 205 +f 87 181 183 +f 182 177 176 +f 179 191 178 +f 176 184 182 +f 199 179 205 +f 182 181 177 +f 180 181 182 +f 183 181 174 +f 174 181 180 +f 182 184 180 +f 186 143 137 +f 189 190 194 +f 194 190 195 +f 189 191 190 +f 190 191 192 +f 190 193 195 +f 192 193 190 +f 194 195 188 +f 188 195 196 +f 195 193 196 +f 196 216 188 +f 188 216 215 +f 179 193 192 +f 196 193 179 +f 199 216 179 +f 179 216 196 +f 192 191 179 +f 216 94 215 +f 200 92 197 +f 92 204 197 +f 199 94 216 +f 200 201 95 +f 197 198 200 +f 197 204 198 +f 202 97 201 +f 203 97 202 +f 213 97 203 +f 201 203 202 +f 205 94 199 +f 209 204 104 +f 209 105 210 +f 210 106 211 +f 198 204 206 +f 206 204 210 +f 210 217 206 +f 210 204 209 +f 208 217 210 +f 210 207 208 +f 207 218 208 +f 211 207 210 +f 214 109 213 +f 211 106 214 +f 213 203 212 +f 218 211 212 +f 213 211 214 +f 212 211 213 +f 207 211 218 +f 198 217 200 +f 200 217 201 +f 201 217 218 +f 218 203 201 +f 206 217 198 +f 208 218 217 +f 212 203 218 +# ======== end mesh ======= diff --git a/test/models/Offset4.obj b/test/models/Offset4.obj new file mode 100644 index 000000000..2810c35a4 --- /dev/null +++ b/test/models/Offset4.obj @@ -0,0 +1,600 @@ +# ======= begin mesh ====== +# tolerance = 5.5669873237609865e-11 +v -27.5 -30.310889132455351 -17.5 +v -52.499999999999993 -4.3301267623901376 -23.839746623328576 +v -21.249999703782297 -36.806079568799568 -55.669873237609863 +v -22.499999703782297 -38.971143426831794 -51.339746475219727 +v -24.999999703782297 -34.641016664441658 -51.339746475219727 +v -22.499999703782297 -34.641016664441658 -55.669873237609863 +v -21.249999703782297 -32.475953760083748 -55.669873237609863 +v -22.499999703782297 -30.310889902051521 -51.339746475219727 +v -22.499999703782294 -38.971143426831794 -8.6602545509084976 +v -24.999999703782294 -34.641016664441658 -8.6602545509084976 +v -25 -25.980762370065214 -17.5 +v -27.5 -51.339746475219727 -4.3301267623901367 +v -27.5 -55.669873237609863 0 +v -30 -51.339746475219727 0 +v -27.5 -47.00961971282959 0 +v -27.5 -30.310889132455351 -4.3301270189221928 +v -27.670161634583458 -25.686033314091297 13.169873204280901 +v -28.920161656172077 -23.520970372340802 13.169873224152838 +v -28.920161634583458 -23.520970409733387 13.169873204280901 +v -27.670161656172077 -21.355907467982892 13.169873224152838 +v -27.670161634583458 -21.355907505375477 13.169873204280901 +v -42.5 -4.3301267623901367 35 +v -34.572857548847409 -18.060340931137958 20.402000568386377 +v -31.420161634583458 -23.520970409733387 17.499999966671037 +v -28.920161634583458 -27.851097172123524 17.499999966671037 +v -27.670161634583458 -25.686033314091297 21.830126729061174 +v -32.072857548847409 -18.060340931137958 16.07187380599624 +v -30.822857548847413 -15.895278026780048 16.07187380599624 +v -26.25 -53.504809379577637 -4.3301267623901367 +v -26.25 -49.174683570861816 -4.3301267623901367 +v -21.249999703782294 -36.806079568799568 -4.3301277885183609 +v -25 -34.641015894845488 -4.3301270189221928 +v -25 -30.310889132455351 -2.5653205604214691e-07 +v -23.75 -32.475952036813261 -2.5653205604214691e-07 +v -17.499999703782294 -51.339746475219727 21.650635607675078 +v -14.999999703782295 -55.669873237609863 21.650635607675078 +v -14.999999703782295 -51.339746475219727 25.980762370065214 +v -20.100525513421307 -44.973611353744438 17.146392778986115 +v -17.600525513421307 -44.973611353744438 21.476519541376252 +v -16.350525513421307 -42.808548449386528 21.476519541376252 +v -17.600525513421307 -40.643484591354301 17.146392778986115 +v -13.749999703782295 -53.504809379577637 25.980762370065214 +v -13.749999703782295 -49.174683570861816 25.980762370065214 +v -25 -25.980762370065214 -4.3301270189221928 +v -23.75 -28.145826228097441 -2.5653205604214691e-07 +v -25.170161656172077 -21.355907467982892 13.169873224152838 +v -52.499999999999993 -8.2013451871993479e-16 -28.169873385718713 +v -51.249999999999993 -2.165062904357911 -28.169873385718713 +v -51.249999999999993 2.1650629043579093 -28.169873385718713 +v -54.999999999999993 -8.2013451871993479e-16 -23.839746623328576 +v -52.499999999999993 4.3301267623901358 -23.839746623328576 +v -52.499999999999993 -8.2013451871993479e-16 -19.509619860938439 +v -51.249999999999993 -2.165062904357911 -19.509619860938439 +v -37.499999851891147 21.650635607675078 -11.339746327110872 +v -34.999999851891147 25.980762370065214 -11.339746327110872 +v -33.749999851891147 23.815698512032988 -15.669873089501008 +v -21.24999970378229 32.475953760083748 -21.650635351143027 +v -22.49999970378229 34.641016664441658 -21.650635351143027 +v -24.99999970378229 34.641016664441658 -17.32050858875289 +v -22.49999970378229 30.310889902051521 -17.32050858875289 +v -21.24999970378229 32.475953760083748 -12.990381826362754 +v -22.49999970378229 34.641016664441658 -12.990381826362754 +v -17.499999703782294 43.301270189221931 -21.650635607675078 +v -14.999999703782295 43.301270189221931 -25.980762370065214 +v -14.999999703782295 47.631396951612068 -21.650635607675078 +v -22.679491924311225 38.660254037844382 -12.679491924311225 +v -18.929491924311225 36.495191133486472 -8.3493651619210887 +v -20.179491924311225 38.660254037844382 -8.3493651619210887 +v -18.929491924311225 40.825316942202292 -8.3493651619210887 +v -20 43.301270189221931 -17.320508075688771 +v -17.5 47.631396951612068 -17.320508075688771 +v -20.179491924311225 42.990380800234519 -12.679491924311225 +v -16.25 45.466333093579841 -12.990381313298634 +v -13.749999703782295 41.136207284864021 -25.980762370065214 +v -13.749999703782295 45.466333093579841 -25.980762370065214 +v -34.999999851891147 21.650635607675078 -7.0096195647207349 +v -33.749999851891147 19.485572703317168 -7.0096195647207349 +v -42.5 0 30.669873237609863 +v -41.25 2.1650629043579102 30.669873237609863 +v -45 0 35 +v -41.25 -2.1650629043579102 39.330126762390137 +v -42.5 0 39.330126762390137 +v -41.25 2.1650629043579102 39.330126762390137 +v -42.5 4.3301267623901367 35 +v -33.749999851891147 23.815698512032988 -7.0096195647207349 +v -27.5 25.980762370065214 0 +v -27.5 30.310889132455351 -4.3301267623901367 +v -30 30.310889132455351 0 +v -27.5 34.641015894845488 0 +v -27.5 30.310889132455351 4.3301270189221928 +v -26.25 28.145826228097441 -4.3301267623901367 +v -26.25 32.475952036813261 -4.3301267623901367 +v -25 25.980762370065214 4.3301270189221928 +v -23.75 28.145826228097441 8.6602537813123295 +v -25 30.310889132455351 8.6602537813123295 +v -21.541618525634803 44.54049658525895 14.650346463399867 +v -17.791618525634803 46.70555948961686 10.32021970100973 +v -19.041618525634803 48.870623347649087 14.650346463399867 +v -16.25 41.136207284864021 21.650634838078908 +v -20 43.301270189221931 17.320508075688771 +v -19.041618525634803 44.54049658525895 18.980473225790004 +v -17.5 47.631396951612068 17.320508075688771 +v -17.791618525634803 46.70555948961686 18.980473225790004 +v -17.5 43.301270189221931 21.650634838078908 +v -16.25 45.466333093579841 21.650634838078908 +v 21.249999703782297 -36.806079568799568 -55.669873237609863 +v 22.499999703782297 -38.971143426831794 -51.339746475219727 +v 22.499999703782297 -34.641016664441658 -55.669873237609863 +v 21.249999703782297 -32.475953760083748 -55.669873237609863 +v 22.499999703782297 -30.310889902051521 -51.339746475219727 +v 24.999999703782297 -34.641016664441658 -51.339746475219727 +v 22.499999703782294 -38.971143426831794 -8.6602545509084976 +v 24.999999703782294 -34.641016664441658 -8.6602545509084976 +v 25 -25.980762370065214 -17.5 +v 27.5 -30.310889132455351 -17.5 +v 52.5 -4.3301267623901376 -23.839746623328576 +v 26.25 -53.504809379577637 -4.3301267623901367 +v 26.25 -49.174683570861816 -4.3301267623901367 +v 21.249999703782294 -36.806079568799568 -4.3301277885183609 +v 25 -34.641015894845488 -4.3301270189221928 +v 23.75 -32.475952036813261 -2.5653205604214691e-07 +v 25 -30.310889132455351 -2.5653205604214691e-07 +v 13.749999703782295 -53.504809379577637 25.980762370065214 +v 13.749999703782295 -49.174683570861816 25.980762370065214 +v 14.999999703782295 -55.669873237609863 21.650635607675078 +v 14.999999703782295 -51.339746475219727 25.980762370065214 +v 17.499999703782294 -51.339746475219727 21.650635607675078 +v 16.350525513421307 -42.808548449386528 21.476519541376252 +v 20.100525513421307 -44.973611353744438 17.146392778986115 +v 17.600525513421307 -44.973611353744438 21.476519541376252 +v 17.600525513421307 -40.643484591354301 17.146392778986115 +v 25 -25.980762370065214 -4.3301270189221928 +v 23.75 -28.145826228097441 -2.5653205604214691e-07 +v 27.5 -51.339746475219727 -4.3301267623901367 +v 27.5 -55.669873237609863 0 +v 30 -51.339746475219727 0 +v 27.5 -47.00961971282959 0 +v 27.5 -30.310889132455351 -4.3301270189221928 +v 27.670161634583462 -25.686033314091297 13.169873204280901 +v 28.920161634583462 -23.520970409733387 13.169873204280901 +v 27.670161634583462 -21.355907505375477 13.169873204280901 +v 28.920161634583462 -27.851097172123524 17.499999966671037 +v 31.420161634583462 -23.520970409733387 17.499999966671037 +v 27.670161634583462 -25.686033314091297 21.830126729061174 +v 32.072857548847409 -18.060340931137958 16.07187380599624 +v 34.572857548847409 -18.060340931137958 20.402000568386377 +v 30.822857548847413 -15.895278026780048 16.07187380599624 +v 42.5 -4.3301267623901367 35 +v 13.749999703782295 41.136207284864021 -25.980762370065214 +v 13.749999703782295 45.466333093579841 -25.980762370065214 +v 21.24999970378229 32.475953760083748 -21.650635351143027 +v 22.49999970378229 34.641016664441658 -21.650635351143027 +v 22.49999970378229 30.310889902051521 -17.32050858875289 +v 24.99999970378229 34.641016664441658 -17.32050858875289 +v 21.24999970378229 32.475953760083748 -12.990381826362754 +v 22.49999970378229 34.641016664441658 -12.990381826362754 +v 14.999999703782295 43.301270189221931 -25.980762370065214 +v 14.999999703782295 47.631396951612068 -21.650635607675078 +v 17.499999703782294 43.301270189221931 -21.650635607675078 +v 18.929491924311225 36.495191133486472 -8.3493651619210887 +v 20.179491924311225 38.660254037844382 -8.3493651619210887 +v 18.929491924311225 40.825316942202292 -8.3493651619210887 +v 20 43.301270189221931 -17.320508075688771 +v 17.5 47.631396951612068 -17.320508075688771 +v 16.25 45.466333093579841 -12.990381313298634 +v 20.179491924311225 42.990380800234519 -12.679491924311225 +v 22.679491924311225 38.660254037844382 -12.679491924311225 +v 51.25 -2.165062904357911 -28.169873385718713 +v 51.25 2.1650629043579097 -28.169873385718713 +v 52.5 -8.2013451871993479e-16 -28.169873385718713 +v 55 -8.2013451871993479e-16 -23.839746623328576 +v 51.25 -2.165062904357911 -19.509619860938439 +v 52.5 -8.2013451871993479e-16 -19.509619860938439 +v 52.5 21.650635607675078 -15.669873089501008 +v 55 21.650635607675078 -11.339746327110872 +v 51.25 23.815698512032988 -15.669873089501008 +v 52.5 25.980762370065214 -11.339746327110872 +v 26.25 28.145826228097441 -4.3301267623901367 +v 26.25 32.475952036813261 -4.3301267623901367 +v 23.75 28.145826228097441 8.6602537813123295 +v 25 25.980762370065214 4.3301270189221928 +v 25 30.310889132455351 8.6602537813123295 +v 17.791618525634803 46.70555948961686 10.32021970100973 +v 19.041618525634803 48.870623347649087 14.650346463399867 +v 21.541618525634803 44.54049658525895 14.650346463399867 +v 16.25 41.136207284864021 21.650634838078908 +v 20 43.301270189221931 17.320508075688771 +v 19.041618525634803 44.54049658525895 18.980473225790004 +v 17.5 47.631396951612068 17.320508075688771 +v 17.791618525634803 46.70555948961686 18.980473225790004 +v 16.25 45.466333093579841 21.650634838078908 +v 17.5 43.301270189221931 21.650634838078908 +v 51.25 19.485572703317168 -7.0096195647207349 +v 52.5 21.650635607675078 -7.0096195647207349 +v 42.5 0 30.669873237609863 +v 41.25 2.1650629043579102 30.669873237609863 +v 41.25 -2.1650629043579102 39.330126762390137 +v 42.5 0 39.330126762390137 +v 41.25 2.1650629043579102 39.330126762390137 +v 45 0 35 +v 42.5 4.3301267623901367 35 +v 27.5 25.980762370065214 0 +v 27.5 30.310889132455351 -4.3301267623901367 +v 30 30.310889132455351 0 +v 27.5 34.641015894845488 0 +v 27.5 30.310889132455351 4.3301270189221928 +v 51.25 23.815698512032988 -7.0096195647207349 +f 4 5 6 +f 3 4 6 +f 6 5 8 +f 8 7 6 +f 4 9 5 +f 8 5 11 +f 3 106 4 +f 6 108 3 +f 7 108 6 +f 110 7 8 +f 4 107 9 +f 5 9 10 +f 11 5 1 +f 16 5 10 +f 1 5 16 +f 1 44 11 +f 16 44 1 +f 116 53 2 +f 114 8 11 +f 11 44 114 +f 14 12 13 +f 14 15 12 +f 25 19 17 +f 20 19 18 +f 21 19 20 +f 20 18 28 +f 28 18 27 +f 28 46 20 +f 25 80 24 +f 25 24 19 +f 24 23 19 +f 18 23 27 +f 19 23 18 +f 26 22 25 +f 28 27 78 +f 24 80 23 +f 27 23 78 +f 28 78 79 +f 22 80 25 +f 81 22 26 +f 78 23 80 +f 13 12 29 +f 12 15 30 +f 13 36 14 +f 14 36 35 +f 38 14 35 +f 38 15 14 +f 41 15 38 +f 34 9 31 +f 10 9 16 +f 16 9 32 +f 32 33 16 +f 32 9 34 +f 34 33 32 +f 12 118 29 +f 30 118 12 +f 29 135 13 +f 15 118 30 +f 13 135 36 +f 41 137 15 +f 31 9 119 +f 31 119 34 +f 121 33 34 +f 35 37 38 +f 35 36 37 +f 36 42 37 +f 39 41 38 +f 39 40 41 +f 38 37 39 +f 37 40 39 +f 43 40 37 +f 125 42 36 +f 42 126 37 +f 37 126 43 +f 124 40 43 +f 41 40 131 +f 33 44 16 +f 45 44 33 +f 20 46 21 +f 45 33 133 +f 133 44 45 +f 139 25 17 +f 17 19 139 +f 141 19 21 +f 21 46 141 +f 147 46 28 +f 26 144 81 +f 79 147 28 +f 25 144 26 +f 48 2 47 +f 49 47 51 +f 47 2 50 +f 50 2 52 +f 2 53 52 +f 51 47 50 +f 52 76 50 +f 53 76 52 +f 49 51 56 +f 55 51 50 +f 50 54 55 +f 50 76 54 +f 77 76 53 +f 56 51 55 +f 54 76 55 +f 55 76 85 +f 168 2 48 +f 47 170 48 +f 49 170 47 +f 77 53 193 +f 176 49 56 +f 60 58 57 +f 61 62 60 +f 59 58 60 +f 60 62 59 +f 67 62 61 +f 64 58 59 +f 57 58 74 +f 59 63 64 +f 59 65 63 +f 74 58 64 +f 63 65 64 +f 64 75 74 +f 65 75 64 +f 59 62 66 +f 66 70 59 +f 72 70 66 +f 66 62 68 +f 72 66 68 +f 70 65 59 +f 68 62 67 +f 68 69 72 +f 71 70 72 +f 71 65 70 +f 69 71 72 +f 73 71 69 +f 57 153 60 +f 60 153 61 +f 61 160 67 +f 177 56 55 +f 55 85 177 +f 74 149 57 +f 74 75 149 +f 158 75 65 +f 67 160 68 +f 68 160 69 +f 164 65 71 +f 165 71 73 +f 162 73 69 +f 79 78 84 +f 80 22 82 +f 82 22 81 +f 84 78 80 +f 80 82 84 +f 84 82 83 +f 88 87 86 +f 86 93 88 +f 88 93 90 +f 89 87 88 +f 193 76 77 +f 81 198 82 +f 82 198 83 +f 201 79 84 +f 84 83 201 +f 87 91 86 +f 92 87 89 +f 90 93 95 +f 95 93 94 +f 88 90 100 +f 100 90 95 +f 94 104 95 +f 92 89 97 +f 96 89 88 +f 88 100 96 +f 97 89 98 +f 98 89 96 +f 91 178 86 +f 86 181 93 +f 87 203 91 +f 92 203 87 +f 85 76 207 +f 93 181 94 +f 97 183 92 +f 97 98 183 +f 98 102 184 +f 104 100 95 +f 99 104 94 +f 96 100 101 +f 101 100 104 +f 104 103 101 +f 96 101 98 +f 101 103 98 +f 103 102 98 +f 105 103 104 +f 105 102 103 +f 94 186 99 +f 105 191 102 +f 99 192 104 +f 104 192 105 +f 4 106 107 +f 3 108 106 +f 109 108 7 +f 109 7 110 +f 106 108 107 +f 107 108 111 +f 111 108 110 +f 110 108 109 +f 113 107 111 +f 114 111 110 +f 9 107 112 +f 112 107 113 +f 115 111 114 +f 115 113 111 +f 138 113 115 +f 110 8 114 +f 114 44 132 +f 114 138 115 +f 132 138 114 +f 116 2 168 +f 117 135 29 +f 29 118 117 +f 137 118 15 +f 36 135 125 +f 131 137 41 +f 119 9 112 +f 34 119 121 +f 122 33 121 +f 133 33 122 +f 134 135 117 +f 117 118 134 +f 134 118 137 +f 125 135 136 +f 136 127 125 +f 129 127 136 +f 136 137 129 +f 129 137 131 +f 112 120 119 +f 112 113 120 +f 119 120 121 +f 120 113 138 +f 122 120 138 +f 121 120 122 +f 123 42 125 +f 123 126 42 +f 43 126 124 +f 128 40 124 +f 131 40 128 +f 127 126 125 +f 125 126 123 +f 129 126 127 +f 128 130 131 +f 131 130 129 +f 124 126 128 +f 128 126 130 +f 130 126 129 +f 132 44 133 +f 139 19 140 +f 140 19 141 +f 141 46 147 +f 122 138 132 +f 132 133 122 +f 142 25 139 +f 142 144 25 +f 196 147 79 +f 81 144 197 +f 136 135 134 +f 134 137 136 +f 139 140 142 +f 147 140 141 +f 147 145 140 +f 140 143 142 +f 145 143 140 +f 146 143 145 +f 143 148 142 +f 148 144 142 +f 195 145 147 +f 200 143 146 +f 146 145 200 +f 196 195 147 +f 200 145 195 +f 197 144 148 +f 200 148 143 +f 48 170 168 +f 169 170 49 +f 172 53 116 +f 169 49 176 +f 193 53 172 +f 57 149 151 +f 151 153 57 +f 155 160 61 +f 61 153 155 +f 149 75 157 +f 157 75 150 +f 150 75 158 +f 158 65 164 +f 69 160 162 +f 164 71 165 +f 165 73 162 +f 151 152 153 +f 176 56 177 +f 177 85 207 +f 155 153 156 +f 153 152 154 +f 156 153 154 +f 155 156 160 +f 157 152 149 +f 149 152 151 +f 157 159 154 +f 154 159 158 +f 157 150 158 +f 158 159 157 +f 154 152 157 +f 163 154 158 +f 160 156 161 +f 162 160 161 +f 166 162 161 +f 164 167 163 +f 166 167 164 +f 158 164 163 +f 166 164 162 +f 162 164 165 +f 167 156 154 +f 163 167 154 +f 161 156 167 +f 161 167 166 +f 168 170 116 +f 116 170 171 +f 116 173 172 +f 171 173 116 +f 176 170 169 +f 174 171 170 +f 173 194 172 +f 171 194 173 +f 176 174 170 +f 175 171 174 +f 172 194 193 +f 175 194 171 +f 177 174 176 +f 175 174 177 +f 207 194 177 +f 177 194 175 +f 194 76 193 +f 207 76 194 +f 196 79 201 +f 197 198 81 +f 83 198 199 +f 201 83 199 +f 91 203 178 +f 202 181 86 +f 86 178 202 +f 179 203 92 +f 180 186 94 +f 94 181 180 +f 92 183 179 +f 183 98 184 +f 178 203 202 +f 205 203 179 +f 182 181 206 +f 180 181 182 +f 185 206 204 +f 206 192 182 +f 182 192 180 +f 183 205 179 +f 205 185 204 +f 206 187 192 +f 185 187 206 +f 184 205 183 +f 184 185 205 +f 186 192 99 +f 184 102 189 +f 102 191 189 +f 105 192 191 +f 180 192 186 +f 191 190 189 +f 185 188 187 +f 187 188 192 +f 191 188 190 +f 192 188 191 +f 190 188 184 +f 189 190 184 +f 184 188 185 +f 201 195 196 +f 148 198 197 +f 200 198 148 +f 200 195 201 +f 199 198 201 +f 201 198 200 +f 202 203 204 +f 204 181 202 +f 206 181 204 +f 204 203 205 +# ======== end mesh =======