From 84889441f3c48e1d8cd304e59ae430936196dc14 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 21 Jan 2015 02:35:59 -0300 Subject: [PATCH] sfc/slicer.py: when height is used as coordinate, correct it for the Z offset --- sfc/slicer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfc/slicer.py b/sfc/slicer.py index 4c2210c..14c6e49 100755 --- a/sfc/slicer.py +++ b/sfc/slicer.py @@ -208,11 +208,11 @@ if height is not None: # if height is not None and height > 0: - last_z = height + last_z = height - z_off else: last_z = None if height is not None and height < 0 and z_levels[-1] > height: - z_levels.append(height) + z_levels.append(height - z_off) for next_z in z_levels: wires = shape.slice(Base.Vector(0, 0, 1), next_z + epsilon)