@nebulaglitch/gcode
Version:
A library to generate gcode output
27 lines (24 loc) • 808 B
JavaScript
import Command from '../command.js';
import Argument from '../argument.js';
class CutGCircle extends Command {
constructor(d = null, x = null, y = null, unknown1 = null, unknown2 = null, unknown3 = null, direction = null, i = null, j = null){
super('G', direction == 1 ? 2 : 3);
if (x !== null) {
this.args.push(new Argument('X', x));
}
if (y !== null) {
this.args.push(new Argument('Y', y));
}
if (d !== null) {
this.args.push(new Argument('R', d / 2));
}
if (i !== null) {
this.args.push(new Argument('I', i));
}
if (j !== null) {
this.args.push(new Argument('J', j));
}
}
}
export { CutGCircle as default };
//# sourceMappingURL=cutgcircle.js.map