FlorisSteenkamp/MAT

findMats fails in find-and-add-3-prongs.js

Closed this issue · 16 comments

koldat commented

Version: floMat 2.0.3

I am trying to findMats on complicated path with different results. I know I can try to split paths, but still would be nice to have robust tool. Code is simple:

        let bezierLoops = getPathsFromStr(path);
        let mats = findMats(bezierLoops, maxCurviness, maxLength);
  1. findMats(bezierLoops, 3, 100) - This one pass, but there is one issue in calculated MAT (bezier go out of polygon). Interesting is that when I calculate just on that polygon result looks ok with same (3, 100).

  2. findMats(bezierLoops) or findMats(bezierLoops, 0.5, 100) - Error

file:///C:/workspace/matcli/node_modules/flo-mat/node/mat/find-mat/find-and-add-3-prongs.js:131
        calcPosOrder(threeProng.circle, threeProng.ps[i]));
                                ^
TypeError: Cannot read properties of undefined (reading 'circle')
    at findAndAdd3Prong (file:///C:/workspace/matcli/node_modules/flo-mat/node/mat/find-mat/find-and-add-3-prongs.js:131:33)
    at findAndAdd3Prongs (file:///C:/workspace/matcli/node_modules/flo-mat/node/mat/find-mat/find-and-add-3-prongs.js:102:13)
    at findAndAddAll3Prongs (file:///C:/workspace/matcli/node_modules/flo-mat/node/mat/find-mat/find-and-add-3-prongs.js:23:21)
    at findMat (file:///C:/workspace/matcli/node_modules/flo-mat/node/find-mats.js:112:5)
    at findMats (file:///C:/workspace/matcli/node_modules/flo-mat/node/find-mats.js:43:21)

It happens because of this:

        const vectorToZeroV = calcVectorToZeroV_StraightToIt(x, circumCenter_);
        if (!Number.isFinite(vectorToZeroV[0]) || !Number.isFinite(vectorToZeroV[1])) {
            // TODO - the code can be cleaned up and sped up a lot if we don't
            // use this function as is but instead use δs[0] and δs[2] as is
            // and make δs[1] include all the rest of the beziers around the 
            // loop. This check, for instance, would be eliminated completely.
            return undefined; <-- HERE it go
        }
  1. findMats(bezierLoops, 1, 50) - This takes very long time and ends JavaScript heap out of memory (I tried even 6GB)
koldat commented

path is

M 136.450  220.359  C 119.879 220.506,103.281 209.192,95.045 193.259 C 90.713 185.078,88.339 175.668,88.868 166.318 C 89.378 157.211,93.001 148.726,97.073 140.916 C 95.623 138.496,94.815 135.717,94.817 132.955 C 94.722 127.931,97.823 123.267,102.029 121.298 C 103.933 120.334,106.067 119.917,108.120 120.035 C 108.660 118.854,109.175 117.666,109.654 116.469 C 108.211 116.694,106.716 116.631,105.265 116.214 C 99.876 114.863,96.426 108.633,98.593 103.473 C 100.581 98.304,107.846 96.691,111.205 100.574 C 112.155 101.617,112.767 102.865,112.975 104.147 C 113.497 99.998,113.393 95.868,112.542 91.936 C 111.781 88.015,110.312 84.358,108.312 81.170 C 108.112 81.830,107.836 82.483,107.472 83.114 C 105.785 86.377,101.306 88.799,97.216 87.197 C 95.224 86.471,93.565 84.964,92.641 82.984 C 91.706 80.977,91.968 78.567,93.034 76.732 C 94.076 74.900,96.022 73.529,98.188 73.437 C 100.312 73.267,102.290 74.393,103.395 75.900 C 105.953 79.373,103.401 83.542,100.846 84.084 C 98.141 84.796,96.694 83.327,96.652 83.365 C 95.825 82.721,96.161 81.570,97.029 81.125 C 97.936 80.644,98.720 80.397,98.862 80.483 C 98.873 80.467,99.181 80.860,99.885 80.743 C 100.566 80.716,101.911 79.214,100.888 77.663 C 99.960 75.941,96.762 75.465,95.145 78.039 C 93.357 80.359,94.748 84.243,97.887 85.509 C 100.950 86.960,104.767 85.333,106.489 82.517 C 107.001 81.746,107.360 80.915,107.583 80.066 C 105.712 77.357,103.445 75.030,100.900 73.228 C 95.185 69.039,88.681 67.128,82.846 66.327 C 71.293 64.837,62.145 67.132,56.658 68.928 C 57.819 68.515,61.628 67.132,67.932 66.224 C 75.369 65.318,87.267 64.716,98.990 71.612 C 102.395 73.480,105.337 76.270,107.675 79.676 C 108.120 77.593,107.772 75.443,106.885 73.840 C 105.636 71.402,103.082 70.662,101.605 70.262 C 100.024 69.887,99.082 69.866,99.085 69.842 C 99.083 69.866,100.021 69.828,101.638 70.110 C 103.149 70.438,105.806 70.966,107.379 73.562 C 108.565 75.427,109.100 78.151,108.414 80.805 C 113.756 89.374,115.456 101.379,111.457 112.521 C 111.224 113.267,110.968 114.007,110.703 114.745 C 112.509 114.190,114.113 113.137,115.180 111.748 C 117.541 108.711,118.034 104.910,118.103 101.744 C 118.135 95.265,116.394 90.657,115.868 89.128 C 113.470 82.978,110.780 79.634,109.894 77.016 C 113.700 80.355,118.835 86.887,119.670 95.828 C 120.192 100.165,120.272 105.030,118.295 109.696 C 117.018 113.092,113.750 115.671,110.084 116.393 C 109.602 117.625,109.084 118.849,108.531 120.066 C 110.779 120.275,112.904 121.131,114.486 122.624 C 117.675 125.428,118.648 129.834,117.428 133.225 C 116.112 136.636,112.913 138.460,110.189 138.577 C 107.374 138.756,105.205 137.192,104.271 135.713 C 103.240 134.202,103.274 132.830,103.236 132.170 C 103.373 132.012,102.941 134.686,105.958 136.981 C 108.619 139.518,116.280 137.883,117.079 131.249 C 117.425 128.179,115.909 124.649,112.923 122.682 C 111.522 121.702,109.813 121.188,108.038 121.125 C 105.108 127.355,101.424 133.451,98.072 139.793 C 98.895 141.254,99.973 142.581,101.287 143.667 C 107.912 149.599,119.646 147.536,124.499 140.229 C 129.523 132.852,129.929 123.397,129.385 115.325 C 129.343 114.813,129.297 114.302,129.245 113.795 C 128.994 111.680,128.705 109.712,128.394 107.940 C 127.378 102.637,125.740 97.825,123.475 93.867 C 120.397 88.369,116.870 84.294,114.111 81.344 C 115.803 82.842,122.784 88.559,127.530 100.249 C 129.963 107.066,131.457 115.532,130.902 124.671 C 130.827 125.647,130.725 126.633,130.593 127.623 C 130.594 128.144,130.591 128.668,130.583 129.196 C 130.476 136.723,130.111 145.147,128.100 152.221 C 126.064 159.392,122.454 165.296,119.112 168.683 C 119.096 168.688,121.504 166.259,124.024 161.567 C 126.557 156.871,128.937 149.943,129.495 142.109 C 129.951 138.184,130.157 134.140,130.176 130.173 C 129.630 132.959,128.775 135.741,127.428 138.386 C 125.268 142.774,121.221 146.577,116.245 147.884 C 111.433 149.275,105.771 148.859,101.600 145.776 C 99.868 144.582,98.412 143.034,97.298 141.281 C 93.983 147.707,91.091 154.410,89.757 161.795 C 86.760 180.353,95.871 199.904,110.371 210.834 C 117.599 216.382,126.344 219.654,134.980 219.982 C 143.579 220.158,152.037 218.424,159.046 214.787 C 173.293 207.379,180.291 192.885,180.219 181.579 C 180.277 178.303,179.876 175.342,179.210 172.683 C 163.805 171.542,148.638 164.378,140.588 153.163 C 139.625 153.709,138.733 154.323,137.926 154.998 C 134.847 157.386,132.789 160.486,132.198 163.593 C 131.647 166.697,132.358 169.633,133.693 171.739 C 136.375 176.065,140.362 177.607,142.775 177.273 C 145.223 176.884,146.117 175.842,146.146 175.941 C 144.177 177.636,141.173 178.044,138.745 176.918 C 136.281 175.912,134.284 173.991,132.873 171.754 C 129.978 167.148,130.920 160.848,134.377 156.973 C 135.987 155.065,137.905 153.510,139.983 152.306 C 130.532 138.707,131.076 124.734,132.053 119.187 C 132.179 119.162,130.625 128.349,135.340 141.161 C 136.637 144.599,138.540 148.237,141.097 151.701 C 141.524 151.485,141.956 151.282,142.393 151.094 C 139.944 148.280,138.640 146.299,138.692 146.353 C 138.630 146.300,140.019 148.264,142.581 151.014 C 144.052 150.396,145.568 149.937,147.085 149.638 C 147.116 149.632,147.146 149.627,147.177 149.622 C 145.179 148.067,143.381 146.396,141.850 144.681 C 136.613 138.963,133.972 133.212,133.423 130.465 C 133.427 130.456,135.037 134.322,138.896 139.328 C 141.352 142.566,144.882 146.226,149.249 149.343 C 153.215 148.985,157.053 149.623,160.406 150.777 C 164.724 152.357,168.135 154.753,170.746 157.286 C 174.549 157.658,178.256 157.596,181.577 157.234 C 188.778 156.504,194.303 154.847,196.752 154.432 C 195.322 154.903,185.070 159.362,172.161 158.755 C 173.678 160.439,174.858 162.125,175.727 163.621 C 176.761 165.324,177.451 166.807,177.914 167.977 C 179.289 167.949,180.593 167.843,181.800 167.671 C 187.363 166.842,190.896 165.234,191.093 165.112 C 192.064 164.480,196.970 158.934,200.019 160.180 C 200.006 160.188,201.923 161.545,201.956 163.341 C 202.005 167.251,192.971 167.768,191.988 167.543 C 191.717 167.497,187.890 168.944,182.019 169.530 C 180.916 169.636,179.739 169.685,178.511 169.675 C 178.649 170.133,178.730 170.463,178.772 170.626 C 178.675 170.305,178.572 169.989,178.465 169.675 C 178.461 169.675,178.456 169.675,178.452 169.675 C 178.614 170.129,178.769 170.602,178.916 171.091 C 186.405 171.625,193.988 170.799,201.122 169.332 C 204.531 168.611,207.858 167.744,211.114 166.939 C 209.903 165.560,208.759 164.116,207.698 162.603 C 205.843 160.064,204.210 157.434,202.741 154.736 C 197.893 156.157,193.682 155.742,193.807 155.635 C 197.400 155.269,200.121 154.455,202.116 153.589 C 201.929 153.230,201.753 152.866,201.572 152.505 C 199.303 153.254,197.013 153.922,194.706 154.492 C 195.991 153.205,198.352 151.996,198.354 151.996 C 199.196 151.590,200.004 151.225,200.778 150.897 C 198.733 146.601,197.069 142.150,195.640 137.608 C 195.358 137.900,195.066 138.189,194.760 138.473 C 187.738 145.188,177.054 146.874,172.741 146.667 C 172.778 146.633,180.327 146.555,188.274 142.499 C 190.864 141.192,193.398 139.351,195.499 137.164 C 195.415 136.891,195.327 136.620,195.244 136.347 C 190.780 136.546,186.128 136.081,181.465 134.726 C 169.943 131.532,159.323 124.125,149.719 115.428 C 149.454 115.515,149.172 115.595,148.872 115.666 C 146.047 116.398,140.657 115.882,136.558 110.823 C 136.535 110.864,134.647 108.008,135.088 105.483 C 138.160 108.970,142.132 111.420,146.392 112.531 C 146.396 112.522,146.258 112.297,145.981 111.931 C 145.814 111.771,145.645 111.612,145.479 111.451 C 144.313 110.329,143.164 109.185,142.024 108.030 C 140.493 106.830,138.486 105.452,135.810 103.502 C 135.809 103.518,136.957 103.886,138.513 104.390 C 130.440 95.852,122.862 86.755,114.868 78.492 C 108.122 71.103,99.247 66.552,90.246 64.625 C 88.142 64.361,85.991 64.187,83.815 64.099 C 83.804 64.079,84.043 63.939,84.407 63.738 C 83.069 63.619,81.739 63.558,80.421 63.553 C 79.967 63.708,79.509 63.856,79.046 63.996 C 75.050 64.062,70.801 64.389,66.673 64.920 C 58.123 66.585,50.599 69.578,44.419 72.558 C 37.098 76.123,31.520 79.756,27.676 82.475 C 31.604 79.530,41.512 72.493,57.176 67.130 C 59.048 66.527,61.022 65.952,63.077 65.437 C 60.647 65.827,58.301 66.285,56.122 66.801 C 55.339 66.769,66.717 58.855,70.541 53.356 C 74.219 47.587,80.838 49.470,84.359 51.652 C 87.842 53.514,99.503 51.656,99.632 51.896 C 99.448 51.922,91.720 59.455,81.187 63.284 C 82.394 63.315,83.612 63.393,84.836 63.507 C 87.504 62.069,95.150 58.185,99.285 55.627 C 99.354 55.670,100.232 60.223,95.313 61.619 C 95.345 61.536,100.923 61.437,103.277 58.363 C 103.308 58.348,104.345 60.682,103.037 62.744 C 103.007 62.736,105.688 62.519,107.433 55.901 C 108.817 49.006,117.456 50.890,116.463 56.454 C 116.656 56.339,121.365 56.004,119.843 45.937 C 119.818 45.934,123.335 48.245,124.764 51.856 C 126.308 55.502,125.232 59.602,119.132 63.201 C 119.102 63.180,114.130 65.942,110.282 66.286 C 110.415 66.547,112.969 67.710,122.091 68.656 C 126.785 69.297,130.147 71.355,132.032 72.954 C 133.927 74.697,134.514 76.630,133.935 79.732 C 133.854 79.684,131.329 75.409,125.284 75.371 C 125.321 75.364,127.613 77.775,131.260 82.104 C 135.167 86.079,139.815 93.508,152.467 97.857 C 152.509 97.767,149.091 98.921,143.231 97.947 C 137.393 97.051,129.979 93.241,124.618 87.219 C 122.423 84.909,120.531 82.530,118.813 80.132 C 118.394 79.544,117.943 78.903,117.553 78.358 L 116.807  77.381  C 116.351 76.698,115.786 76.105,115.236 75.498 C 113.028 73.091,110.333 71.043,107.095 69.423 C 103.282 67.478,98.837 66.095,94.058 65.215 C 100.658 67.160,107.153 70.584,112.460 75.667 C 117.851 80.667,122.710 86.404,127.770 92.020 C 131.536 96.249,135.351 100.508,139.281 104.640 C 140.280 104.965,141.354 105.317,142.471 105.692 C 145.954 106.908,148.629 108.313,153.056 113.381 C 153.051 113.328,152.198 114.497,150.125 115.284 C 153.364 118.211,156.702 120.984,160.176 123.521 C 170.770 131.470,183.378 136.591,195.170 136.096 C 189.880 118.588,187.844 99.823,181.036 83.298 C 175.961 70.466,166.880 59.620,155.610 52.825 C 144.511 45.773,131.978 42.062,119.896 41.290 C 111.954 40.781,104.343 41.245,97.104 42.304 C 95.602 43.822,93.703 45.079,91.572 45.855 C 91.599 45.935,86.936 47.154,84.195 45.696 C 86.027 45.264,87.889 44.565,89.615 43.620 C 83.095 44.968,76.926 46.737,71.149 48.637 C 70.839 49.083,70.556 49.518,70.282 49.927 C 69.464 51.144,68.077 52.441,65.625 54.994 C 65.608 54.944,62.757 57.430,58.709 59.027 C 59.081 56.842,59.618 54.588,60.402 52.433 C 59.441 52.789,58.442 53.150,57.510 53.501 C 56.546 53.846,55.600 54.193,54.664 54.541 C 54.498 56.266,54.565 58.132,54.938 60.114 C 54.855 59.934,53.646 58.156,52.919 55.201 C 51.635 55.690,50.375 56.182,49.147 56.676 C 51.368 60.716,51.069 65.126,50.120 68.729 C 50.085 68.740,49.767 67.726,48.977 65.864 C 48.177 64.092,46.925 61.140,44.310 59.204 C 44.172 59.095,44.030 58.992,43.884 58.893 C 36.973 61.938,31.206 65.065,26.868 68.217 C 29.213 66.442,32.378 64.331,36.559 62.188 C 38.705 61.059,41.153 59.942,43.766 58.815 C 41.248 57.184,37.553 57.051,33.573 59.258 C 30.211 61.147,26.864 64.632,25.070 69.593 C 25.639 69.134,26.237 68.675,26.868 68.217 C 26.197 68.725,25.582 69.206,25.050 69.648 C 24.555 71.027,24.180 72.520,23.958 74.124 C 23.721 74.041,23.107 81.966,23.822 87.583 C 21.126 81.287,19.951 74.001,22.253 67.433 C 24.439 61.024,30.013 55.232,37.045 54.287 C 36.472 54.218,32.035 53.235,25.916 58.039 C 22.727 60.630,19.463 65.253,18.613 71.550 C 17.731 77.776,19.491 85.195,23.903 91.846 C 23.694 91.583,22.094 89.894,20.213 86.520 C 18.297 82.901,15.809 76.970,16.867 69.224 C 17.898 61.665,23.599 52.614,33.829 50.271 C 38.769 49.142,45.223 50.715,48.265 55.277 C 48.577 55.710,48.854 56.149,49.102 56.593 C 50.328 56.100,51.597 55.595,52.893 55.088 C 52.319 52.692,52.070 49.543,52.980 45.853 C 54.012 41.747,57.427 36.391,63.917 34.339 C 70.472 32.209,77.477 35.595,79.648 41.417 C 79.756 41.515,76.361 43.464,73.423 46.033 C 72.577 46.768,71.936 47.545,71.389 48.301 C 74.794 47.192,78.353 46.122,82.070 45.132 C 84.715 44.431,87.491 43.778,90.356 43.193 C 93.998 40.994,96.891 37.655,97.349 33.380 C 97.304 33.344,96.241 35.012,94.112 37.088 C 91.919 39.125,88.559 41.722,82.225 44.278 C 82.168 44.243,86.061 41.679,89.152 38.322 C 90.739 36.623,91.838 34.999,92.791 33.158 C 93.660 31.906,94.728 29.639,92.715 25.914 C 92.915 25.879,95.413 24.648,98.791 27.975 C 100.601 29.556,101.502 33.854,100.255 37.188 C 99.754 38.863,98.777 40.503,97.453 41.937 C 113.876 39.524,132.697 40.156,150.236 49.351 C 161.750 55.154,172.244 64.533,178.462 76.879 C 184.888 89.109,187.698 103.064,190.722 116.830 C 192.108 123.258,193.616 129.742,195.556 136.079 C 195.882 136.062,196.208 136.041,196.534 136.015 C 197.212 135.212,197.830 134.372,198.370 133.500 C 200.824 129.755,201.768 125.718,202.246 122.901 C 202.243 122.672,202.027 129.715,197.078 135.964 C 197.733 135.902,198.387 135.826,199.035 135.727 C 211.827 134.096,222.043 127.357,227.910 120.304 C 233.253 114.133,235.233 107.828,235.883 103.683 C 235.658 105.254,235.133 107.859,233.768 111.234 C 231.430 116.807,226.095 124.322,216.914 129.836 C 211.442 133.122,204.455 135.631,196.852 136.246 C 196.561 136.601,196.254 136.953,195.931 137.301 C 197.383 141.895,199.087 146.399,201.150 150.741 C 208.544 147.672,212.707 148.000,212.775 148.074 C 210.106 151.631,206.479 153.578,203.111 154.625 C 203.528 155.394,203.958 156.158,204.403 156.914 C 206.442 160.453,208.859 163.783,211.576 166.828 C 216.640 165.585,221.533 164.520,226.278 164.454 C 234.140 164.058,241.197 165.779,246.106 168.533 C 251.111 171.192,253.862 174.658,255.157 176.668 C 255.237 176.944,250.341 168.930,237.603 166.281 C 231.394 164.972,223.774 165.275,215.799 167.117 C 214.749 167.381,213.677 167.659,212.591 167.943 C 219.111 174.875,227.280 180.132,236.397 182.448 C 241.600 183.896,246.895 184.663,252.175 184.905 C 252.217 184.417,252.251 183.909,252.270 183.366 C 252.275 183.401,252.561 180.511,253.292 179.209 C 253.895 181.207,254.071 183.056,254.094 184.977 C 254.618 184.988,255.140 184.986,255.663 184.987 C 255.561 183.110,255.169 180.954,254.192 178.387 C 254.231 178.319,255.787 181.068,256.500 184.993 C 258.584 184.978,260.660 184.880,262.724 184.720 C 261.878 183.403,260.565 181.371,259.299 179.464 C 261.381 180.866,263.261 182.707,265.032 184.513 C 265.721 184.443,266.407 184.368,267.092 184.284 C 264.995 181.438,261.770 178.207,257.666 176.871 C 257.687 176.904,260.150 176.321,264.285 178.928 C 265.871 179.866,267.739 181.803,269.440 183.966 C 271.818 183.615,274.168 183.186,276.478 182.689 C 289.327 180.032,300.841 173.689,309.330 165.209 C 317.877 156.768,323.391 146.319,325.588 136.050 C 327.877 125.754,326.783 115.785,324.101 107.591 C 319.719 94.484,311.759 86.268,305.315 81.785 C 307.784 83.464,310.950 86.006,314.370 89.929 C 321.654 98.331,329.781 114.617,326.132 134.579 C 322.855 154.164,305.998 175.159,281.079 181.873 C 277.380 182.872,273.567 183.685,269.679 184.273 C 270.019 184.715,270.353 185.163,270.674 185.614 C 272.502 187.905,274.556 190.758,276.547 193.002 C 276.533 192.985,275.655 193.708,273.535 193.598 C 271.473 193.354,267.933 192.109,263.601 186.087 C 263.598 186.082,263.315 185.640,262.935 185.047 C 260.823 185.214,258.696 185.310,256.557 185.325 C 256.732 186.371,256.844 187.493,256.851 188.665 C 257.039 195.294,258.109 203.342,257.458 209.013 C 257.527 209.056,254.642 205.518,253.132 200.200 C 252.349 197.553,251.760 194.471,251.681 191.225 C 251.646 188.937,251.954 187.251,252.144 185.243 C 248.753 185.089,245.346 184.727,241.945 184.126 C 230.757 182.299,220.081 176.589,212.140 168.061 C 205.202 169.879,197.588 171.929,189.672 172.506 C 186.274 172.887,182.808 172.939,179.354 172.692 C 181.058 179.628,181.058 189.298,175.755 198.876 C 172.555 204.606,167.620 210.101,161.045 213.988 C 154.509 217.940,146.422 219.910,138.054 220.309 C 137.519 220.338,136.985 220.354,136.450 220.359 Z  M 305.315  81.785  C 305.072 81.620,304.800 81.418,304.572 81.270 C 304.815 81.432,305.067 81.613,305.315 81.785 Z  M 304.572  81.270  C 304.514 81.232,304.461 81.201,304.404 81.163 C 304.462 81.200,304.513 81.232,304.572 81.270 Z  M 304.404  81.163  C 301.925 79.576,300.385 78.998,300.479 78.915 C 301.657 79.482,302.988 80.234,304.404 81.163 Z  M 235.883  103.683  C 235.885 103.671,235.887 103.656,235.889 103.643 C 235.887 103.657,235.885 103.670,235.883 103.683 Z  M 235.889  103.643  C 235.949 103.256,235.983 102.918,236.021 102.571 C 235.996 102.835,235.952 103.196,235.889 103.643 Z  M 236.021  102.571  C 236.056 102.215,236.070 102.012,236.089 102.021 C 236.074 102.188,236.041 102.392,236.021 102.571 Z  M 92.715  25.914  C 92.700 25.917,92.694 25.915,92.708 25.900 C 92.710 25.905,92.713 25.909,92.715 25.914 Z  M 23.903  91.846  C 23.921 91.868,23.932 91.884,23.929 91.886 C 23.920 91.872,23.912 91.859,23.903 91.846 Z  M 54.938  60.114  C 54.943 60.125,54.945 60.131,54.941 60.130 C 54.940 60.125,54.939 60.119,54.938 60.114 Z  M 27.676  82.475  C 26.428 83.411,25.755 83.954,25.731 83.872 C 26.314 83.445,26.977 82.970,27.676 82.475 Z  M 196.752  154.432  C 196.876 154.391,196.945 154.375,196.932 154.400 C 196.877 154.409,196.811 154.422,196.752 154.432 Z  M 114.111  81.344  C 113.828 81.094,113.653 80.928,113.704 80.907 C 113.835 81.046,113.977 81.200,114.111 81.344 Z  M 56.658  68.928  C 56.412 69.016,56.243 69.075,56.241 69.060 C 56.369 69.017,56.526 68.971,56.658 68.928 Z  M 278.315  210.526  C 277.622 210.523,276.900 210.473,276.146 210.368 C 271.278 209.729,266.431 205.793,263.696 200.571 C 263.573 200.609,261.030 195.012,260.887 191.407 C 262.503 195.634,264.447 199.874,267.604 203.338 C 270.629 206.839,275.384 209.214,280.084 208.662 C 280.158 208.525,277.324 208.821,273.084 206.429 C 268.817 204.035,264.499 197.931,260.926 188.724 C 261.048 188.603,263.277 194.234,268.209 200.370 C 270.709 203.346,274.214 206.113,278.646 206.428 C 283.071 206.806,288.041 205.143,292.700 202.752 C 292.564 202.884,291.417 205.267,286.891 208.103 C 284.906 209.233,282.054 210.547,278.315 210.526 Z  M 292.700  202.752  C 292.706 202.747,292.711 202.744,292.713 202.746 C 292.709 202.748,292.705 202.750,292.700 202.752 Z  M 254.281  196.927  C 254.270 196.933,254.836 195.793,255.134 192.612 C 255.206 190.516,255.787 188.264,255.678 185.322 C 255.151 185.320,254.624 185.318,254.097 185.306 C 254.108 188.574,253.728 192.087,254.281 196.927 Z  M 270.920  189.932  C 270.936 189.906,269.972 188.330,268.155 185.835 C 267.904 185.439,267.626 185.025,267.322 184.600 C 266.663 184.683,266.002 184.757,265.340 184.827 C 267.287 186.820,269.107 188.736,270.920 189.932 Z  M 243.911  183.835  C 243.681 183.696,242.242 179.824,236.679 171.944 C 236.703 171.952,235.452 169.921,235.802 168.540 C 239.477 171.483,242.226 175.156,243.301 178.631 C 243.280 178.624,243.813 177.838,243.540 175.909 C 243.142 174.180,241.921 170.762,236.475 167.491 C 236.410 167.467,241.171 169.194,244.011 172.935 C 247.026 176.580,247.063 181.280,243.911 183.835 Z  M 118.767  181.587  C 117.916 181.568,114.482 180.744,116.706 174.513 C 116.712 174.511,117.396 172.669,118.500 170.919 C 118.955 173.126,119.188 175.420,119.190 177.796 C 119.320 177.875,122.752 172.846,119.551 169.415 C 119.540 169.428,121.304 169.702,122.371 171.276 C 123.315 172.776,124.023 176.159,118.939 181.572 C 118.915 181.582,118.855 181.588,118.767 181.587 Z  M 104.030  180.690  C 103.873 180.444,106.912 178.860,114.037 173.471 C 114.050 173.479,115.856 171.983,117.221 171.032 C 115.097 173.755,112.441 176.242,109.286 178.141 C 109.691 177.990,114.692 176.499,118.327 170.329 C 118.265 170.465,117.666 172.396,115.579 174.796 C 113.473 177.261,109.371 180.176,104.030 180.690 Z  M 118.327  170.329  C 118.330 170.323,118.332 170.319,118.332 170.320 C 118.331 170.323,118.329 170.326,118.327 170.329 Z  M 104.674  175.813  C 103.954 175.811,103.326 175.759,102.795 175.697 C 100.628 175.395,99.812 174.869,99.811 174.891 C 104.850 173.824,109.088 172.780,112.427 171.577 C 115.736 170.420,117.981 169.325,118.004 169.371 C 110.374 173.723,105.850 174.502,105.844 174.745 C 109.722 174.264,113.596 172.883,117.128 170.588 C 115.878 172.082,113.434 173.562,113.418 173.519 C 109.809 175.392,106.832 175.821,104.674 175.813 Z  M 110.159  171.680  C 108.586 171.674,107.137 171.228,106.248 170.241 C 106.332 170.135,109.741 169.184,115.331 168.125 C 115.321 168.128,116.792 167.919,117.498 168.210 C 114.989 169.334,112.453 170.019,110.011 170.239 C 110.340 170.376,112.447 171.661,117.972 168.603 C 117.997 168.607,116.022 170.244,113.424 171.110 C 112.371 171.484,111.236 171.685,110.159 171.680 Z  M 178.767  171.082  C 178.620 170.601,178.467 170.130,178.304 169.672 C 173.061 169.600,166.900 168.434,161.369 165.771 C 153.308 162.093,147.032 156.259,143.145 151.944 C 142.667 152.133,142.200 152.337,141.747 152.555 C 143.741 155.122,146.100 157.575,148.860 159.753 C 155.548 165.121,164.235 168.890,173.429 170.445 C 175.198 170.742,176.980 170.950,178.767 171.082 Z  M 178.811  170.749  C 178.806 170.753,178.794 170.712,178.773 170.629 C 178.785 170.669,178.799 170.709,178.811 170.749 Z  M 177.300  167.984  C 177.416 167.984,177.532 167.982,177.648 167.980 C 176.269 164.703,174.545 162.097,172.994 160.217 C 174.213 161.651,176.046 164.140,177.772 167.979 C 177.792 167.979,177.812 167.979,177.833 167.979 C 176.370 164.385,174.315 161.297,171.948 158.746 C 171.856 158.741,171.763 158.734,171.671 158.729 C 171.985 159.054,172.316 159.424,172.658 159.822 C 172.088 159.180,171.734 158.834,171.658 158.728 C 171.607 158.726,171.556 158.722,171.505 158.719 C 173.610 160.927,175.386 163.449,176.738 166.168 C 175.432 163.764,173.392 160.933,171.171 158.700 C 168.794 158.541,166.333 158.205,163.828 157.639 C 158.244 156.405,152.907 153.796,148.440 150.569 C 146.656 150.814,144.956 151.253,143.379 151.856 C 147.396 156.018,153.791 161.557,161.771 164.837 C 166.925 167.086,172.498 168.002,177.300 167.984 Z  M 172.658  159.822  C 172.743 159.919,172.829 160.021,172.923 160.130 C 172.833 160.022,172.746 159.926,172.658 159.822 Z  M 172.923  160.130  C 172.947 160.159,172.970 160.188,172.994 160.217 C 172.971 160.190,172.945 160.156,172.923 160.130 Z  M 117.495  167.909  C 116.183 167.905,113.566 167.447,113.150 164.851 C 113.144 164.880,115.290 164.301,117.635 166.068 C 117.634 166.069,118.201 166.594,118.281 167.253 C 117.103 166.787,115.959 166.283,114.851 165.745 C 114.901 165.818,115.278 167.382,118.243 167.824 C 118.225 167.861,117.933 167.911,117.495 167.909 Z  M 262.443  166.327  C 262.231 166.328,262.002 166.319,261.755 166.300 C 259.196 166.215,254.386 164.653,246.456 163.844 C 246.435 163.832,242.224 163.365,238.577 163.028 C 243.488 161.528,249.118 160.885,255.319 162.087 C 255.333 162.106,252.625 160.531,248.585 159.930 C 244.642 159.304,239.478 159.919,235.506 162.622 C 235.596 162.509,236.535 160.294,240.578 158.639 C 242.684 157.836,245.669 157.191,249.819 157.759 C 253.960 158.333,259.574 160.373,264.994 165.491 C 265.007 165.510,264.499 166.327,262.443 166.327 Z  M 235.506  162.622  C 235.502 162.626,235.500 162.628,235.499 162.627 C 235.501 162.625,235.503 162.624,235.506 162.622 Z  M 133.387  159.394  C 135.110 156.594,137.531 154.385,140.328 152.800 C 140.303 152.764,140.278 152.728,140.252 152.692 C 135.653 155.355,133.934 158.350,133.387 159.394 Z  M 170.470  157.259  C 167.923 154.864,165.109 153.038,162.332 151.813 C 157.847 149.908,153.467 149.347,149.688 149.652 C 149.813 149.739,149.938 149.827,150.065 149.914 C 152.196 149.764,154.343 149.900,156.412 150.337 C 161.488 151.273,166.150 153.752,169.946 157.201 C 170.121 157.221,170.296 157.241,170.470 157.259 Z  M 169.475  157.146  C 166.710 154.762,164.174 153.540,164.199 153.509 C 159.729 151.111,155.059 150.179,150.737 150.363 C 152.700 151.651,154.814 152.817,157.060 153.785 C 161.023 155.571,165.288 156.630,169.475 157.146 Z  M 114.931  156.970  C 114.459 156.969,113.974 156.922,113.481 156.823 C 113.469 156.595,115.043 153.297,119.665 149.485 C 119.672 149.485,120.947 148.494,122.192 148.044 C 121.025 150.445,119.221 152.619,117.089 154.395 C 116.785 154.412,121.524 154.366,123.300 147.760 C 123.315 147.733,123.594 150.005,122.137 152.554 C 120.963 154.759,118.239 156.980,114.931 156.970 Z  M 202.485  153.424  C 205.334 152.121,206.579 150.758,206.708 150.657 C 205.131 151.269,203.542 151.845,201.943 152.381 C 202.119 152.731,202.304 153.076,202.485 153.424 Z  M 141.469  152.199  C 141.914 151.980,142.367 151.777,142.827 151.588 C 142.784 151.540,142.739 151.491,142.697 151.443 C 142.234 151.651,141.796 151.863,141.376 152.079 C 141.406 152.119,141.438 152.159,141.469 152.199 Z  M 143.041  151.503  C 144.599 150.883,146.231 150.438,147.892 150.166 C 147.783 150.085,147.674 150.004,147.566 149.922 C 146.395 150.129,145.300 150.420,144.300 150.780 C 143.812 150.966,143.349 151.159,142.901 151.355 C 142.947 151.404,142.995 151.454,143.041 151.503 Z  M 52.053  150.134  C 51.114 150.113,50.202 149.568,49.438 148.199 C 49.612 148.467,50.409 149.498,51.506 148.788 C 52.716 147.981,53.152 144.380,52.288 137.850 C 52.331 137.857,51.968 134.393,52.589 131.849 C 54.911 136.826,56.194 142.221,54.487 145.748 C 54.630 145.546,55.753 144.393,56.506 142.062 C 57.302 139.551,57.333 135.204,53.412 129.863 C 53.321 129.821,57.117 132.626,58.464 137.178 C 59.114 139.400,58.996 140.930,57.763 144.973 C 57.103 146.716,54.488 150.187,52.053 150.134 Z  M 49.438  148.199  C 49.409 148.153,49.395 148.127,49.404 148.138 C 49.415 148.159,49.427 148.178,49.438 148.199 Z  M 168.521  150.094  C 164.558 150.040,160.292 149.340,156.101 147.657 C 149.507 144.854,143.248 139.704,139.528 132.816 C 135.786 125.918,134.683 118.120,132.760 111.191 C 130.997 104.169,127.853 98.060,124.485 93.050 C 117.757 83.180,111.145 77.218,109.832 75.408 C 110.382 75.975,115.063 79.883,120.964 86.895 C 124.111 90.658,127.635 95.344,130.440 101.093 C 133.336 106.831,134.834 113.679,136.585 120.476 C 138.271 127.276,141.038 134.077,146.030 138.996 C 150.946 143.945,157.214 147.248,163.498 148.275 C 176.057 150.410,186.570 145.657,192.324 143.121 C 190.957 143.910,185.048 147.781,175.248 149.568 C 173.168 149.927,170.899 150.127,168.521 150.094 Z  M 192.324  143.121  C 192.522 143.007,192.627 142.955,192.633 142.985 C 192.540 143.026,192.420 143.078,192.324 143.121 Z  M 109.832  75.408  C 109.791 75.366,109.768 75.338,109.774 75.333 C 109.789 75.354,109.815 75.385,109.832 75.408 Z  M 45.353  149.510  C 45.353 149.508,45.354 149.506,45.355 149.504 C 45.356 149.508,45.356 149.510,45.353 149.510 Z  M 45.355  149.504  C 45.313 149.339,42.246 145.306,48.229 135.061 C 48.232 135.064,49.265 132.569,50.586 131.289 C 49.695 135.350,48.634 139.379,47.432 143.329 C 47.716 142.845,50.880 139.143,51.780 130.410 C 51.778 130.410,52.286 133.365,51.483 137.166 C 50.736 140.993,46.555 146.154,45.355 149.504 Z  M 81.034  148.375  C 80.425 148.352,77.145 137.653,64.311 131.650 C 64.320 131.613,60.894 129.753,58.706 127.782 C 64.841 128.779,71.473 130.507,76.560 136.432 C 76.572 136.485,75.982 133.859,72.902 130.940 C 69.863 128.074,64.286 125.546,57.133 125.960 C 57.520 125.878,61.628 124.324,67.808 125.654 C 71.008 126.389,74.895 128.092,78.144 132.007 C 81.394 135.802,83.199 142.629,81.085 148.344 C 81.071 148.366,81.054 148.376,81.034 148.375 Z  M 57.133  125.960  C 57.114 125.964,57.101 125.966,57.101 125.961 C 57.112 125.961,57.123 125.961,57.133 125.960 Z  M 59.039  146.328  C 58.667 146.328,58.465 146.301,58.488 146.303 C 60.648 145.604,60.028 141.126,59.209 138.593 C 57.608 133.395,54.876 128.462,55.030 128.507 C 60.136 135.187,61.980 139.595,62.297 141.348 C 62.605 143.081,62.776 143.255,62.835 143.352 C 63.964 142.296,64.318 140.028,63.318 137.240 C 62.332 134.478,60.261 131.511,57.719 128.779 C 61.105 129.566,64.457 132.978,64.342 133.000 C 67.111 136.435,67.688 139.760,66.906 141.742 C 66.211 143.763,64.729 144.734,63.379 145.376 C 61.499 146.205,59.857 146.330,59.039 146.328 Z  M 97.865  139.410  C 101.174 133.207,104.732 127.235,107.619 121.118 C 105.798 121.126,103.928 121.600,102.262 122.530 C 98.783 124.348,96.282 128.213,96.179 132.384 C 96.137 134.778,96.722 137.230,97.865 139.410 Z  M 195.793  136.853  C 195.966 136.667,196.134 136.478,196.300 136.288 C 196.078 136.303,195.855 136.315,195.632 136.327 C 195.686 136.502,195.739 136.678,195.793 136.853 Z  M 53.538  126.525  C 53.534 126.534,52.188 125.957,49.701 125.113 C 48.460 124.699,46.919 124.217,45.158 123.763 C 44.734 123.655,44.239 123.532,43.865 123.453 C 42.507 123.049,42.399 122.958,41.577 122.677 C 40.284 122.157,38.922 121.550,37.613 120.714 C 32.327 117.561,27.162 111.421,25.823 103.343 C 25.701 102.606,25.607 101.857,25.545 101.101 C 20.986 97.592,17.190 92.671,15.315 86.773 C 9.446 71.249,15.361 53.248,24.402 43.091 C 33.480 32.440,44.545 29.058,48.634 28.407 C 48.757 28.503,41.183 29.874,32.326 36.842 C 23.495 43.520,14.514 57.252,14.449 72.992 C 14.416 80.706,16.737 88.610,21.261 94.658 C 22.501 96.347,23.920 97.864,25.460 99.195 C 25.434 96.434,25.841 93.599,26.812 90.829 C 28.262 86.472,31.326 82.497,35.331 79.829 C 43.242 74.509,55.573 74.681,62.639 83.199 C 65.980 87.228,67.408 92.668,66.634 97.697 C 66.088 102.678,62.556 107.887,57.934 110.049 C 53.256 112.353,47.996 112.338,43.506 109.979 C 42.017 109.175,40.741 108.122,39.695 106.916 C 35.420 106.557,30.894 104.842,26.853 102.052 C 27.698 109.968,32.486 116.782,38.459 120.365 C 41.462 122.377,45.229 123.210,47.208 123.911 C 49.542 124.729,51.674 125.614,53.538 126.525 Z  M 58.795  124.479  C 58.671 124.479,58.549 124.479,58.426 124.476 C 63.318 119.534,68.798 115.012,75.162 111.350 C 75.177 111.353,71.670 110.515,67.488 111.976 C 63.265 113.369,58.569 117.019,55.062 124.068 C 55.115 124.077,55.479 118.642,58.760 112.998 C 60.450 110.206,62.938 107.349,67.066 105.558 C 71.219 103.912,76.952 102.787,85.930 106.637 C 85.940 106.613,86.660 110.434,84.141 114.007 C 81.749 117.732,75.826 120.212,67.042 123.212 C 67.007 123.185,62.625 124.463,58.795 124.479 Z  M 205.883  123.991  C 205.599 123.993,205.296 123.975,204.975 123.933 C 204.975 123.933,204.216 123.790,203.775 123.431 C 204.982 123.306,206.193 123.150,207.406 122.961 C 207.409 122.934,206.159 122.208,203.497 123.073 C 203.879 122.877,206.774 120.897,209.296 122.657 C 209.298 122.668,208.199 123.977,205.883 123.991 Z  M 203.497  123.073  C 203.470 123.087,203.455 123.093,203.454 123.087 C 203.468 123.082,203.482 123.078,203.497 123.073 Z  M 200.440  122.784  C 198.651 122.788,194.919 122.159,192.776 118.515 C 192.871 118.549,195.619 116.736,199.819 119.530 C 199.819 119.526,200.858 120.411,201.277 121.604 C 199.426 120.760,197.565 120.030,195.704 119.415 C 195.701 119.399,197.086 121.750,201.451 122.659 C 201.417 122.712,201.037 122.783,200.440 122.784 Z  M 192.776  118.515  C 192.774 118.515,192.773 118.513,192.774 118.511 C 192.775 118.512,192.775 118.514,192.776 118.515 Z  M 203.802  122.604  C 205.015 121.029,206.158 119.284,207.126 117.464 C 207.074 117.425,205.441 118.393,203.267 122.413 C 203.634 121.462,205.081 116.248,208.598 114.562 C 208.585 114.491,208.915 118.281,205.485 121.724 C 205.501 121.727,204.567 122.520,203.802 122.604 Z  M 203.186  122.563  C 203.213 122.513,203.240 122.463,203.267 122.414 C 203.229 122.512,203.202 122.565,203.186 122.563 Z  M 202.688  122.180  C 202.686 122.180,202.685 122.178,202.684 122.174 C 205.255 117.197,204.391 113.791,204.366 113.541 C 203.954 116.193,203.375 118.793,202.484 121.250 C 202.331 120.074,202.565 118.385,202.530 118.382 C 203.262 111.925,204.711 109.356,204.823 109.348 C 207.268 116.297,202.844 122.225,202.688 122.180 Z  M 261.308  122.118  C 258.312 122.052,255.315 121.075,252.978 119.099 C 246.783 113.648,245.736 104.483,247.877 97.189 C 249.870 89.652,255.182 83.545,261.152 79.656 C 267.221 75.739,274.117 74.089,280.416 73.928 C 293.242 73.628,303.203 79.260,308.759 84.071 C 312.468 87.298,314.660 90.040,315.766 91.544 C 307.076 80.079,294.407 74.640,283.687 74.226 C 272.427 73.646,263.307 77.791,257.789 82.669 C 252.206 87.613,249.661 92.822,248.654 96.326 C 247.862 98.897,247.671 100.578,247.606 101.303 C 249.203 87.693,261.449 77.289,274.504 75.129 C 287.860 72.627,302.098 77.489,311.538 87.126 C 307.875 83.466,302.039 79.626,296.799 77.698 C 291.571 75.745,287.261 75.231,287.285 75.248 C 270.656 72.899,256.459 81.478,251.018 92.064 C 245.358 102.688,247.829 114.196,253.891 118.987 C 260.260 123.446,267.194 121.552,269.529 118.846 C 272.052 115.997,271.516 113.743,271.721 113.868 C 271.712 117.901,268.257 121.324,264.278 121.884 C 263.305 122.061,262.306 122.140,261.308 122.118 Z  M 315.766  91.544  C 316.072 91.948,316.374 92.357,316.670 92.776 C 316.646 92.803,316.349 92.336,315.766 91.544 Z  M 201.805  121.813  C 201.677 121.540,198.735 117.511,198.834 112.368 C 198.874 112.420,201.312 113.484,202.247 118.707 C 202.278 118.703,202.373 120.116,202.107 121.083 C 201.613 119.018,200.966 117.063,200.150 115.202 C 200.110 115.258,200.159 117.587,201.805 121.813 Z  M 198.834  112.368  L 198.834  112.367  C 198.833 112.367,198.834 112.366,198.834 112.366 C 198.834 112.367,198.834 112.367,198.834 112.368 Z  M 107.987  115.183  C 108.767 115.168,109.541 115.058,110.286 114.864 C 111.135 112.599,111.814 110.291,112.315 107.972 C 111.495 109.404,110.062 110.302,108.728 110.584 C 104.932 111.354,103.105 107.787,103.669 106.376 C 103.221 107.955,105.430 111.229,108.868 110.150 C 110.430 109.723,111.930 108.355,112.345 106.443 C 112.778 104.541,112.092 102.459,110.629 100.975 C 107.583 97.772,101.497 99.224,99.726 103.418 C 97.721 107.578,100.215 112.744,104.141 114.421 C 105.374 114.970,106.690 115.207,107.987 115.183 Z  M 232.966  113.026  C 232.944 113.016,233.096 112.759,233.342 112.292 C 233.224 112.536,233.102 112.779,232.976 113.022 C 232.971 113.026,232.968 113.027,232.966 113.026 Z  M 233.342  112.292  C 236.689 105.396,237.006 98.291,235.895 92.663 C 234.729 86.756,231.978 82.360,229.303 79.453 C 224.476 74.793,220.542 73.975,219.448 73.768 C 226.448 75.557,231.799 81.352,234.227 88.007 C 236.632 94.348,236.753 101.465,234.781 107.924 C 236.306 102.555,235.778 94.661,235.534 94.713 C 234.264 86.038,229.540 79.174,224.036 76.174 C 218.543 72.812,212.775 73.179,209.436 75.611 C 205.968 77.829,204.588 80.847,204.465 82.804 C 204.329 84.800,204.833 85.736,204.763 85.738 C 203.026 81.655,205.791 77.051,209.340 74.846 C 212.921 72.285,217.792 72.308,221.622 73.851 C 229.670 76.742,234.193 84.462,235.759 90.893 C 238.299 102.100,234.576 109.953,233.342 112.292 Z  M 234.781  107.924  C 234.656 108.363,234.520 108.787,234.366 109.187 C 234.513 108.769,234.652 108.348,234.781 107.924 Z  M 50.460  110.573  C 52.637 110.579,54.851 110.103,56.932 109.106 C 60.825 107.337,64.026 103.373,64.943 98.989 C 65.955 94.749,65.250 89.959,62.838 86.075 C 60.513 82.173,56.287 79.188,51.851 78.284 C 47.509 77.261,42.768 77.726,38.710 79.650 C 34.622 81.508,31.212 84.798,29.189 88.759 C 27.265 92.513,26.639 96.364,26.735 100.233 C 30.362 103.017,34.535 104.823,38.600 105.472 C 37.148 103.277,36.362 100.748,36.335 98.318 C 36.104 94.027,38.458 89.433,41.937 87.427 C 45.312 85.290,49.190 85.271,51.897 86.309 C 51.941 86.477,49.401 85.110,45.024 86.374 C 42.914 87.047,40.468 88.593,38.814 91.308 C 37.159 94.119,36.651 97.376,37.535 100.927 C 37.948 102.570,38.756 104.203,39.905 105.643 C 42.846 105.952,45.623 105.738,47.852 104.571 C 50.123 103.292,51.844 100.845,52.951 98.779 C 55.036 94.568,54.938 90.647,54.281 88.271 C 54.516 88.895,55.093 90.455,55.091 92.940 C 55.041 96.139,53.695 101.116,49.267 104.932 C 46.895 106.368,44.098 107.018,41.135 106.983 C 42.201 107.994,43.465 108.849,44.902 109.463 C 46.649 110.188,48.540 110.568,50.460 110.573 Z  M 54.281  88.271  C 54.205 88.069,54.163 87.963,54.192 87.959 C 54.223 88.058,54.252 88.165,54.281 88.271 Z  M 174.663  101.644  C 174.248 101.639,173.583 101.564,173.001 101.221 C 174.412 100.381,175.744 99.428,177.013 98.423 C 176.951 98.433,174.663 97.636,172.265 100.609 C 172.520 100.172,173.725 95.063,178.915 96.797 C 178.984 96.712,179.336 100.560,175.070 101.622 C 175.072 101.626,174.912 101.647,174.663 101.644 Z  M 172.243  100.636  C 172.250 100.627,172.257 100.619,172.264 100.610 C 172.257 100.623,172.249 100.632,172.243 100.636 Z  M 92.577  96.861  C 92.300 96.828,88.598 94.854,83.763 91.922 C 78.434 88.858,73.396 85.711,63.793 81.656 C 63.823 81.592,58.788 79.236,54.812 76.024 C 64.524 74.743,75.239 76.816,83.107 83.681 C 83.043 83.520,82.660 79.927,78.061 75.862 C 73.562 71.783,63.217 67.960,51.642 72.919 C 51.550 73.066,57.931 66.648,69.996 67.192 C 75.829 67.485,83.029 70.150,87.976 75.868 C 92.981 81.484,94.936 89.611,92.594 96.858 C 92.592 96.861,92.586 96.862,92.577 96.861 Z  M 152.133  91.927  C 150.622 91.934,149.084 91.675,147.610 91.151 C 147.538 91.283,143.276 89.077,142.369 86.217 C 145.058 87.683,148.126 88.581,151.214 88.492 C 154.253 88.430,157.459 86.933,158.951 84.298 C 158.907 84.183,157.272 85.359,154.636 85.779 C 151.923 86.159,148.054 86.128,141.939 83.908 C 141.895 83.798,146.476 84.564,150.395 83.773 C 152.487 83.372,153.868 82.807,154.958 82.040 C 155.711 81.511,156.434 81.092,157.070 80.435 C 157.714 79.825,158.259 78.446,157.443 76.567 C 157.451 76.576,157.899 76.416,158.993 76.550 C 159.913 76.757,161.893 77.602,162.632 80.249 C 163.411 82.852,162.531 86.318,159.850 88.981 C 157.804 90.931,155.018 91.913,152.133 91.927 Z  M 54.678  54.390  C 55.112 54.222,55.514 54.061,55.954 53.891 C 57.419 53.315,58.961 52.731,60.507 52.147 C 62.070 47.991,64.581 44.240,68.673 42.137 C 68.560 42.096,65.905 40.617,61.785 42.732 C 58.603 44.323,55.292 48.535,54.678 54.390 Z  M 78.583  32.036  C 78.583 32.036,78.581 32.034,78.580 32.034 C 78.583 32.035,78.587 32.035,78.590 32.036 C 78.589 32.038,78.587 32.038,78.583 32.036 Z  M 78.580  32.034  C 69.847 30.114,61.491 29.075,54.658 29.368 C 47.894 29.560,42.971 30.649,42.953 30.562 C 51.083 28.290,57.196 27.981,61.300 27.895 C 65.402 27.828,67.522 27.901,67.523 27.871 C 60.057 26.179,52.068 26.583,44.685 29.008 C 47.165 27.086,52.161 25.763,52.163 25.798 C 61.939 23.762,69.203 26.160,73.166 28.185 C 77.068 30.231,78.454 31.958,78.580 32.034 Z  
koldat commented

Issue for findMats(bezierLoops, 3, 100)
image

hi have you solved the issue?

koldat commented

No

Hi. I've have a look into it and get back to you.

Hi. I've have a look into it and get back to you.

Hi. I've have a look into it and get back to you.
please say why are you culling when finding the 2 prongs,I could no where see you using a circle curve intersection in the code without that how are you refining the radius, and are you culling in order to reduce computation, because for cubic bezier and circle intersection I am getting polynomial of degree 6, which is very slow computation please just help here

No

do you why are culling to find 2 prong?,

Hi koldat.

There was a bug in the boolean operation library (flo-boolean) that's now fixed.

Also, please use a low value for both parameters 2 and 3, e.g. findMats(bezierLoops, 0.4, 4) instead of findMats(bezierLoops, 3, 100) else too little MAT points are generated causing the algorithm to fail under certain circumstances. With the low values it should be robust now.

I am currently working to ensure robustness even with high parameter values.

Hi hari

There is no need to find bezier circle intersections even though one could easily think so (and in fact it will also work doing it that way).

See the paper for details. There are 3 points, x,y and z. x is the center of the MAT circle to be found. y is a fixed boundary point
and z is the closest point to x on the boundary.

You only need to find the next x iteratively to within some tolerance by finding the foot point from x on the boundary. In the code it is called getFootpointPolyDd and it is defined in the library flo-bezier. Even then, it is still a 5th order polynomial and to find it's roots accurately by controlling the error is an immensely difficult task due to the high condition number of some polynomials, see e.g. https://epubs.siam.org/doi/book/10.1137/1.9780898718027 and google condition
number. See also here https://people.mpi-inf.mpg.de/~mehlhorn/ftp/classroomExamplesNonrobustness.pdf
why controlling the error is important.

The culling of beziers is simply an optimization to eliminate some beziers that is guaranteed not to contain z.

Unfortunately I do not currently have the time to help you further with the algorithm itself here. I suggest you ask on Stack Overflow. Github issues are only for bug reports and feature requests.

If you want a fast, accurate algorithm for circle/bezier intersection it is defined here: https://github.com/FlorisSteenkamp/FloBezier/blob/master/src/intersection/circle-bezier-intersection/circle-bezier-intersection.ts

koldat commented

Hi Floris,

Thank you so much. It is much better. Unfotunatelly there are still some artifacts I am not able to tune.

I tried these:

findMats(bezierLoops, 0.4, 4);
findMats(bezierLoops, 0.1, 1)

Still some extreme parts of image that go to thin strip fails. Any idea what I can tune? I do not care if output will be very large. I just try to have correct one (Working on slicer for my CNC....).

image

image

Thanks for the feedback.

It is a very specific issue that occurs at the corners. Best will be for me to fix it.

I'll see what I can do.

The reason the algorithm is struggling so much is if you zoom in about a million times on to the points where individual beziers meet they're not smooth (see the image).

koldat

koldat commented

I am trying to find your zoom and not able to find it :)

This one seems clean to me (I was able to move by point in Inkscape as individual ones.
image

koldat commented

When I cut just the portion of the image with crossings it works. So something around is affecting it.

This is correct
image

Hi koldat. Ok, I've finally fixed some bugs and added extra details specifically
on the sharp corners that should make it incredibly accurate everywhere.

See the before and after images below that also shows the construction circles.

The new package is a major version upgrade from version 2.x.x to 3.x.x due to
breaking changes, specifically:

Instead of, for example:

import { findMats } from 'flo-mat';

const mats = findMats(bezierLoops, 0.4, 4);
const cpNode = mats[0].cpNode;

// use functions:
cpNode.getAllOnLoop();
cpNode.isTerminating();
cpNode.isSharp();
// etc.

the functions are now not part of the CpNode class anymore, thus:

import { findMats, getAllOnLoop, isTerminating, isSharp } from 'flo-mat';

const mats = findMats(bezierLoops, 0.4, 4);
const cpNode = mats[0].cpNode;

getAllOnLoop(cpNode);
isTerminating(cpNode);
isSharp(cpNode);

The demo and examples repos have been updated to reflect this.
before
after

To romove 'noise' I also recommend using:

const satScale = 1.1;  // a number > 1 and <= 1.5 works best, the higher the more noise is removed.
let sats = findMats(bezierLoops, 0.4, 4).map(mat => toScaleAxis(mat, satScale));

instead of:

let mats = findMats(bezierLoops, 0.4, 4);