Waffle structure not working in not planar surface

Hi! Hoping you could help me, I was trying to make this waffle structure but Ive been only able to do it in a planar plane. Do you know how could I make this curves with a curved surface? Thanks so much!!

prueba pilar.gh (22.5 KB)
prueba pilar.3dm (455.9 KB)