Automatic CNC toolpath generator for 2.5D parts