The positions of orthodontic appliances such as brackets and buccal tubes on a patients teeth are determined using digital data that represents the shapes of the patients teeth. Certain landmarks of the teeth such as the marginal ridges are determined using software, and the software adjusts positions of the virtual appliances on the teeth as needed in order to bring the marginal ridges into proper alignment at the conclusion of treatment. The resulting positions are optionally used to determine the location of the appliances in an indirect bonding apparatus such as a transfer tray.