kld-intersections icon indicating copy to clipboard operation
kld-intersections copied to clipboard

Maximum call stack size exceeded

Open elixiao opened this issue 2 years ago • 0 comments

const path1 = ShapeInfo.path(
 "M 157 612 L 157 612 C 157 612 162.93043615114098 608.5347819244295 166 607 C 168.27058484879018 605.8647075756049 170.69506244610156 605.0638173325685 173 604 C 175.03025890455189 603.0629574286684 176.93593725153866 601.8600261451923 179 601 C 180.9460170216421 600.1891595743158 183.08077895050255 599.872373204317 185 599 C 186.7694343789214 598.1957116459448 188.2305656210786 596.8042883540552 190 596 C 191.91922104949745 595.127626795683 194.0187415011529 594.7204576359444 196 594 C 197.68698082338213 593.386552427861 199.28064919915957 592.5158052402521 201 592 C 202.62799163965823 591.5116025081026 204.37200836034177 591.4883974918974 206 591 C 207.71935080084043 590.4841947597479 209.319237688354 589.6302858668672 211 589 C 211.98697761359682 588.6298833949012 213.02129963414217 588.3914801463432 214 588 C 214.69204566544784 587.7231817338209 215.29289321881345 587.2357022603956 216 587 C 217.30384048104054 586.5653865063198 218.67851173410534 586.3775680759699 220 586 C 221.01353523311383 585.7104185048246 221.9663772117566 585.2067245576487 223 585 C 223.6537204504606 584.8692559099079 224.3462795495394 585.1307440900921 225 585 C 226.0336227882434 584.7932754423513 226.9663772117566 584.2067245576487 228 584 C 228.6537204504606 583.8692559099079 229.33333333333334 584 230 584 C 230.66666666666666 584 231.33333333333334 584 232 584 C 232.33333333333334 584 232.66666666666666 584 233 584 C 233.66666666666666 584 234.33333333333334 584 235 584 C 236 584 237 584 238 584 C 238.66666666666666 584 239.33333333333334 584 240 584 C 240.66666666666666 584 241.36754446796633 584.2108185106779 242 584 C 242.44721359549996 583.8509288015 242.66666666666666 583.3333333333334 243 583 C 243.33333333333334 582.6666666666666 243.55278640450004 582.1490711985 244 582 C 244.63245553203367 581.7891814893221 245.33333333333334 582 246 582 C 246.33333333333334 582 246.70185760300004 582.1490711985 247 582 C 247.4216370213558 581.7891814893221 247.5783629786442 581.2108185106779 248 581 C 248.29814239699996 580.8509288015 248.70185760300004 581.1490711985 249 581 C 249.4216370213558 580.7891814893221 249.5783629786442 580.2108185106779 250 580 C 250.29814239699996 579.8509288015 250.66666666666666 580 251 580 C 251.33333333333334 580 251.66666666666666 580 252 580 C 252.33333333333334 580 253 580 253 580"
  );
const path2 = ShapeInfo.path(
    "M 218 268 L 218 268 C 218 268 223.3078404494596 277.0645346442572 225 282 C 231.3268648166052 300.4533557150985 237.8559579349404 318.9374065007258 242 338 C 247.87892617442165 365.0430604023396 250.88288048929005 392.6332644288103 255 420 C 256.55001755323724 430.30305785387094 257.66059560917324 440.66745184219354 259 451 C 259.99392948523655 458.6674560289678 259.96567909648905 481.45917664620674 262 474 C 264.9819972656439 463.0660100259724 262 440 262 440"
  );
const intersections = Intersection.intersect(path1, path2);

got error:

index-umd.js:166 Uncaught RangeError: Maximum call stack size exceeded
    at Polynomial.getRootsInInterval (index-umd.js:1955)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)
    at Polynomial.getRootsInInterval (index-umd.js:1974)

elixiao avatar Sep 14 '21 02:09 elixiao