Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fromSVGPathData throwing error while parsing svg path Cannot read properties of null (reading 'intersectionPoints') #601

Open
Gautam2010 opened this issue Aug 13, 2024 · 1 comment

Comments

@Gautam2010
Copy link
Contributor

An error occurred while converting SVG Path to a Makejs model.

const myModel = importer.fromSVGPathData(belowSvgPath);

Error: Cannot read properties of null (reading 'intersectionPoints')

M120.166-26.2364 120.1626-26.2362 120.166-26.2364 120.1677-26.2366 120.1693-26.2367 120.1705-26.2368 120.1727-26.237 120.1761-26.2373 120.1795-26.2376 120.1828-26.2378 120.1862-26.2381A15.421 15.421 0 00120.246-26.2432 2.7921 2.7921 0 00120.2888-26.2472.3573.3573 0 00120.3122-26.2502.0397.0397 0 00120.3149-26.2503.3341.3341 0 00120.3201-26.2508 1.1731 1.1731 0 00120.3289-26.2518 2.7746 2.7746 0 00120.3388-26.2529 5.3986 5.3986 0 00120.354-26.2547 10.1343 10.1343 0 00120.3763-26.2573 9.9975 9.9975 0 00120.3791-26.2577 16.9886 16.9886 0 00120.4018-26.2604 21.5566 21.5566 0 00120.4193-26.2625 25.0916 25.0916 0 00120.4293-26.2638 19.6784 19.6784 0 00120.4361-26.2646 13.5775 13.5775 0 00120.4394-26.265L120.4407-26.2652A1.6896 1.6896 0 00121.412-26.737 3.265 3.265 0 00121.9892-27.5149 9.5727 9.5727 0 00122.4535-28.4952 22.1935 22.1935 0 00122.5043-28.6176 36.4725 36.4725 0 00122.6578-28.9974L129.702-46.6173A21.0642 21.0642 0 01129.7965-46.8424 10.4588 10.4588 0 01129.8848-47.0438 5.537 5.537 0 01129.9852-47.2548 2.8699 2.8699 0 01130.0943-47.4532 2.0124 2.0124 0 01130.0966-47.4569 1.363 1.363 0 01130.2404-47.6551.5617.5617 0 01130.4379-47.8108.5617.5617 0 01130.6781-47.8647.5579.5579 0 01130.6835-47.8647.6229.6229 0 01130.6879-47.8647.6284.6284 0 01131.1115-47.7005 1.2535 1.2535 0 01131.3396-47.4232 3.3767 3.3767 0 01131.5328-47.0631 7.3384 7.3384 0 01131.5816-46.9578 12.977 12.977 0 01131.6638-46.7724L134.1914-40.4916 138.6205-29.5206A18.6048 18.6048 0 00139.035-28.6028 12.4737 12.4737 0 00139.4171-27.8757 7.7704 7.7704 0 00139.8231-27.2336 4.3633 4.3633 0 00140.1947-26.7727 2.15 2.15 0 00140.5521-26.459.864.864 0 00140.8516-26.3205 2.6934 2.6934 0 00140.9723-26.2972 4.9962 4.9962 0 00141.1943-26.2649 8.3082 8.3082 0 00141.3901-26.243 11.4345 11.4345 0 00141.5657-26.2267 14.5626 14.5626 0 00141.6615-26.2189 31.8978 31.8978 0 00141.7399-26.2129 17.2946 17.2946 0 01141.7464-26.2124 9.1699 9.1699 0 01141.7524-26.2119 5.7752 5.7752 0 01141.7581-26.2115 3.1277 3.1277 0 01141.7646-26.211 1.6665 1.6665 0 01141.7707-26.2105.7311.7311 0 01141.7758-26.21.1929.1929 0 01141.7811-26.2095 2.0675 2.0675 0 00141.7945-26.2079 4.637 4.637 0 00141.8849-26.1987 5.2872 5.2872 0 01141.9236-26.1949.7019.7019 0 01142.1725-26.1347.4508.4508 0 01142.2872-26.0522.294.294 0 01142.2946-26.0446.3606.3606 0 01142.3894-25.8619.2572.2572 0 01142.3933-25.8181.207.207 0 01142.3933-25.8168.2008.2008 0 01142.3854-25.7612.184.184 0 01142.3118-25.6613.443.443 0 01142.1685-25.6001 1.3998 1.3998 0 01141.9781-25.5659 3.6369 3.6369 0 01141.74-25.5465 8.2063 8.2063 0 01141.4612-25.5371 16.8493 16.8493 0 01141.1661-25.5345 16.7303 16.7303 0 01141.1493-25.5345L140.9098-25.5373 135.8344-25.5914 135.6967-25.5975A2.1182 2.1182 0 00135.6793-25.5985 2.9375 2.9375 0 00135.5411-25.6017 2.9236 2.9236 0 00135.5328-25.6017 8.444 8.444 0 00135.4009-25.6004 108.8076 108.8076 0 01135.3847-25.6001 7.2101 7.2101 0 01135.2745-25.599 2.7623 2.7623 0 01135.2709-25.599 2.6689 2.6689 0 01135.2002-25.6 1.0067 1.0067 0 01135.0061-25.6208.3046.3046 0 01134.8288-25.7199.2762.2762 0 01134.7739-25.8509.312.312 0 01134.7712-25.8701.2551.2551 0 01134.7696-25.8981.1672.1672 0 01134.7696-25.9022.1666.1666 0 01134.7929-25.9873.1666.1666 0 01134.8601-26.0504.4865.4865 0 01134.9711-26.0959 1.8537 1.8537 0 01135.1233-26.1318 74.3792 74.3792 0 01135.2097-26.1491 4.4938 4.4938 0 00135.3002-26.1682.274.274 0 00135.4102-26.2196.2376.2376 0 00135.4889-26.3367.3495.3495 0 00135.5038-26.4377.35.35 0 00135.5038-26.4418.4646.4646 0 00135.5034-26.4597.5598.5598 0 00135.4962-26.5288.7483.7483 0 00135.4806-26.6006.9818.9818 0 00135.4578-26.6739 1056.8064 1056.8064 0 00135.3099-27.0655 1936.9027 1936.9027 0 00134.8443-28.2963L134.8422-28.3017 134.8382-28.3124A16511.5014 16511.5014 0 00134.3491-29.6036 1946.5125 1946.5125 0 01133.9084-30.7679 581.4632 581.4632 0 01133.6654-31.4119 177.1444 177.1444 0 01133.4619-31.9543 38.199 38.199 0 01133.3775-32.1826 2.6401 2.6401 0 01133.3362-32.3L126.6693-32.2911A2.2819 2.2819 0 01126.6688-32.2899 9.0517 9.0517 0 01126.6673-32.2866 17.2329 17.2329 0 01126.6646-32.2801 18.5053 18.5053 0 01126.6614-32.2726 17.1355 17.1355 0 01126.6564-32.2608 13.0882 13.0882 0 01126.6489-32.2432 8.0884 8.0884 0 01126.642-32.2272 4.1345 4.1345 0 01126.6361-32.2135 1.8409 1.8409 0 01126.6328-32.2059.6536.6536 0 01126.6299-32.1995.1529.1529 0 01126.6287-32.1968.0128.0128 0 01126.628-32.1954 2837.4472 2837.4472 0 01126.6115-32.1524 5133.0265 5133.0265 0 01126.565-32.0314 7819.5074 7819.5074 0 01126.476-31.7998 8232.196 8232.196 0 01126.3726-31.5305 7623.9901 7623.9901 0 01126.2089-31.1043 5953.9165 5953.9165 0 01125.9656-30.4712L125.9648-30.469A3585.59 3585.59 0 01125.7237-29.842 1703.2972 1703.2972 0 01125.5351-29.3516 695.085 695.085 0 01125.4266-29.0698 229.7897 229.7897 0 01125.3526-28.8782 49.5408 49.5408 0 01125.3169-28.786 1.7225 1.7225 0 01125.3016-28.7471 7.0129 7.0129 0 00125.1009-28.1727 6.2702 6.2702 0 00124.9767-27.6951 4.3456 4.3456 0 00124.9158-27.3538 2.0644 2.0644 0 00124.8962-27.1203 2.8646 2.8646 0 00124.8955-27.0572 2.5084 2.5084 0 00124.8955-27.0547 2.6118 2.6118 0 00124.8955-27.0522 2.4326 2.4326 0 00124.9009-26.8916 1.692 1.692 0 00124.9168-26.746.9346.9346 0 00124.9577-26.577.4088.4088 0 00125.0167-26.464.5751.5751 0 00125.2841-26.2686.9858.9858 0 00125.4995-26.2206 2.545 2.545 0 00125.7171-26.2049L126.1595-26.1908A2.8204 2.8204 0 01126.1669-26.1908 2.8278 2.8278 0 01126.2975-26.1878 1.3077 1.3077 0 01126.498-26.1644.5718.5718 0 01126.7445-26.0562.7833.7833 0 01126.7483-26.0531.6071.6071 0 01126.773-26.032.4043.4043 0 01126.7971-26.0084.2213.2213 0 01126.8587-25.8842.3978.3978 0 01126.8629-25.8263.3974.3974 0 01126.8629-25.8228.6769.6769 0 01126.8624-25.7964.9447.9447 0 01126.8608-25.768.1641.1641 0 01126.8081-25.6558.3241.3241 0 01126.6928-25.5893.924.924 0 01126.4762-25.5453 1.9955 1.9955 0 01126.3302-25.5367 3.1476 3.1476 0 01126.2537-25.5357 2.3536 2.3536 0 01126.2509-25.5357 4.7776 4.7776 0 01126.2179-25.5359 9.0758 9.0758 0 01126.1878-25.5361 36.7956 36.7956 0 01126.1824-25.5362 21.4887 21.4887 0 00126.1669-25.5363 73532.6482 73532.6482 0 00125.5255-25.5544 30688.4934 30688.4934 0 00124.9824-25.5696 14220.0913 14220.0913 0 00124.4492-25.5846 6314.5352 6314.5352 0 00124.0731-25.5951 2446.855 2446.855 0 00123.6978-25.6056 667.8834 667.8834 0 00123.4224-25.6132 118.1198 118.1198 0 00123.2636-25.6175 4.8382 4.8382 0 00123.1987-25.619L122.6455-25.6006 120.1412-25.5348A1.5992 1.5992 0 01120.0648-25.5366 1.3924 1.3924 0 01119.7636-25.5827.7856.7856 0 01119.5856-25.6538.3442.3442 0 01119.4736-25.749.2243.2243 0 01119.4461-25.7983.287.287 0 01119.4254-25.9054.2894.2894 0 01119.4291-25.9525.2687.2687 0 01119.5037-26.0998.3209.3209 0 01119.6033-26.167.4741.4741 0 01119.7147-26.1997.723.723 0 01119.8335-26.2095.725.725 0 01119.8377-26.2095.9094.9094 0 01119.8432-26.2095 118.8193 118.8193 0 01119.9575-26.2191 132.4735 132.4735 0 01120.0523-26.227 465.0813 465.0813 0 01120.1426-26.2345L120.1459-26.2348A3.4496 3.4496 0 01120.1459-26.2348L120.147-26.2349 120.1492-26.235 120.1509-26.2352 120.1526-26.2353 120.1542-26.2355 120.1559-26.2356 120.157-26.2357 120.1593-26.2359 120.1609-26.236 120.1626-26.2362

@Gautam2010
Copy link
Contributor Author

Gautam2010 commented Sep 5, 2024

Same issue for the below path
M118.0516-29.9356l.0002-.0016a3.3724 3.3724 0 01.0002-.0016l.0001-.0011a3.622 3.622 0 01.0002-.0022 3.5413 3.5413 0 01.0003-.0035 1.857 1.857 0 01.0003-.003 4.33 4.33 0 01.0002-.0025 3.3921 3.3921 0 01.0142-.1235 1.9923 1.9923 0 01.0057-.0388 1.046 1.046 0 01.0352-.1571.361.361 0 01.0404-.0884.1067.1067 0 01.0369-.0394.1067.1067 0 01.0514-.0163.4782.4782 0 01.0145-.0002.4788.4788 0 01.175.0331.4788.4788 0 01.1613.1049.5765.5765 0 01.1607.3604 2.0211 2.0211 0 01.0121.2204 2.0191 2.0191 0 01-.0002.0278 6.0812 6.0812 0 01-.0001.0265 1.0704 1.0704 0 01-.0002.0152 3.8766 3.8766 0 01-.0077.1623 14.4558 14.4558 0 01-.0217.2887 28.187 28.187 0 01-.0422.4552 33.3683 33.3683 0 01-.0981.8642 21.6876 21.6876 0 01-.1133.7858 10.6798 10.6798 0 01-.0758.4129 4.8559 4.8559 0 01-.0706.2999 7.8657 7.8657 0 00-.0013.0049 12.7169 12.7169 0 00-.038.1442 9.4824 9.4824 0 01-.0351.1329 2.8804 2.8804 0 01-.021.0731.6317.6317 0 01-.2275.3678.7473.7473 0 01-.2508.1068 2.0685 2.0685 0 01-.2936.0486 5.2733 5.2733 0 01-.3559.0226 12.4694 12.4694 0 01-.3962.0063 12.4471 12.4471 0 01-.0275-0l-6.0416-.0602-4.3645-.1083-1.599.0278-1.9405.0567a5.8727 5.8727 0 01-.0084 0 5.8337 5.8337 0 01-.0943-.0008 1.9463 1.9463 0 01-.1452-.007.6524.6524 0 01-.1321-.024.2569.2569 0 01-.1129-.0645.2569.2569 0 01-.0669-.1115.2928.2928 0 01-.0174-.0994.3033.3033 0 01.0032-.0443.3083.3083 0 01.0084-.0392.3295.3295 0 01.0858-.1439.415.415 0 01.1144-.0796.5699.5699 0 01.1287-.0429.0573.0573 0 00.0015 0 .1617.1617 0 00.0031 0 .3736.3736 0 00.0185-.0005.8857.8857 0 00.0592-.0052 1.7355 1.7355 0 00.0915-.0135 2.8396 2.8396 0 00.1203-.0237 4.1998 4.1998 0 00.1442-.0342 5.8649 5.8649 0 00.1762-.048 7.8386 7.8386 0 00.1926-.0584 1.2855 1.2855 0 00.2454-.1059 1.0181 1.0181 0 00.3244-.309 1.0181 1.0181 0 00.1603-.4183 5.0897 5.0897 0 00.0819-.5478 75.2601 75.2601 0 00.0071-.0643 25.8268 25.8268 0 01.0226-.1987 15.293 15.293 0 00.0741-.9769 43.7714 43.7714 0 00.0409-1.2722 119.9626 119.9626 0 00.0191-1.8419 470.628 470.628 0 00.0026-1.5725 470.6847 470.6847 0 00-.0001-.2238 497.9619 497.9619 0 00-0-.0599l.0017-4.9972-.0556-5.8702a5.6266 5.6266 0 00-.0043-.0726 4.0792 4.0792 0 00-.0179-.2015 2.507 2.507 0 00-.0276-.1832 2.7544 2.7544 0 00-.0603-.2719 1.4157 1.4157 0 00-.3655-.6628.9694.9694 0 00-.4727-.2439 26.0527 26.0527 0 00-.1729-.0268 17.7926 17.7926 0 00-.1483-.0218 10.8765 10.8765 0 00-.1884-.0253 6.4768 6.4768 0 00-.1145-.0133 4.0848 4.0848 0 00-.1223-.0113 2.8823 2.8823 0 00-.1613-.0079 1.0427 1.0427 0 00-.009-.0002 2.659 2.659 0 00-.0103-.0002 69.4479 69.4479 0 00-.0075-.0001 69.4475 69.4475 0 00-.0075-.0001 2.981 2.981 0 01-.0551-.0014 1.7691 1.7691 0 01-.0919-.0056 1.2092 1.2092 0 01-.1555-.0233.8281.8281 0 01-.0826-.0228.4765.4765 0 01-.1839-.1054.0836.0836 0 01-.007-.0085.1493.1493 0 01-.0205-.0437.2403.2403 0 01-.0097-.0676.2456.2456 0 010-.0013.2747.2747 0 01.0053-.0535.2895.2895 0 01.0252-.0732.3087.3087 0 01.0171-.0298.3649.3649 0 01.0889-.0932.5366.5366 0 01.1153-.0645.8234.8234 0 01.1368-.0426 1.2433 1.2433 0 01.1562-.0241 1.804 1.804 0 01.1633-.0074 1.8818 1.8818 0 01.0048 0 2.0926 2.0926 0 01.0032 0 2.0926 2.0926 0 01.0032 0l2.4199.0498a3113.1788 3113.1788 0 01.132.003 2130.4302 2130.4302 0 01.3478.0078 1315.6911 1315.6911 0 01.2901.0066 820.3129 820.3129 0 01.1775.0041 461.59 461.59 0 01.1843.0043 193.5118 193.5118 0 01.1549.0037 54.6891 54.6891 0 01.0897.0022 5.5175 5.5175 0 01.0455.0013l1.4954-.0353 2.318-.0498a3.2074 3.2074 0 01.0185-.0001 3.217 3.217 0 01.2306.0083 1.3184 1.3184 0 01.2417.0387.5576.5576 0 01.2491.1325.2481.2481 0 01.0042.0043.2592.2592 0 01.0182.021.2865.2865 0 01.0356.06.3358.3358 0 01.0225.0728.4181.4181 0 01.0072.0771.4268.4268 0 01-0 .0017.4788.4788 0 01-0 .0068.5022.5022 0 01-.0007.0209.1593.1593 0 01-.043.0975.3577.3577 0 01-.1017.0755.9469.9469 0 01-.2207.0776 1.4988 1.4988 0 01-.1122.0217 1.4797 1.4797 0 01-.081.0102 1.4318 1.4318 0 01-.0168.0016 2.4415 2.4415 0 01-.0568.0043 6.1622 6.1622 0 01-.0787.0045 74.7641 74.7641 0 01-.1393.0069 15.1538 15.1538 0 00-.1628.0089 8.7028 8.7028 0 00-.2925.0224 6.4615 6.4615 0 00-.3987.0498.73.73 0 00-.3222.1354 1.0414 1.0414 0 00-.3126.4086 2.2729 2.2729 0 00-.1572.5013 4.452 4.452 0 00-.0769.6267l-.0556 5.9351 0 4.9393a2352.2369 2352.2369 0 01-0 .0434 2352.2387 2352.2387 0 01-0 .0434 2326.6649 2326.6649 0 00-0 .0431 2326.663 2326.663 0 00-0 .0431 264.1549 264.1549 0 00-.0001.0727 267.5299 267.5299 0 00-.0001.1762 266.8925 266.8925 0 00.003 1.263 67.1485 67.1485 0 00.0185 1.3203 24.6287 24.6287 0 00.0523 1.1486 8.6323 8.6323 0 00.0988.8562 4.8715 4.8715 0 00.0034.0191 3.6984 3.6984 0 00.0557.2614 2.0887 2.0887 0 00.0679.2201 1.0528 1.0528 0 00.081.1718.4656.4656 0 00.1046.1253 1.1892 1.1892 0 00.3826.207 3.7523 3.7523 0 00.5854.1507 8.7794 8.7794 0 00.7518.1016 17.1047 17.1047 0 00.975.0627 29.5049 29.5049 0 001.0828.0199 29.5598 29.5598 0 00.0432-0l.0045 0a61.8218 61.8218 0 00.2027-.0003 42.8287 42.8287 0 00.6803-.0073 27.7722 27.7722 0 00.9863-.0352 17.6166 17.6166 0 00.7852-.0596 9.2071 9.2071 0 001.0462-.1581 3.6189 3.6189 0 00.6352-.1938 1.2027 1.2027 0 00.4101-.2646 1.2879 1.2879 0 00.0363-.0413 1.4559 1.4559 0 00.0139-.0167 2.1567 2.1567 0 00.1808-.2625 3.6981 3.6981 0 00.2956-.6376 3.2321 3.2321 0 00.1047-.3559 2.0761 2.0761 0 00.0432-.256 1.4962 1.4962 0 00.0008-.0066 2.1392 2.1392 0 00.0023-.0211 3.2078 3.2078 0 00.0009-.0092 14.5361 14.5361 0 00.0069-.0709l.0001-.001.0001-.001a2.5369 2.5369 0 000 0l-.0001.001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant