diff --git a/cutter.py b/cutter.py index 83e72bb..6e0e2d0 100644 --- a/cutter.py +++ b/cutter.py @@ -92,8 +92,10 @@ def load_file(self, filename): self.plt.reset_settings() # send the PLT to the cutter - def cut(self): + def cut(self): + self.plt.scale = self.scale output = self.plt.build() + print(output) for line in output: response = self.send(line) @@ -109,7 +111,6 @@ def move_direction(self, direction): self.move(0, self.step_size) def move(self, x, y): - next_x = self.current_x + x next_y = self.current_y + y diff --git a/server.py b/server.py index f74db91..c268c8a 100644 --- a/server.py +++ b/server.py @@ -3,11 +3,12 @@ from werkzeug import secure_filename from cutter import Cutter -knk = Cutter() - UPLOAD_FOLDER = './static/svg/' ALLOWED_EXTENSIONS = set(['svg']) +knk = Cutter() +knk.load_file(UPLOAD_FOLDER+'pattern.svg') + app = Flask(__name__, static_url_path='') app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER