Hexagonal surface-with triangular pattern

Hello
I did a grasshopper tutorial of how to créate a suqared Surface divided into triangles to create a roof that can be moved on Z position X and Y

Here is the link of the video from where i got the code of the roof grasshopper tutorial - YouTube

Then i wanted to apllied the same parameters of the code, that are applied to an suqared Surface but to an hexagonal Surface but the GH wont let me, it Stil create a rectangular o squared surace.

How could i change those parameters so it can create the Surface on the hexagonal Surface selected on RIHNO


20191021-Cubierta.gh (21.4 KB)