@duet3d/objectmodel 3.5.0-beta.42 → 3.5.0-beta.44

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.
Files changed (130) hide show
  1. package/dist/ModelCollection.d.ts +37 -0
  2. package/dist/ModelCollection.js +103 -0
  3. package/dist/ModelDictionary.d.ts +46 -0
  4. package/dist/ModelDictionary.js +108 -0
  5. package/dist/ModelObject.d.ts +47 -0
  6. package/dist/ModelObject.js +212 -0
  7. package/dist/ModelSet.d.ts +11 -0
  8. package/dist/ModelSet.js +15 -0
  9. package/dist/ObjectModel.d.ts +47 -0
  10. package/dist/ObjectModel.js +54 -0
  11. package/dist/boards/index.d.ts +52 -0
  12. package/dist/boards/index.js +81 -0
  13. package/dist/directories/index.d.ts +11 -0
  14. package/dist/directories/index.js +18 -0
  15. package/dist/fans/index.d.ts +19 -0
  16. package/dist/fans/index.js +30 -0
  17. package/dist/heat/Heater.d.ts +28 -0
  18. package/dist/heat/Heater.js +36 -0
  19. package/dist/heat/HeaterModel.d.ts +21 -0
  20. package/dist/heat/HeaterModel.js +32 -0
  21. package/dist/heat/HeaterMonitor.d.ts +18 -0
  22. package/dist/heat/HeaterMonitor.js +27 -0
  23. package/dist/heat/index.d.ts +14 -0
  24. package/dist/heat/index.js +35 -0
  25. package/dist/index.d.ts +26 -0
  26. package/dist/inputs/CodeChannel.d.ts +18 -0
  27. package/dist/inputs/CodeChannel.js +22 -0
  28. package/dist/inputs/Compatibility.d.ts +10 -0
  29. package/dist/inputs/Compatibility.js +14 -0
  30. package/dist/inputs/InputChannel.d.ts +30 -0
  31. package/dist/inputs/InputChannel.js +39 -0
  32. package/dist/inputs/index.d.ts +3 -0
  33. package/dist/inputs/index.js +19 -0
  34. package/dist/job/Build.d.ts +15 -0
  35. package/dist/job/Build.js +26 -0
  36. package/dist/job/GCodeFileInfo.d.ts +17 -0
  37. package/dist/job/GCodeFileInfo.js +24 -0
  38. package/dist/job/ThumbnailInfo.d.ts +15 -0
  39. package/dist/job/ThumbnailInfo.js +23 -0
  40. package/dist/job/index.d.ts +40 -0
  41. package/dist/job/index.js +70 -0
  42. package/dist/limits/index.d.ts +29 -0
  43. package/dist/limits/index.js +36 -0
  44. package/dist/messages/index.d.ts +13 -0
  45. package/dist/messages/index.js +27 -0
  46. package/dist/move/Axis.d.ts +47 -0
  47. package/dist/move/Axis.js +55 -0
  48. package/dist/move/DriverId.d.ts +10 -0
  49. package/dist/move/DriverId.js +49 -0
  50. package/dist/move/Extruder.d.ts +28 -0
  51. package/dist/move/Extruder.js +39 -0
  52. package/dist/move/InputShaping.d.ts +20 -0
  53. package/dist/move/InputShaping.js +28 -0
  54. package/dist/move/KeepoutZone.d.ts +10 -0
  55. package/dist/move/KeepoutZone.js +21 -0
  56. package/dist/move/Microstepping.d.ts +6 -0
  57. package/dist/move/Microstepping.js +13 -0
  58. package/dist/move/MoveCalibration.d.ts +11 -0
  59. package/dist/move/MoveCalibration.js +22 -0
  60. package/dist/move/MoveCompensation.d.ts +30 -0
  61. package/dist/move/MoveCompensation.js +47 -0
  62. package/dist/move/index.d.ts +61 -0
  63. package/dist/move/index.js +98 -0
  64. package/dist/move/kinematics/CoreKinematics.d.ts +9 -0
  65. package/dist/move/kinematics/CoreKinematics.js +31 -0
  66. package/dist/move/kinematics/DeltaKinematics.d.ts +20 -0
  67. package/dist/move/kinematics/DeltaKinematics.js +40 -0
  68. package/dist/move/kinematics/HangprinterKinematics.d.ts +9 -0
  69. package/dist/move/kinematics/HangprinterKinematics.js +28 -0
  70. package/dist/move/kinematics/KinematicsBase.d.ts +37 -0
  71. package/dist/move/kinematics/KinematicsBase.js +56 -0
  72. package/dist/move/kinematics/PolarKinematics.d.ts +7 -0
  73. package/dist/move/kinematics/PolarKinematics.js +21 -0
  74. package/dist/move/kinematics/ScaraKinematics.d.ts +6 -0
  75. package/dist/move/kinematics/ScaraKinematics.js +18 -0
  76. package/dist/move/kinematics/index.d.ts +14 -0
  77. package/dist/move/kinematics/index.js +73 -0
  78. package/dist/network/NetworkInterface.d.ts +41 -0
  79. package/dist/network/NetworkInterface.js +51 -0
  80. package/dist/network/index.d.ts +14 -0
  81. package/dist/network/index.js +35 -0
  82. package/dist/plugins/PluginManifest.d.ts +64 -0
  83. package/dist/plugins/PluginManifest.js +114 -0
  84. package/dist/plugins/index.d.ts +9 -0
  85. package/dist/plugins/index.js +30 -0
  86. package/dist/sbc/CPU.d.ts +8 -0
  87. package/dist/sbc/CPU.js +15 -0
  88. package/dist/sbc/Memory.d.ts +6 -0
  89. package/dist/sbc/Memory.js +13 -0
  90. package/dist/sbc/dsf/HttpEndpoint.d.ts +19 -0
  91. package/dist/sbc/dsf/HttpEndpoint.js +27 -0
  92. package/dist/sbc/dsf/index.d.ts +11 -0
  93. package/dist/sbc/dsf/index.js +32 -0
  94. package/dist/sbc/index.d.ts +19 -0
  95. package/dist/sbc/index.js +40 -0
  96. package/dist/sensors/AnalogSensor.d.ts +48 -0
  97. package/dist/sensors/AnalogSensor.js +57 -0
  98. package/dist/sensors/Endstop.d.ts +15 -0
  99. package/dist/sensors/Endstop.js +23 -0
  100. package/dist/sensors/FilamentMonitors/FilamentMonitorBase.d.ts +24 -0
  101. package/dist/sensors/FilamentMonitors/FilamentMonitorBase.js +32 -0
  102. package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +22 -0
  103. package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.js +46 -0
  104. package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +21 -0
  105. package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.js +45 -0
  106. package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +22 -0
  107. package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +46 -0
  108. package/dist/sensors/FilamentMonitors/index.d.ts +11 -0
  109. package/dist/sensors/FilamentMonitors/index.js +51 -0
  110. package/dist/sensors/Probe.d.ts +33 -0
  111. package/dist/sensors/Probe.js +41 -0
  112. package/dist/sensors/index.d.ts +21 -0
  113. package/dist/sensors/index.js +46 -0
  114. package/dist/spindles/index.d.ts +20 -0
  115. package/dist/spindles/index.js +28 -0
  116. package/dist/state/MachineStatus.d.ts +17 -0
  117. package/dist/state/MachineStatus.js +21 -0
  118. package/dist/state/MessageBox.d.ts +26 -0
  119. package/dist/state/MessageBox.js +39 -0
  120. package/dist/state/RestorePoint.d.ts +12 -0
  121. package/dist/state/RestorePoint.js +19 -0
  122. package/dist/state/index.d.ts +60 -0
  123. package/dist/state/index.js +97 -0
  124. package/dist/tools/index.d.ts +26 -0
  125. package/dist/tools/index.js +34 -0
  126. package/dist/userSessions/index.d.ts +18 -0
  127. package/dist/userSessions/index.js +27 -0
  128. package/dist/volumes/index.d.ts +11 -0
  129. package/dist/volumes/index.js +18 -0
  130. package/package.json +2 -2
@@ -0,0 +1,11 @@
1
+ import ModelObject from "../ModelObject";
2
+ export declare class MoveDeviations extends ModelObject {
3
+ deviation: number;
4
+ mean: number;
5
+ }
6
+ export declare class MoveCalibration extends ModelObject {
7
+ readonly final: MoveDeviations;
8
+ readonly initial: MoveDeviations;
9
+ numFactors: number;
10
+ }
11
+ export default MoveCalibration;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MoveCalibration = 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.MoveCalibration = MoveCalibration;
22
+ exports.default = MoveCalibration;
@@ -0,0 +1,30 @@
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 declare 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
+ }
30
+ export default MoveCompensation;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MoveCompensation = 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
+ ModelObject_1.default.wrapModelProperty(this, "liveGrid", ProbeGrid);
43
+ ModelObject_1.default.wrapModelProperty(this, "meshDeviation", MoveCalibration_1.MoveDeviations);
44
+ }
45
+ }
46
+ exports.MoveCompensation = MoveCompensation;
47
+ exports.default = MoveCompensation;
@@ -0,0 +1,61 @@
1
+ import ModelObject from "../ModelObject";
2
+ import ModelCollection from "../ModelCollection";
3
+ import Axis from "./Axis";
4
+ import Extruder from "./Extruder";
5
+ import InputShaping from "./InputShaping";
6
+ import KeepoutZone from "./KeepoutZone";
7
+ import MoveCalibration from "./MoveCalibration";
8
+ import MoveCompensation from "./MoveCompensation";
9
+ import Kinematics from "./kinematics";
10
+ export declare class CurrentMove extends ModelObject {
11
+ acceleration: number;
12
+ deceleration: number;
13
+ extrusionRate: number;
14
+ laserPwm: number | null;
15
+ requestedSpeed: number;
16
+ topSpeed: number;
17
+ }
18
+ export declare class MotorsIdleControl extends ModelObject {
19
+ factor: number;
20
+ timeout: number;
21
+ }
22
+ export declare class MoveQueueItem extends ModelObject {
23
+ gracePeriod: number;
24
+ length: number;
25
+ }
26
+ export declare class MoveRotation extends ModelObject {
27
+ angle: number;
28
+ centre: Array<number>;
29
+ }
30
+ export declare class Move extends ModelObject {
31
+ readonly axes: ModelCollection<Axis>;
32
+ backlashFactor: number;
33
+ readonly calibration: MoveCalibration;
34
+ readonly compensation: MoveCompensation;
35
+ readonly currentMove: CurrentMove;
36
+ readonly extruders: ModelCollection<Extruder>;
37
+ readonly idle: MotorsIdleControl;
38
+ readonly keepout: ModelCollection<KeepoutZone | null>;
39
+ kinematics: Kinematics;
40
+ limitAxes: boolean;
41
+ noMovesBeforeHoming: boolean;
42
+ printingAcceleration: number;
43
+ readonly queue: ModelCollection<MoveQueueItem>;
44
+ reducedAcceleration: number;
45
+ readonly rotation: MoveRotation;
46
+ readonly shaping: InputShaping;
47
+ speedFactor: number;
48
+ travelAcceleration: number;
49
+ virtualEPos: number;
50
+ workplaceNumber: number;
51
+ }
52
+ export default Move;
53
+ export * from "./kinematics";
54
+ export * from "./Axis";
55
+ export * from "./DriverId";
56
+ export * from "./Extruder";
57
+ export * from "./InputShaping";
58
+ export * from "./KeepoutZone";
59
+ export * from "./Microstepping";
60
+ export * from "./MoveCalibration";
61
+ export * from "./MoveCompensation";
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Move = exports.MoveRotation = exports.MoveQueueItem = exports.MotorsIdleControl = exports.CurrentMove = void 0;
18
+ const ModelObject_1 = require("../ModelObject");
19
+ const ModelCollection_1 = require("../ModelCollection");
20
+ const Axis_1 = require("./Axis");
21
+ const Extruder_1 = require("./Extruder");
22
+ const InputShaping_1 = require("./InputShaping");
23
+ const KeepoutZone_1 = require("./KeepoutZone");
24
+ const MoveCalibration_1 = require("./MoveCalibration");
25
+ const MoveCompensation_1 = require("./MoveCompensation");
26
+ const kinematics_1 = require("./kinematics");
27
+ class CurrentMove extends ModelObject_1.default {
28
+ constructor() {
29
+ super(...arguments);
30
+ this.acceleration = 0;
31
+ this.deceleration = 0;
32
+ this.extrusionRate = 0;
33
+ this.laserPwm = null;
34
+ this.requestedSpeed = 0;
35
+ this.topSpeed = 0;
36
+ }
37
+ }
38
+ exports.CurrentMove = CurrentMove;
39
+ class MotorsIdleControl extends ModelObject_1.default {
40
+ constructor() {
41
+ super(...arguments);
42
+ this.factor = 0.3;
43
+ this.timeout = 30;
44
+ }
45
+ }
46
+ exports.MotorsIdleControl = MotorsIdleControl;
47
+ class MoveQueueItem extends ModelObject_1.default {
48
+ constructor() {
49
+ super(...arguments);
50
+ this.gracePeriod = 0;
51
+ this.length = 0;
52
+ }
53
+ }
54
+ exports.MoveQueueItem = MoveQueueItem;
55
+ class MoveRotation extends ModelObject_1.default {
56
+ constructor() {
57
+ super(...arguments);
58
+ this.angle = 0;
59
+ this.centre = [0, 0];
60
+ }
61
+ }
62
+ exports.MoveRotation = MoveRotation;
63
+ class Move extends ModelObject_1.default {
64
+ constructor() {
65
+ super(...arguments);
66
+ this.axes = new ModelCollection_1.default(Axis_1.default);
67
+ this.backlashFactor = 10;
68
+ this.calibration = new MoveCalibration_1.default();
69
+ this.compensation = new MoveCompensation_1.default();
70
+ this.currentMove = new CurrentMove();
71
+ this.extruders = new ModelCollection_1.default(Extruder_1.default);
72
+ this.idle = new MotorsIdleControl();
73
+ this.keepout = new ModelCollection_1.default(KeepoutZone_1.default);
74
+ this.kinematics = new kinematics_1.CoreKinematics(kinematics_1.KinematicsName.cartesian);
75
+ this.limitAxes = true;
76
+ this.noMovesBeforeHoming = true;
77
+ this.printingAcceleration = 10000;
78
+ this.queue = new ModelCollection_1.default(MoveQueueItem);
79
+ this.reducedAcceleration = 10000;
80
+ this.rotation = new MoveRotation();
81
+ this.shaping = new InputShaping_1.default();
82
+ this.speedFactor = 1;
83
+ this.travelAcceleration = 10000;
84
+ this.virtualEPos = 0;
85
+ this.workplaceNumber = 0;
86
+ }
87
+ }
88
+ exports.Move = Move;
89
+ exports.default = Move;
90
+ __exportStar(require("./kinematics"), exports);
91
+ __exportStar(require("./Axis"), exports);
92
+ __exportStar(require("./DriverId"), exports);
93
+ __exportStar(require("./Extruder"), exports);
94
+ __exportStar(require("./InputShaping"), exports);
95
+ __exportStar(require("./KeepoutZone"), exports);
96
+ __exportStar(require("./Microstepping"), exports);
97
+ __exportStar(require("./MoveCalibration"), exports);
98
+ __exportStar(require("./MoveCompensation"), exports);
@@ -0,0 +1,9 @@
1
+ import { IModelObject } from "../../ModelObject";
2
+ import { KinematicsName, ZLeadscrewKinematics } from "./KinematicsBase";
3
+ export declare 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
+ }
9
+ export default CoreKinematics;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CoreKinematics = void 0;
4
+ const KinematicsBase_1 = require("./KinematicsBase");
5
+ const index_1 = require("./index");
6
+ class CoreKinematics extends KinematicsBase_1.ZLeadscrewKinematics {
7
+ constructor(name) {
8
+ super(name);
9
+ this.forwardMatrix = [
10
+ [1, 0, 0],
11
+ [0, 1, 0],
12
+ [0, 0, 1]
13
+ ];
14
+ this.inverseMatrix = [
15
+ [1, 0, 0],
16
+ [0, 1, 0],
17
+ [0, 0, 1]
18
+ ];
19
+ }
20
+ update(jsonElement) {
21
+ if (jsonElement === null) {
22
+ throw new Error("Kinematics must not be null");
23
+ }
24
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
25
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
26
+ }
27
+ return super.update(jsonElement);
28
+ }
29
+ }
30
+ exports.CoreKinematics = CoreKinematics;
31
+ exports.default = CoreKinematics;
@@ -0,0 +1,20 @@
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 declare 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
+ }
20
+ export default DeltaKinematics;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeltaKinematics = 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 = (0, ModelCollection_1.initCollection)(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.DeltaKinematics = DeltaKinematics;
40
+ exports.default = DeltaKinematics;
@@ -0,0 +1,9 @@
1
+ import { IModelObject } from "../../ModelObject";
2
+ import KinematicsBase from "./KinematicsBase";
3
+ export declare class HangprinterKinematics extends KinematicsBase {
4
+ anchors: Array<Array<number>>;
5
+ printRadius: number;
6
+ constructor();
7
+ update(jsonElement: any): IModelObject | null;
8
+ }
9
+ export default HangprinterKinematics;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HangprinterKinematics = void 0;
4
+ const KinematicsBase_1 = require("./KinematicsBase");
5
+ const index_1 = require("./index");
6
+ class HangprinterKinematics extends KinematicsBase_1.default {
7
+ constructor() {
8
+ super(KinematicsBase_1.KinematicsName.hangprinter);
9
+ this.anchors = [
10
+ [0, -2000, -100],
11
+ [2000, 1000, -100],
12
+ [-2000, 1000, -100],
13
+ [0, 0, 3000]
14
+ ];
15
+ this.printRadius = 1500;
16
+ }
17
+ update(jsonElement) {
18
+ if (jsonElement === null) {
19
+ throw new Error("Kinematics must not be null");
20
+ }
21
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
22
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
23
+ }
24
+ return super.update(jsonElement);
25
+ }
26
+ }
27
+ exports.HangprinterKinematics = HangprinterKinematics;
28
+ exports.default = HangprinterKinematics;
@@ -0,0 +1,37 @@
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 declare abstract class KinematicsBase extends ModelObject {
22
+ readonly name: KinematicsName;
23
+ readonly segmentation: MoveSegmentation;
24
+ constructor(name: KinematicsName);
25
+ }
26
+ export default KinematicsBase;
27
+ export declare class TiltCorrection extends ModelObject {
28
+ correctionFactor: number;
29
+ lastCorrections: Array<number>;
30
+ maxCorrection: number;
31
+ screwPitch: number;
32
+ screwX: Array<number>;
33
+ screwY: Array<number>;
34
+ }
35
+ export declare abstract class ZLeadscrewKinematics extends KinematicsBase {
36
+ readonly tiltCorrection: TiltCorrection;
37
+ }
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZLeadscrewKinematics = exports.TiltCorrection = exports.KinematicsBase = exports.MoveSegmentation = exports.KinematicsName = void 0;
4
+ const ModelObject_1 = require("../../ModelObject");
5
+ var KinematicsName;
6
+ (function (KinematicsName) {
7
+ KinematicsName["cartesian"] = "cartesian";
8
+ KinematicsName["coreXY"] = "coreXY";
9
+ KinematicsName["coreXYU"] = "coreXYU";
10
+ KinematicsName["coreXYUV"] = "coreXYUV";
11
+ KinematicsName["coreXZ"] = "coreXZ";
12
+ KinematicsName["markForged"] = "markForged";
13
+ KinematicsName["fiveBarScara"] = "FiveBarScara";
14
+ KinematicsName["hangprinter"] = "Hangprinter";
15
+ KinematicsName["delta"] = "delta";
16
+ KinematicsName["polar"] = "Polar";
17
+ KinematicsName["rotaryDelta"] = "Rotary delta";
18
+ KinematicsName["scara"] = "Scara";
19
+ KinematicsName["unknown"] = "unknown";
20
+ })(KinematicsName = exports.KinematicsName || (exports.KinematicsName = {}));
21
+ class MoveSegmentation extends ModelObject_1.default {
22
+ constructor() {
23
+ super(...arguments);
24
+ this.segmentsPerSec = 0;
25
+ this.minSegmentLength = 0;
26
+ }
27
+ }
28
+ exports.MoveSegmentation = MoveSegmentation;
29
+ class KinematicsBase extends ModelObject_1.default {
30
+ constructor(name) {
31
+ super();
32
+ this.segmentation = new MoveSegmentation();
33
+ this.name = name;
34
+ }
35
+ }
36
+ exports.KinematicsBase = KinematicsBase;
37
+ exports.default = KinematicsBase;
38
+ class TiltCorrection extends ModelObject_1.default {
39
+ constructor() {
40
+ super(...arguments);
41
+ this.correctionFactor = 0;
42
+ this.lastCorrections = [];
43
+ this.maxCorrection = 0;
44
+ this.screwPitch = 0;
45
+ this.screwX = [];
46
+ this.screwY = [];
47
+ }
48
+ }
49
+ exports.TiltCorrection = TiltCorrection;
50
+ class ZLeadscrewKinematics extends KinematicsBase {
51
+ constructor() {
52
+ super(...arguments);
53
+ this.tiltCorrection = new TiltCorrection();
54
+ }
55
+ }
56
+ exports.ZLeadscrewKinematics = ZLeadscrewKinematics;
@@ -0,0 +1,7 @@
1
+ import { IModelObject } from "../../ModelObject";
2
+ import KinematicsBase from "./KinematicsBase";
3
+ export declare class PolarKinematics extends KinematicsBase {
4
+ constructor();
5
+ update(jsonElement: any): IModelObject | null;
6
+ }
7
+ export default PolarKinematics;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PolarKinematics = void 0;
4
+ const KinematicsBase_1 = require("./KinematicsBase");
5
+ const index_1 = require("./index");
6
+ class PolarKinematics extends KinematicsBase_1.default {
7
+ constructor() {
8
+ super(KinematicsBase_1.KinematicsName.polar);
9
+ }
10
+ update(jsonElement) {
11
+ if (jsonElement === null) {
12
+ throw new Error("Kinematics must not be null");
13
+ }
14
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
15
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
16
+ }
17
+ return super.update(jsonElement);
18
+ }
19
+ }
20
+ exports.PolarKinematics = PolarKinematics;
21
+ exports.default = PolarKinematics;
@@ -0,0 +1,6 @@
1
+ import { IModelObject } from "../../ModelObject";
2
+ import { ZLeadscrewKinematics } from "./KinematicsBase";
3
+ export declare class ScaraKinematics extends ZLeadscrewKinematics {
4
+ update(jsonElement: any): IModelObject | null;
5
+ }
6
+ export default ScaraKinematics;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScaraKinematics = void 0;
4
+ const KinematicsBase_1 = require("./KinematicsBase");
5
+ const index_1 = require("./index");
6
+ class ScaraKinematics extends KinematicsBase_1.ZLeadscrewKinematics {
7
+ update(jsonElement) {
8
+ if (jsonElement === null) {
9
+ throw new Error("Kinematics must not be null");
10
+ }
11
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
12
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
13
+ }
14
+ return super.update(jsonElement);
15
+ }
16
+ }
17
+ exports.ScaraKinematics = ScaraKinematics;
18
+ exports.default = ScaraKinematics;
@@ -0,0 +1,14 @@
1
+ import { IModelObject } from "../../ModelObject";
2
+ import KinematicsBase, { KinematicsName } from "./KinematicsBase";
3
+ export declare class Kinematics extends KinematicsBase {
4
+ constructor(name?: KinematicsName);
5
+ update(jsonElement: any): IModelObject | null;
6
+ }
7
+ export default Kinematics;
8
+ export declare function getKinematics(name: KinematicsName): KinematicsBase;
9
+ export * from "./CoreKinematics";
10
+ export * from "./DeltaKinematics";
11
+ export * from "./HangprinterKinematics";
12
+ export * from "./KinematicsBase";
13
+ export * from "./PolarKinematics";
14
+ export * from "./ScaraKinematics";
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.getKinematics = exports.Kinematics = void 0;
18
+ const KinematicsBase_1 = require("./KinematicsBase");
19
+ const CoreKinematics_1 = require("./CoreKinematics");
20
+ const DeltaKinematics_1 = require("./DeltaKinematics");
21
+ const HangprinterKinematics_1 = require("./HangprinterKinematics");
22
+ const ScaraKinematics_1 = require("./ScaraKinematics");
23
+ const PolarKinematics_1 = require("./PolarKinematics");
24
+ class Kinematics extends KinematicsBase_1.default {
25
+ constructor(name = KinematicsBase_1.KinematicsName.cartesian) {
26
+ super(name);
27
+ }
28
+ update(jsonElement) {
29
+ if (jsonElement === null) {
30
+ throw new Error("Kinematics must not be null");
31
+ }
32
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
33
+ return getKinematics(jsonElement.name).update(jsonElement);
34
+ }
35
+ return super.update(jsonElement);
36
+ }
37
+ }
38
+ exports.Kinematics = Kinematics;
39
+ exports.default = Kinematics;
40
+ function getKinematics(name) {
41
+ switch (name) {
42
+ case KinematicsBase_1.KinematicsName.cartesian:
43
+ case KinematicsBase_1.KinematicsName.coreXY:
44
+ case KinematicsBase_1.KinematicsName.coreXYU:
45
+ case KinematicsBase_1.KinematicsName.coreXYUV:
46
+ case KinematicsBase_1.KinematicsName.coreXZ:
47
+ case KinematicsBase_1.KinematicsName.markForged:
48
+ return new CoreKinematics_1.default(name);
49
+ case KinematicsBase_1.KinematicsName.delta:
50
+ return new DeltaKinematics_1.default(name);
51
+ case KinematicsBase_1.KinematicsName.rotaryDelta:
52
+ return new Kinematics(name);
53
+ case KinematicsBase_1.KinematicsName.hangprinter:
54
+ return new HangprinterKinematics_1.default();
55
+ case KinematicsBase_1.KinematicsName.fiveBarScara:
56
+ case KinematicsBase_1.KinematicsName.scara:
57
+ return new ScaraKinematics_1.default(name);
58
+ case KinematicsBase_1.KinematicsName.polar:
59
+ return new PolarKinematics_1.default();
60
+ default:
61
+ const _exhaustiveCheck = name;
62
+ case KinematicsBase_1.KinematicsName.unknown:
63
+ console.warn(`Kinematics '${name}' is not supported, falling back to cartesian`);
64
+ return new CoreKinematics_1.default(name);
65
+ }
66
+ }
67
+ exports.getKinematics = getKinematics;
68
+ __exportStar(require("./CoreKinematics"), exports);
69
+ __exportStar(require("./DeltaKinematics"), exports);
70
+ __exportStar(require("./HangprinterKinematics"), exports);
71
+ __exportStar(require("./KinematicsBase"), exports);
72
+ __exportStar(require("./PolarKinematics"), exports);
73
+ __exportStar(require("./ScaraKinematics"), exports);