Rotated Brep Enclosures

Hello all,
I’m trying to create connected breps that form an enclosed polyhedron.
I start with a pyramid:

I then rotate the sloped breps “upward”:

I now what to create enclosing faces between the new rotated breps and the original non-rotated breps (but not between adjacent breps).
I’m attaching my script (24.4 KB)

try this

This worked great! Thank you. I’m still learning grasshopper. Is there another way you’d approach this type of process? I think the code I sent is pretty rough…

i think there are many ways to create that but using mesh like in your example is not good as using surfaces (21.5 KB)

This is great! Thank you! I’ll be sure to help others when I am able.