Meander model of polymer melts and networks