Help with GRASSHOPPER - hinges and bending(origami)


I am trying to achieve an origami effect such as shown in the photos below with kangaroo hinges and bending. Can anyone please check my GH code and figure out, why is it not working?

Thank you in advance!
Hinges.3dm (103.3 KB) (18.1 KB)

Interested in how-to regarding hinging. Did you develop GH method that you might share??