EmbroidePy / pyembroidery

pyembroidery library for reading and writing a variety of embroidery formats.
MIT License
195 stars 35 forks source link

1.3.0 Breaking Corrections #5

Closed tatarize closed 6 years ago

tatarize commented 6 years ago

Convert OPTION_ENABLE_TIE_ON OPTION_ENABLE_TIE_OFF to contingency based settings, allowing for other types of tie ons.

CONTINGENCY_TIEON_NONE CONTINGENCY_TIEON_THREE_SMALL

CONTINGENCY_TIEOFF_NONE CONTINGENCY_TIEOFF_THREE_SMALL


Rename: CONTINGENCY_NONE = 0xF0 CONTINGENCY_JUMP_NEEDLE = 0xF1 CONTINGENCY_SEW_TO = 0xF2

To: CONTINGENCY_LONGSTITCH_NONE = 0xF0 CONTINGENCY_LONGSTITCH_JUMP_NEEDLE = 0xF1 CONTINGENCY_LONGSTITCH_SEW_TO = 0xF2


Explicit Trim defaults to False.


COLOR_CHANGE gets needle selections. COLOR_CHANGE = 5 NEEDLE_1 = 0x100 NEEDLE_2 = 0x200 NEEDLE_3 = 0x300 NEEDLE_4 = 0x400 ... NEEDLE_CHANGE_1 = COLOR_CHANGE | NEEDLE_1 NEEDLE_CHANGE_2 = COLOR_CHANGE | NEEDLE_2 NEEDLE_CHANGE_3 = COLOR_CHANGE | NEEDLE_3 NEEDLE_CHANGE_4 = COLOR_CHANGE | NEEDLE_4 ...

These should apply both reading and writing. However, simply using & COMMAND_MASK will convert these more specific commands into simple COLOR_CHANGE commands.

tatarize commented 6 years ago

PEC GRAPHIC names to pec_graphic_0...

The current methods use 0, 1, 2, 3.

tatarize commented 6 years ago

BRO. DAT (Barudan), U01, DSZ, FXY, GT, KSM, STC all have needle changes. Some of these specifically read needle changes but had no method of encoding them.

tatarize commented 6 years ago

MATRIX_ROTATE and MATRIX_SCALE do so from the current position within the commands rather than the origin. Adding MATRIX_ROTATE_ORIGIN and MATRIX_SCALE_ORIGIN for these values. This should permit some turtle graphics direct applications being added, as such. But, more properly is the way that should have been originally.

tatarize commented 6 years ago

CSV helpful files to get command dictionaries are to be moved to the constants file.