Extended multiscale FEM for design of beams and frames with complex topology