inkstitch / pyembroidery

libembroidery/EmbroideryFormats converted to python
MIT License
72 stars 28 forks source link

Read and Write, Needle for Color_Change. #45

Open tatarize opened 5 years ago

tatarize commented 5 years ago

One of the few breaking changes that might be doable. Reading color change commands could and maybe should be flagged with the needle provided. Some formats like .u01 overtly give this information and might be needed to express where sequins should be in particular layers where that information is not overtly given within the format but where the sequins are linked to a particular needle. Such information would be unrecoverable without storing the needle number present in the format command statement. Writing this information wouldn't require any breaks it would just use null-op for color and default to the current behavior, but loading would be flagged with additional information and rather than command == COLOR_CHANGE, command == (COLOR_CHANGE & COMMAND_MASK), could break some elements that failed to account for that.

This could also be triggered optionally, by loading with some settings flag that basically means give the needle number used. Also it is typical in many formats that STOP is actually encoded by selected the same needle back to back.