MCPcopy Create free account
hub / github.com/FullControlXYZ/fullcontrol / gcode

Method gcode

lab/fullcontrol/multiaxis/gcode/XYZB/point.py:100–112  ·  view source on GitHub ↗

process this instance in a list of steps supplied by the designer to generate and return a line of gcode

(self, state)

Source from the content-addressed store, hash-verified

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

Callers 1

gcodeFunction · 0.45

Calls 5

inverse_kinematicsMethod · 0.95
XYZB_gcodeMethod · 0.95
e_gcodeMethod · 0.80
update_fromMethod · 0.80
f_gcodeMethod · 0.45

Tested by

no test coverage detected