@duet3d/objectmodel 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +504 -0
- package/README.md +7 -0
- package/lib/ModelCollection.d.ts +25 -0
- package/lib/ModelCollection.js +79 -0
- package/lib/ModelDictionary.d.ts +28 -0
- package/lib/ModelDictionary.js +68 -0
- package/lib/ModelObject.d.ts +35 -0
- package/lib/ModelObject.js +155 -0
- package/lib/boards/index.d.ts +49 -0
- package/lib/boards/index.js +78 -0
- package/lib/directories/index.d.ts +11 -0
- package/lib/directories/index.js +17 -0
- package/lib/fans/index.d.ts +17 -0
- package/lib/fans/index.js +28 -0
- package/lib/heat/Heater.d.ts +24 -0
- package/lib/heat/Heater.js +32 -0
- package/lib/heat/HeaterModel.d.ts +20 -0
- package/lib/heat/HeaterModel.js +31 -0
- package/lib/heat/HeaterMonitor.d.ts +17 -0
- package/lib/heat/HeaterMonitor.js +26 -0
- package/lib/heat/index.d.ts +10 -0
- package/lib/heat/index.js +16 -0
- package/lib/httpEndpoints/index.d.ts +18 -0
- package/lib/httpEndpoints/index.js +26 -0
- package/lib/index.d.ts +44 -0
- package/lib/index.js +59 -0
- package/lib/inputs/CodeChannel.d.ts +15 -0
- package/lib/inputs/CodeChannel.js +19 -0
- package/lib/inputs/Compatibility.d.ts +9 -0
- package/lib/inputs/Compatibility.js +13 -0
- package/lib/inputs/InputChannel.d.ts +27 -0
- package/lib/inputs/InputChannel.js +36 -0
- package/lib/job/Build.d.ts +14 -0
- package/lib/job/Build.js +25 -0
- package/lib/job/GCodeFileInfo.d.ts +16 -0
- package/lib/job/GCodeFileInfo.js +22 -0
- package/lib/job/ThumbnailInfo.d.ts +14 -0
- package/lib/job/ThumbnailInfo.js +22 -0
- package/lib/job/index.d.ts +36 -0
- package/lib/job/index.js +52 -0
- package/lib/limits/index.d.ts +28 -0
- package/lib/limits/index.js +34 -0
- package/lib/messages/index.d.ts +12 -0
- package/lib/messages/index.js +26 -0
- package/lib/move/Axis.d.ts +51 -0
- package/lib/move/Axis.js +59 -0
- package/lib/move/DriverId.d.ts +7 -0
- package/lib/move/DriverId.js +29 -0
- package/lib/move/Extruder.d.ts +26 -0
- package/lib/move/Extruder.js +37 -0
- package/lib/move/InputShaping.d.ts +18 -0
- package/lib/move/InputShaping.js +26 -0
- package/lib/move/Microstepping.d.ts +5 -0
- package/lib/move/Microstepping.js +11 -0
- package/lib/move/MoveCalibration.d.ts +10 -0
- package/lib/move/MoveCalibration.js +21 -0
- package/lib/move/MoveCompensation.d.ts +29 -0
- package/lib/move/MoveCompensation.js +46 -0
- package/lib/move/index.d.ts +46 -0
- package/lib/move/index.js +69 -0
- package/lib/move/kinematics/CoreKinematics.d.ts +8 -0
- package/lib/move/kinematics/CoreKinematics.js +29 -0
- package/lib/move/kinematics/DeltaKinematics.d.ts +19 -0
- package/lib/move/kinematics/DeltaKinematics.js +39 -0
- package/lib/move/kinematics/HangprinterKinematics.d.ts +8 -0
- package/lib/move/kinematics/HangprinterKinematics.js +25 -0
- package/lib/move/kinematics/KinematicsBase.d.ts +36 -0
- package/lib/move/kinematics/KinematicsBase.js +55 -0
- package/lib/move/kinematics/PolarKinematics.d.ts +6 -0
- package/lib/move/kinematics/PolarKinematics.js +19 -0
- package/lib/move/kinematics/ScaraKinematics.d.ts +5 -0
- package/lib/move/kinematics/ScaraKinematics.js +16 -0
- package/lib/move/kinematics/index.d.ts +7 -0
- package/lib/move/kinematics/index.js +48 -0
- package/lib/network/NetworkInterface.d.ts +27 -0
- package/lib/network/NetworkInterface.js +36 -0
- package/lib/network/index.d.ts +12 -0
- package/lib/network/index.js +19 -0
- package/lib/plugins/PluginManifest.d.ts +59 -0
- package/lib/plugins/PluginManifest.js +112 -0
- package/lib/plugins/index.d.ts +7 -0
- package/lib/plugins/index.js +13 -0
- package/lib/scanner/index.d.ts +13 -0
- package/lib/scanner/index.js +21 -0
- package/lib/sensors/AnalogSensor.d.ts +23 -0
- package/lib/sensors/AnalogSensor.js +31 -0
- package/lib/sensors/Endstop.d.ts +13 -0
- package/lib/sensors/Endstop.js +21 -0
- package/lib/sensors/FilamentMonitors/FilamentMonitorBase.d.ts +23 -0
- package/lib/sensors/FilamentMonitors/FilamentMonitorBase.js +31 -0
- package/lib/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +21 -0
- package/lib/sensors/FilamentMonitors/LaserFilamentMonitor.js +45 -0
- package/lib/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +20 -0
- package/lib/sensors/FilamentMonitors/PulsedFilamentMonitor.js +44 -0
- package/lib/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +21 -0
- package/lib/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +45 -0
- package/lib/sensors/FilamentMonitors/index.d.ts +6 -0
- package/lib/sensors/FilamentMonitors/index.js +32 -0
- package/lib/sensors/Probe.d.ts +32 -0
- package/lib/sensors/Probe.js +40 -0
- package/lib/sensors/index.d.ts +16 -0
- package/lib/sensors/index.js +27 -0
- package/lib/spindles/index.d.ts +16 -0
- package/lib/spindles/index.js +24 -0
- package/lib/state/MachineStatus.d.ts +16 -0
- package/lib/state/MachineStatus.js +20 -0
- package/lib/state/MessageBox.d.ts +15 -0
- package/lib/state/MessageBox.js +23 -0
- package/lib/state/RestorePoint.d.ts +11 -0
- package/lib/state/RestorePoint.js +17 -0
- package/lib/state/index.d.ts +52 -0
- package/lib/state/index.js +70 -0
- package/lib/tools/index.d.ts +25 -0
- package/lib/tools/index.js +33 -0
- package/lib/userSessions/index.d.ts +17 -0
- package/lib/userSessions/index.js +26 -0
- package/lib/volumes/index.d.ts +10 -0
- package/lib/volumes/index.js +16 -0
- package/package.json +29 -0
package/lib/move/Axis.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AxisLetter = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
const ModelCollection_1 = require("../ModelCollection");
|
|
6
|
+
const DriverId_1 = require("./DriverId");
|
|
7
|
+
const Microstepping_1 = require("./Microstepping");
|
|
8
|
+
var AxisLetter;
|
|
9
|
+
(function (AxisLetter) {
|
|
10
|
+
AxisLetter["X"] = "X";
|
|
11
|
+
AxisLetter["Y"] = "Y";
|
|
12
|
+
AxisLetter["Z"] = "Z";
|
|
13
|
+
AxisLetter["U"] = "U";
|
|
14
|
+
AxisLetter["V"] = "V";
|
|
15
|
+
AxisLetter["W"] = "W";
|
|
16
|
+
AxisLetter["A"] = "A";
|
|
17
|
+
AxisLetter["B"] = "B";
|
|
18
|
+
AxisLetter["C"] = "C";
|
|
19
|
+
AxisLetter["D"] = "D";
|
|
20
|
+
AxisLetter["a"] = "a";
|
|
21
|
+
AxisLetter["b"] = "b";
|
|
22
|
+
AxisLetter["c"] = "c";
|
|
23
|
+
AxisLetter["d"] = "d";
|
|
24
|
+
AxisLetter["e"] = "e";
|
|
25
|
+
AxisLetter["f"] = "f";
|
|
26
|
+
AxisLetter["g"] = "g";
|
|
27
|
+
AxisLetter["h"] = "h";
|
|
28
|
+
AxisLetter["i"] = "i";
|
|
29
|
+
AxisLetter["j"] = "j";
|
|
30
|
+
AxisLetter["k"] = "k";
|
|
31
|
+
AxisLetter["l"] = "l";
|
|
32
|
+
AxisLetter["none"] = "";
|
|
33
|
+
})(AxisLetter = exports.AxisLetter || (exports.AxisLetter = {}));
|
|
34
|
+
class Axis extends ModelObject_1.default {
|
|
35
|
+
constructor() {
|
|
36
|
+
super(...arguments);
|
|
37
|
+
this.acceleration = 0;
|
|
38
|
+
this.babystep = 0;
|
|
39
|
+
this.current = 0;
|
|
40
|
+
this.drivers = new ModelCollection_1.default(DriverId_1.default);
|
|
41
|
+
this.homed = false;
|
|
42
|
+
this.jerk = 15;
|
|
43
|
+
this.letter = AxisLetter.none;
|
|
44
|
+
this.machinePosition = null;
|
|
45
|
+
this.max = 200;
|
|
46
|
+
this.maxProbed = false;
|
|
47
|
+
this.microstepping = new Microstepping_1.default();
|
|
48
|
+
this.min = 0;
|
|
49
|
+
this.minProbed = false;
|
|
50
|
+
this.percentCurrent = 100;
|
|
51
|
+
this.percentStstCurrent = null;
|
|
52
|
+
this.speed = 100;
|
|
53
|
+
this.stepsPerMm = 80;
|
|
54
|
+
this.userPosition = null;
|
|
55
|
+
this.visible = true;
|
|
56
|
+
this.workplaceOffsets = new Array();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.default = Axis;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ModelObject_1 = require("../ModelObject");
|
|
4
|
+
class DriverId extends ModelObject_1.default {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.board = 0;
|
|
8
|
+
this.driver = 0;
|
|
9
|
+
}
|
|
10
|
+
update(jsonElement) {
|
|
11
|
+
if (typeof jsonElement === "string") {
|
|
12
|
+
const matches = /(\d+)\.(\d+)/.exec(jsonElement);
|
|
13
|
+
if (matches !== null) {
|
|
14
|
+
this.board = Number(matches[1]);
|
|
15
|
+
this.driver = Number(matches[2]);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.board = 0;
|
|
19
|
+
this.driver = Number(jsonElement);
|
|
20
|
+
}
|
|
21
|
+
return this;
|
|
22
|
+
}
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
toString() {
|
|
26
|
+
return `${this.board}.${this.driver}`;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = DriverId;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import ModelObject from "../ModelObject";
|
|
2
|
+
import DriverId from "./DriverId";
|
|
3
|
+
import Microstepping from "./Microstepping";
|
|
4
|
+
export declare class ExtruderNonlinear extends ModelObject {
|
|
5
|
+
a: number;
|
|
6
|
+
b: number;
|
|
7
|
+
upperLimit: number;
|
|
8
|
+
}
|
|
9
|
+
export default class Extruder extends ModelObject {
|
|
10
|
+
constructor();
|
|
11
|
+
acceleration: number;
|
|
12
|
+
current: number;
|
|
13
|
+
driver: DriverId | null;
|
|
14
|
+
filament: string;
|
|
15
|
+
factor: number;
|
|
16
|
+
jerk: number;
|
|
17
|
+
readonly microstepping: Microstepping;
|
|
18
|
+
readonly nonlinear: ExtruderNonlinear;
|
|
19
|
+
percentCurrent: number;
|
|
20
|
+
percentStstCurrent: number | null;
|
|
21
|
+
position: number;
|
|
22
|
+
pressureAdvance: number;
|
|
23
|
+
rawPosition: number;
|
|
24
|
+
speed: number;
|
|
25
|
+
stepsPerMm: number;
|
|
26
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExtruderNonlinear = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
const DriverId_1 = require("./DriverId");
|
|
6
|
+
const Microstepping_1 = require("./Microstepping");
|
|
7
|
+
class ExtruderNonlinear extends ModelObject_1.default {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.a = 0;
|
|
11
|
+
this.b = 0;
|
|
12
|
+
this.upperLimit = 0.2;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
exports.ExtruderNonlinear = ExtruderNonlinear;
|
|
16
|
+
class Extruder extends ModelObject_1.default {
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.acceleration = 500;
|
|
20
|
+
this.current = 0;
|
|
21
|
+
this.driver = null;
|
|
22
|
+
this.filament = "";
|
|
23
|
+
this.factor = 1;
|
|
24
|
+
this.jerk = 15;
|
|
25
|
+
this.microstepping = new Microstepping_1.default();
|
|
26
|
+
this.nonlinear = new ExtruderNonlinear();
|
|
27
|
+
this.percentCurrent = 100;
|
|
28
|
+
this.percentStstCurrent = null;
|
|
29
|
+
this.position = 0;
|
|
30
|
+
this.pressureAdvance = 0;
|
|
31
|
+
this.rawPosition = 0;
|
|
32
|
+
this.speed = 100;
|
|
33
|
+
this.stepsPerMm = 420;
|
|
34
|
+
this.wrapModelProperty("driver", DriverId_1.default);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.default = Extruder;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ModelObject from "../ModelObject";
|
|
2
|
+
export declare enum InputShapingType {
|
|
3
|
+
none = "none",
|
|
4
|
+
mzv = "mzv",
|
|
5
|
+
zvd = "zvd",
|
|
6
|
+
zvdd = "zvddd",
|
|
7
|
+
zvddd = "zvddd",
|
|
8
|
+
ei2 = "ei2",
|
|
9
|
+
ei3 = "ei3"
|
|
10
|
+
}
|
|
11
|
+
export default class InputShaping extends ModelObject {
|
|
12
|
+
amplitudes: Array<number>;
|
|
13
|
+
damping: number;
|
|
14
|
+
durations: Array<number>;
|
|
15
|
+
frequency: number;
|
|
16
|
+
minAcceleration: number;
|
|
17
|
+
type: InputShapingType;
|
|
18
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputShapingType = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
var InputShapingType;
|
|
6
|
+
(function (InputShapingType) {
|
|
7
|
+
InputShapingType["none"] = "none";
|
|
8
|
+
InputShapingType["mzv"] = "mzv";
|
|
9
|
+
InputShapingType["zvd"] = "zvd";
|
|
10
|
+
InputShapingType["zvdd"] = "zvddd";
|
|
11
|
+
InputShapingType["zvddd"] = "zvddd";
|
|
12
|
+
InputShapingType["ei2"] = "ei2";
|
|
13
|
+
InputShapingType["ei3"] = "ei3";
|
|
14
|
+
})(InputShapingType = exports.InputShapingType || (exports.InputShapingType = {}));
|
|
15
|
+
class InputShaping extends ModelObject_1.default {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.amplitudes = [];
|
|
19
|
+
this.damping = 0.2;
|
|
20
|
+
this.durations = [];
|
|
21
|
+
this.frequency = 40;
|
|
22
|
+
this.minAcceleration = 10;
|
|
23
|
+
this.type = InputShapingType.none;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = InputShaping;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ModelObject_1 = require("../ModelObject");
|
|
4
|
+
class Microstepping extends ModelObject_1.default {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.interpolated = false;
|
|
8
|
+
this.value = 16;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.default = Microstepping;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import ModelObject from "../ModelObject";
|
|
2
|
+
export declare class MoveDeviations extends ModelObject {
|
|
3
|
+
deviation: number;
|
|
4
|
+
mean: number;
|
|
5
|
+
}
|
|
6
|
+
export default class MoveCalibration extends ModelObject {
|
|
7
|
+
readonly final: MoveDeviations;
|
|
8
|
+
readonly initial: MoveDeviations;
|
|
9
|
+
numFactors: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveDeviations = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
class MoveDeviations extends ModelObject_1.default {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.deviation = 0;
|
|
9
|
+
this.mean = 0;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
exports.MoveDeviations = MoveDeviations;
|
|
13
|
+
class MoveCalibration extends ModelObject_1.default {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
this.final = new MoveDeviations();
|
|
17
|
+
this.initial = new MoveDeviations();
|
|
18
|
+
this.numFactors = 0;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = MoveCalibration;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import ModelObject from "../ModelObject";
|
|
2
|
+
import { MoveDeviations } from "./MoveCalibration";
|
|
3
|
+
export declare class ProbeGrid extends ModelObject {
|
|
4
|
+
axes: Array<string>;
|
|
5
|
+
maxs: Array<number>;
|
|
6
|
+
mins: Array<number>;
|
|
7
|
+
radius: number;
|
|
8
|
+
spacings: Array<number>;
|
|
9
|
+
}
|
|
10
|
+
export declare class Skew extends ModelObject {
|
|
11
|
+
compensateXY: boolean;
|
|
12
|
+
tanXY: number;
|
|
13
|
+
tanXZ: number;
|
|
14
|
+
tanYZ: number;
|
|
15
|
+
}
|
|
16
|
+
export declare enum MoveCompensationType {
|
|
17
|
+
none = "none",
|
|
18
|
+
mesh = "mesh"
|
|
19
|
+
}
|
|
20
|
+
export default class MoveCompensation extends ModelObject {
|
|
21
|
+
constructor();
|
|
22
|
+
fadeHeight: number | null;
|
|
23
|
+
file: string | null;
|
|
24
|
+
liveGrid: ProbeGrid | null;
|
|
25
|
+
meshDeviation: MoveDeviations | null;
|
|
26
|
+
readonly probeGrid: ProbeGrid;
|
|
27
|
+
readonly skew: Skew;
|
|
28
|
+
type: MoveCompensationType;
|
|
29
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveCompensationType = exports.Skew = exports.ProbeGrid = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
const MoveCalibration_1 = require("./MoveCalibration");
|
|
6
|
+
class ProbeGrid extends ModelObject_1.default {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.axes = ['X', 'Y'];
|
|
10
|
+
this.maxs = [-1, -1];
|
|
11
|
+
this.mins = [0, 0];
|
|
12
|
+
this.radius = 0;
|
|
13
|
+
this.spacings = [0, 0];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.ProbeGrid = ProbeGrid;
|
|
17
|
+
class Skew extends ModelObject_1.default {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.compensateXY = true;
|
|
21
|
+
this.tanXY = 0;
|
|
22
|
+
this.tanXZ = 0;
|
|
23
|
+
this.tanYZ = 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.Skew = Skew;
|
|
27
|
+
var MoveCompensationType;
|
|
28
|
+
(function (MoveCompensationType) {
|
|
29
|
+
MoveCompensationType["none"] = "none";
|
|
30
|
+
MoveCompensationType["mesh"] = "mesh";
|
|
31
|
+
})(MoveCompensationType = exports.MoveCompensationType || (exports.MoveCompensationType = {}));
|
|
32
|
+
class MoveCompensation extends ModelObject_1.default {
|
|
33
|
+
constructor() {
|
|
34
|
+
super();
|
|
35
|
+
this.fadeHeight = null;
|
|
36
|
+
this.file = null;
|
|
37
|
+
this.liveGrid = null;
|
|
38
|
+
this.meshDeviation = null;
|
|
39
|
+
this.probeGrid = new ProbeGrid();
|
|
40
|
+
this.skew = new Skew();
|
|
41
|
+
this.type = MoveCompensationType.none;
|
|
42
|
+
this.wrapModelProperty("liveGrid", ProbeGrid);
|
|
43
|
+
this.wrapModelProperty("meshDeviation", MoveCalibration_1.MoveDeviations);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.default = MoveCompensation;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import ModelObject from "../ModelObject";
|
|
2
|
+
import ModelCollection from "../ModelCollection";
|
|
3
|
+
import Axis from "./Axis";
|
|
4
|
+
import MoveCalibration from "./MoveCalibration";
|
|
5
|
+
import MoveCompensation from "./MoveCompensation";
|
|
6
|
+
import Extruder from "./Extruder";
|
|
7
|
+
import InputShaping from "./InputShaping";
|
|
8
|
+
import Kinematics from "./kinematics";
|
|
9
|
+
export declare class CurrentMove extends ModelObject {
|
|
10
|
+
acceleration: number;
|
|
11
|
+
deceleration: number;
|
|
12
|
+
laserPwm: number | null;
|
|
13
|
+
requestedSpeed: number;
|
|
14
|
+
topSpeed: number;
|
|
15
|
+
}
|
|
16
|
+
export declare class MotorsIdleControl extends ModelObject {
|
|
17
|
+
factor: number;
|
|
18
|
+
timeout: number;
|
|
19
|
+
}
|
|
20
|
+
export declare class MoveQueueItem extends ModelObject {
|
|
21
|
+
gracePeriod: number;
|
|
22
|
+
length: number;
|
|
23
|
+
}
|
|
24
|
+
export declare class MoveRotation extends ModelObject {
|
|
25
|
+
angle: number;
|
|
26
|
+
centre: Array<number>;
|
|
27
|
+
}
|
|
28
|
+
export default class Move extends ModelObject {
|
|
29
|
+
readonly axes: ModelCollection<Axis>;
|
|
30
|
+
readonly calibration: MoveCalibration;
|
|
31
|
+
readonly compensation: MoveCompensation;
|
|
32
|
+
readonly currentMove: CurrentMove;
|
|
33
|
+
readonly extruders: ModelCollection<Extruder>;
|
|
34
|
+
readonly idle: MotorsIdleControl;
|
|
35
|
+
kinematics: Kinematics;
|
|
36
|
+
limitAxes: boolean;
|
|
37
|
+
noMovesBeforeHoming: boolean;
|
|
38
|
+
printingAcceleration: number;
|
|
39
|
+
readonly queue: ModelCollection<MoveQueueItem>;
|
|
40
|
+
readonly rotation: MoveRotation;
|
|
41
|
+
readonly shaping: InputShaping;
|
|
42
|
+
speedFactor: number;
|
|
43
|
+
travelAcceleration: number;
|
|
44
|
+
virtualEPos: number;
|
|
45
|
+
workplaceNumber: number;
|
|
46
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MoveRotation = exports.MoveQueueItem = exports.MotorsIdleControl = exports.CurrentMove = void 0;
|
|
4
|
+
const ModelObject_1 = require("../ModelObject");
|
|
5
|
+
const ModelCollection_1 = require("../ModelCollection");
|
|
6
|
+
const Axis_1 = require("./Axis");
|
|
7
|
+
const MoveCalibration_1 = require("./MoveCalibration");
|
|
8
|
+
const MoveCompensation_1 = require("./MoveCompensation");
|
|
9
|
+
const Extruder_1 = require("./Extruder");
|
|
10
|
+
const InputShaping_1 = require("./InputShaping");
|
|
11
|
+
const kinematics_1 = require("./kinematics");
|
|
12
|
+
class CurrentMove extends ModelObject_1.default {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
this.acceleration = 0;
|
|
16
|
+
this.deceleration = 0;
|
|
17
|
+
this.laserPwm = null;
|
|
18
|
+
this.requestedSpeed = 0;
|
|
19
|
+
this.topSpeed = 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.CurrentMove = CurrentMove;
|
|
23
|
+
class MotorsIdleControl extends ModelObject_1.default {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.factor = 0.3;
|
|
27
|
+
this.timeout = 30;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.MotorsIdleControl = MotorsIdleControl;
|
|
31
|
+
class MoveQueueItem extends ModelObject_1.default {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.gracePeriod = 0;
|
|
35
|
+
this.length = 0;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.MoveQueueItem = MoveQueueItem;
|
|
39
|
+
class MoveRotation extends ModelObject_1.default {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments);
|
|
42
|
+
this.angle = 0;
|
|
43
|
+
this.centre = [0, 0];
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.MoveRotation = MoveRotation;
|
|
47
|
+
class Move extends ModelObject_1.default {
|
|
48
|
+
constructor() {
|
|
49
|
+
super(...arguments);
|
|
50
|
+
this.axes = new ModelCollection_1.default(Axis_1.default);
|
|
51
|
+
this.calibration = new MoveCalibration_1.default();
|
|
52
|
+
this.compensation = new MoveCompensation_1.default();
|
|
53
|
+
this.currentMove = new CurrentMove();
|
|
54
|
+
this.extruders = new ModelCollection_1.default(Extruder_1.default);
|
|
55
|
+
this.idle = new MotorsIdleControl();
|
|
56
|
+
this.kinematics = new kinematics_1.default();
|
|
57
|
+
this.limitAxes = true;
|
|
58
|
+
this.noMovesBeforeHoming = true;
|
|
59
|
+
this.printingAcceleration = 10000;
|
|
60
|
+
this.queue = new ModelCollection_1.default(MoveQueueItem);
|
|
61
|
+
this.rotation = new MoveRotation();
|
|
62
|
+
this.shaping = new InputShaping_1.default();
|
|
63
|
+
this.speedFactor = 1;
|
|
64
|
+
this.travelAcceleration = 10000;
|
|
65
|
+
this.virtualEPos = 0;
|
|
66
|
+
this.workplaceNumber = 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.default = Move;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IModelObject } from "../../ModelObject";
|
|
2
|
+
import { KinematicsName, ZLeadscrewKinematics } from "./KinematicsBase";
|
|
3
|
+
export default class CoreKinematics extends ZLeadscrewKinematics {
|
|
4
|
+
constructor(name: KinematicsName);
|
|
5
|
+
forwardMatrix: Array<Array<number>>;
|
|
6
|
+
inverseMatrix: Array<Array<number>>;
|
|
7
|
+
update(jsonElement: any): IModelObject | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const KinematicsBase_1 = require("./KinematicsBase");
|
|
4
|
+
const index_1 = require("./index");
|
|
5
|
+
class CoreKinematics extends KinematicsBase_1.ZLeadscrewKinematics {
|
|
6
|
+
constructor(name) {
|
|
7
|
+
super(name);
|
|
8
|
+
this.forwardMatrix = [
|
|
9
|
+
[1, 0, 0],
|
|
10
|
+
[0, 1, 0],
|
|
11
|
+
[0, 0, 1]
|
|
12
|
+
];
|
|
13
|
+
this.inverseMatrix = [
|
|
14
|
+
[1, 0, 0],
|
|
15
|
+
[0, 1, 0],
|
|
16
|
+
[0, 0, 1]
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
update(jsonElement) {
|
|
20
|
+
if (jsonElement === null) {
|
|
21
|
+
throw new Error("Kinematics must not be null");
|
|
22
|
+
}
|
|
23
|
+
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
24
|
+
return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
|
|
25
|
+
}
|
|
26
|
+
return super.update(jsonElement);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = CoreKinematics;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import ModelCollection from "../../ModelCollection";
|
|
2
|
+
import ModelObject, { IModelObject } from "../../ModelObject";
|
|
3
|
+
import KinematicsBase from "./KinematicsBase";
|
|
4
|
+
export declare class DeltaTower extends ModelObject {
|
|
5
|
+
angleCorrection: number;
|
|
6
|
+
diagonal: number;
|
|
7
|
+
endstopAdjustment: number;
|
|
8
|
+
xPos: number;
|
|
9
|
+
yPos: number;
|
|
10
|
+
}
|
|
11
|
+
export default class DeltaKinematics extends KinematicsBase {
|
|
12
|
+
deltaRadius: number;
|
|
13
|
+
homedHeight: number;
|
|
14
|
+
printRadius: number;
|
|
15
|
+
readonly towers: ModelCollection<DeltaTower>;
|
|
16
|
+
xTilt: number;
|
|
17
|
+
yTilt: number;
|
|
18
|
+
update(jsonElement: any): IModelObject | null;
|
|
19
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeltaTower = void 0;
|
|
4
|
+
const ModelCollection_1 = require("../../ModelCollection");
|
|
5
|
+
const ModelObject_1 = require("../../ModelObject");
|
|
6
|
+
const KinematicsBase_1 = require("./KinematicsBase");
|
|
7
|
+
const index_1 = require("./index");
|
|
8
|
+
class DeltaTower extends ModelObject_1.default {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.angleCorrection = 0;
|
|
12
|
+
this.diagonal = 0;
|
|
13
|
+
this.endstopAdjustment = 0;
|
|
14
|
+
this.xPos = 0;
|
|
15
|
+
this.yPos = 0;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.DeltaTower = DeltaTower;
|
|
19
|
+
class DeltaKinematics extends KinematicsBase_1.default {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
this.deltaRadius = 0;
|
|
23
|
+
this.homedHeight = 0;
|
|
24
|
+
this.printRadius = 0;
|
|
25
|
+
this.towers = new ModelCollection_1.default(DeltaTower);
|
|
26
|
+
this.xTilt = 0;
|
|
27
|
+
this.yTilt = 0;
|
|
28
|
+
}
|
|
29
|
+
update(jsonElement) {
|
|
30
|
+
if (jsonElement === null) {
|
|
31
|
+
throw new Error("Kinematics must not be null");
|
|
32
|
+
}
|
|
33
|
+
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
34
|
+
return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
|
|
35
|
+
}
|
|
36
|
+
return super.update(jsonElement);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
exports.default = DeltaKinematics;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IModelObject } from "../../ModelObject";
|
|
2
|
+
import KinematicsBase from "./KinematicsBase";
|
|
3
|
+
export default class HangprinterKinematics extends KinematicsBase {
|
|
4
|
+
anchors: Array<Array<number>>;
|
|
5
|
+
printRadius: number;
|
|
6
|
+
constructor();
|
|
7
|
+
update(jsonElement: any): IModelObject | null;
|
|
8
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const KinematicsBase_1 = require("./KinematicsBase");
|
|
4
|
+
const index_1 = require("./index");
|
|
5
|
+
class HangprinterKinematics extends KinematicsBase_1.default {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(KinematicsBase_1.KinematicsName.hangprinter);
|
|
8
|
+
this.anchors = [
|
|
9
|
+
[0, -2000, -100],
|
|
10
|
+
[2000, 1000, -100],
|
|
11
|
+
[0, 0, 3000]
|
|
12
|
+
];
|
|
13
|
+
this.printRadius = 1500;
|
|
14
|
+
}
|
|
15
|
+
update(jsonElement) {
|
|
16
|
+
if (jsonElement === null) {
|
|
17
|
+
throw new Error("Kinematics must not be null");
|
|
18
|
+
}
|
|
19
|
+
if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
|
|
20
|
+
return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
|
|
21
|
+
}
|
|
22
|
+
return super.update(jsonElement);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = HangprinterKinematics;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import ModelObject from "../../ModelObject";
|
|
2
|
+
export declare enum KinematicsName {
|
|
3
|
+
cartesian = "cartesian",
|
|
4
|
+
coreXY = "corexy",
|
|
5
|
+
coreXYU = "corexyu",
|
|
6
|
+
coreXYUV = "corexyuv",
|
|
7
|
+
coreXZ = "corexz",
|
|
8
|
+
markForged = "markforged",
|
|
9
|
+
fiveBarScara = "fivebarscara",
|
|
10
|
+
hangprinter = "hangprinter",
|
|
11
|
+
delta = "delta",
|
|
12
|
+
polar = "polar",
|
|
13
|
+
rotaryDelta = "rotary delta",
|
|
14
|
+
scara = "scara",
|
|
15
|
+
unknown = "unknown"
|
|
16
|
+
}
|
|
17
|
+
export declare class MoveSegmentation extends ModelObject {
|
|
18
|
+
segmentsPerSec: number;
|
|
19
|
+
minSegmentLength: number;
|
|
20
|
+
}
|
|
21
|
+
export default abstract class KinematicsBase extends ModelObject {
|
|
22
|
+
readonly name: KinematicsName;
|
|
23
|
+
readonly segmentation: MoveSegmentation;
|
|
24
|
+
constructor(name: KinematicsName);
|
|
25
|
+
}
|
|
26
|
+
export declare class TiltCorrection extends ModelObject {
|
|
27
|
+
correctionFactor: number;
|
|
28
|
+
lastCorrections: Array<number>;
|
|
29
|
+
maxCorrection: number;
|
|
30
|
+
screwPitch: number;
|
|
31
|
+
screwX: Array<number>;
|
|
32
|
+
screwY: Array<number>;
|
|
33
|
+
}
|
|
34
|
+
export declare abstract class ZLeadscrewKinematics extends KinematicsBase {
|
|
35
|
+
readonly tiltCorrection: TiltCorrection;
|
|
36
|
+
}
|