Following this discussion,
here a little cluster that generate an extrudes polygon to generate a polyhedron with lateral squares.
Some connections are put on the sides and of the top/bottom faces.
If you choose 3 sided polygon, just connections on the side and 0° of rotation on the side you’ll have
If Side and Top
If 90° rotation
Pentagon on plane
And you can combine