Nonlinear thin-walled beams with a rectangular cross-section - Part I