Commit abd56970 authored by Guillaume Seguin's avatar Guillaume Seguin

Make path_width and path_height dynamically changeable

parent 85de40f8
...@@ -306,6 +306,9 @@ class GcodeModel(Model): ...@@ -306,6 +306,9 @@ class GcodeModel(Model):
use_vbos = True use_vbos = True
loaded = False loaded = False
path_halfwidth = 0.2
path_halfheight = 0.2
def load_data(self, model_data, callback=None): def load_data(self, model_data, callback=None):
t_start = time.time() t_start = time.time()
...@@ -378,8 +381,9 @@ class GcodeModel(Model): ...@@ -378,8 +381,9 @@ class GcodeModel(Model):
move_normal_x = - delta_y / norm move_normal_x = - delta_y / norm
move_normal_y = delta_x / norm move_normal_y = delta_x / norm
path_halfwidth = 0.2 # FIXME: compute these dynamically
path_halfheight = 0.12 path_halfwidth = self.path_halfwidth * 1.2
path_halfheight = self.path_halfheight * 1.2
new_indices = [] new_indices = []
new_vertices = [] new_vertices = []
......
Markdown is supported
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