Aim The embroidery sequence algorithm of different patterns are researched in the development of software for computer uided embroidery. Methods The algorithm are analysed with the related theories of graph and tree. Results A reasonable algorithm of embroidery sequence is put forward. Conclusion Various harsh problems in the course of software development can be solved with the theories of graph and data structure.