SVGnest icon indicating copy to clipboard operation
SVGnest copied to clipboard

SVG Read error

Open groyk opened this issue 6 years ago • 3 comments

I have many SVG shapes witch is not generated corectly with SVG NEST.

Below is an simplyfied example.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-176.3 -45.2 293.1 299.2" width="293.1" height="299.2">

Anyone know why this renders wrong?

groyk avatar Jun 14 '18 19:06 groyk

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-176.3 -45.2 293.1 299.2" width="293.1" height="299.2"><style>.a{fill:none;stroke-width:2;stroke:currentColor;}</style><defs><line x1="-1" x2="1"/></defs><g transform="matrix(1 0 0 -1 0 0)" stroke-width="2"><g class="a"><path d="M-0.8 35.2A6 6 0 0 1-6.8 41.2"/><path d="M-52.8 41.2A6 6 0 0 1-58.8 35.2"/><path d="M-172.3-248A2 2 0 0 1-170.3-250"/><path d="M-170.3-50A2 2 0 0 1-172.3-52"/><path d="M-123.4-50A2 2 0 0 1-122-49.4"/><path d="M-71.7 0A2 2 0 0 1-73.1-0.6"/><path d="M110.8-250A2 2 0 0 1 112.8-248"/><path d="M112.8-52A2 2 0 0 1 110.8-50"/><path d="M62.4-49.4A2 2 0 0 1 63.8-50"/><path d="M13.6-0.6A2 2 0 0 1 12.2 0"/><line x1="-0.8" y1="35.2" x2="-0.8"/><line x1="-58.8" y1="35.2" x2="-58.8"/><line x1="-6.8" y1="41.2" x2="-52.8" y2="41.2"/><line x1="-172.3" y1="-248" x2="-172.3" y2="-52"/><line x1="-170.3" y1="-50" x2="-123.4" y2="-50"/><line x1="-122" y1="-49.4" x2="-73.1" y2="-0.6"/><line x1="-58.8" x2="-71.7"/><line x1="112.8" y1="-248" x2="112.8" y2="-52"/><line x1="110.8" y1="-50" x2="63.8" y2="-50"/><line x1="62.4" y1="-49.4" x2="13.6" y2="-0.6"/><line x1="-0.8" x2="12.2"/><line x1="110.8" y1="-250" x2="-170.3" y2="-250"/></g><g class="a"><circle cx="-166.1" cy="-139.2" r="3"/><circle cx="-166.1" cy="-229.5" r="3"/><circle cx="106.6" cy="-229.5" r="3"/><circle cx="106.6" cy="-139.2" r="3"/></g></g></svg>

groyk avatar Jun 14 '18 19:06 groyk

it looks like the entire thing is mirrored via a matrix transform. That Could be the issue

On Thu, Jun 14, 2018, 12:27 PM Simon Madsen [email protected] wrote:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="-176.3 -45.2 293.1 299.2" width="293.1" height="299.2">

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Jack000/SVGnest/issues/69#issuecomment-397411140, or mute the thread https://github.com/notifications/unsubscribe-auth/ACg63VZkNoGojmn3wkxxtIrLofTvIIwpks5t8rkygaJpZM4Uohus .

Jack000 avatar Jun 15 '18 04:06 Jack000

I know this is not the right place. But does anyone know how to remove all translates (Flatten SVG's) if JS is avaible somewhere, maybe it could be part of this project?

groyk avatar Jun 18 '18 05:06 groyk