Skip to content

Extra layer when running two read/writes within one pipeline #695

Answered by abey79
lewi0622 asked this question in Q&A
Discussion options

You must be logged in to vote

This is working as intended.

The write command does not flush the pipeline, so the result of the initial read + occult (ie 3 layers) is still in the pipeline by the time you reach forlayer. The second read just adds (redundant) lines in layer 1 and 2. You can see that for yourself by inserting a show command:

vpype \
read -a id 'C://Users//lewi0//Downloads//Demo1.svg'  occult  -i  write 'C://Users//lewi0//Downloads//Demo1_PROCESSED.svg' \
show \
read -a stroke 'C://Users//lewi0//Downloads//Demo1_PROCESSED.svg'  \
eval "k=0" \
forlayer write "C://Users//lewi0//Downloads//Demo1_PROCESSED"%_i%".svg" end

It's possible to run the pipeline in a single line, but it requires the knowledge of whi…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lewi0622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #694 on February 12, 2024 07:22.