@duet3d/objectmodel 3.7.0-alpha.6 → 3.7.0-alpha.7

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 (215) hide show
  1. package/dist/ObjectModel.js +24 -21
  2. package/dist/boards/directDisplay/DirectDisplayScreen.js +4 -1
  3. package/dist/boards/directDisplay/DirectDisplayScreenBase.js +4 -1
  4. package/dist/boards/directDisplay/DirectDisplayScreenST7567.js +4 -1
  5. package/dist/boards/directDisplay/index.js +5 -2
  6. package/dist/boards/index.js +6 -3
  7. package/dist/directories/index.js +4 -1
  8. package/dist/enums.json +1 -1
  9. package/dist/fans/index.js +4 -1
  10. package/dist/heat/Heater.js +7 -4
  11. package/dist/heat/HeaterModel.js +4 -1
  12. package/dist/heat/HeaterMonitor.js +4 -1
  13. package/dist/heat/index.js +6 -3
  14. package/dist/httpEndpoints/index.d.ts +19 -0
  15. package/dist/httpEndpoints/index.js +27 -0
  16. package/dist/index.js +4 -1
  17. package/dist/inputs/InputChannel.js +5 -2
  18. package/dist/job/Build.js +5 -2
  19. package/dist/job/GCodeFileInfo.js +7 -4
  20. package/dist/job/index.js +7 -4
  21. package/dist/ledStrips/index.js +4 -1
  22. package/dist/limits/index.js +4 -1
  23. package/dist/messages/index.js +4 -1
  24. package/dist/move/Axis.js +7 -4
  25. package/dist/move/DriverId.js +4 -1
  26. package/dist/move/Extruder.js +6 -3
  27. package/dist/move/InputShaping.js +4 -1
  28. package/dist/move/Microstepping.js +4 -1
  29. package/dist/move/MotionSystem.js +6 -3
  30. package/dist/move/MoveCalibration.js +4 -1
  31. package/dist/move/MoveCompensation.js +4 -1
  32. package/dist/move/index.js +12 -9
  33. package/dist/move/kinematics/DeltaKinematics.js +5 -2
  34. package/dist/move/kinematics/HangprinterKinematics.js +34 -1
  35. package/dist/move/kinematics/KinematicsBase.js +4 -1
  36. package/dist/move/kinematics/PolarKinematics.js +34 -1
  37. package/dist/move/kinematics/index.js +31 -6
  38. package/dist/network/NetworkInterface.d.ts +1 -1
  39. package/dist/network/NetworkInterface.js +6 -3
  40. package/dist/network/index.js +6 -3
  41. package/dist/plugins/PluginManifest.js +5 -2
  42. package/dist/plugins/index.js +4 -1
  43. package/dist/sbc/CPU.js +4 -1
  44. package/dist/sbc/Memory.js +4 -1
  45. package/dist/sbc/dsf/HttpEndpoint.js +4 -1
  46. package/dist/sbc/dsf/UserSession.js +4 -1
  47. package/dist/sbc/dsf/index.js +7 -4
  48. package/dist/sbc/index.js +7 -4
  49. package/dist/sensors/AnalogSensor.js +4 -1
  50. package/dist/sensors/Endstop.js +4 -1
  51. package/dist/sensors/FilamentMonitors/FilamentMonitorBase.js +4 -1
  52. package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.js +4 -1
  53. package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.js +38 -2
  54. package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +4 -1
  55. package/dist/sensors/FilamentMonitors/index.js +29 -4
  56. package/dist/sensors/Probe.js +4 -1
  57. package/dist/sensors/index.js +9 -6
  58. package/dist/spindles/index.js +4 -1
  59. package/dist/src/ModelCollection.d.ts +36 -0
  60. package/dist/src/ModelCollection.js +108 -0
  61. package/dist/src/ModelDictionary.d.ts +44 -0
  62. package/dist/src/ModelDictionary.js +109 -0
  63. package/dist/src/ModelObject.d.ts +55 -0
  64. package/dist/src/ModelObject.js +237 -0
  65. package/dist/src/ModelSet.d.ts +11 -0
  66. package/dist/src/ModelSet.js +15 -0
  67. package/dist/src/ObjectModel.d.ts +47 -0
  68. package/dist/src/ObjectModel.js +57 -0
  69. package/dist/src/boards/Driver.d.ts +18 -0
  70. package/dist/src/boards/Driver.js +37 -0
  71. package/dist/src/boards/directDisplay/DirectDisplayScreen.d.ts +6 -0
  72. package/dist/src/boards/directDisplay/DirectDisplayScreen.js +21 -0
  73. package/dist/src/boards/directDisplay/DirectDisplayScreenBase.d.ts +11 -0
  74. package/dist/src/boards/directDisplay/DirectDisplayScreenBase.js +19 -0
  75. package/dist/src/boards/directDisplay/DirectDisplayScreenST7567.d.ts +9 -0
  76. package/dist/src/boards/directDisplay/DirectDisplayScreenST7567.js +26 -0
  77. package/dist/src/boards/directDisplay/index.d.ts +20 -0
  78. package/dist/src/boards/directDisplay/index.js +59 -0
  79. package/dist/src/boards/index.d.ts +59 -0
  80. package/dist/src/boards/index.js +103 -0
  81. package/dist/src/directories/index.d.ts +11 -0
  82. package/dist/src/directories/index.js +21 -0
  83. package/dist/src/fans/index.d.ts +19 -0
  84. package/dist/src/fans/index.js +33 -0
  85. package/dist/src/heat/Heater.d.ts +30 -0
  86. package/dist/src/heat/Heater.js +41 -0
  87. package/dist/src/heat/HeaterModel.d.ts +21 -0
  88. package/dist/src/heat/HeaterModel.js +35 -0
  89. package/dist/src/heat/HeaterMonitor.d.ts +19 -0
  90. package/dist/src/heat/HeaterMonitor.js +31 -0
  91. package/dist/src/heat/index.d.ts +22 -0
  92. package/dist/src/heat/index.js +46 -0
  93. package/dist/src/index.d.ts +26 -0
  94. package/dist/src/index.js +57 -0
  95. package/dist/src/inputs/CodeChannel.d.ts +18 -0
  96. package/dist/src/inputs/CodeChannel.js +22 -0
  97. package/dist/src/inputs/Compatibility.d.ts +10 -0
  98. package/dist/src/inputs/Compatibility.js +14 -0
  99. package/dist/src/inputs/InputChannel.d.ts +32 -0
  100. package/dist/src/inputs/InputChannel.js +44 -0
  101. package/dist/src/inputs/index.d.ts +3 -0
  102. package/dist/src/inputs/index.js +19 -0
  103. package/dist/src/job/Build.d.ts +15 -0
  104. package/dist/src/job/Build.js +29 -0
  105. package/dist/src/job/GCodeFileInfo.d.ts +19 -0
  106. package/dist/src/job/GCodeFileInfo.js +29 -0
  107. package/dist/src/job/ThumbnailInfo.d.ts +15 -0
  108. package/dist/src/job/ThumbnailInfo.js +23 -0
  109. package/dist/src/job/index.d.ts +45 -0
  110. package/dist/src/job/index.js +78 -0
  111. package/dist/src/ledStrips/index.d.ts +13 -0
  112. package/dist/src/ledStrips/index.js +24 -0
  113. package/dist/src/limits/index.d.ts +32 -0
  114. package/dist/src/limits/index.js +42 -0
  115. package/dist/src/messages/index.d.ts +13 -0
  116. package/dist/src/messages/index.js +30 -0
  117. package/dist/src/move/Axis.d.ts +71 -0
  118. package/dist/src/move/Axis.js +82 -0
  119. package/dist/src/move/DriverId.d.ts +10 -0
  120. package/dist/src/move/DriverId.js +52 -0
  121. package/dist/src/move/Extruder.d.ts +39 -0
  122. package/dist/src/move/Extruder.js +57 -0
  123. package/dist/src/move/InputShaping.d.ts +19 -0
  124. package/dist/src/move/InputShaping.js +30 -0
  125. package/dist/src/move/KeepoutZone.d.ts +10 -0
  126. package/dist/src/move/KeepoutZone.js +21 -0
  127. package/dist/src/move/Microstepping.d.ts +6 -0
  128. package/dist/src/move/Microstepping.js +16 -0
  129. package/dist/src/move/MotionSystem.d.ts +20 -0
  130. package/dist/src/move/MotionSystem.js +30 -0
  131. package/dist/src/move/MoveCalibration.d.ts +11 -0
  132. package/dist/src/move/MoveCalibration.js +25 -0
  133. package/dist/src/move/MoveCompensation.d.ts +30 -0
  134. package/dist/src/move/MoveCompensation.js +50 -0
  135. package/dist/src/move/index.d.ts +80 -0
  136. package/dist/src/move/index.js +120 -0
  137. package/dist/src/move/kinematics/CoreKinematics.d.ts +9 -0
  138. package/dist/src/move/kinematics/CoreKinematics.js +31 -0
  139. package/dist/src/move/kinematics/DeltaKinematics.d.ts +20 -0
  140. package/dist/src/move/kinematics/DeltaKinematics.js +43 -0
  141. package/dist/src/move/kinematics/HangprinterKinematics.d.ts +9 -0
  142. package/dist/src/move/kinematics/HangprinterKinematics.js +61 -0
  143. package/dist/src/move/kinematics/KinematicsBase.d.ts +37 -0
  144. package/dist/src/move/kinematics/KinematicsBase.js +59 -0
  145. package/dist/src/move/kinematics/PolarKinematics.d.ts +12 -0
  146. package/dist/src/move/kinematics/PolarKinematics.js +59 -0
  147. package/dist/src/move/kinematics/ScaraKinematics.d.ts +14 -0
  148. package/dist/src/move/kinematics/ScaraKinematics.js +29 -0
  149. package/dist/src/move/kinematics/index.d.ts +14 -0
  150. package/dist/src/move/kinematics/index.js +98 -0
  151. package/dist/src/network/NetworkInterface.d.ts +46 -0
  152. package/dist/src/network/NetworkInterface.js +59 -0
  153. package/dist/src/network/index.d.ts +14 -0
  154. package/dist/src/network/index.js +38 -0
  155. package/dist/src/plugins/PluginManifest.d.ts +67 -0
  156. package/dist/src/plugins/PluginManifest.js +128 -0
  157. package/dist/src/plugins/index.d.ts +9 -0
  158. package/dist/src/plugins/index.js +33 -0
  159. package/dist/src/sbc/CPU.d.ts +8 -0
  160. package/dist/src/sbc/CPU.js +18 -0
  161. package/dist/src/sbc/Memory.d.ts +6 -0
  162. package/dist/src/sbc/Memory.js +16 -0
  163. package/dist/src/sbc/dsf/HttpEndpoint.d.ts +19 -0
  164. package/dist/src/sbc/dsf/HttpEndpoint.js +30 -0
  165. package/dist/src/sbc/dsf/UserSession.d.ts +18 -0
  166. package/dist/src/sbc/dsf/UserSession.js +30 -0
  167. package/dist/src/sbc/dsf/index.d.ts +15 -0
  168. package/dist/src/sbc/dsf/index.js +39 -0
  169. package/dist/src/sbc/index.d.ts +19 -0
  170. package/dist/src/sbc/index.js +43 -0
  171. package/dist/src/sensors/AnalogSensor.d.ts +59 -0
  172. package/dist/src/sensors/AnalogSensor.js +71 -0
  173. package/dist/src/sensors/Endstop.d.ts +15 -0
  174. package/dist/src/sensors/Endstop.js +26 -0
  175. package/dist/src/sensors/FilamentMonitors/Duet3DFilamentMonitor.d.ts +11 -0
  176. package/dist/src/sensors/FilamentMonitors/Duet3DFilamentMonitor.js +17 -0
  177. package/dist/src/sensors/FilamentMonitors/FilamentMonitorBase.d.ts +33 -0
  178. package/dist/src/sensors/FilamentMonitors/FilamentMonitorBase.js +45 -0
  179. package/dist/src/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +22 -0
  180. package/dist/src/sensors/FilamentMonitors/LaserFilamentMonitor.js +50 -0
  181. package/dist/src/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +22 -0
  182. package/dist/src/sensors/FilamentMonitors/PulsedFilamentMonitor.js +82 -0
  183. package/dist/src/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +22 -0
  184. package/dist/src/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +50 -0
  185. package/dist/src/sensors/FilamentMonitors/index.d.ts +12 -0
  186. package/dist/src/sensors/FilamentMonitors/index.js +77 -0
  187. package/dist/src/sensors/Probe.d.ts +51 -0
  188. package/dist/src/sensors/Probe.js +66 -0
  189. package/dist/src/sensors/index.d.ts +21 -0
  190. package/dist/src/sensors/index.js +49 -0
  191. package/dist/src/spindles/index.d.ts +25 -0
  192. package/dist/src/spindles/index.js +37 -0
  193. package/dist/src/state/MachineStatus.d.ts +17 -0
  194. package/dist/src/state/MachineStatus.js +21 -0
  195. package/dist/src/state/MessageBox.d.ts +26 -0
  196. package/dist/src/state/MessageBox.js +42 -0
  197. package/dist/src/state/RestorePoint.d.ts +11 -0
  198. package/dist/src/state/RestorePoint.js +21 -0
  199. package/dist/src/state/index.d.ts +69 -0
  200. package/dist/src/state/index.js +109 -0
  201. package/dist/src/tools/ToolRetraction.d.ts +9 -0
  202. package/dist/src/tools/ToolRetraction.js +19 -0
  203. package/dist/src/tools/index.d.ts +32 -0
  204. package/dist/src/tools/index.js +43 -0
  205. package/dist/src/volumes/index.d.ts +11 -0
  206. package/dist/src/volumes/index.js +21 -0
  207. package/dist/state/MessageBox.js +4 -1
  208. package/dist/state/RestorePoint.js +4 -1
  209. package/dist/state/index.js +7 -4
  210. package/dist/tools/ToolRetraction.js +4 -1
  211. package/dist/tools/index.js +5 -2
  212. package/dist/userSessions/index.d.ts +18 -0
  213. package/dist/userSessions/index.js +27 -0
  214. package/dist/volumes/index.js +4 -1
  215. package/package.json +3 -2
@@ -0,0 +1,120 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.Move = exports.MoveRotation = exports.MoveQueueItem = exports.MotorsIdleControl = exports.CurrentMove = void 0;
21
+ const ModelObject_1 = __importDefault(require("../ModelObject"));
22
+ const ModelCollection_1 = __importDefault(require("../ModelCollection"));
23
+ const Axis_1 = __importDefault(require("./Axis"));
24
+ const Extruder_1 = __importDefault(require("./Extruder"));
25
+ const InputShaping_1 = __importDefault(require("./InputShaping"));
26
+ const KeepoutZone_1 = __importDefault(require("./KeepoutZone"));
27
+ const MotionSystem_1 = __importDefault(require("./MotionSystem"));
28
+ const MoveCalibration_1 = __importDefault(require("./MoveCalibration"));
29
+ const MoveCompensation_1 = __importDefault(require("./MoveCompensation"));
30
+ const kinematics_1 = require("./kinematics");
31
+ class CurrentMove extends ModelObject_1.default {
32
+ constructor() {
33
+ super(...arguments);
34
+ this.acceleration = 0;
35
+ this.deceleration = 0;
36
+ this.extrusionRate = 0;
37
+ this.laserPwm = null;
38
+ this.requestedSpeed = 0;
39
+ this.topSpeed = 0;
40
+ }
41
+ }
42
+ exports.CurrentMove = CurrentMove;
43
+ class MotorsIdleControl extends ModelObject_1.default {
44
+ constructor() {
45
+ super(...arguments);
46
+ this.factor = 0.3;
47
+ this.timeout = 30;
48
+ }
49
+ }
50
+ exports.MotorsIdleControl = MotorsIdleControl;
51
+ class MoveQueueItem extends ModelObject_1.default {
52
+ constructor() {
53
+ super(...arguments);
54
+ this.gracePeriod = 0;
55
+ this.length = 0;
56
+ }
57
+ }
58
+ exports.MoveQueueItem = MoveQueueItem;
59
+ class MoveRotation extends ModelObject_1.default {
60
+ constructor() {
61
+ super(...arguments);
62
+ this.angle = 0;
63
+ this.centre = [0, 0];
64
+ }
65
+ }
66
+ exports.MoveRotation = MoveRotation;
67
+ class Move extends ModelObject_1.default {
68
+ constructor() {
69
+ super(...arguments);
70
+ this.accelerationTime = null;
71
+ this.axes = new ModelCollection_1.default(Axis_1.default);
72
+ this.backlashFactor = 10;
73
+ this.calibration = new MoveCalibration_1.default();
74
+ this.compensation = new MoveCompensation_1.default();
75
+ this.currentMove = new CurrentMove();
76
+ this.extruders = new ModelCollection_1.default(Extruder_1.default);
77
+ this.idle = new MotorsIdleControl();
78
+ this.keepout = new ModelCollection_1.default(KeepoutZone_1.default);
79
+ this.kinematics = new kinematics_1.CoreKinematics(kinematics_1.KinematicsName.cartesian);
80
+ this.limitAxes = true;
81
+ this.noMovesBeforeHoming = true;
82
+ this.motionSystems = new ModelCollection_1.default(MotionSystem_1.default);
83
+ /**
84
+ * @deprecated use motionSystems[].printingAcceleration instead
85
+ */
86
+ this.printingAcceleration = 10000;
87
+ this.queue = new ModelCollection_1.default(MoveQueueItem);
88
+ /**
89
+ * @deprecated use motionSystems[].rotation instead
90
+ */
91
+ this.rotation = new MoveRotation();
92
+ this.shaping = new InputShaping_1.default();
93
+ this.speedFactor = 1;
94
+ /**
95
+ * @deprecated use motionSystems[].travelAcceleration instead
96
+ */
97
+ this.travelAcceleration = 10000;
98
+ this.usingSCurve = false;
99
+ /**
100
+ * @deprecated use motionSystems[].virtualEPos instead
101
+ */
102
+ this.virtualEPos = 0;
103
+ /**
104
+ * @deprecated use motionSystems[].workplaceNumber instead
105
+ */
106
+ this.workplaceNumber = 0;
107
+ }
108
+ }
109
+ exports.Move = Move;
110
+ exports.default = Move;
111
+ __exportStar(require("./kinematics"), exports);
112
+ __exportStar(require("./Axis"), exports);
113
+ __exportStar(require("./DriverId"), exports);
114
+ __exportStar(require("./Extruder"), exports);
115
+ __exportStar(require("./InputShaping"), exports);
116
+ __exportStar(require("./KeepoutZone"), exports);
117
+ __exportStar(require("./Microstepping"), exports);
118
+ __exportStar(require("./MoveCalibration"), exports);
119
+ __exportStar(require("./MotionSystem"), exports);
120
+ __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,43 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DeltaKinematics = exports.DeltaTower = void 0;
7
+ const ModelCollection_1 = require("../../ModelCollection");
8
+ const ModelObject_1 = __importDefault(require("../../ModelObject"));
9
+ const KinematicsBase_1 = __importDefault(require("./KinematicsBase"));
10
+ const index_1 = require("./index");
11
+ class DeltaTower extends ModelObject_1.default {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.angleCorrection = 0;
15
+ this.diagonal = 0;
16
+ this.endstopAdjustment = 0;
17
+ this.xPos = 0;
18
+ this.yPos = 0;
19
+ }
20
+ }
21
+ exports.DeltaTower = DeltaTower;
22
+ class DeltaKinematics extends KinematicsBase_1.default {
23
+ constructor() {
24
+ super(...arguments);
25
+ this.deltaRadius = 0;
26
+ this.homedHeight = 0;
27
+ this.printRadius = 0;
28
+ this.towers = (0, ModelCollection_1.initCollection)(DeltaTower, [{}, {}, {}]);
29
+ this.xTilt = 0;
30
+ this.yTilt = 0;
31
+ }
32
+ update(jsonElement) {
33
+ if (jsonElement === null) {
34
+ throw new Error("Kinematics must not be null");
35
+ }
36
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
37
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
38
+ }
39
+ return super.update(jsonElement);
40
+ }
41
+ }
42
+ exports.DeltaKinematics = DeltaKinematics;
43
+ 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,61 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.HangprinterKinematics = void 0;
37
+ const KinematicsBase_1 = __importStar(require("./KinematicsBase"));
38
+ const index_1 = require("./index");
39
+ class HangprinterKinematics extends KinematicsBase_1.default {
40
+ constructor() {
41
+ super(KinematicsBase_1.KinematicsName.hangprinter);
42
+ this.anchors = [
43
+ [0, -2000, -100],
44
+ [2000, 1000, -100],
45
+ [-2000, 1000, -100],
46
+ [0, 0, 3000]
47
+ ];
48
+ this.printRadius = 1500;
49
+ }
50
+ update(jsonElement) {
51
+ if (jsonElement === null) {
52
+ throw new Error("Kinematics must not be null");
53
+ }
54
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
55
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
56
+ }
57
+ return super.update(jsonElement);
58
+ }
59
+ }
60
+ exports.HangprinterKinematics = HangprinterKinematics;
61
+ 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
+ linearDelta = "linearDelta",
12
+ polar = "polar",
13
+ rotaryDelta = "rotaryDelta",
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,59 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ZLeadscrewKinematics = exports.TiltCorrection = exports.KinematicsBase = exports.MoveSegmentation = exports.KinematicsName = void 0;
7
+ const ModelObject_1 = __importDefault(require("../../ModelObject"));
8
+ var KinematicsName;
9
+ (function (KinematicsName) {
10
+ KinematicsName["cartesian"] = "cartesian";
11
+ KinematicsName["coreXY"] = "coreXY";
12
+ KinematicsName["coreXYU"] = "coreXYU";
13
+ KinematicsName["coreXYUV"] = "coreXYUV";
14
+ KinematicsName["coreXZ"] = "coreXZ";
15
+ KinematicsName["markForged"] = "markForged";
16
+ KinematicsName["fiveBarScara"] = "fiveBarScara";
17
+ KinematicsName["hangprinter"] = "hangprinter";
18
+ KinematicsName["linearDelta"] = "linearDelta";
19
+ KinematicsName["polar"] = "polar";
20
+ KinematicsName["rotaryDelta"] = "rotaryDelta";
21
+ KinematicsName["scara"] = "scara";
22
+ KinematicsName["unknown"] = "unknown";
23
+ })(KinematicsName || (exports.KinematicsName = KinematicsName = {}));
24
+ class MoveSegmentation extends ModelObject_1.default {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.segmentsPerSec = 0;
28
+ this.minSegmentLength = 0;
29
+ }
30
+ }
31
+ exports.MoveSegmentation = MoveSegmentation;
32
+ class KinematicsBase extends ModelObject_1.default {
33
+ constructor(name) {
34
+ super();
35
+ this.segmentation = new MoveSegmentation();
36
+ this.name = name;
37
+ }
38
+ }
39
+ exports.KinematicsBase = KinematicsBase;
40
+ exports.default = KinematicsBase;
41
+ class TiltCorrection extends ModelObject_1.default {
42
+ constructor() {
43
+ super(...arguments);
44
+ this.correctionFactor = 0;
45
+ this.lastCorrections = [];
46
+ this.maxCorrection = 0;
47
+ this.screwPitch = 0;
48
+ this.screwX = [];
49
+ this.screwY = [];
50
+ }
51
+ }
52
+ exports.TiltCorrection = TiltCorrection;
53
+ class ZLeadscrewKinematics extends KinematicsBase {
54
+ constructor() {
55
+ super(...arguments);
56
+ this.tiltCorrection = new TiltCorrection();
57
+ }
58
+ }
59
+ exports.ZLeadscrewKinematics = ZLeadscrewKinematics;
@@ -0,0 +1,12 @@
1
+ import { IModelObject } from "../../ModelObject";
2
+ import KinematicsBase from "./KinematicsBase";
3
+ export declare class PolarKinematics extends KinematicsBase {
4
+ constructor();
5
+ radiusHomed: number;
6
+ radiusMax: number;
7
+ radiusMin: number;
8
+ ttAccMax: number;
9
+ ttSpeedMax: number;
10
+ update(jsonElement: any): IModelObject | null;
11
+ }
12
+ export default PolarKinematics;
@@ -0,0 +1,59 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.PolarKinematics = void 0;
37
+ const KinematicsBase_1 = __importStar(require("./KinematicsBase"));
38
+ const index_1 = require("./index");
39
+ class PolarKinematics extends KinematicsBase_1.default {
40
+ constructor() {
41
+ super(KinematicsBase_1.KinematicsName.polar);
42
+ this.radiusHomed = 0;
43
+ this.radiusMax = 0;
44
+ this.radiusMin = 0;
45
+ this.ttAccMax = 0;
46
+ this.ttSpeedMax = 0;
47
+ }
48
+ update(jsonElement) {
49
+ if (jsonElement === null) {
50
+ throw new Error("Kinematics must not be null");
51
+ }
52
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
53
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
54
+ }
55
+ return super.update(jsonElement);
56
+ }
57
+ }
58
+ exports.PolarKinematics = PolarKinematics;
59
+ exports.default = PolarKinematics;
@@ -0,0 +1,14 @@
1
+ import { IModelObject } from "../../ModelObject";
2
+ import { ZLeadscrewKinematics } from "./KinematicsBase";
3
+ export declare class ScaraKinematics extends ZLeadscrewKinematics {
4
+ crosstalk: number[];
5
+ distalLength: number;
6
+ minRadius: number;
7
+ proximalLength: number;
8
+ psiLimits: number[];
9
+ thetaLimits: number[];
10
+ xOffset: number;
11
+ yOffset: number;
12
+ update(jsonElement: any): IModelObject | null;
13
+ }
14
+ export default ScaraKinematics;
@@ -0,0 +1,29 @@
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
+ constructor() {
8
+ super(...arguments);
9
+ this.crosstalk = [0, 0, 0];
10
+ this.distalLength = 0;
11
+ this.minRadius = 0;
12
+ this.proximalLength = 0;
13
+ this.psiLimits = [0, 0];
14
+ this.thetaLimits = [0, 0];
15
+ this.xOffset = 0;
16
+ this.yOffset = 0;
17
+ }
18
+ update(jsonElement) {
19
+ if (jsonElement === null) {
20
+ throw new Error("Kinematics must not be null");
21
+ }
22
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
23
+ return (0, index_1.getKinematics)(jsonElement.name).update(jsonElement);
24
+ }
25
+ return super.update(jsonElement);
26
+ }
27
+ }
28
+ exports.ScaraKinematics = ScaraKinematics;
29
+ 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,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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
+ };
38
+ var __importDefault = (this && this.__importDefault) || function (mod) {
39
+ return (mod && mod.__esModule) ? mod : { "default": mod };
40
+ };
41
+ Object.defineProperty(exports, "__esModule", { value: true });
42
+ exports.Kinematics = void 0;
43
+ exports.getKinematics = getKinematics;
44
+ const KinematicsBase_1 = __importStar(require("./KinematicsBase"));
45
+ const CoreKinematics_1 = __importDefault(require("./CoreKinematics"));
46
+ const DeltaKinematics_1 = __importDefault(require("./DeltaKinematics"));
47
+ const HangprinterKinematics_1 = __importDefault(require("./HangprinterKinematics"));
48
+ const ScaraKinematics_1 = __importDefault(require("./ScaraKinematics"));
49
+ const PolarKinematics_1 = __importDefault(require("./PolarKinematics"));
50
+ class Kinematics extends KinematicsBase_1.default {
51
+ constructor(name = KinematicsBase_1.KinematicsName.cartesian) {
52
+ super(name);
53
+ }
54
+ update(jsonElement) {
55
+ if (jsonElement === null) {
56
+ throw new Error("Kinematics must not be null");
57
+ }
58
+ if (typeof jsonElement.name === "string" && this.name !== jsonElement.name) {
59
+ return getKinematics(jsonElement.name).update(jsonElement);
60
+ }
61
+ return super.update(jsonElement);
62
+ }
63
+ }
64
+ exports.Kinematics = Kinematics;
65
+ exports.default = Kinematics;
66
+ function getKinematics(name) {
67
+ switch (name) {
68
+ case KinematicsBase_1.KinematicsName.cartesian:
69
+ case KinematicsBase_1.KinematicsName.coreXY:
70
+ case KinematicsBase_1.KinematicsName.coreXYU:
71
+ case KinematicsBase_1.KinematicsName.coreXYUV:
72
+ case KinematicsBase_1.KinematicsName.coreXZ:
73
+ case KinematicsBase_1.KinematicsName.markForged:
74
+ return new CoreKinematics_1.default(name);
75
+ case KinematicsBase_1.KinematicsName.linearDelta:
76
+ return new DeltaKinematics_1.default(name);
77
+ case KinematicsBase_1.KinematicsName.rotaryDelta:
78
+ return new Kinematics(name);
79
+ case KinematicsBase_1.KinematicsName.hangprinter:
80
+ return new HangprinterKinematics_1.default();
81
+ case KinematicsBase_1.KinematicsName.fiveBarScara:
82
+ case KinematicsBase_1.KinematicsName.scara:
83
+ return new ScaraKinematics_1.default(name);
84
+ case KinematicsBase_1.KinematicsName.polar:
85
+ return new PolarKinematics_1.default();
86
+ default:
87
+ const _exhaustiveCheck = name;
88
+ case KinematicsBase_1.KinematicsName.unknown:
89
+ console.warn(`Kinematics '${name}' is not supported, falling back to cartesian`);
90
+ return new CoreKinematics_1.default(name);
91
+ }
92
+ }
93
+ __exportStar(require("./CoreKinematics"), exports);
94
+ __exportStar(require("./DeltaKinematics"), exports);
95
+ __exportStar(require("./HangprinterKinematics"), exports);
96
+ __exportStar(require("./KinematicsBase"), exports);
97
+ __exportStar(require("./PolarKinematics"), exports);
98
+ __exportStar(require("./ScaraKinematics"), exports);
@@ -0,0 +1,46 @@
1
+ import ModelObject from "../ModelObject";
2
+ import ModelSet from "../ModelSet";
3
+ export declare enum NetworkProtocol {
4
+ HTTP = "http",
5
+ HTTPS = "https",
6
+ FTP = "ftp",
7
+ SFTP = "sftp",
8
+ Telnet = "telnet",
9
+ SSH = "ssh"
10
+ }
11
+ export declare enum NetworkInterfaceState {
12
+ disabled = "disabled",
13
+ enabled = "enabled",
14
+ starting1 = "starting1",
15
+ starting2 = "starting2",
16
+ changingMode = "changingMode",
17
+ establishingLink = "establishingLink",
18
+ obtainingIP = "obtainingIP",
19
+ connected = "connected",
20
+ active = "active",
21
+ idle = "idle"
22
+ }
23
+ export declare enum NetworkInterfaceType {
24
+ ethernet = "ethernet",
25
+ wifi = "wifi"
26
+ }
27
+ export declare class NetworkInterface extends ModelObject {
28
+ activeProtocols: ModelSet<NetworkProtocol>;
29
+ actualIP: string | null;
30
+ configuredIP: string | null;
31
+ dnsServer: string | null;
32
+ firmwareVersion: string | null;
33
+ gateway: string | null;
34
+ mac: string | null;
35
+ numReconnects: number | null;
36
+ rssi: number | null;
37
+ /** @deprecated use rssi instead */
38
+ signal: number | null;
39
+ speed: number | null;
40
+ ssid: string | null;
41
+ state: NetworkInterfaceState | null;
42
+ subnet: string | null;
43
+ type: NetworkInterfaceType;
44
+ wifiCountry: string | null;
45
+ }
46
+ export default NetworkInterface;