Learning Based Toolpath Planner on Diverse Graphs for 3D Printing