ss-component-new 1.3.658 → 1.3.660

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 (83) hide show
  1. package/dist/_plugin-vue_export-helper-BZ_eTSzz.js +16638 -0
  2. package/dist/config.js +1 -1
  3. package/dist/{index-ChNfRlIP.js → index-BofWylNB.js} +42 -18
  4. package/dist/index-C5rFKP3J.js +1042 -0
  5. package/dist/index-CLw1Ncst.js +181 -0
  6. package/dist/index-Cz0F1nRr.js +8236 -0
  7. package/dist/index-p2dYw5GI.js +49 -0
  8. package/dist/{index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js → index.vue_vue_type_script_setup_true_lang-DRzriV-s.js} +2 -2
  9. package/dist/ss-component.css +2 -8
  10. package/dist/ss-component.js +214 -67
  11. package/dist/ss-component2.js +15 -75
  12. package/dist/ss-component3.js +785 -9
  13. package/package.json +4 -4
  14. package/public/config.js +1 -1
  15. package/dist/MTLLoader-DI0avKtj.js +0 -657
  16. package/dist/URDFLoader-PUxvYFDe.js +0 -2304
  17. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  18. package/dist/animationData-05aVUytq.js +0 -83
  19. package/dist/array-ZM04o_us.js +0 -1044
  20. package/dist/clone-Ddn1p6-1.js +0 -8
  21. package/dist/eleIcon-BWVKfp5t.js +0 -29
  22. package/dist/iconfont-BNdGaGPn.js +0 -1018
  23. package/dist/icons/svg/Update.svg +0 -1
  24. package/dist/icons/svg/functionList.svg +0 -1
  25. package/dist/icons/svg/uploadCopy.svg +0 -1
  26. package/dist/index-9ruiIh9Q.js +0 -30
  27. package/dist/index-BAenzdfB.js +0 -83
  28. package/dist/index-BDhIWgKn.js +0 -658
  29. package/dist/index-BFqUz4pN.js +0 -52
  30. package/dist/index-BIAWyba9.js +0 -2623
  31. package/dist/index-BKJ5SfU0.js +0 -98
  32. package/dist/index-BMr09Ruf.js +0 -107
  33. package/dist/index-BOGJMjxF.js +0 -117
  34. package/dist/index-BP1mKUQP.js +0 -627
  35. package/dist/index-BczRQX8N.js +0 -407
  36. package/dist/index-BnrvtCYj.js +0 -55
  37. package/dist/index-Bpr501oZ.js +0 -78
  38. package/dist/index-Bs7vFXNW.js +0 -93
  39. package/dist/index-BvbZiTVB.js +0 -342
  40. package/dist/index-Bvvz41NY.js +0 -44
  41. package/dist/index-C2YKgxwc.js +0 -61990
  42. package/dist/index-C9DBY1gg.js +0 -103
  43. package/dist/index-CFFbhR3G.js +0 -996
  44. package/dist/index-COr2mcbl.js +0 -48
  45. package/dist/index-CV_jQDcg.js +0 -9
  46. package/dist/index-CXe4q28L.js +0 -447
  47. package/dist/index-CsxH-GEh.js +0 -24847
  48. package/dist/index-D-5v1Jx7.js +0 -93
  49. package/dist/index-D4LcEpQ7.js +0 -619
  50. package/dist/index-DGObzWyL.js +0 -8984
  51. package/dist/index-DJ59jXR0.js +0 -28483
  52. package/dist/index-DJrzqi4-.js +0 -209
  53. package/dist/index-D_kI6aHR.js +0 -98
  54. package/dist/index-Ddhx18T9.js +0 -864
  55. package/dist/index-Dr9Wt5nC.js +0 -84
  56. package/dist/index-Dwt0Wlg_.js +0 -201
  57. package/dist/index-EGwObkob.js +0 -468
  58. package/dist/index-WPJbEuld.js +0 -62
  59. package/dist/index-YVR3acYT.js +0 -61
  60. package/dist/index-dD-mKgue.js +0 -27
  61. package/dist/index-lHjuVdOp.js +0 -11773
  62. package/dist/index-uF-ibwG0.js +0 -9
  63. package/dist/index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js +0 -137728
  64. package/dist/isString-CoCw_sp3.js +0 -8
  65. package/dist/localIcon-CoJHw5ss.js +0 -76
  66. package/dist/main-Bs7Y7gDm.js +0 -502
  67. package/dist/menuIndex-Dt0NyAyE.js +0 -159
  68. package/dist/request-DiogHwkN.js +0 -9465
  69. package/dist/threeModel-C3x2TmUN.js +0 -1108
  70. package/dist/threePreview-BHLSA5YS.js +0 -2259
  71. package/dist/threeSceneView-mfAIunaw.js +0 -1289
  72. package/dist/threeSceneViewForCPMPIP-DrnsTNPv.js +0 -538
  73. package/dist/threeTrackPathView-BR8-g2Tr.js +0 -620
  74. package/dist/threeViewerHost-DbJCLcbz.js +0 -233
  75. package/dist/urdfTree-IEJgkVzs.js +0 -254
  76. package/dist/workpieceTreePanel-aZV2ut3W.js +0 -555
  77. package/public/icons/svg/Update.svg +0 -1
  78. package/public/icons/svg/functionList.svg +0 -1
  79. package/public/icons/svg/uploadCopy.svg +0 -1
  80. /package/dist/icons/svg/{tableClose.svg → table-close.svg} +0 -0
  81. /package/dist/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
  82. /package/public/icons/svg/{tableClose.svg → table-close.svg} +0 -0
  83. /package/public/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
@@ -1,1289 +0,0 @@
1
- import { defineComponent as Le, ref as h, watch as ae, shallowRef as be, computed as ke, onUnmounted as Ie, resolveComponent as U, openBlock as Q, createElementBlock as Ve, createElementVNode as u, createVNode as l, withCtx as M, createBlock as ye, unref as X, createCommentVNode as Pe, toDisplayString as he, onMounted as Ge, onBeforeUnmount as Ze, Fragment as He, renderList as qe, nextTick as Ke, withDirectives as pe, vShow as de, renderSlot as Me } from "vue";
2
- import { r as Te, s as Ye } from "./threeViewerHost-DbJCLcbz.js";
3
- import { u as Je, a as Qe, b as et, T as Y, C as tt } from "./iconfont-BNdGaGPn.js";
4
- import { U as lt, u as ot, W as nt, a as at } from "./workpieceTreePanel-aZV2ut3W.js";
5
- import { c as st } from "./index-DGObzWyL.js";
6
- import { ax as it, E as j, aO as rt, aP as ct } from "./request-DiogHwkN.js";
7
- /* empty css */
8
- import { o as De, T as xe, V as D, n as H, s as ut, p as pt, h as Se, t as dt, L as mt, u as vt, v as ft, w as gt, x as ht, y as bt, z as yt, l as _t, F as wt } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js";
9
- import "./index-C2YKgxwc.js";
10
- import "./index-dD-mKgue.js";
11
- import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js";
12
- import { y as Be, z as Ct, A as Pt } from "./index-DJ59jXR0.js";
13
- import "./index-BIAWyba9.js";
14
- import "./index-BvbZiTVB.js";
15
- import { f as kt, a as xt, g as Rt, b as Mt } from "./animationData-05aVUytq.js";
16
- import { g as Tt, a as Vt, b as Dt, c as St, U as At, J as $t } from "./urdfTree-IEJgkVzs.js";
17
- import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
18
- import { s as Ft } from "./index-DJrzqi4-.js";
19
- const I = 1e-3, oe = pt.degToRad, je = new dt({
20
- // 灰色
21
- color: 13421772,
22
- metalness: 0.3,
23
- roughness: 0.6,
24
- side: _t
25
- });
26
- function zt(y = 5e-3, v = 64) {
27
- const d = new De([new D(0, 0, 0), new D(0, 0, 0)]), n = new xe(d, v, y, 16, !1), m = je;
28
- return new Se(n, m);
29
- }
30
- const Ne = (y) => y.reduce((v, d) => {
31
- let n = 0;
32
- const m = d.Y ?? 0, _ = d.C ?? 0, s = d.R ?? 0;
33
- return m > 0 && (n += m), _ > 0 && s > 0 && (n += s * oe(_)), v + n;
34
- }, 0), We = (y) => {
35
- const v = [], d = y.Y ?? 0, n = y.B ?? 0, m = y.C ?? 0, _ = y.R ?? 0, s = {
36
- pos: new D(0, 0, 0),
37
- localY: new D(0, 1, 0),
38
- localX: new D(1, 0, 0),
39
- localZ: new D(0, 0, 1)
40
- };
41
- if (!d && !m) return v;
42
- if (v.push(s.pos.clone()), n !== 0) {
43
- const b = new H().makeRotationAxis(s.localY, oe(n));
44
- s.localX.applyMatrix4(b), s.localZ.applyMatrix4(b);
45
- }
46
- if (d > 0 && (s.pos.add(s.localY.clone().multiplyScalar(d * I)), v.push(s.pos.clone())), m > 0 && _ > 0) {
47
- const b = oe(m), f = _ * I, w = s.pos.clone().add(s.localX.clone().multiplyScalar(-f)), a = Math.max(16, Math.ceil(m / 5));
48
- for (let C = 1; C <= a; C++) {
49
- const p = b * C / a, P = new H().makeRotationAxis(s.localZ, p), c = s.localX.clone().multiplyScalar(f).applyMatrix4(P), T = w.clone().add(c);
50
- v.push(T);
51
- }
52
- }
53
- return v;
54
- };
55
- function Yt(y, v) {
56
- const d = new ut();
57
- d.name = "CompletePipe";
58
- const n = {
59
- pos: new D(0, 0, 0),
60
- localX: new D(1, 0, 0),
61
- localY: new D(0, 1, 0),
62
- localZ: new D(0, 0, 1)
63
- };
64
- let m = 0, _ = 1;
65
- for (let s = 0; s < y.length; s++) {
66
- const b = y[s], f = b.Y ?? 0, w = b.B ?? 0, a = b.C ?? 0, C = b.R ?? 0;
67
- if (w !== 0) {
68
- const p = new H().makeRotationAxis(n.localY, oe(w));
69
- n.localX.applyMatrix4(p), n.localZ.applyMatrix4(p);
70
- }
71
- if (f > 0) {
72
- const p = n.pos.clone();
73
- n.pos.add(n.localY.clone().multiplyScalar(f * I));
74
- const P = n.pos.clone(), r = Lt(p, P, v * I);
75
- r.userData = {
76
- segmentType: "straight",
77
- segmentIndex: m,
78
- frameIndex: s,
79
- length: f,
80
- frame: { Y: f, B: w, C: a, R: C }
81
- }, r.name = `直段_${m}`, d.add(r);
82
- const c = p.clone();
83
- Bt(d, _, c, v * I), m++;
84
- }
85
- if (a > 0 && C > 0) {
86
- const p = oe(a), P = C * I, r = [];
87
- r.push(n.pos.clone());
88
- const c = n.pos.clone().add(n.localX.clone().multiplyScalar(-P)), T = Math.max(16, Math.ceil(a / 5));
89
- for (let g = 1; g <= T; g++) {
90
- const V = p * g / T, B = new H().makeRotationAxis(n.localZ, V), Z = n.localX.clone().multiplyScalar(P).applyMatrix4(B), ee = c.clone().add(Z);
91
- r.push(ee);
92
- }
93
- const A = Ut(r, v * I);
94
- A.userData = {
95
- segmentType: "bend",
96
- segmentIndex: m,
97
- frameIndex: s,
98
- angle: a,
99
- radius: C,
100
- centerPoint: c.toArray(),
101
- frame: { Y: f, B: w, C: a, R: C }
102
- }, A.name = `弯段_${m}`, d.add(A), Math.floor(r.length / 2), r[0], n.pos = r[r.length - 1].clone();
103
- const $ = new H().makeRotationAxis(n.localZ, p);
104
- n.localY.applyMatrix4($), n.localX.applyMatrix4($), m++, _++;
105
- }
106
- }
107
- return d;
108
- }
109
- function Bt(y, v, d, n) {
110
- const m = new D(0, n * 2, n * 5), _ = d.clone().add(m), s = [d, _], b = new vt().setFromPoints(s), f = new ft({
111
- color: 16711680,
112
- dashSize: n * 0.5,
113
- gapSize: n * 0.3,
114
- linewidth: 1
115
- }), w = new gt(b, f);
116
- w.computeLineDistances(), y.add(w);
117
- const a = document.createElement("canvas"), C = a.getContext("2d");
118
- a.width = 128, a.height = 128, C.clearRect(0, 0, 128, 128), C.fillStyle = "#FF0000", C.font = "bold 80px Arial", C.textAlign = "center", C.textBaseline = "middle", C.fillText(v.toString(), 64, 64);
119
- const p = new ht(a), P = new bt({
120
- map: p,
121
- transparent: !0,
122
- depthTest: !1,
123
- depthWrite: !1
124
- }), r = new yt(P), c = n * 3;
125
- r.scale.set(c, c, 1), r.position.copy(_), r.name = `Label_${v}`, r.userData = { labelNumber: v }, y.add(r);
126
- }
127
- function Lt(y, v, d) {
128
- const n = new mt(y, v), m = new xe(n, 2, d, 18, !1);
129
- return new Se(m, je);
130
- }
131
- function Ut(y, v) {
132
- const d = new De(y, !1, "catmullrom", 0.01), n = new xe(d, Math.max(16, y.length * 2), v, 18, !1);
133
- return new Se(n, je);
134
- }
135
- function Ee(y, v, d, n, m, _ = 0) {
136
- let s = v.slice(0, m + 1);
137
- const b = v[m + 1];
138
- if (b && _ > 0) {
139
- const r = {
140
- ...b,
141
- // 根据插值因子计算当前的弯曲角度C,实现从0到目标角度的平滑过渡
142
- B: (b.B ?? 0) * _,
143
- // 根据插值因子计算当前的弯曲角度C,实现从0到目标角度的平滑过渡
144
- C: (b.C ?? 0) * _
145
- };
146
- s.push(r);
147
- }
148
- const f = Ne(s), w = Math.max(0, d - f), a = [];
149
- a.push(new D(0, 0, 0));
150
- const C = new D(0, w * I, 0);
151
- w > 0 && a.push(C);
152
- let p = {
153
- pos: C.clone(),
154
- localY: new D(0, 1, 0),
155
- localX: new D(1, 0, 0),
156
- localZ: new D(0, 0, 1)
157
- };
158
- const P = [];
159
- for (let r = s.length - 1; r >= 0; r--) {
160
- const c = s[r], T = We(c);
161
- if (T.length > 0) {
162
- const A = T.map((B) => {
163
- const L = B.clone(), Z = new H();
164
- return Z.makeBasis(p.localX, p.localY, p.localZ), L.applyMatrix4(Z), L.add(p.pos);
165
- });
166
- P.push(A);
167
- const $ = A[A.length - 1];
168
- p.pos = $.clone();
169
- const g = c.B ?? 0, V = c.C ?? 0;
170
- if (g !== 0) {
171
- const B = new H().makeRotationAxis(p.localY, oe(g));
172
- p.localX.applyMatrix4(B), p.localZ.applyMatrix4(B);
173
- }
174
- if (V > 0) {
175
- const B = oe(V), L = new H().makeRotationAxis(p.localZ, B);
176
- p.localY.applyMatrix4(L), p.localX.applyMatrix4(L);
177
- }
178
- }
179
- }
180
- for (const r of P)
181
- r.length > 1 && a.push(...r.slice(1));
182
- a.length < 2 && a.push(new D(0, 1e-3, 0));
183
- try {
184
- const r = new De(a, !1, "catmullrom", 0.01), c = new xe(r, Math.max(2, a.length * 4), n * I, 18, !1);
185
- y.geometry.dispose(), y.geometry = c;
186
- } catch (r) {
187
- console.error("管件更新失败", r);
188
- }
189
- }
190
- function Oe(y, v, d, n = 0) {
191
- let m = y.slice(0, d + 1);
192
- const _ = y[d + 1];
193
- if (_ && n > 0) {
194
- const p = {
195
- ..._,
196
- // 根据插值因子计算当前的弯曲角度C,实现从0到目标角度的平滑过渡
197
- B: (_.B ?? 0) * n,
198
- // 根据插值因子计算当前的弯曲角度C,实现从0到目标角度的平滑过渡
199
- C: (_.C ?? 0) * n
200
- };
201
- m.push(p);
202
- }
203
- const s = Ne(m), b = Math.max(0, v - s), f = [];
204
- f.push(new D(0, 0, 0));
205
- const w = new D(0, b * I, 0);
206
- b > 0 && f.push(w);
207
- let a = {
208
- pos: w.clone(),
209
- localY: new D(0, 1, 0),
210
- localX: new D(1, 0, 0),
211
- localZ: new D(0, 0, 1)
212
- };
213
- const C = [];
214
- for (let p = m.length - 1; p >= 0; p--) {
215
- const P = m[p], r = We(P);
216
- if (r.length > 0) {
217
- const c = r.map((g) => {
218
- const V = g.clone(), B = new H();
219
- return B.makeBasis(a.localX, a.localY, a.localZ), V.applyMatrix4(B), V.add(a.pos);
220
- });
221
- C.push(c);
222
- const T = c[c.length - 1];
223
- a.pos = T.clone();
224
- const A = P.B ?? 0, $ = P.C ?? 0;
225
- if (A !== 0) {
226
- const g = new H().makeRotationAxis(a.localY, oe(A));
227
- a.localX.applyMatrix4(g), a.localZ.applyMatrix4(g);
228
- }
229
- if ($ > 0) {
230
- const g = oe($), V = new H().makeRotationAxis(a.localZ, g);
231
- a.localY.applyMatrix4(V), a.localX.applyMatrix4(V);
232
- }
233
- }
234
- }
235
- for (const p of C)
236
- p.length > 1 && f.push(...p.slice(1));
237
- return f.length < 2 && f.push(new D(0, 1e-3, 0)), f;
238
- }
239
- function Xe(y, v, d, n, m, _, s, b = 0, f = 0) {
240
- const w = m - f, a = Oe(n, w, s, b);
241
- let p = Oe(d, f, s, b);
242
- p.forEach((r) => r.y = -r.y), p.reverse();
243
- const P = [...p, ...a];
244
- try {
245
- const r = new De(P, !1, "catmullrom", 0.01), c = new xe(r, Math.max(2, P.length * 4), _ * I, 18, !1);
246
- v.geometry.dispose(), y.geometry.dispose(), v.parent && v.parent.remove(v), y.geometry = c;
247
- } catch (r) {
248
- console.error("管件更新失败", r);
249
- }
250
- }
251
- const jt = { class: "panel-content" }, Et = { class: "action-bar" }, Ot = { class: "animation-controls" }, Xt = { class: "control-row" }, Gt = { class: "control-row" }, Zt = { class: "frame-info" }, Jt = { class: "control-row" }, Nt = { class: "progress-bar" }, Wt = { class: "dialog-footer" }, It = /* @__PURE__ */ Le({
252
- __name: "animationPanel",
253
- props: {
254
- model: {},
255
- threeData: {}
256
- },
257
- setup(y, { expose: v }) {
258
- const d = y, n = h(), m = h();
259
- ae(() => d.threeData, (e) => {
260
- const o = e == null ? void 0 : e.data;
261
- m.value = o == null ? void 0 : o.type;
262
- }, {
263
- immediate: !0
264
- });
265
- const _ = async () => {
266
- let e = {};
267
- m.value === Te.SINGLE && (e = await kt()), m.value === Te.DOUBLE && (e = await xt());
268
- const {
269
- initialPipeLength: o = 0,
270
- pipeRadius: t = 0,
271
- clampLength: i = 0,
272
- animationData: R
273
- } = e;
274
- $.value = o, g.value = t, V.value = i, n.value = R;
275
- const x = st(n.value), le = fe(G.value), K = (x == null ? void 0 : x["输出(动画数据)"]) || [];
276
- s.value = K.length ? K : [le];
277
- }, s = h([]), b = h(!1), f = h(""), w = h(!1), a = h(0), C = h(0), p = h(1e3);
278
- let P = !1;
279
- const r = h(null), c = be(null), T = be(null), A = be(null), $ = h(0), g = h(12.5), V = h(30), B = h([]), L = h(null), Z = ke(() => d.model ? Tt(d.model).map((t) => t.name) : []), ee = h(["Y", "B", "C", "R"]), G = ke(() => [...Z.value, ...ee.value]), _e = ke(() => G.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
280
- ${G.value.join(" ")}
281
- 0 0 0 ...
282
- 1 2 3 ...` : "请先加载模型。"), ve = () => s.value.map((e) => ({
283
- Y: parseFloat(e.Y) || 0,
284
- B: parseFloat(e.B) || 0,
285
- C: parseFloat(e.C) || 0,
286
- R: parseFloat(e.R) || 0
287
- })), se = () => {
288
- const e = [], o = [];
289
- return s.value.forEach((t) => {
290
- const { Y1: i, B1: R, C1: x, R1: le, Y2: K, B2: ue, C2: Ce, R2: z } = t;
291
- e.push({
292
- Y: parseFloat(i) || 0,
293
- B: parseFloat(R) || 0,
294
- C: parseFloat(x) || 0,
295
- R: parseFloat(le) || 0
296
- }), o.push({
297
- Y: parseFloat(K) || 0,
298
- B: parseFloat(ue) || 0,
299
- C: parseFloat(Ce) || 0,
300
- R: parseFloat(z) || 0
301
- });
302
- }), {
303
- posPipeYbcr: e,
304
- negPipeYbcr: o
305
- };
306
- }, S = (e = 0, o = 0) => {
307
- if (c.value && T.value) {
308
- const t = se();
309
- Xe(
310
- c.value,
311
- T.value,
312
- t.posPipeYbcr,
313
- t.negPipeYbcr,
314
- $.value,
315
- g.value,
316
- e,
317
- o,
318
- V.value
319
- );
320
- } else if (c.value) {
321
- const t = ve();
322
- Ee(c.value, t, $.value, g.value, e, o);
323
- }
324
- }, k = (e) => {
325
- if (e < 0 || e >= s.value.length) {
326
- console.error(`帧索引 ${e} 超出范围`);
327
- return;
328
- }
329
- const o = s.value[e];
330
- if (console.log(`应用第 ${e} 帧数据 ${o}`), a.value = e, r.value) {
331
- const t = {};
332
- Z.value.forEach((i) => {
333
- const R = parseFloat(o[i]);
334
- isNaN(R) || (t[i] = R);
335
- }), r.value.setJointAngles(t);
336
- }
337
- S(e, 0);
338
- }, J = async () => {
339
- if (s.value.length === 0) {
340
- j.error("无法播放动画:无数据");
341
- return;
342
- }
343
- if (!w.value) {
344
- w.value = !0, P = !1, s.value.length - 1 === a.value && (a.value = 0);
345
- try {
346
- for (let e = a.value + 1; e < s.value.length && !P; e++) {
347
- a.value = e;
348
- const o = s.value[e], t = {};
349
- r.value && Z.value.forEach((i) => {
350
- const R = parseFloat(o[i]);
351
- isNaN(R) || (t[i] = R);
352
- }), r.value ? await r.value.animateToState(
353
- t,
354
- p.value,
355
- (i) => {
356
- C.value = (e + i) / s.value.length * 100, S(e - 1, i);
357
- }
358
- ) : (await new Promise((i) => setTimeout(i, p.value)), C.value = (e + 1) / s.value.length * 100);
359
- }
360
- P || j.success("动画播放完成");
361
- } catch (e) {
362
- console.error("动画播放出错:", e), j.error("动画播放出错");
363
- } finally {
364
- w.value = !1, C.value = 0;
365
- }
366
- }
367
- }, E = () => {
368
- P = !0, w.value = !1, C.value = 0, j.info("动画已停止");
369
- }, N = () => {
370
- a.value = 0;
371
- }, O = () => {
372
- if (c.value && T.value) {
373
- const e = se();
374
- Xe(
375
- c.value,
376
- T.value,
377
- e.posPipeYbcr,
378
- e.negPipeYbcr,
379
- $.value,
380
- g.value,
381
- -1,
382
- 0,
383
- V.value
384
- );
385
- } else if (c.value) {
386
- const e = ve();
387
- Ee(
388
- c.value,
389
- e,
390
- $.value,
391
- g.value,
392
- -1,
393
- 0
394
- );
395
- }
396
- }, te = () => {
397
- r.value && r.value.resetToZero(), O(), N(), j.success("机器人和管件已重置");
398
- }, q = (e) => `第 ${e + 1} 帧`, W = (e) => {
399
- w.value && E(), k(e);
400
- }, ie = () => {
401
- w.value && E(), !(a.value + 1 >= s.value.length) && k(a.value + 1);
402
- }, F = () => {
403
- w.value && E(), a.value !== 0 && k(a.value - 1);
404
- }, ne = () => {
405
- A.value && (A.value.visible = !0), c.value && c.value.parent && c.value.parent.remove(c.value), A.value = null, c.value = null, T.value = null;
406
- }, fe = (e) => e == null ? void 0 : e.reduce((o, t) => (o[t] = "0", o), {});
407
- ae(G, (e, o) => {
408
- if (JSON.stringify(e) !== JSON.stringify(o))
409
- if (e.length > 0) {
410
- const t = fe(e);
411
- s.value = [t];
412
- } else
413
- s.value = [];
414
- }, { immediate: !0 });
415
- const re = h(0), we = (e) => {
416
- re.value = e;
417
- }, Ae = (e, o) => {
418
- if (!e || !o)
419
- return;
420
- const t = St(e, o), i = zt();
421
- i.visible = !1, t == null || t.add(i);
422
- }, $e = (e) => {
423
- r.value = new lt(e), B.value = Dt(e), L.value = "Pipe_Joint";
424
- }, ce = () => {
425
- r.value = null, B.value = [], L.value = null;
426
- }, ge = (e) => {
427
- $e(e), Ae(e, L.value), we(re.value + 1), te();
428
- };
429
- ae(() => d.model, (e) => {
430
- if (ne(), e) {
431
- ge(e);
432
- return;
433
- }
434
- ce();
435
- }, { immediate: !0 });
436
- const Re = (e) => {
437
- var t, i;
438
- const o = new Se(
439
- e.geometry.clone(),
440
- e.material
441
- );
442
- return o.name = "managed_pipe_clone", (i = (t = e == null ? void 0 : e.parent) == null ? void 0 : t.add) == null || i.call(t, o), o.position.copy(e.position), o.rotation.copy(e.rotation), o.scale.copy(e.scale), o;
443
- };
444
- ae([L, V, $, re], ([e, o]) => {
445
- if (ne(), d.model && e) {
446
- const t = Vt(d.model, e);
447
- if (console.log(t, "meshToReplace"), t && t.parent) {
448
- A.value = t, t.visible = !1;
449
- const i = Re(t);
450
- if (m.value === Te.SINGLE && (i.position.y -= o * 1e-3), c.value = i, m.value === Te.DOUBLE) {
451
- const R = Re(t);
452
- T.value = R;
453
- }
454
- S(0, 0);
455
- } else
456
- e && console.warn(`在 link '${e}' 中未找到可替换的网格或其没有父级。`);
457
- }
458
- });
459
- const Fe = async () => {
460
- if (G.value.length === 0) {
461
- j.warning("没有可导出的表头");
462
- return;
463
- }
464
- const e = G.value.join(" ");
465
- try {
466
- await navigator.clipboard.writeText(e), j.success("表头已成功复制到剪贴板!");
467
- } catch (o) {
468
- console.error("复制失败:", o), j.error("复制失败,请检查浏览器权限或手动复制。");
469
- }
470
- }, ze = () => {
471
- if (!f.value.trim()) {
472
- j.warning("导入内容不能为空");
473
- return;
474
- }
475
- const e = f.value.trim().split(`
476
- `).filter((x) => x.trim() !== "");
477
- if (e.length < 2) {
478
- j.error("导入数据至少需要包含表头行和一行数据");
479
- return;
480
- }
481
- const o = e[0].split(" ").map((x) => x.trim()), t = {};
482
- if (o.forEach((x, le) => {
483
- G.value.includes(x) && (t[le] = x);
484
- }), Object.keys(t).length === 0) {
485
- j.error("没有找到匹配的表头,请检查表头名称是否正确");
486
- return;
487
- }
488
- const R = e.slice(1).map((x) => {
489
- const le = x.split(" "), K = {};
490
- return G.value.forEach((ue) => {
491
- K[ue] = "0";
492
- }), Object.entries(t).forEach(([ue, Ce]) => {
493
- const z = le[parseInt(ue)];
494
- z !== void 0 && z.trim() !== "" && (K[Ce] = z.trim());
495
- }), K;
496
- });
497
- R.length > 0 ? (s.value = R, j.success(`成功导入 ${R.length} 行数据!`), b.value = !1, f.value = "") : j.error("未能解析到有效数据,请检查格式。");
498
- };
499
- return Ie(() => {
500
- ne(), P = !0;
501
- }), v({ playAnimation: J, stopAnimation: E, forwardFrame: ie, backwardFrame: F }), (e, o) => {
502
- const t = U("el-icon"), i = U("el-input-number"), R = U("el-form-item"), x = U("el-form"), le = U("el-slider"), K = U("el-progress"), ue = U("el-input"), Ce = U("el-dialog");
503
- return Q(), Ve("div", jt, [
504
- u("div", Et, [
505
- l(me, {
506
- onClick: _,
507
- modelValue: "获取数据"
508
- }),
509
- l(me, {
510
- onClick: Fe,
511
- disabled: G.value.length === 0,
512
- modelValue: "导出表头"
513
- }, null, 8, ["disabled"]),
514
- l(me, {
515
- modelValue: "播放",
516
- onClick: J,
517
- disabled: s.value.length === 0 || w.value,
518
- buttonType: "primary"
519
- }, {
520
- default: M(() => [
521
- w.value ? (Q(), ye(t, {
522
- key: 0,
523
- class: "is-loading"
524
- }, {
525
- default: M(() => [
526
- l(X(it))
527
- ]),
528
- _: 1
529
- })) : Pe("", !0)
530
- ]),
531
- _: 1
532
- }, 8, ["disabled"]),
533
- l(me, {
534
- onClick: E,
535
- modelValue: "停止",
536
- buttonType: "danger"
537
- }),
538
- l(me, {
539
- onClick: te,
540
- modelValue: "重置",
541
- buttonType: "primary"
542
- })
543
- ]),
544
- u("div", Ot, [
545
- u("div", Xt, [
546
- l(x, {
547
- "label-width": "auto",
548
- style: { width: "100%" }
549
- }, {
550
- default: M(() => [
551
- l(R, {
552
- label: "帧间隔 (ms):",
553
- prop: "frameDuration"
554
- }, {
555
- default: M(() => [
556
- l(i, {
557
- modelValue: p.value,
558
- "onUpdate:modelValue": o[0] || (o[0] = (z) => p.value = z),
559
- min: 100,
560
- max: 5e3,
561
- step: 100,
562
- style: { width: "100%" }
563
- }, null, 8, ["modelValue"])
564
- ]),
565
- _: 1
566
- }),
567
- l(R, {
568
- label: "管件总长 (mm):",
569
- prop: "initialPipeLength"
570
- }, {
571
- default: M(() => [
572
- l(i, {
573
- modelValue: $.value,
574
- "onUpdate:modelValue": o[1] || (o[1] = (z) => $.value = z),
575
- min: 0,
576
- style: { width: "100%" }
577
- }, null, 8, ["modelValue"])
578
- ]),
579
- _: 1
580
- }),
581
- l(R, {
582
- label: "管件半径 (mm):",
583
- prop: "pipeRadius"
584
- }, {
585
- default: M(() => [
586
- l(i, {
587
- modelValue: g.value,
588
- "onUpdate:modelValue": o[2] || (o[2] = (z) => g.value = z),
589
- min: 0,
590
- style: { width: "100%" }
591
- }, null, 8, ["modelValue"])
592
- ]),
593
- _: 1
594
- }),
595
- l(R, {
596
- label: "夹持长度 (mm):",
597
- prop: "clampLength"
598
- }, {
599
- default: M(() => [
600
- l(i, {
601
- modelValue: V.value,
602
- "onUpdate:modelValue": o[3] || (o[3] = (z) => V.value = z),
603
- min: 0,
604
- style: { width: "100%" }
605
- }, null, 8, ["modelValue"])
606
- ]),
607
- _: 1
608
- })
609
- ]),
610
- _: 1
611
- })
612
- ]),
613
- o[10] || (o[10] = u("div", { class: "control-row" }, [
614
- u("label", null, "管件 Mesh:")
615
- ], -1)),
616
- u("div", Gt, [
617
- o[8] || (o[8] = u("label", null, "当前帧:", -1)),
618
- u("span", Zt, he(a.value + 1) + " / " + he(s.value.length), 1)
619
- ]),
620
- u("div", Jt, [
621
- o[9] || (o[9] = u("label", null, "动画进度:", -1)),
622
- l(le, {
623
- modelValue: a.value,
624
- "onUpdate:modelValue": o[4] || (o[4] = (z) => a.value = z),
625
- min: 0,
626
- max: s.value.length > 0 ? s.value.length - 1 : 0,
627
- step: 1,
628
- "format-tooltip": q,
629
- onInput: W,
630
- disabled: s.value.length === 0,
631
- style: { "flex-grow": "1", margin: "0 10px" }
632
- }, null, 8, ["modelValue", "max", "disabled"])
633
- ]),
634
- u("div", Nt, [
635
- l(K, {
636
- percentage: C.value,
637
- "show-text": !1,
638
- "stroke-width": 6
639
- }, null, 8, ["percentage"])
640
- ])
641
- ]),
642
- l(Ce, {
643
- modelValue: b.value,
644
- "onUpdate:modelValue": o[7] || (o[7] = (z) => b.value = z),
645
- title: "导入数据",
646
- width: "500px"
647
- }, {
648
- footer: M(() => [
649
- u("span", Wt, [
650
- l(me, {
651
- modelValue: "取消",
652
- onClick: o[6] || (o[6] = (z) => b.value = !1)
653
- }),
654
- l(me, {
655
- modelValue: "确认导入",
656
- onClick: ze,
657
- type: "primary"
658
- })
659
- ])
660
- ]),
661
- default: M(() => [
662
- o[11] || (o[11] = u("p", { class: "import-instructions" }, " 请从Excel或csv中复制数据 (首行为表头, Tab分隔) ", -1)),
663
- l(ue, {
664
- modelValue: f.value,
665
- "onUpdate:modelValue": o[5] || (o[5] = (z) => f.value = z),
666
- type: "textarea",
667
- rows: 10,
668
- placeholder: _e.value
669
- }, null, 8, ["modelValue", "placeholder"])
670
- ]),
671
- _: 1
672
- }, 8, ["modelValue"])
673
- ]);
674
- };
675
- }
676
- }), Ht = /* @__PURE__ */ Ue(It, [["__scopeId", "data-v-49a19db9"]]), qt = async () => {
677
- const v = await Rt(["工件库", "弯管"]), d = Be("工件列表", v), n = Ct(d);
678
- return n == null ? void 0 : n.map((_) => ({
679
- name: _,
680
- mainKey: _
681
- }));
682
- }, Kt = async (y) => {
683
- const d = await Pt(["工件库", "弯管"], y), n = Be("弯管基础参数", d), m = Be("弯管特征尺寸", d), _ = {
684
- outerDiameter: 0,
685
- ybcrList: []
686
- }, s = Mt(n), b = wt(m);
687
- return _.outerDiameter = (s == null ? void 0 : s.外径) || 0, _.ybcrList = b || [], _;
688
- }, Qt = { class: "pipe-analysis-dialog-header" }, el = { class: "header-right" }, tl = { class: "pipe-analysis-dialog-body" }, ll = { class: "panel-left" }, ol = { class: "pipe-analysis-input" }, nl = { class: "input-params" }, al = { class: "pipe-analysis-output" }, sl = { class: "ouput-params" }, il = /* @__PURE__ */ Le({
689
- __name: "pipeAnalysisPanel",
690
- emits: ["nodeClick", "visibleChange", "updatePosition", "updateRotation"],
691
- setup(y, { expose: v, emit: d }) {
692
- const n = h(null), m = be(null), {
693
- currentModels: _,
694
- resetView: s,
695
- initThreeJS: b,
696
- handleResize: f,
697
- getThreeJSObjects: w,
698
- cleanup: a,
699
- setModels: C,
700
- clearAllModels: p,
701
- axesHelperVisible: P,
702
- toggleAxesVisibility: r,
703
- addModelAndFit: c
704
- } = Je(n);
705
- h(null);
706
- const T = h({ file: null, pipe: "" });
707
- h(null), h(!1);
708
- const A = h([]), $ = (S) => {
709
- A.value = S;
710
- };
711
- h("ybcr");
712
- const g = h({
713
- form: {},
714
- list: [],
715
- reverse: !1
716
- }), V = (S) => {
717
- const { length: k, outerDiameter: J, innerDiameter: E, thickness: N, ybcrList: O } = S || {};
718
- g.value.form = {
719
- length: k,
720
- outerDiameter: J,
721
- innerDiameter: E,
722
- thickness: N
723
- }, g.value.list = O;
724
- }, B = () => {
725
- const { form: S, list: k } = g.value, {
726
- outerDiameter: J
727
- } = S, E = J / 2, N = k == null ? void 0 : k.map(((te) => {
728
- const { y: q, b: W, c: ie, r: F, Y: ne, B: fe, C: re, R: we } = te;
729
- return ne ? {
730
- Y: ne,
731
- B: fe,
732
- C: re,
733
- R: we
734
- } : {
735
- Y: q,
736
- B: W,
737
- C: ie,
738
- R: F
739
- };
740
- }));
741
- p();
742
- const O = Yt(N, E);
743
- c(O);
744
- }, L = h(!1), Z = () => {
745
- const S = L.value;
746
- L.value = !S;
747
- }, ee = h(!1), G = () => {
748
- ee.value = !1;
749
- }, _e = () => {
750
- ee.value = !0;
751
- }, ve = async () => {
752
- const S = await qt();
753
- $(S);
754
- }, se = async (S) => {
755
- const k = await Kt(S);
756
- V(k);
757
- };
758
- return ae(() => g, () => {
759
- B();
760
- }, {
761
- deep: !0
762
- }), ae(() => n, () => {
763
- try {
764
- if (m.value)
765
- return;
766
- b(), window.addEventListener("resize", f);
767
- } catch (S) {
768
- console.error("Three.js 初始化失败:", S), j.error("渲染引擎初始化失败!");
769
- }
770
- }, {
771
- deep: !0
772
- }), Ge(async () => {
773
- ve();
774
- }), Ze(() => {
775
- window.removeEventListener("resize", f), a();
776
- }), v({ openDialog: _e }), (S, k) => {
777
- const J = U("el-icon"), E = U("el-option"), N = U("el-select"), O = U("el-form-item"), te = U("el-form"), q = U("el-input"), W = U("el-table-column"), ie = U("el-table");
778
- return Q(), ye(Ft, {
779
- class: "pipe-analysis-dialog",
780
- visible: ee.value,
781
- onBeforeDestroy: S.onDestroy,
782
- showClose: !1,
783
- fullScreen: L.value
784
- }, {
785
- header: M(() => [
786
- u("div", Qt, [
787
- k[6] || (k[6] = u("div", {
788
- class: "header-left",
789
- title: "管件解析"
790
- }, " 管件解析 ", -1)),
791
- u("div", el, [
792
- l(J, null, {
793
- default: M(() => [
794
- l(X(rt), { onClick: Z })
795
- ]),
796
- _: 1
797
- }),
798
- l(J, null, {
799
- default: M(() => [
800
- l(X(ct), { onClick: G })
801
- ]),
802
- _: 1
803
- })
804
- ])
805
- ])
806
- ]),
807
- default: M(() => [
808
- u("div", tl, [
809
- u("div", ll, [
810
- u("div", ol, [
811
- k[7] || (k[7] = u("span", { class: "item-view-group" }, [
812
- u("span", { class: "group-name-wrap" }, "输入")
813
- ], -1)),
814
- u("div", nl, [
815
- l(te, {
816
- model: T.value,
817
- "label-width": "auto",
818
- "label-position": "top"
819
- }, {
820
- default: M(() => [
821
- l(O, { label: "弯管" }, {
822
- default: M(() => [
823
- l(N, {
824
- modelValue: T.value.pipe,
825
- "onUpdate:modelValue": k[0] || (k[0] = (F) => T.value.pipe = F),
826
- placeholder: "请选择弯管",
827
- onChange: se
828
- }, {
829
- default: M(() => [
830
- (Q(!0), Ve(He, null, qe(A.value, (F) => (Q(), ye(E, {
831
- label: F.name,
832
- value: F.mainKey
833
- }, null, 8, ["label", "value"]))), 256))
834
- ]),
835
- _: 1
836
- }, 8, ["modelValue"])
837
- ]),
838
- _: 1
839
- })
840
- ]),
841
- _: 1
842
- }, 8, ["model"])
843
- ])
844
- ]),
845
- u("div", al, [
846
- l(O, { label: "加工方向" }, {
847
- default: M(() => [
848
- l(N, {
849
- modelValue: g.value.reverse,
850
- "onUpdate:modelValue": k[1] || (k[1] = (F) => g.value.reverse = F),
851
- placeholder: "请选择加工方向"
852
- }, {
853
- default: M(() => [
854
- l(E, {
855
- label: "正向",
856
- value: !1
857
- }),
858
- l(E, {
859
- label: "反向",
860
- value: !0
861
- })
862
- ]),
863
- _: 1
864
- }, 8, ["modelValue"])
865
- ]),
866
- _: 1
867
- }),
868
- k[8] || (k[8] = u("span", { class: "item-view-group" }, [
869
- u("span", { class: "group-name-wrap" }, "输出(弯管基础参数)")
870
- ], -1)),
871
- u("div", sl, [
872
- l(te, {
873
- model: g.value.form,
874
- "label-width": "auto",
875
- "label-position": "top",
876
- inline: !0
877
- }, {
878
- default: M(() => [
879
- l(O, { label: "管长" }, {
880
- default: M(() => [
881
- l(q, {
882
- modelValue: g.value.form.length,
883
- "onUpdate:modelValue": k[2] || (k[2] = (F) => g.value.form.length = F)
884
- }, null, 8, ["modelValue"])
885
- ]),
886
- _: 1
887
- }),
888
- l(O, { label: "外径" }, {
889
- default: M(() => [
890
- l(q, {
891
- modelValue: g.value.form.outerDiameter,
892
- "onUpdate:modelValue": k[3] || (k[3] = (F) => g.value.form.outerDiameter = F)
893
- }, null, 8, ["modelValue"])
894
- ]),
895
- _: 1
896
- }),
897
- l(O, { label: "内径" }, {
898
- default: M(() => [
899
- l(q, {
900
- modelValue: g.value.form.innerDiameter,
901
- "onUpdate:modelValue": k[4] || (k[4] = (F) => g.value.form.innerDiameter = F)
902
- }, null, 8, ["modelValue"])
903
- ]),
904
- _: 1
905
- }),
906
- l(O, { label: "壁厚" }, {
907
- default: M(() => [
908
- l(q, {
909
- modelValue: g.value.form.thickness,
910
- "onUpdate:modelValue": k[5] || (k[5] = (F) => g.value.form.thickness = F)
911
- }, null, 8, ["modelValue"])
912
- ]),
913
- _: 1
914
- })
915
- ]),
916
- _: 1
917
- }, 8, ["model"]),
918
- l(ie, {
919
- ref: "singleTableRef",
920
- data: g.value.list,
921
- "highlight-current-rowstyle": "width: 100%"
922
- }, {
923
- default: M(() => [
924
- l(W, {
925
- type: "index",
926
- width: "50"
927
- }),
928
- l(W, {
929
- property: "y",
930
- label: "Y"
931
- }),
932
- l(W, {
933
- property: "b",
934
- label: "B"
935
- }),
936
- l(W, {
937
- property: "c",
938
- label: "C"
939
- }),
940
- l(W, {
941
- property: "r",
942
- label: "R"
943
- })
944
- ]),
945
- _: 1
946
- }, 8, ["data"])
947
- ])
948
- ])
949
- ]),
950
- u("div", {
951
- class: "panel-right",
952
- ref_key: "threejsContainer",
953
- ref: n
954
- }, null, 512)
955
- ])
956
- ]),
957
- _: 1
958
- }, 8, ["visible", "onBeforeDestroy", "fullScreen"]);
959
- };
960
- }
961
- }), rl = /* @__PURE__ */ Ue(il, [["__scopeId", "data-v-61e834a4"]]), cl = { class: "obj-viewer-container" }, ul = { class: "pipe-comparison" }, pl = {
962
- ref: "pipe1",
963
- class: "pipe-container"
964
- }, dl = {
965
- ref: "pipe2",
966
- class: "pipe-container"
967
- }, ml = { class: "buttonGroup-topLeft" }, vl = { class: "buttonGroup-left" }, fl = { class: "buttonGroup-right" }, gl = { class: "buttonGroup-bottom" }, hl = { class: "top-panel" }, bl = { class: "panel-header" }, yl = { class: "panel-body" }, _l = { class: "left-panel" }, wl = { class: "panel-header" }, Cl = { class: "panel-body" }, Pl = { class: "right-panel" }, kl = { class: "panel-header" }, xl = { class: "panel-body" }, Rl = {
968
- key: 0,
969
- class: "loading-overlay"
970
- }, Ml = /* @__PURE__ */ Le({
971
- __name: "threeSceneView",
972
- props: {
973
- fileBlobs: { default: () => [] },
974
- threeData: {}
975
- },
976
- setup(y) {
977
- const v = y, d = h(Ye.ROBOT), n = h(null), m = h(), _ = h(!1), s = h(""), b = h(!1), f = h(""), w = h(!1), a = h(""), C = h(!1), p = h(""), P = be(null), r = be(null), c = h(), {
978
- currentModels: T,
979
- resetView: A,
980
- initThreeJS: $,
981
- handleResize: g,
982
- getThreeJSObjects: V,
983
- cleanup: B,
984
- setAndFitModels: L,
985
- axesHelperVisible: Z,
986
- toggleAxesVisibility: ee,
987
- zoomIn: G,
988
- zoomOut: _e
989
- } = Je(n), { loadSceneFromFile: ve } = at(
990
- V,
991
- T,
992
- _,
993
- s
994
- ), { isAnimating: se, toggleAnimation: S, startAnimation: k, stopAnimation: J } = Qe(V, T), { isClipping: E, activeClippingAxis: N, toggleClipping: O, updateClippingPlanes: te } = et(V, T), { initRaycaster: q, selectedObject3D: W, setSelectedObjVisible: ie, updatePosition: F, updateRotation: ne, dispose: fe } = ot(n, V, T), re = () => {
995
- ee();
996
- }, we = (t) => {
997
- N.value = t, te();
998
- }, Ae = ke(() => d.value === Ye.ROBOT), $e = ke(() => d.value === Ye.PIPECOMPARSION), ce = (t) => {
999
- b.value = !0, f.value = t, t === "剖面视图" && !E.value && O();
1000
- }, ge = (t) => {
1001
- w.value = !0, a.value = t;
1002
- }, Re = () => {
1003
- var t;
1004
- (t = c == null ? void 0 : c.value) == null || t.playAnimation();
1005
- }, Fe = () => {
1006
- var t;
1007
- (t = c == null ? void 0 : c.value) == null || t.stopAnimation();
1008
- }, ze = () => {
1009
- var t;
1010
- (t = c == null ? void 0 : c.value) == null || t.forwardFrame();
1011
- }, e = () => {
1012
- var t;
1013
- (t = c == null ? void 0 : c.value) == null || t.backwardFrame();
1014
- };
1015
- ae(() => v.fileBlobs, (t) => {
1016
- if (t && t.length > 0) {
1017
- const i = t[0];
1018
- if (!i.name.toLowerCase().endsWith(".urdf"))
1019
- return;
1020
- ve(i).then((R) => {
1021
- P.value = R;
1022
- }).catch((R) => {
1023
- console.error("加载URDF文件时发生错误:", R), j.error("加载urdf模型失败"), P.value = null;
1024
- });
1025
- } else
1026
- P.value = null;
1027
- }, {
1028
- immediate: !0,
1029
- deep: !0
1030
- }), ae(P, (t) => {
1031
- L(t ? [t] : []), q();
1032
- });
1033
- let o = null;
1034
- return Ge(async () => {
1035
- await Ke();
1036
- try {
1037
- $(), n.value && (o = new ResizeObserver(g), o.observe(n.value));
1038
- const t = V();
1039
- r.value = t.scene;
1040
- } catch (t) {
1041
- console.error("Three.js 初始化失败:", t), j.error("渲染引擎初始化失败!");
1042
- }
1043
- }), Ze(() => {
1044
- f.value = "", a.value = "", o && o.disconnect(), se.value && J(), B(), fe();
1045
- }), (t, i) => {
1046
- const R = U("el-scrollbar");
1047
- return Q(), Ve("div", cl, [
1048
- pe(u("div", {
1049
- ref_key: "threejsContainer",
1050
- ref: n,
1051
- class: "threejs-container"
1052
- }, null, 512), [
1053
- [de, Ae.value]
1054
- ]),
1055
- pe(u("div", ul, [
1056
- u("div", pl, null, 512),
1057
- u("div", dl, null, 512)
1058
- ], 512), [
1059
- [de, $e.value]
1060
- ]),
1061
- u("div", ml, [
1062
- l(Y, {
1063
- name: "viewReset",
1064
- size: "24",
1065
- onClick: X(A),
1066
- title: "重置"
1067
- }, null, 8, ["onClick"]),
1068
- l(Y, {
1069
- name: "fangda",
1070
- size: "24",
1071
- title: "放大",
1072
- onClick: X(G)
1073
- }, null, 8, ["onClick"]),
1074
- l(Y, {
1075
- name: "suoxiao",
1076
- size: "24",
1077
- title: "缩小",
1078
- onClick: X(_e)
1079
- }, null, 8, ["onClick"]),
1080
- l(Y, {
1081
- name: "lookAround",
1082
- size: "24",
1083
- onClick: X(S),
1084
- title: X(se) ? "停止动画" : "动画视图"
1085
- }, null, 8, ["onClick", "title"]),
1086
- l(Y, {
1087
- name: "zuobiaoxi",
1088
- size: "24",
1089
- active: X(Z),
1090
- onClick: re,
1091
- title: "显隐坐标轴"
1092
- }, null, 8, ["active"])
1093
- ]),
1094
- u("div", vl, [
1095
- Me(t.$slots, "button-left", { switchRightPanel: ce }, void 0, !0),
1096
- l(Y, {
1097
- name: "jiegoushu",
1098
- size: "24",
1099
- onClick: i[0] || (i[0] = (x) => ce("场景树")),
1100
- active: b.value && f.value === "场景树",
1101
- title: "场景树"
1102
- }, null, 8, ["active"]),
1103
- l(Y, {
1104
- name: "clipping",
1105
- size: "24",
1106
- onClick: i[1] || (i[1] = (x) => ce("剖面视图")),
1107
- active: b.value && f.value === "剖面视图",
1108
- title: "剖面视图"
1109
- }, null, 8, ["active"]),
1110
- l(Y, {
1111
- name: "zhaozi",
1112
- size: "24",
1113
- onClick: i[2] || (i[2] = (x) => ce("工件树")),
1114
- active: b.value && f.value === "工件树",
1115
- title: "工件 "
1116
- }, null, 8, ["active"]),
1117
- l(Y, {
1118
- name: "donghuafangzhen",
1119
- size: "24",
1120
- onClick: i[3] || (i[3] = (x) => ce("场景4"))
1121
- })
1122
- ]),
1123
- u("div", fl, [
1124
- Me(t.$slots, "button-right", { switchRightPanel: ge }, void 0, !0),
1125
- l(Y, {
1126
- name: "donghuafangzhen",
1127
- size: "24"
1128
- }),
1129
- l(Y, {
1130
- name: "donghuafangzhen",
1131
- size: "24"
1132
- }),
1133
- l(Y, {
1134
- name: "guanjiekongzhi",
1135
- size: "24",
1136
- onClick: i[4] || (i[4] = (x) => ge("关节控制")),
1137
- active: w.value && a.value === "关节控制",
1138
- title: "关节控制"
1139
- }, null, 8, ["active"]),
1140
- l(Y, {
1141
- name: "donghuafangzhen",
1142
- size: "24",
1143
- title: "动画仿真",
1144
- onClick: i[5] || (i[5] = (x) => ge("动画仿真")),
1145
- active: w.value && a.value === "动画仿真"
1146
- }, null, 8, ["active"]),
1147
- l(Y, {
1148
- name: "donghuafangzhen",
1149
- size: "24",
1150
- title: "urdf动画",
1151
- onClick: i[6] || (i[6] = (x) => ge("urdf动画")),
1152
- active: w.value && a.value === "urdf动画"
1153
- }, null, 8, ["active"]),
1154
- l(Y, {
1155
- name: "donghuafangzhen",
1156
- size: "24"
1157
- })
1158
- ]),
1159
- u("div", gl, [
1160
- l(Y, {
1161
- name: "kuaitui",
1162
- size: "24",
1163
- backgroundColor: "#ffffff",
1164
- title: "快退",
1165
- onClick: e
1166
- }),
1167
- l(Y, {
1168
- name: "bofang",
1169
- size: "24",
1170
- backgroundColor: "#ffffff",
1171
- title: "播放",
1172
- onClick: Re
1173
- }),
1174
- l(Y, {
1175
- name: "kuaijin",
1176
- size: "24",
1177
- backgroundColor: "#ffffff",
1178
- title: "快进",
1179
- onClick: ze
1180
- }),
1181
- l(Y, {
1182
- name: "zanting",
1183
- size: "24",
1184
- backgroundColor: "#ffffff",
1185
- title: "暂停",
1186
- onClick: Fe
1187
- })
1188
- ]),
1189
- pe(u("div", hl, [
1190
- u("div", bl, [
1191
- u("span", null, he(p.value), 1),
1192
- u("span", {
1193
- class: "close",
1194
- onClick: i[7] || (i[7] = (x) => C.value = !1)
1195
- }, " X ")
1196
- ]),
1197
- u("div", yl, [
1198
- l(R, { height: "100%" }, {
1199
- default: M(() => [
1200
- Me(t.$slots, "top-panel", { topPanelType: p.value }, void 0, !0)
1201
- ]),
1202
- _: 3
1203
- })
1204
- ])
1205
- ], 512), [
1206
- [de, C.value]
1207
- ]),
1208
- pe(u("div", _l, [
1209
- u("div", wl, [
1210
- u("span", null, he(f.value), 1),
1211
- u("span", {
1212
- class: "close",
1213
- onClick: i[8] || (i[8] = (x) => b.value = !1)
1214
- }, " X ")
1215
- ]),
1216
- u("div", Cl, [
1217
- l(R, { height: "100%" }, {
1218
- default: M(() => {
1219
- var x;
1220
- return [
1221
- f.value === "场景树" ? (Q(), ye(At, {
1222
- key: 0,
1223
- model: P.value
1224
- }, null, 8, ["model"])) : Pe("", !0),
1225
- f.value === "剖面视图" ? (Q(), ye(tt, {
1226
- key: 1,
1227
- value: X(N),
1228
- onChange: we
1229
- }, null, 8, ["value"])) : Pe("", !0),
1230
- f.value === "工件树" ? (Q(), ye(nt, {
1231
- key: 2,
1232
- model: (x = X(W)) == null ? void 0 : x.obj,
1233
- onVisibleChange: X(ie),
1234
- onUpdatePosition: X(F),
1235
- onUpdateRotation: X(ne)
1236
- }, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : Pe("", !0)
1237
- ];
1238
- }),
1239
- _: 1
1240
- })
1241
- ])
1242
- ], 512), [
1243
- [de, b.value]
1244
- ]),
1245
- pe(u("div", Pl, [
1246
- u("div", kl, [
1247
- u("span", null, he(a.value), 1),
1248
- u("span", {
1249
- class: "close",
1250
- onClick: i[9] || (i[9] = (x) => w.value = !1)
1251
- }, " X ")
1252
- ]),
1253
- u("div", xl, [
1254
- l(R, { height: "100%" }, {
1255
- default: M(() => [
1256
- pe(l($t, { model: P.value }, null, 8, ["model"]), [
1257
- [de, a.value === "关节控制"]
1258
- ]),
1259
- pe(l(Ht, {
1260
- ref_key: "animationPanelRef",
1261
- ref: c,
1262
- model: P.value,
1263
- threeData: v.threeData
1264
- }, null, 8, ["model", "threeData"]), [
1265
- [de, a.value === "动画仿真"]
1266
- ]),
1267
- Me(t.$slots, "right-panel", { rightPanelType: a.value }, void 0, !0)
1268
- ]),
1269
- _: 3
1270
- })
1271
- ])
1272
- ], 512), [
1273
- [de, w.value]
1274
- ]),
1275
- _.value ? (Q(), Ve("div", Rl, [
1276
- i[10] || (i[10] = u("div", { class: "loading-spinner" }, null, -1)),
1277
- u("p", null, he(s.value), 1)
1278
- ])) : Pe("", !0),
1279
- l(rl, {
1280
- ref_key: "pipeAnalysisPanelRef",
1281
- ref: m
1282
- }, null, 512)
1283
- ]);
1284
- };
1285
- }
1286
- }), Jl = /* @__PURE__ */ Ue(Ml, [["__scopeId", "data-v-ec34be42"]]);
1287
- export {
1288
- Jl as default
1289
- };