1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-06-03 05:12:01 +03:00

sfc/slicer.py: when flipping, also flip Z positions used for selecting levels

This led to toolpaths full of strange yet almost imperceptible errors
along the Z axis, just on the edge of what could be explained by
machining tolerances.
This commit is contained in:
Werner Almesberger 2015-01-20 03:19:22 -03:00
parent ed0129df1e
commit 4cc43e1661

View File

@ -150,7 +150,10 @@ max_nz = 0
inclined = 0
for facet in mesh.Facets:
if abs(facet.Normal.z) >= 1 - epsilon:
z_raw[facet.Points[0][2]] = 1
z = facet.Points[0][2]
if flip:
z = bb.ZMax - z + bb.ZMin
z_raw[z] = 1
else:
nz = abs(facet.Normal.z)
if nz > epsilon: