コード例 #1
0
 def intersect_circle_line(self, direction, edge, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_circle_line(
         padd(psub(start, self.location), self.center), self.axis,
         self.distance_radius, self.distance_radiussq, direction, edge)
     if ccp:
         cl = padd(cp, psub(start, ccp))
         return (cl, ccp, cp, l)
     return (None, None, None, INFINITE)
コード例 #2
0
 def intersect_circle_line(self, direction, edge, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_circle_line(start, self.axis,
             self.distance_majorradius, self.distance_majorradiussq,
             direction, edge)
     if ccp:
         cl = cp.sub(ccp.sub(start))
         return (cl, ccp, cp, l)
     return (None, None, None, INFINITE)
コード例 #3
0
ファイル: ToroidalCutter.py プロジェクト: stevegt/pycam
 def intersect_circle_line(self, direction, edge, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_circle_line(start, self.axis,
             self.distance_majorradius, self.distance_majorradiussq,
             direction, edge)
     if ccp:
         cl = psub(cp, psub(ccp, start))
         return (cl, ccp, cp, l)
     return (None, None, None, INFINITE)
コード例 #4
0
ファイル: CylindricalCutter.py プロジェクト: I--Fox--I/pycam
 def intersect_circle_line(self, direction, edge, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_circle_line(
             start.sub(self.location).add(self.center), self.axis,
             self.distance_radius, self.distance_radiussq, direction, edge)
     if ccp:
         cl = cp.add(start.sub(ccp))
         return (cl, ccp, cp, l)
     return (None, None, None, INFINITE)