How to create individual shaped tunnel by using a curve? I try to create a square shaped tunnel with the help of a curve and a cube, i have this path curve:



And i try to use the cube to create a tunnel or closed mesh which looks something like this:



I was able to create a circle shaped tunnel by changing the object data of the curve: 


But is it possible to use individual forms to create tunnels?
I tried it with using a curve modifier in addition with an array modifier, but the result is ugly.
You can do this by using a square shaped bezier circle (no oxymoron here as you'll soon see):

First add a bezier circle (Add --> Curve --> Circle)


Then go to edit mode (Tab), select all the control points (A), then press V --> Vector, to make all the corners sharp.



While still in edit mode, rotate the circle along the Z axis by 45 degrees (R --> Z --> 45 ).



Now use this circle as a bevel object for your tunnel curve:


Scale the circle (S) to adjust the size.

You can manipulate this circle to change the shape of the tunnel's profile whichever way you'd like.