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

read's layer ID attribution doesn't appropriately handle well-formed inkscape layers in some cases #594

Open
abey79 opened this issue Jan 24, 2023 · 2 comments

Comments

@abey79
Copy link
Owner

abey79 commented Jan 24, 2023

This happens e.g. with layers named xxxx1 and yyyy1. The digit extraction logic merges both layers into layer 1. This logic might make sense based on id attributes, but definitely doesn't make sense when multiple, top-level <g inkscape:groupmode="layer" ...> element exist.

Example file:
flow-inkscape

Relevant discord discussion: https://discord.com/channels/499297341472505858/748589023731122277/1067315996727181383

image

@oskay
Copy link

oskay commented Jan 24, 2023

If you're making a change, you might consider matching the AxiDraw layer number syntax ( https://wiki.evilmadscientist.com/AxiDraw_Layer_Control#Syntax ), where only leading numbers (after stripping whitespace) are considered, and otherwise the layers are considered independent.

@abey79 abey79 added this to the 1.13.0 milestone Mar 10, 2023
@abey79
Copy link
Owner Author

abey79 commented Mar 11, 2023

I'm unsure how to deal with this tbh. Surely, having green1 and blue1 merged into a single layer (with ID 1) is surprising. So would be to have 01 layer 01 end up with ID 101, as is currently the case. However, the current design does the right thing with layer 1 and layer 3, which I'm somewhat reluctant to break.

I'm thinking of at least considering "the first group of contiguous digits", as opposed of the current "all digits", for 1.13. This removes one WTF edge case but doesn't address this particular issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants