Customizable Strange 3D Line Fractal

This fractal uses a 2D line to describe the 3D object each face is replaced with. Not all lines can produce a manifold mesh, some tweaking is required to find suitable values. This fractal is not what I had originally planned, but it can produce some interesting results, only in higher recursions it creates to many thin parts.
Edit: Height calculation was wrong, fixed it