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

Sorting by "-a id -a stroke" gives each unique id it's own layer/color on output #582

Open
lewi0622 opened this issue Nov 19, 2022 · 2 comments
Milestone

Comments

@lewi0622
Copy link

Expectation: Keep stroke colors, but order the layers by "id" so that I can use occult across layers in the draw order of the original.

Issue: Order is preserved, but for each unique "id" a unique layer and color are generated, original stroke colors are overwritten.

Exact command executed as follows:
vpype read -a id -a stroke --no-crop "Line_Interrupted_seed_646429_colors_10_scale_2_346.svg" scaleto 10in 8in occult -i layout -l letter linemerge linesort reloop linesimplify write --color-mode layer "Line_Interrupted_seed_646429_colors_10_scale_2_346_PROCESSED.svg"

Line_Interrupted_seed_646429_colors_10_scale_2_346
Line_Interrupted_seed_646429_colors_10_scale_2_346_PROCESSED

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

abey79 commented Mar 10, 2023

This will be addressed by vpype 2.0's path-level metadata support.

@lewi0622
Copy link
Author

To correct my original issue. The stroke colors are only being overwritten because of "--color-mode layer". If that isn't used, it works fine.

My workflow for occulting overlapping colors is to assign id's to each line in the order it's drawn and process the file in two steps, the first just does occult using the id's layers, the second performs all other postprocessing using the stroke colors as layers.

  1. read -a id input.svg occult -i write input_PROCESSED.svg
  2. read -a stroke input_PROCESSED.svg scaleto 3.5in 3.5in layout -l 8.5x11in linemerge linesort reloop linesimplify write input_PROCESSED.svg

Would still look forward to being able to do it in just one step, where draw order could be maintained, even when parsing the stroke colors into layers.

Simple example files processed using this method:
Hex_Gone_seed_25099_colors_10_scale_1
Hex_Gone_seed_25099_colors_10_scale_1_PROCESSED

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