This is the sort of technology necessary for a Moon settlement/factory and especially colonizing Mars.
The robot machine needs to be able to ingest lunar or Martian regolith and use those raw materials to form construction members such as pipes, plates, glass, etc.
On Mars, gleaning oxygen and water from the atmosphere would be a must.
Mars has oodles of oxygen.
Iron Oxide.......................