generate XYZBC gcode string to move from a point p to this point. return XYZB string
(self, self_systemXYZ, p)
| 8 | b: Optional[float] = None |
| 9 | |
| 10 | def XYZB_gcode(self, self_systemXYZ, p) -> float: |
| 11 | 'generate XYZBC gcode string to move from a point p to this point. return XYZB string' |
| 12 | s = '' |
| 13 | if self_systemXYZ.x != None and self_systemXYZ.x != p.x: |
| 14 | s += f'X{round(self_systemXYZ.x, 6):.6} ' |
| 15 | if self_systemXYZ.y != None and self_systemXYZ.y != p.y: |
| 16 | s += f'Y{round(self_systemXYZ.y, 6):.6} ' |
| 17 | if self_systemXYZ.z != None and self_systemXYZ.z != p.z: |
| 18 | s += f'Z{round(self_systemXYZ.z, 6):.6} ' |
| 19 | if self_systemXYZ.b != None and self_systemXYZ.b != p.b: |
| 20 | s += f'B{round(self_systemXYZ.b, 6):.6f} ' |
| 21 | return s if s != '' else None |
| 22 | |
| 23 | def inverse_kinematics(self, state): |
| 24 | 'calculate system XYZ for the current point XYZ (in part coordinates)' |