xsrf / easyeda-svg-import

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

No path-Tags found (Add more supported tags) #23

Open shinkuan opened 2 years ago

shinkuan commented 2 years ago

When trying to import this SVG file. Extension shows "No path-Tag found." this SVG file This SVG was composed of circule Tags.

<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 1000 563" xmlns="http://www.w3.org/2000/svg">
<rect width="1e3" height="563" fill="#fff"/>
<g>
<circle cx="520.78" cy="287.5" r=".0054498"/>
<circle cx="517.32" cy="311.5" r=".0077089"/>
...
...
...
...
<circle cx="-2.2947" cy="-.5" r="1.2656"/>
<circle cx="-2.2947" cy="563.5" r="1.9901"/>
<circle cx="-.56268" cy="566.5" r="1.9901"/>
</g>
</svg>

Can you try to add more Tag support for this extension for it to become more powerful?

shinkuan commented 2 years ago

This issue can be solved by using a converter. Some one already made one Link Here

The converted SVG has no problem importing.

xsrf commented 2 years ago

Thank you, I might look into including a library like that. But so far this is intended behavior, hence I've documented how to convert SVGs to paths here: https://github.com/xsrf/easyeda-svg-import#preparing-svgs-using-inkscape SVGs can get pretty complex (e.g. with additional transformations around the XML Tags) and I didn't want to write a parser that supports everything as long you can convert with minimal effort.