Beispiel #1
0
 def GetRadiusPointFromExt(self, x, y):
     """
         get The intersecrion point from the line(x,y,cx,cy) and the circle
     """
     _cx, _cy = self.center.getCoords()
     _r = self.radius
     centerPoint = Point(_cx, _cy)
     outPoint = Point(x, y)
     vector = Vector(outPoint, centerPoint)
     vNorm = vector.Norm()
     newNorm = abs(vNorm - _r)
     magVector = vector.Mag()
     magVector.Mult(newNorm)
     newPoint = magVector.Point()
     intPoint = Point(outPoint + newPoint)
     return intPoint.getCoords()