Commit 91ffeb24 authored by Guillaume Seguin's avatar Guillaume Seguin

Don't report infinite dimensions when there is no material

parent c2a60d20
...@@ -310,15 +310,15 @@ class GCode(object): ...@@ -310,15 +310,15 @@ class GCode(object):
zmin = min(zm, zmin) zmin = min(zm, zmin)
zmax = max(zM, zmax) zmax = max(zM, zmax)
self.xmin = xmin self.xmin = xmin if not math.isinf(xmin) else 0
self.xmax = xmax self.xmax = xmax if not math.isinf(xmax) else 0
self.ymin = ymin self.ymin = ymin if not math.isinf(ymin) else 0
self.ymax = ymax self.ymax = ymax if not math.isinf(ymax) else 0
self.zmin = zmin self.zmin = zmin if not math.isinf(zmin) else 0
self.zmax = zmax self.zmax = zmax if not math.isinf(zmax) else 0
self.width = xmax - xmin self.width = self.xmax - self.xmin
self.depth = ymax - ymin self.depth = self.ymax - self.ymin
self.height = zmax - zmin self.height = self.zmax - self.zmin
def estimate_duration(self): def estimate_duration(self):
lastx = lasty = lastz = laste = lastf = 0.0 lastx = lasty = lastz = laste = lastf = 0.0
......
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