Commit 253f9249 authored by sumpfralle's avatar sumpfralle

removed erroneous usage of epsilon (introduced by me in r569) in cutter collision detection


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@714 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 0a5f423d
...@@ -151,7 +151,7 @@ class BaseCutter(object): ...@@ -151,7 +151,7 @@ class BaseCutter(object):
def intersect_cylinder_vertex(self, direction, point): def intersect_cylinder_vertex(self, direction, point):
(cl, ccp, cp, l) = self.intersect_cylinder_point(direction, point) (cl, ccp, cp, l) = self.intersect_cylinder_point(direction, point)
if ccp and ccp.z < self.center.z + epsilon: if ccp and ccp.z < self.center.z:
return (None, INFINITE, None) return (None, INFINITE, None)
return (cl, l, cp) return (cl, l, cp)
...@@ -171,7 +171,7 @@ class BaseCutter(object): ...@@ -171,7 +171,7 @@ class BaseCutter(object):
m = cp.sub(edge.p1).dot(edge.dir) m = cp.sub(edge.p1).dot(edge.dir)
if (m < -epsilon) or (m > edge.len + epsilon): if (m < -epsilon) or (m > edge.len + epsilon):
return (None, INFINITE, None) return (None, INFINITE, None)
if ccp.z < self.center.z + epsilon: if ccp.z < self.center.z:
return (None, INFINITE, None) return (None, INFINITE, None)
return (cl, l, cp) return (cl, l, cp)
...@@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License ...@@ -21,7 +21,7 @@ You should have received a copy of the GNU General Public License
along with PyCAM. If not, see <http://www.gnu.org/licenses/>. along with PyCAM. If not, see <http://www.gnu.org/licenses/>.
""" """
from pycam.Geometry.utils import INFINITE, sqrt, epsilon from pycam.Geometry.utils import INFINITE, sqrt
from pycam.Geometry.Point import Point, Vector from pycam.Geometry.Point import Point, Vector
from pycam.Geometry.intersection import intersect_circle_plane, \ from pycam.Geometry.intersection import intersect_circle_plane, \
intersect_circle_point, intersect_circle_line intersect_circle_point, intersect_circle_line
......
...@@ -201,7 +201,7 @@ class ToroidalCutter(BaseCutter): ...@@ -201,7 +201,7 @@ class ToroidalCutter(BaseCutter):
def intersect_cylinder_edge(self, direction, edge): def intersect_cylinder_edge(self, direction, edge):
(cl, ccp, cp, l) = self.intersect_cylinder_line(direction, edge) (cl, ccp, cp, l) = self.intersect_cylinder_line(direction, edge)
if ccp and ccp.z < self.center.z - epsilon: if ccp and ccp.z < self.center.z:
return (None, INFINITE, None) return (None, INFINITE, None)
if ccp: if ccp:
m = cp.sub(edge.p1).dot(edge.dir) m = cp.sub(edge.p1).dot(edge.dir)
......
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