Skip to content

Commit

Permalink
Added locale information
Browse files Browse the repository at this point in the history
  • Loading branch information
vlachoudis committed Nov 23, 2015
1 parent 87eb783 commit b40f640
Show file tree
Hide file tree
Showing 25 changed files with 587 additions and 586 deletions.
8 changes: 5 additions & 3 deletions CNC.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: latin1 -*-
# -*- coding: ascii -*-
# $Id: CNC.py,v 1.8 2014/10/15 15:03:49 bnv Exp $
#
# Author: vvlachoudis@gmail.com
Expand Down Expand Up @@ -504,6 +504,7 @@ def __init__(self):
"TLO" : 0.,
}
self.initPath()
self.resetAllMargins()

#----------------------------------------------------------------------
# Update G variables from "G" string
Expand Down Expand Up @@ -611,8 +612,6 @@ def initPath(self, x=None, y=None, z=None):
self.totalLength = 0.0
self.totalTime = 0.0

self.resetAllMargins()

#----------------------------------------------------------------------
def resetEnableMargins(self):
# Selected blocks margin
Expand Down Expand Up @@ -1938,6 +1937,7 @@ def load(self, filename=None):
except: return False
self._lastModified = os.stat(self.filename).st_mtime
self.cnc.initPath()
self.cnc.resetAllMargins()
self._blocksExist = False
for line in f:
self._addLine(line[:-1].replace("\x0d",""))
Expand Down Expand Up @@ -2723,6 +2723,7 @@ def drill(self, items, depth=None, peck=None, dwell=None):
for bid in items:
block = self.blocks[bid]
if block.name() in ("Header", "Footer"): continue
block.enable = True

# construct new name
undoinfo.append(self.addBlockOperationUndo(bid, opname))
Expand Down Expand Up @@ -2838,6 +2839,7 @@ def cut(self, items, depth=None, stepz=None, surface=None):
for bid in items:
block = self.blocks[bid]
if block.name() in ("Header", "Footer"): continue
block.enable = True
newpath = []
newblock = Block(block.name())
for path in self.toPath(bid):
Expand Down
4 changes: 3 additions & 1 deletion CNCCanvas.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: latin1 -*-
# -*- coding: ascii -*-
# $Id: CNCCanvas.py,v 1.7 2014/10/15 15:04:06 bnv Exp $
#
# Author: vvlachoudis@gmail.com
Expand Down Expand Up @@ -862,6 +862,7 @@ def initPosition(self):
self._vector = None
self._items.clear()
self.cnc.initPath()
self.cnc.resetAllMargins()

#----------------------------------------------------------------------
def _drawGantry(self, x, y):
Expand Down Expand Up @@ -1161,6 +1162,7 @@ def drawPaths(self):

self._last = (0.,0.,0.)
self.initPosition()
self.cnc.resetAllMargins()
drawG = self.draw_rapid or self.draw_paths or self.draw_margin
for i,block in enumerate(self.gcode.blocks):
start = True # start location found
Expand Down
2 changes: 1 addition & 1 deletion CNCList.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: latin1 -*-
# -*- coding: ascii -*-
# $Id: CNCEditor.py,v 1.9 2014/10/15 15:04:38 bnv Exp $
#
# Author: vvlachoudis@gmail.com
Expand Down
3 changes: 1 addition & 2 deletions CNCRibbon.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/usr/bin/python
# -*- coding: latin1 -*-
# -*- coding: ascii -*-
# $Id$
#
# Author: vvlachoudis@gmail.com
Expand Down
Loading

0 comments on commit b40f640

Please sign in to comment.