mirror of
git://projects.qi-hardware.com/cae-tools.git
synced 2024-12-22 23:26:27 +02:00
sfc/slicer.py: add overshoot only after slicing
Otherwise, we slice below the bottom of the piece , which probably won't go too well ..
This commit is contained in:
parent
a20499bb9f
commit
dc79b03b1d
@ -217,17 +217,18 @@ else:
|
|||||||
if height is not None and height < 0 and z_levels[-1] > height:
|
if height is not None and height < 0 and z_levels[-1] > height:
|
||||||
z_levels.append(height - z_off)
|
z_levels.append(height - z_off)
|
||||||
|
|
||||||
z_levels[-1] += end
|
for i in range(0, len(z_levels)):
|
||||||
|
next_z = z_levels[i]
|
||||||
for next_z in z_levels:
|
|
||||||
wires = shape.slice(Base.Vector(0, 0, 1), next_z + epsilon)
|
wires = shape.slice(Base.Vector(0, 0, 1), next_z + epsilon)
|
||||||
|
if i == len(z_levels) - 1:
|
||||||
|
next_z += end
|
||||||
if z_step is None or last_z is None or last_z - z_step <= next_z:
|
if z_step is None or last_z is None or last_z - z_step <= next_z:
|
||||||
dump_level(wires, next_z + z_off)
|
dump_level(wires, next_z + z_off)
|
||||||
else:
|
else:
|
||||||
d = last_z - next_z
|
d = last_z - next_z
|
||||||
n = int(d // z_step) + 1
|
n = int(d // z_step) + 1
|
||||||
for i in range(0, n):
|
for j in range(0, n):
|
||||||
dump_level(wires, last_z - (i + 1) * (d / n) + z_off)
|
dump_level(wires, last_z - (j + 1) * (d / n) + z_off)
|
||||||
last_z = next_z
|
last_z = next_z
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user