General multilayer geometrically-exact beams and 1-D plates with piecewise linear section deformation