Invalid Cast

I am trying to fit in a TPMS geometry (gyroid, schwarz etc) into cylinder. I am giving the constructed tpms into basic cylinder as topology. But I am getting an error ‘invalid cast: mesh >> unitcell’

can’t help you without a gh file (13.0 KB)
I now want to fit this gyroid in a cylinder, basically make a cylindrical flow pipe with gyroids packed in it