Skip to content

Commit

Permalink
Code update
Browse files Browse the repository at this point in the history
  • Loading branch information
marmni committed Mar 5, 2016
1 parent 7f4729c commit 6cb9b85
Show file tree
Hide file tree
Showing 13 changed files with 1,038 additions and 629 deletions.
12 changes: 8 additions & 4 deletions PCBobjects.py
Expand Up @@ -1210,8 +1210,8 @@ def addArc3P(self, p1, p2, p3):
#def addArc_v2(self, p1, p2, curve, width=0, cap='round'):
#return self.spisObiektowTXT[-1]['objects'].append(['arcV2', p1, p2, curve, width, cap])

def addElipse(self, x, y, r1, r2):
self.spisObiektowTXT[-1]['objects'].append(['elipse', x, y, r1, r2])
def addElipse(self, x, y, r1, r2, w=0):
self.spisObiektowTXT[-1]['objects'].append(['elipse', x, y, r1, r2, w])

################
################
Expand Down Expand Up @@ -1318,11 +1318,15 @@ def makePolygon(self, obj):
y = i[2]
r1 = i[3]
r2 = i[4]
w = i[4]

if r2 > r1:
obj['rotations'].append([x, y, 90])

data.append(self.createElipse(x, y, r1, r2))

if w > 0:
data.append(self.createElipse(x, y, r1 + w / 2., r2 + w / 2.))
else:
data.append(self.createElipse(x, y, r1, r2))
elif i[0] == 'line':
x1 = i[1]
y1 = i[2]
Expand Down

0 comments on commit 6cb9b85

Please sign in to comment.