leomcelroy / svg-pcb

Design PCBs in the Browser
https://www.leomcelroy.com/svg-pcb-website
GNU General Public License v3.0
64 stars 9 forks source link

Keyswitch footprint error #99

Open ducky64 opened 3 months ago

ducky64 commented 3 months ago

When I try to import the Kaillh Hotswap MX switch footprint, it generates this SVG-PCB code:

const SW_Hotswap_Kailh_MX_Efr = footprint({"1":{"pos":[-0.27893700787401576,0.1],"shape":"M -0.05019685039370078 -0.04429133858267716 L -0.050122085398682126 -0.04514590638615615 L -0.04990006211016687 -0.0459745085793586 L -0.049537526593427354 -0.04675196850393701 L -0.04904549430668788 -0.04745466343349675 L -0.04843891540200068 -0.04806124233818394 L -0.04773622047244094 -0.04855327462492341 L -0.04695876054786254 -0.048915810141662935 L -0.046130158354660084 -0.04913783343017819 L -0.0452755905511811 -0.049212598425196846 L 0.0452755905511811 -0.049212598425196846 L 0.046130158354660084 -0.04913783343017819 L 0.046958760547862535 -0.048915810141662935 L 0.04773622047244094 -0.04855327462492342 L 0.04843891540200068 -0.04806124233818394 L 0.04904549430668788 -0.04745466343349675 L 0.04953752659342735 -0.04675196850393701 L 0.04990006211016687 -0.04597450857935861 L 0.050122085398682126 -0.04514590638615615 L 0.05019685039370078 -0.04429133858267716 L 0.05019685039370078 0.04429133858267716 L 0.050122085398682126 0.04514590638615615 L 0.04990006211016687 0.0459745085793586 L 0.049537526593427354 0.04675196850393701 L 0.04904549430668788 0.04745466343349675 L 0.04843891540200068 0.04806124233818394 L 0.04773622047244094 0.04855327462492341 L 0.04695876054786254 0.048915810141662935 L 0.046130158354660084 0.04913783343017819 L 0.0452755905511811 0.049212598425196846 L -0.0452755905511811 0.049212598425196846 L -0.046130158354660084 0.04913783343017819 L -0.046958760547862535 0.048915810141662935 L -0.04773622047244094 0.04855327462492342 L -0.04843891540200068 0.04806124233818394 L -0.04904549430668788 0.04745466343349675 L -0.04953752659342735 0.04675196850393701 L -0.04990006211016687 0.04597450857935861 L -0.050122085398682126 0.04514590638615615 L -0.05019685039370078 0.04429133858267716 L -0.05019685039370078 -0.04429133858267716 ","layers":["B.Cu","B.Mask","B.Paste"]},"2":{"pos":[0.22999999999999998,0.2],"shape":"M -0.05019685039370078 -0.04429133858267716 L -0.050122085398682126 -0.04514590638615615 L -0.04990006211016687 -0.0459745085793586 L -0.049537526593427354 -0.04675196850393701 L -0.04904549430668788 -0.04745466343349675 L -0.04843891540200068 -0.04806124233818394 L -0.04773622047244094 -0.04855327462492341 L -0.04695876054786254 -0.048915810141662935 L -0.046130158354660084 -0.04913783343017819 L -0.0452755905511811 -0.049212598425196846 L 0.0452755905511811 -0.049212598425196846 L 0.046130158354660084 -0.04913783343017819 L 0.046958760547862535 -0.048915810141662935 L 0.04773622047244094 -0.04855327462492342 L 0.04843891540200068 -0.04806124233818394 L 0.04904549430668788 -0.04745466343349675 L 0.04953752659342735 -0.04675196850393701 L 0.04990006211016687 -0.04597450857935861 L 0.050122085398682126 -0.04514590638615615 L 0.05019685039370078 -0.04429133858267716 L 0.05019685039370078 0.04429133858267716 L 0.050122085398682126 0.04514590638615615 L 0.04990006211016687 0.0459745085793586 L 0.049537526593427354 0.04675196850393701 L 0.04904549430668788 0.04745466343349675 L 0.04843891540200068 0.04806124233818394 L 0.04773622047244094 0.04855327462492341 L 0.04695876054786254 0.048915810141662935 L 0.046130158354660084 0.04913783343017819 L 0.0452755905511811 0.049212598425196846 L -0.0452755905511811 0.049212598425196846 L -0.046130158354660084 0.04913783343017819 L -0.046958760547862535 0.048915810141662935 L -0.04773622047244094 0.04855327462492342 L -0.04843891540200068 0.04806124233818394 L -0.04904549430668788 0.04745466343349675 L -0.04953752659342735 0.04675196850393701 L -0.04990006211016687 0.04597450857935861 L -0.050122085398682126 0.04514590638615615 L -0.05019685039370078 0.04429133858267716 L -0.05019685039370078 -0.04429133858267716 ","layers":["B.Cu","B.Mask","B.Paste"]}});

but when using it in the board it gives me:

TypeError: o is not iterable
    at index-1e22db5a.js:14:13362
    at Array.forEach (<anonymous>)
    at cl (index-1e22db5a.js:14:13339)
    at Cr (index-1e22db5a.js:14:13579)
    at vk (index-1e22db5a.js:1243:39373)
    at footprint (index-1e22db5a.js:1243:40319)
    at eval (eval at RUN (index-1e22db5a.js:1382:1645), <anonymous>:5:33)
    at RUN (index-1e22db5a.js:1382:1678)
    at Nt (index-1e22db5a.js:1387:334)
    at index-1e22db5a.js:1392:3677