xsrf / easyeda-svg-import

Simple SVG Importer for EasyEDA PCB that doesn't convert everything to Comic Sans 😄
85 stars 8 forks source link

Paths stopped showing. Log file? #11

Closed djex closed 3 years ago

djex commented 3 years ago

Sorry to post in issues but I have a few paths that were once importing fine but now no longer import. Is there a log file I can reference to check for any import errors?

EDIT: Actually now adding anything new will not show. Something must of gotten messed up in the svg. Any way I can validate the svg? It opens fine in all other programs though.

I found the issue. One of the paths was causing the issue. After deleting it the other paths imported fine. I've included the problem path below.

<path style="fill:#070000;fill-opacity:1;stroke:none;stroke-width:2.26722407;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" d="M 1604.4102 512.12695 A 9.6754398 9.4487906 0 0 0 1599.502 513.44531 C 1597.7776 512.68413 1596.0107 512.24805 1594.3086 512.24805 L 917.26758 512.24805 C 915.46199 512.24805 913.60392 512.73024 911.81445 513.58203 A 10.393692 8.7248554 0 0 0 907.66016 512.84961 A 10.393692 8.7248554 0 0 0 897.60156 519.4082 L 895.81055 519.4082 L 895.81055 531.30078 L 900.88281 531.30078 L 909.92188 531.30078 L 1599.6855 531.30078 L 1611.0898 531.30078 L 1616.0703 531.30078 L 1616.0703 519.23047 L 1613.7695 519.23047 A 9.6754398 9.4487906 0 0 0 1604.4102 512.12695 z M 1202.0117 514.70508 L 1202.0215 514.70508 C 1203.507 514.70708 1204.6994 515.06196 1205.5625 515.79492 C 1206.4277 516.52967 1206.8718 517.58178 1206.8848 518.88086 L 1206.8848 519.13281 L 1204.8555 519.13281 L 1204.8555 518.88672 C 1204.8435 518.11214 1204.5983 517.565 1204.1172 517.16992 C 1203.637 516.77545 1202.9264 516.5625 1201.9551 516.5625 C 1201.1395 516.5625 1200.5124 516.74756 1200.0449 517.09961 C 1199.5847 517.4448 1199.375 517.86415 1199.375 518.43945 C 1199.375 518.87473 1199.5003 519.17319 1199.7539 519.40039 C 1200.0079 519.62791 1200.5181 519.86602 1201.2695 520.06641 L 1204.4473 520.92383 C 1205.3449 521.16497 1206.0584 521.58222 1206.5586 522.17969 C 1207.0646 522.76988 1207.3184 523.50182 1207.3184 524.33398 C 1207.3184 524.69494 1207.2704 525.04896 1207.1758 525.39648 C 1207.0838 525.75656 1206.9148 526.12102 1206.6719 526.49219 C 1206.4242 526.87057 1206.1074 527.20461 1205.7266 527.49023 C 1205.3396 527.77866 1204.836 528.00313 1204.2188 528.17578 C 1203.601 528.35661 1202.9041 528.44531 1202.1289 528.44531 C 1201.6404 528.44531 1201.1705 528.40591 1200.7188 528.32617 C 1200.2643 528.25147 1199.8043 528.10577 1199.3379 527.89258 C 1198.8655 527.67663 1198.4525 527.40173 1198.1035 527.06641 L 1198.1035 527.06445 C 1197.7465 526.7145 1197.4587 526.25634 1197.2305 525.69922 L 1197.2305 525.69727 C 1197.0053 525.13095 1196.8948 524.48935 1196.8848 523.77734 L 1196.8848 523.52539 L 1198.918 523.52539 L 1198.918 523.87109 C 1198.918 524.19842 1198.968 524.50381 1199.0684 524.79102 C 1199.1654 525.07179 1199.3297 525.35341 1199.5625 525.63477 C 1199.7772 525.88806 1200.1052 526.10619 1200.5645 526.27539 C 1201.0226 526.442 1201.5788 526.5287 1202.2344 526.5293 L 1202.2441 526.5293 C 1202.7477 526.5293 1203.1861 526.4789 1203.5586 526.38281 C 1203.9383 526.28481 1204.2247 526.16301 1204.4141 526.0332 C 1204.62 525.89598 1204.7788 525.7365 1204.9004 525.55469 C 1205.0303 525.35409 1205.1105 525.17681 1205.1465 525.02734 C 1205.1865 524.86146 1205.207 524.68536 1205.207 524.49805 C 1205.207 524.06035 1205.0588 523.72643 1204.7266 523.43359 L 1204.7266 523.43164 C 1204.4012 523.13992 1203.8515 522.87929 1203.0781 522.67969 L 1203.0781 522.67773 L 1199.9473 521.84961 C 1199.0843 521.6255 1198.4125 521.25136 1197.957 520.71289 C 1197.5015 520.17442 1197.2773 519.48099 1197.2773 518.67188 C 1197.2773 517.46452 1197.7129 516.4701 1198.5703 515.76367 C 1199.4311 515.05307 1200.5896 514.70708 1202.0117 514.70508 z M 1214.4688 514.70508 L 1214.4707 514.70508 C 1215.8884 514.70542 1217.0492 515.0636 1217.9141 515.79688 C 1218.7793 516.53047 1219.3336 517.62425 1219.5879 519.04102 L 1219.6406 519.33594 L 1217.4805 519.33594 L 1217.4395 519.13477 C 1217.2675 518.26273 1216.9305 517.64659 1216.4395 517.24805 L 1216.4395 517.24609 C 1215.9518 516.84442 1215.2434 516.62891 1214.2793 516.62891 C 1213.1237 516.62891 1212.2491 517.05492 1211.5781 517.9375 C 1210.908 518.81286 1210.5605 520.0283 1210.5605 521.60938 C 1210.5605 523.15544 1210.9187 524.34996 1211.6133 525.22656 C 1212.3153 526.10406 1213.2242 526.5293 1214.4141 526.5293 C 1215.4073 526.5293 1216.1208 526.25967 1216.6191 525.73242 C 1217.1287 525.19345 1217.4972 524.33784 1217.6914 523.14844 L 1217.7246 522.9375 L 1219.8848 522.9375 L 1219.8516 523.2168 C 1219.6514 524.92354 1219.1035 526.23724 1218.1836 527.12305 C 1217.2638 528.00885 1215.9871 528.44531 1214.4043 528.44531 C 1213.6492 528.44531 1212.9529 528.33842 1212.3203 528.12305 C 1211.6928 527.91578 1211.1591 527.62854 1210.7266 527.25781 L 1210.7266 527.25586 C 1210.3069 526.88952 1209.9422 526.48286 1209.6348 526.03516 L 1209.6348 526.0332 C 1209.3261 525.57686 1209.0875 525.08226 1208.9199 524.55273 C 1208.7563 524.03572 1208.6337 523.53981 1208.5547 523.06445 L 1208.5547 523.0625 L 1208.5547 523.06055 C 1208.4827 522.57993 1208.4453 522.1019 1208.4453 521.62695 L 1208.4453 521.37695 L 1208.4609 521.37695 C 1208.4709 521.05163 1208.4824 520.72746 1208.5234 520.40234 C 1208.5764 519.98466 1208.6662 519.54879 1208.791 519.0957 L 1208.791 519.09375 C 1208.923 518.63165 1209.0898 518.19837 1209.2891 517.79297 C 1209.4909 517.37591 1209.7491 516.97581 1210.0625 516.5957 L 1210.0625 516.59375 C 1210.3851 516.2106 1210.7493 515.88341 1211.1543 515.61328 C 1211.571 515.33335 1212.0598 515.11504 1212.6191 514.95508 C 1213.1896 514.78728 1213.8063 514.70524 1214.4688 514.70508 z M 1263.6328 514.70508 L 1263.6348 514.70508 L 1263.6426 514.70508 C 1265.1291 514.70608 1266.3239 515.06163 1267.1875 515.79492 C 1268.0526 516.52967 1268.4948 517.58179 1268.5078 518.88086 L 1268.5078 519.13281 L 1266.4785 519.13281 L 1266.4785 518.88672 C 1266.4665 518.11214 1266.2233 517.565 1265.7422 517.16992 C 1265.262 516.77545 1264.5513 516.5625 1263.5801 516.5625 C 1262.7644 516.5625 1262.1374 516.74757 1261.6699 517.09961 C 1261.2097 517.4448 1260.998 517.86415 1260.998 518.43945 C 1260.998 518.87472 1261.1233 519.17318 1261.377 519.40039 C 1261.6309 519.62792 1262.1412 519.86602 1262.8926 520.06641 L 1266.0703 520.92383 C 1266.967 521.16505 1267.6799 521.58263 1268.1797 522.17969 C 1268.6858 522.76988 1268.9414 523.50181 1268.9414 524.33398 C 1268.9414 524.69624 1268.8925 525.05167 1268.7969 525.40039 C 1268.7049 525.75921 1268.5351 526.12235 1268.293 526.49219 C 1268.0454 526.87059 1267.7286 527.2046 1267.3477 527.49023 C 1266.9608 527.77867 1266.4574 528.00313 1265.8398 528.17578 C 1265.2223 528.35661 1264.5272 528.44531 1263.752 528.44531 C 1263.2634 528.44531 1262.7916 528.40591 1262.3398 528.32617 C 1261.8863 528.25137 1261.4267 528.1055 1260.9609 527.89258 C 1260.4886 527.67663 1260.0757 527.40171 1259.7266 527.06641 L 1259.7266 527.06445 C 1259.3696 526.7145 1259.0798 526.25634 1258.8516 525.69922 L 1258.8516 525.69727 C 1258.6264 525.13095 1258.5178 524.48935 1258.5078 523.77734 L 1258.5078 523.52539 L 1260.541 523.52539 L 1260.541 523.87109 C 1260.541 524.19842 1260.5891 524.50381 1260.6895 524.79102 C 1260.7865 525.07178 1260.9507 525.35342 1261.1836 525.63477 C 1261.398 525.88769 1261.7273 526.1063 1262.1855 526.27539 C 1262.6433 526.4416 1263.2007 526.5287 1263.8555 526.5293 L 1263.8652 526.5293 C 1264.3687 526.5293 1264.8072 526.4789 1265.1797 526.38281 C 1265.5595 526.28481 1265.846 526.16299 1266.0352 526.0332 C 1266.241 525.89598 1266.4018 525.7365 1266.5234 525.55469 C 1266.6533 525.35409 1266.7335 525.17681 1266.7695 525.02734 C 1266.8105 524.86146 1266.8301 524.68536 1266.8301 524.49805 C 1266.8301 524.06034 1266.6799 523.72642 1266.3477 523.43359 L 1266.3477 523.43164 C 1266.0221 523.13989 1265.4707 522.87929 1264.6973 522.67969 L 1264.6973 522.67773 L 1261.5684 521.84961 C 1260.7063 521.62544 1260.0314 521.25096 1259.5762 520.71289 C 1259.1207 520.17442 1258.8965 519.48099 1258.8965 518.67188 C 1258.8965 517.46452 1259.336 516.4701 1260.1934 515.76367 C 1261.0541 515.05307 1262.2106 514.70641 1263.6328 514.70508 z M 1225.0039 514.90625 L 1227.4375 514.90625 L 1232.0527 528.05078 L 1229.7207 528.05078 L 1228.4121 524.25586 L 1223.9043 524.25586 L 1222.5645 528.05078 L 1220.3203 528.05078 L 1225.0039 514.90625 z M 1233.0684 514.90625 L 1234.9355 514.90625 L 1235.1855 514.90625 L 1235.1855 526.125 L 1241.4258 526.125 L 1241.4258 528.05078 L 1233.0684 528.05078 L 1233.0684 514.90625 z M 1242.8711 514.90625 L 1252.1152 514.90625 L 1252.1152 516.8418 L 1244.9785 516.8418 L 1244.9785 520.37695 L 1251.8652 520.37695 L 1251.8652 522.29102 L 1244.9785 522.29102 L 1244.9785 526.125 L 1252.4414 526.125 L 1252.4414 528.05078 L 1242.8711 528.05078 L 1242.8711 514.90625 z M 1270.7969 514.90625 L 1280.041 514.90625 L 1280.041 516.8418 L 1272.9043 516.8418 L 1272.9043 520.37695 L 1279.791 520.37695 L 1279.791 522.29102 L 1272.9043 522.29102 L 1272.9043 526.125 L 1280.3672 526.125 L 1280.3672 528.05078 L 1270.7969 528.05078 L 1270.7969 514.90625 z M 1281.1582 514.90625 L 1291.5762 514.90625 L 1291.5762 516.8418 L 1287.4258 516.8418 L 1287.4258 528.05078 L 1285.3184 528.05078 L 1285.3184 516.8418 L 1281.1582 516.8418 L 1281.1582 514.90625 z M 1292.8594 514.90625 L 1294.957 514.90625 L 1294.957 524.03516 C 1294.957 524.90015 1295.2163 525.49271 1295.7363 525.89844 C 1296.2742 526.31355 1296.9967 526.5293 1297.9336 526.5293 C 1298.9078 526.5293 1299.6375 526.29879 1300.1602 525.85742 L 1300.1602 525.85547 C 1300.6893 525.41356 1300.9473 524.83197 1300.9473 524.03516 L 1300.9473 515.15625 L 1300.9473 514.90625 L 1303.0645 514.90625 L 1303.0645 524.03516 C 1303.0645 525.36435 1302.5874 526.46367 1301.6484 527.25977 C 1300.71 528.05537 1299.4587 528.44531 1297.9336 528.44531 C 1296.3963 528.44531 1295.1489 528.0592 1294.2344 527.26758 C 1293.3204 526.47635 1292.8594 525.37493 1292.8594 524.03516 L 1292.8594 514.90625 z M 1305.4531 514.90625 L 1310.9336 514.90625 C 1312.2224 514.90625 1313.2568 515.2475 1313.9863 515.94922 C 1314.7218 516.64421 1315.082 517.64236 1315.082 518.88281 C 1315.082 520.0058 1314.7311 520.94571 1314.0273 521.64258 C 1313.3252 522.33781 1312.3969 522.6875 1311.2988 522.6875 L 1307.5723 522.6875 L 1307.5723 528.05078 L 1305.4531 528.05078 L 1305.4531 514.90625 z M 1307.5723 516.8418 L 1307.5723 520.78125 L 1310.6816 520.78125 C 1311.4089 520.78125 1311.9422 520.59988 1312.3242 520.25781 C 1312.7073 519.90848 1312.8984 519.44751 1312.8984 518.80664 C 1312.8984 518.16578 1312.7081 517.70787 1312.3262 517.36523 C 1311.9441 517.02244 1311.4097 516.8418 1310.6816 516.8418 L 1307.5723 516.8418 z M 1226.1934 517.65039 L 1224.4785 522.39844 L 1227.7891 522.39844 L 1226.1934 517.65039 z " id="rect13281-6" />

xsrf commented 3 years ago

Thank you... The error actually occurs in the EasyEDA source code as part of placing the shape after it was processed by my extension. Maybe I can fix this by manipulating the path before adding it, but I'm not yet sure what the cause actually is. You can hit F12 / go to the browsers developer console for a limited debug output.

xsrf commented 3 years ago

Okay, found the issue. EasyEDA cannot handle Arcs with different x/y radius, aka ellipses. So the issue is A 9.6754398 9.4487906 0 0 0 1604.4102 512.12695 (the ends of your label). I guess I must change my preprocessing of the paths, such that ellipses get converted to a lot small segments, like I do already for the "import as track".

xsrf commented 3 years ago

Fixed with latest release https://github.com/xsrf/easyeda-svg-import/releases/tag/v1.5 You SVG now imports just fine. 2021-01-30 16_14_07-EasyEDA(Standard) - A Simple and Powerful Electronic Circuit Design Tool