Hi,
I've checked your file and have made a few changes in order to achieve the result.

The logic that you use for making the model is not the best one. Its better to have the X of the array along the length of the roof and the Y aligned to the height. This is just an advise for better workflow and i did not change it in the model.
Here are the changes I've made in the generator:

1. First and ground-braking is that you should use "Extent X/Y Size to Area" for such purposes.
2. The "Y Mode" should be "Aligned".
3. "Auto align" should be set on "to Spline". With this approach you can rotate the roof as you wish and this would not effect the Array. The RC object will take the spline orientation instead of the world (X, Y).
I've also added "Scale final Y segment" so the RC doesn't cut the final segment and it fits perfectly.
And the last but not least - as Rokas just mentioned, you should always have a bigger surface so the RC can evaluate the vertices properly. When it the size if the area and the surface are the same, it is much harder to define the edge.

This looks like a beginning if an interesting shot. Good luck!
Best regards,
Kiril Alexandrov