Commit 5f005bfe authored by Nicholas Gar Hei Chan's avatar Nicholas Gar Hei Chan
Browse files

Indentation fixes

parent d454cac2
......@@ -94,8 +94,7 @@ class Layer():
self.prev_e = 0
self.prev_g = -1
self.z_height = z_height
self.sample_points = dict([('x', []), ('y', [])])
self.sample_points = dict([('x', []), ('y', [])])
def append_coords(self, x, y, e, g):
"""
......@@ -199,8 +198,8 @@ class Layer():
x_pts = [points['x'][i] for i in sample_pts]
y_pts = [points['y'][i] for i in sample_pts]
self.sample_points = dict([('x', x_pts), ('y', y_pts)])
if method == "none":
self.sample_points dict([('x', []), ('y', [])])
if method == "none":
self.sample_points = dict([('x', []), ('y', [])])
def parse_gcode(filename, sample_spacing, samples_per_layer):
layers = []
......
......@@ -12,7 +12,7 @@ sys.path.append(os.path.abspath(".."))
import gcodeparser as gcp
start = time.time()
model = gcp.parse_gcode(os.path.abspath("LM_rocktopus.gcode"))
model = gcp.parse_gcode(os.path.abspath("LM_rocktopus.gcode"), 5, 10)
print("Execution time: {} seconds".format(time.time()-start))
layer = model.layers[10]
......@@ -24,8 +24,6 @@ sample_pts = list(np.random.randint(0,pts['num_pts'],num_samples))
#model.layers[10].plot_layer()
layer.get_sample_points('random', 10)
for pt in sample_pts:
plt.plot(pts['x'][pt], pts['y'][pt], 'ro')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment