A method for compact and descriptive representation of teeth shape, or other shapes, in terms of characteristic curves and its application to generation of automatic designs within dental CAD software or other software is provided. In an embodiment, a method includes capturing tooth shape by a network of characteristic curves, such as margin lines. In an embodiment, a method includes compactly encoding curves as strings, which then can be indexed and searched efficiently by similarity. In an embodiment, a method includes retrieving high quality crown design proposals from a case repository based on similarity of margin line.