summaryrefslogtreecommitdiff
path: root/lib/stitch_plan/trim.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-07-25 21:21:24 -0400
committerGitHub <noreply@github.com>2018-07-25 21:21:24 -0400
commitf1478556565f2e23150c86b17e6e170edc217d23 (patch)
tree4e652bde1122f44f360e140b696cb0eb81a7e9e1 /lib/stitch_plan/trim.py
parent82c06cceda54d559e78792e5284f3520908142ed (diff)
parent1bd7aa110a1b30a6c44f4d792b3c817e10234c07 (diff)
Merge pull request #234 from inkstitch/lexelby-integrate-pyembroidery
switch from libembroidery to pyembroidery
Diffstat (limited to 'lib/stitch_plan/trim.py')
-rw-r--r--lib/stitch_plan/trim.py23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/stitch_plan/trim.py b/lib/stitch_plan/trim.py
deleted file mode 100644
index f692a179..00000000
--- a/lib/stitch_plan/trim.py
+++ /dev/null
@@ -1,23 +0,0 @@
-def process_trim(color_block, next_stitch):
- """Handle the "trim after" checkbox.
-
- DST (and maybe other formats?) has no actual TRIM instruction.
- Instead, 3 sequential JUMPs cause the machine to trim the thread.
-
- To support both DST and other formats, we'll add a TRIM and two
- JUMPs. The TRIM will be converted to a JUMP by libembroidery
- if saving to DST, resulting in the 3-jump sequence.
- """
-
- delta = next_stitch - color_block.last_stitch
- delta = delta * (1/4.0)
-
- pos = color_block.last_stitch
-
- for i in xrange(3):
- pos += delta
- color_block.add_stitch(pos.x, pos.y, jump=True)
-
- # first one should be TRIM instead of JUMP
- color_block.stitches[-3].jump = False
- color_block.stitches[-3].trim = True