How can I map each mesh to the curve in this box

How can I map each grid to the curve in this box, just like the picture effect



kangaroo布装置1.gh (23.3 KB)
kangaroo布装置提问版.3dm (19.0 MB)