A topology optimization approach applied to metamaterial mechanism design