gfwilliams / svgtoeagle

Online SVG to Eagle CAD converter
MIT License
85 stars 26 forks source link

Is this tool currently working? #1

Closed Jimima closed 6 years ago

Jimima commented 6 years ago

Is this tool currently working? I have tried to import a few SVGs and they do not seem to generate any output :-(

gfwilliams commented 6 years ago

Yes, it seems to work fine - I just checked.

Maybe check out the video on it: https://www.youtube.com/watch?v=OWuIbHIiJ6k

It won't pick things up if you haven't done 'Object to Path' first - so that could be your problem.

Jimima commented 6 years ago

Okay, well thanks anyway. I still can't get it working so in case you want to look into it here is the (processed) svg that I can't get to work: `

  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 
   
  <svg
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:cc="http://creativecommons.org/ns#"
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:svg="http://www.w3.org/2000/svg"
  xmlns="http://www.w3.org/2000/svg"
  xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
  xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
  width="129.33841mm"
  height="106.11555mm"
  viewBox="0 0 458.2857 376"
  id="svg3381"
  version="1.1"
  inkscape:version="0.91 r13725"
  sodipodi:docname="drawing-1.svg">
  <defs
  id="defs3383" />
  <sodipodi:namedview
  id="base"
  pagecolor="#ffffff"
  bordercolor="#666666"
  borderopacity="1.0"
  inkscape:pageopacity="0.0"
  inkscape:pageshadow="2"
  inkscape:zoom="0.35"
  inkscape:cx="278.42857"
  inkscape:cy="-137.71428"
  inkscape:document-units="px"
  inkscape:current-layer="layer1"
  showgrid="false"
  fit-margin-top="0"
  fit-margin-left="0"
  fit-margin-right="0"
  fit-margin-bottom="0"
  inkscape:window-width="1920"
  inkscape:window-height="1058"
  inkscape:window-x="0"
  inkscape:window-y="0"
  inkscape:window-maximized="1" />
  <metadata
  id="metadata3386">
 
  <cc:Work
  rdf:about="">
  image/svg+xml</dc:format>
  <dc:type
  rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
  </dc:title>
  </cc:Work>
  </rdf:RDF>
 
  <g
  inkscape:label="Layer 1"
  inkscape:groupmode="layer"
  id="layer1"
  transform="translate(-96.571426,-18.647919)">
  <path
  d="m 468.92857,99.219349 c -3.91601,0 -7.6642,0.59002 -11.46833,1.075121 -21.8178,-47.970212 -72.61412,-81.646551 -131.74596,-81.646551 -59.14571,0 -109.89995,33.676339 -131.75982,81.646551 -3.77639,-0.485101 -7.52457,-1.075121 -11.45446,-1.075121 -47.46748,0 -85.928574,36.063271 -85.928574,80.571431 0,44.50816 38.461094,80.57143 85.928574,80.57143 9.18854,0 17.84584,-1.78349 26.12542,-4.3538 15.25858,15.84152 36.22292,26.48996 59.80315,29.74219 l 0,-27.3817 c -22.30742,-4.35379 -40.99241,-17.96575 -50.40472,-36.87611 -9.77616,7.3962 -21.9995,12.01227 -35.52385,12.01227 -31.62171,0 -57.28571,-24.07701 -57.28571,-53.71428 0,-29.65029 25.664,-53.71429 57.28571,-53.71429 11.31437,0 21.76186,3.17334 30.61474,8.4323 9.37069,-50.488487 56.02721,-89.003728 112.59954,-89.003728 56.6144,0 102.82339,38.699044 112.10994,89.279018 8.95089,-5.45536 19.63602,-8.70759 31.10435,-8.70759 31.60784,0 57.28572,24.064 57.28572,53.71429 0,29.63727 -25.67788,53.71428 -57.28572,53.71428 -4.58733,0 -8.95089,-0.62946 -13.25851,-1.57366 -12.9506,17.1529 -34.20897,28.43081 -58.34863,28.43081 -4.95074,0 -9.67815,-0.68192 -14.32143,-1.67858 l 0,27.25077 c 4.67147,0.70836 9.42619,1.28495 14.32143,1.28495 27.38436,0 52.13895,-10.33371 70.23676,-27.04095 0.47529,0.0264 0.8669,0.18381 1.37038,0.18381 47.46748,0 85.92857,-36.06327 85.92857,-80.57143 0,-44.50816 -38.46109,-80.571431 -85.92857,-80.571431 z"
  id="path3450" />
  <path
  d="m 354.35714,179.79078 -57.28571,0 0,134.28571 -57.28572,0 85.92857,80.57143 85.92858,-80.57143 -57.28572,0 0,-134.28571 z"
  id="path3439" />
 
 
   

`

gfwilliams commented 6 years ago

Can you attach it as a file instead? I'm not quite sure what happened there but it seems incomplete/garbled.

Jimima commented 6 years ago

drawing.svg.txt drawing-1.svg.txt

Sorry about that. Try these, I had to change the extension as Github doesn't like SVGs for some reason.

gfwilliams commented 6 years ago

Hi - I just checked this and for some reason your SVG didn't have a fill or a stroke set on the paths, so they were being ignored. If you go into inkscape, highlight, and just click on color (even black works) then that'll do it.

I changed the instructions. Sadly I can't just detect it and render them anyway, since clip paths don't have fill or stroke and they definitely shouldn't be rendered.

Try this one:

drawing_fixed.svg.txt

Jimima commented 6 years ago

Yes, I have now tested that myself and I could get it to work. Thanks for figuring it out and getting back to me!