process this instance in a list of steps supplied by the designer to generate and return a line of gcode
(self, state)
| 98 | return system_point |
| 99 | |
| 100 | def gcode(self, state): |
| 101 | 'process this instance in a list of steps supplied by the designer to generate and return a line of gcode' |
| 102 | self_systemXYZ = self.inverse_kinematics(state) |
| 103 | XYZB_str = self.XYZB_gcode(self_systemXYZ, state.point_systemXYZ) |
| 104 | if XYZB_str != None: # only write a line of gcode if movement occurs |
| 105 | G_str = 'G1 ' if state.extruder.on else 'G0 ' |
| 106 | F_str = state.printer.f_gcode(state) |
| 107 | E_str = state.extruder.e_gcode(self, state) |
| 108 | gcode_str = f'{G_str}{F_str}{XYZB_str}{E_str}' |
| 109 | state.printer.speed_changed = False |
| 110 | state.point.update_from(self) |
| 111 | state.point_systemXYZ.update_from(self_systemXYZ) |
| 112 | return gcode_str.strip() # strip the final space |
no test coverage detected