Skip to content

Commit

Permalink
added scale and load initial file at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuraca committed Feb 2, 2016
1 parent 68715dd commit b3e8db9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions cutter.py
Expand Up @@ -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)
Expand All @@ -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

Expand Down
5 changes: 3 additions & 2 deletions server.py
Expand Up @@ -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

Expand Down

0 comments on commit b3e8db9

Please sign in to comment.