Example #1
0
 def process(self, p: EmbPattern) -> EmbPattern:
     copy = EmbPattern.EmbPattern()
     EmbPattern.set(p, copy)
     layer = copy.stitches
     for stitch in layer:
         stitch[0] = round(stitch[0] - self.translate_X)
         stitch[1] = round(stitch[1] - self.translate_Y)
     p.stitches = []
     p.threadlist = []
     self.write_code(copy, p)
     self.write_thread(copy, p)
     return p
Example #2
0
 def process(self, p):
     self.needle_x = 0
     self.needle_y = 0
     copy = EmbPattern.EmbPattern()
     EmbPattern.set(p, copy)
     layer = copy.stitches
     for stitch in layer:
         stitch[0] = round(stitch[0] - self.translate_x)
         stitch[1] = round(stitch[1] - self.translate_y)
     p.stitches = []
     p.threadlist = []
     self.write_code(copy, p)
     self.write_thread(copy, p)
     return p