Commit b8b5ab03 authored by Guillaume Seguin's avatar Guillaume Seguin

Fix Z measurement estimation

parent 8d2612e6
...@@ -93,6 +93,10 @@ class Layer(object): ...@@ -93,6 +93,10 @@ class Layer(object):
y = current_y + (y or 0) y = current_y + (y or 0)
z = current_z + (z or 0) z = current_z + (z or 0)
current_x = x or current_x
current_y = y or current_y
current_z = z or current_z
if line.e: if line.e:
if x: if x:
xmin = min(xmin, x) xmin = min(xmin, x)
...@@ -100,13 +104,9 @@ class Layer(object): ...@@ -100,13 +104,9 @@ class Layer(object):
if y: if y:
ymin = min(ymin, y) ymin = min(ymin, y)
ymax = max(ymax, y) ymax = max(ymax, y)
if z: if current_z:
zmin = min(zmin, z) zmin = min(zmin, current_z)
zmax = max(zmax, z) zmax = max(zmax, current_z)
current_x = x or current_x
current_y = y or current_y
current_z = z or current_z
else: else:
current_x = line.x or current_x current_x = line.x or current_x
......
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