Skip to content

Commit

Permalink
Copy blocks copy also tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
vlachoudis committed Jan 25, 2016
1 parent 71d2227 commit 8ed1efa
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions CNC.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,9 +1568,14 @@ def __init__(self, x, y, dx, dy, z):
self.dx = dx
self.dy = dy
self.z = z # z to raise within the tab
self.path = None
# self.slope = 45 # cutting z-slope as entry/exit
# self.create()

#----------------------------------------------------------------------
def copy(self, src):
self.x = src.x # x,y limits of a square tab
self.y = src.y
self.dx = src.dx
self.dy = src.dy
self.z = src.z # z to raise within the tab

#----------------------------------------------------------------------
def __str__(self):
Expand Down Expand Up @@ -1714,7 +1719,9 @@ def copy(self, src):
self._name = src._name
self.enable = src.enable
self.expand = src.expand
self.tabs = src.tabs[:]
self.tabs = []
for tab in src.tabs:
self.tabs.append(Tab(tab.x, tab.y, tab.dx, tab.dy, tab.z))
self[:] = src[:]
self._path = []
self.sx = src.sx
Expand Down

0 comments on commit 8ed1efa

Please sign in to comment.