Path Planning for Product Function Transformation based on Kruskal Algorithm