def closest(self, position): """ Obtain a Cursor at the point closest to 'position' Finds the point on this PLine that's closest to the point 'position' and returns a Cursor at that point """ return PCursor(Cursor.cursorFromClosestPoint(self.line, position))
def minima(self, position): """ Find minimal points on line. returns a list of Cursors that are at all the places where this line reaches points that are minima of the distance function between this line and 'position' """ ll = Cursor.cursorsFromMinimalApproach(self.line, Vector2(position[0], position[1])) return [PCursor(x) for x in ll]
def minima(self, position): """ Find minimal points on line. returns a list of Cursors that are at all the places where this line reaches points that are minima of the distance function between this line and 'position' """ ll = Cursor.cursorsFromMinimalApproach( self.line, Vector2(position[0], position[1])) return [PCursor(x) for x in ll]
def split(self): a,b = Cursor.split(self) return (PLine(a), PLine(b))
def __init__(self, *x): Cursor.__init__(self, *x)
def split(self): a, b = Cursor.split(self) return (PLine(a), PLine(b))
def cursorAtPosition(self, position): """Returns a 'cursor' object for this line thats closest to this position """ return PCursor(Cursor.cursorFromClosestPoint(self, position))