Commit e362e4d6 authored by sumpfralle's avatar sumpfralle

ignore PushCutter hits outside the bounding box


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@575 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent b84c5e39
...@@ -79,16 +79,16 @@ def get_free_paths_triangles(model, cutter, p1, p2): ...@@ -79,16 +79,16 @@ def get_free_paths_triangles(model, cutter, p1, p2):
for h in hits: for h in hits:
if h.dir == forward: if h.dir == forward:
if count == 0: if count == 0:
if h.d >= 0 - epsilon: if -epsilon <= h.d <= xyz_dist + epsilon:
if len(points) == 0: if len(points) == 0:
points.append(p1) points.append(p1)
points.append(h.cl) points.append(h.cl)
count += 1 count += 1
else: else:
count -= 1 if count == 1:
if count == 0: if -epsilon <= h.d <= xyz_dist + epsilon:
if h.d <= xyz_dist + epsilon:
points.append(h.cl) points.append(h.cl)
count -= 1
if len(points)%2 == 1: if len(points)%2 == 1:
points.append(p2) points.append(p2)
......
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