A combined teat position and breeding rating determining arrangement is provided for a milking system comprising a milking stall (5) for housing the milking animal during milking, a movable robot arm (15) for automatically attaching teat cups to (11) the teats of the milking animal in the milking stall, and a control device (19) for controlling the movement of the robot arm based on determined positions of the teats of the milking animal. The arrangement comprises a three-dimensional camera (21) directed towards the udder of the milking animal in the milking stall and provided to repeatedly record three-dimensional images of the udder of the milking animal; and processing means (22) provided to repeatedly detect the teats of the milking animal and determine their positions based on the repeatedly recorded three-dimensional images. Further, the processing means is arranged to automatically determine the shapes of the teats of the milking animal based on the repeatedly recorded three-dimensional images and to calculate a breeding rating based on the determined shapes of the teats of the milking animal.