Example #1
0
 def intersect_torus_plane(self, direction, triangle, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_torus_plane(
         padd(psub(start, self.location),
              self.center), self.axis, self.distance_majorradius,
         self.distance_minorradius, direction, triangle)
     if cp:
         cl = padd(cp, psub(start, ccp))
         return (cl, ccp, cp, l)
     return (None, None, None, INFINITE)
Example #2
0
 def intersect_torus_plane(self, direction, triangle, start=None):
     if start is None:
         start = self.location
     (ccp, cp, l) = intersect_torus_plane(
             padd(psub(start, self.location), self.center),
             self.axis, self.distance_majorradius, self.distance_minorradius, direction,
             triangle)
     if cp:
         cl = padd(cp, psub(start, ccp))
         return (cl, ccp, cp, l)
     return (None, None, None, INFINITE)