def copy(self) -> 'Object': """Copy and pastes object in the scene. The object is copied together with all its associated calculation objects and associated scripts. :return: The new pasted object. """ return self.__class__((sim.simCopyPasteObjects([self._handle], 0)[0]))
def copy(self) -> 'RobotComponent': """Copy and pastes the arm in the scene. The arm is copied together with all its associated calculation objects and associated scripts. :return: The new pasted arm. """ # Copy whole model handle = sim.simCopyPasteObjects([self._handle], 1)[0] name = sim.simGetObjectName(handle) # Find the number of this arm num = name[name.rfind('#') + 1:] if len(num) > 0: num = int(num) + 1 else: num = 0 return self.__class__(num)