The method shown flips the entire part to vertical. To make the bend you need to edit the code to rotate one half relative to the other. (I assume you have modeled the two parts out of slabs.)
If you want to do it entirely without writing code, you can make each half as a separate part, place them together and resave the two as a single part.