Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incomplete path export #3

Open
cyqsimon opened this issue Mar 13, 2020 · 5 comments
Open

Incomplete path export #3

cyqsimon opened this issue Mar 13, 2020 · 5 comments
Labels

Comments

@cyqsimon
Copy link

cyqsimon commented Mar 13, 2020

Not sure if you intend to maintain this tool or not, but in case you do, I think I found a bug.

I was trying to use your script to grab this following path in .svg because PS's export function simply gives an <image> tag and no path.

Screencap-001-20200313-182739

I ran the script and there were no errors thrown, but the svg I got was incomplete:

Screencap-001-20200313-183017

I suspect it's because I constructed the several parallelograms on the top right using two big beizer curves to form a big 'curly parallelogram' first, then split it into the smaller ones with horizontal line segments. And perhaps PS stores this kind of path differently, and your script missed this edge case. Anyways, those are my educated guesses. Here are my .psd and .svg files if you want them for debugging. Thanks.

files.zip

@Pomax
Copy link
Owner

Pomax commented Apr 4, 2020

No real support intent, but it's not like we're not all stuck inside right now, so I might as well have a look =)

@Pomax
Copy link
Owner

Pomax commented Apr 5, 2020

It looks like that really is the "true" path: walking the document's pathing object, if I remove the Z and the lower-right rectangle, theres only 1 path left, with 1 subpath, and that subpath only has 4 points (the four for the lowest "rect").

However, there's some masking weirdness going on, too: if you select the text tool and hover it over your path, you'll see it change from the standard text placement icon to a circular text placement icon when inside any of the "rects" and clicking will invalidate all but the one you clicked, prefilling that shape with lorem ipsum text.

So I think the issue here is that what we're seeing is not the true path, but some kind of vector mask, and it doesn't actually have path points. And I'm not sure what exactly it would be or how to script getting the resulting "virtual path" in this case.

@cyqsimon
Copy link
Author

cyqsimon commented Apr 6, 2020

Thanks a lot @Pomax for your time.

Too bad then I guess. It is a proprietary format after all. What to do. I ended up manually tracing the missing paths in Inkscape - wasn't a big deal for such simply shapes.

I guess I'll keep the issue open in the off chance that someone else decides to fix it. Cheers.

@Pomax
Copy link
Owner

Pomax commented Apr 6, 2020

If you have illustrator and Photoshop then there will be no need to redraw anything: they're both Adobe applications. You can just select the paths you want in PS, hit copy, select your Illustrator document, and hit paste.

But yeah if you rely on Inkscape or other not-Adobe applications, no such luck =(

@Pomax
Copy link
Owner

Pomax commented Apr 6, 2020

@Pomax Pomax added the bug label Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants