Is it okay to imitate machines produced by others?

As long as the imitation does not infringe the other party's patent, it is fine.

If imitation infringes upon the other party’s patent, according to Article 58 of the Patent Law, anyone who counterfeits another person’s patent shall, in addition to bearing civil liability in accordance with the law, be ordered by the patent management department to make corrections and According to the announcement, the illegal gains will be confiscated and a fine of not more than three times of the illegal gains may be imposed. If there are no illegal gains, a fine of not more than 50,000 yuan may be imposed. If a crime is constituted, criminal liability shall be pursued in accordance with the law.