You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While building a complex command to address the painting use case (see discussion in #487), I uncovered multiple issues:
faulty doc management in block:
withstate.temp_document(keep_layer=False) asdoc:
This construct is wrong, because doc might be replaced by the nested workflow (after execute_processors). Best use state.document throughout.
splitdist doesn't appear to handle metadata properly
Experiment
I created a 3-color input file, with each layer named after the corresponding layer:
vpype random -l1 -n 200 -a 10cm 10cm name -l1 red color -l1 "#f00" random -l2 -n 200 -a 10cm 10cm name -l2 green color -l2 "#0f0" random -l3 -n 200 -a 10cm 10cm name -l3 blue color -l3 "#00f" write /tmp/multilayer.svg
Create 3 "well" files, using the same color names:
vpype circle 12cm 2cm 0.5cm pagesize -l 14x10cm write /tmp/well_red.svg
vpype circle 12cm 4cm 0.5cm pagesize -l 14x10cm write /tmp/well_green.svg
vpype circle 12cm 6cm 0.5cm pagesize -l 14x10cm write /tmp/well_blue.svg
Process each layer and insert corresponding well files every XXm:
vpype read /tmp/multilayer.svg forlayer eval "cur_color=_name" lmove %_lid% 1 splitdist 2m forlayer lmove %_lid% %_lid*2% read -l %_lid*2-1% /tmp/well_%cur_color%.svg end lmove all %_lid% end show
The text was updated successfully, but these errors were encountered:
While building a complex command to address the painting use case (see discussion in #487), I uncovered multiple issues:
This construct is wrong, because
doc
might be replaced by the nested workflow (afterexecute_processors
). Best usestate.document
throughout.splitdist
doesn't appear to handle metadata properlyExperiment
I created a 3-color input file, with each layer named after the corresponding layer:
Create 3 "well" files, using the same color names:
Process each layer and insert corresponding well files every XXm:
The text was updated successfully, but these errors were encountered: