UNPKG

@nebulaglitch/gcode

Version:
31 lines (26 loc) 991 B
'use strict'; Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } }); const command = require('../command.cjs'); const argument = require('../argument.cjs'); class CutGCircle extends command.default { 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.default('X', x)); } if (y !== null) { this.args.push(new argument.default('Y', y)); } if (d !== null) { this.args.push(new argument.default('R', d / 2)); } if (i !== null) { this.args.push(new argument.default('I', i)); } if (j !== null) { this.args.push(new argument.default('J', j)); } } } exports.default = CutGCircle; //# sourceMappingURL=cutgcircle.cjs.map