Skip to content

Commit

Permalink
A better fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
senthurayyappan committed Jul 31, 2020
1 parent b33ac7f commit 84b7d63
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,18 @@ def execute(self, context):
y = round(float(match.group('Y')), 3)
g = int(match.group('G'))

vertices[i].append((g, round(x, 3), round(y, 3), z))
else:
print(line)
if g == 0:
if j+1 < len(layer):
if sub_pattern.search(layer[j+1]).group('G') != '0':
vertices[i].append((g, round(x, 3), round(y, 3), z))
else:
vertices[i].append((g, round(x, 3), round(y, 3), z))

else:
vertices[i].append((g, round(x, 3), round(y, 3), z))

vertices.append([])

# SAFETY NET
for i in range(0, len(vertices)):
for j in range(0, len(vertices[i])):
if j+1 < len(vertices[i]):
if vertices[i][j][0] == 0 and vertices[i][j+1][0] == 0:
vertices[i].pop(j)

count = 1
for _batch in self.batches(vertices, batch_size):
for _layer in _batch:
Expand Down

0 comments on commit 84b7d63

Please sign in to comment.