ss-component-new 1.2.97 → 1.2.99

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 (97) hide show
  1. package/dist/MTLLoader-B4z0XNO-.js +304 -0
  2. package/dist/MTLLoader-n_3HPhif.cjs +2 -0
  3. package/dist/OBJLoader-C_JaUegI.cjs +5 -0
  4. package/dist/OBJLoader-Dilcv9TL.js +356 -0
  5. package/dist/{OrbitControls-B85G8nPk.cjs → OrbitControls-8LBwRzcq.cjs} +1 -1
  6. package/dist/{OrbitControls-DFhYzlF3.js → OrbitControls-Cz47Q27N.js} +1 -1
  7. package/dist/{animationData-DfKVkFbz.js → animationData-C8lM4zZj.js} +1 -1
  8. package/dist/{animationData-DxBvEqB1.cjs → animationData-CKcPDmLp.cjs} +1 -1
  9. package/dist/{iconfont-C7kE-QbU.cjs → iconfont-B1cUqs_N.cjs} +1 -1
  10. package/dist/{iconfont-WOKNi2xx.js → iconfont-CUWS5tNH.js} +2 -2
  11. package/dist/{index-D0hovh9R.cjs → index-2hqZ_tND.cjs} +1 -1
  12. package/dist/{index-331j518H.cjs → index-AuEh0RiU.cjs} +1 -1
  13. package/dist/{index-D_igus4A.cjs → index-B2UPNwqJ.cjs} +1 -1
  14. package/dist/{index-BYk9Fb6p.js → index-BCvmfE-Q.js} +3 -3
  15. package/dist/{index-DeOwZgqL.js → index-BDw8DIQx.js} +130 -130
  16. package/dist/{index-CqI3frdZ.js → index-BPv8txj6.js} +6 -6
  17. package/dist/{index-DgZVeYqH.js → index-BQaejVqo.js} +1 -1
  18. package/dist/{index-DSPjcpWK.cjs → index-Ba16ouw0.cjs} +1 -1
  19. package/dist/{index-D_RGoDln.js → index-BaSO3EEl.js} +3 -3
  20. package/dist/{index-DHZMd8iK.cjs → index-BdSiNUC0.cjs} +1 -1
  21. package/dist/{index-BDxPlbe2.cjs → index-BfU8GMj1.cjs} +1 -1
  22. package/dist/{index-Cppt0AsF.cjs → index-BjKKDSDx.cjs} +1 -1
  23. package/dist/{index-C-dlFxRJ.cjs → index-BqgfejIC.cjs} +1 -1
  24. package/dist/{index-BODyH6MD.js → index-BxONUPjM.js} +1 -1
  25. package/dist/{index-BFzMf0GC.js → index-Byp3gJNW.js} +1 -1
  26. package/dist/{index-DJ6qg2Mo.js → index-C7ZsHeLt.js} +3 -3
  27. package/dist/{index-B-AhHUV1.js → index-C9p_wwJ7.js} +6 -6
  28. package/dist/{index-BoTiP0aV.js → index-CKlt750z.js} +1 -1
  29. package/dist/{index-CQRJ3pLh.cjs → index-CQwDw3-2.cjs} +1 -1
  30. package/dist/{index-hhS08X8b.js → index-CR1Ng5ip.js} +3 -3
  31. package/dist/{index-D6u590uA.cjs → index-CZIqVNof.cjs} +1 -1
  32. package/dist/{index-iErxMZBi.cjs → index-C_208RkZ.cjs} +1 -1
  33. package/dist/{index-S1LIIzCa.cjs → index-CqZ1E-Mt.cjs} +1 -1
  34. package/dist/{index-DHjtOySN.js → index-CrNsPd4D.js} +2 -2
  35. package/dist/{index-DrzK0O_g.cjs → index-CvQCAGWI.cjs} +1 -1
  36. package/dist/{index-Cnk_4Zz5.cjs → index-CyCcPnZb.cjs} +1 -1
  37. package/dist/{index-BI7g3c_u.js → index-CyE5qCBb.js} +13 -13
  38. package/dist/{index-DHBoRe9V.cjs → index-D32pAhQk.cjs} +1 -1
  39. package/dist/{index-DRfVnLTN.js → index-DAUjjqaD.js} +391 -391
  40. package/dist/{index-DbDM-XfB.cjs → index-DQTlc6Gq.cjs} +1 -1
  41. package/dist/{index-B_zjoT4m.js → index-DTilOAv_.js} +2 -2
  42. package/dist/{index-_PP-dSm3.cjs → index-D_22J0ok.cjs} +1 -1
  43. package/dist/{index-iZ9BRKg5.js → index-DboUMA_C.js} +1 -1
  44. package/dist/{index-BXv3aZ7v.js → index-DgMQpO6g.js} +1 -1
  45. package/dist/{index-CPAXrzNY.cjs → index-Dh6GqpZF.cjs} +1 -1
  46. package/dist/{index-CZPnP0uy.cjs → index-DhqEoDPT.cjs} +1 -1
  47. package/dist/{index-CeGM8aBH.js → index-DlwlGkyt.js} +2 -2
  48. package/dist/{index-6sZXjGGz.cjs → index-DtDmxPdD.cjs} +1 -1
  49. package/dist/{index-kLDMroPk.js → index-GxmJC9kr.js} +1 -1
  50. package/dist/{index-CLOUp_4j.cjs → index-XKn5AuYT.cjs} +1 -1
  51. package/dist/{index-Cr5if46q.js → index-mEKMjplD.js} +1 -1
  52. package/dist/{index-Bhha7SY3.js → index-vglZ0qjT.js} +1 -1
  53. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DSlAeFA3.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DKwCF412.cjs} +1 -1
  54. package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-ERjMISIK.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DqIuWlps.js} +6 -6
  55. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-3GcG1eTD.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CICG8Qah.js} +8908 -8949
  56. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dzyqt2Z-.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-K6lh7Rrj.cjs} +302 -302
  57. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-mJB_yl_P.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Cpyo5jke.js} +3 -3
  58. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DODc2KPN.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Cq8VF9uK.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_style_index_1_lang-BH0DRFVE.js → index.vue_vue_type_style_index_1_lang-B_HCEX9y.js} +6 -5
  60. package/dist/{index.vue_vue_type_style_index_1_lang-BRFs_L5R.cjs → index.vue_vue_type_style_index_1_lang-rTLLuvuo.cjs} +5 -5
  61. package/dist/loaderUtil-B0djdt91.js +5 -0
  62. package/dist/loaderUtil-CaWWb8db.cjs +1 -0
  63. package/dist/{main-Z5UMyCj6.js → main-DHx-3OSy.js} +2 -2
  64. package/dist/{main-B541MQH8.cjs → main-DS156sQ4.cjs} +1 -1
  65. package/dist/ss-component.cjs +1 -1
  66. package/dist/ss-component.css +1 -1
  67. package/dist/ss-component.js +9 -9
  68. package/dist/ss-component2.cjs +1 -1
  69. package/dist/ss-component2.js +10 -10
  70. package/dist/{threeModel-tKq0hvaK.cjs → threeModel-CfIK1rQB.cjs} +1 -1
  71. package/dist/{threeModel-BcjGbIJZ.js → threeModel-WYCdw_Ff.js} +4 -4
  72. package/dist/{threePreview-BnPMGQ2H.js → threePreview-C29AR7Mr.js} +310 -305
  73. package/dist/threePreview-Ci8TnUQ8.cjs +1 -0
  74. package/dist/{threeSceneView-DVUTlm6F.cjs → threeSceneView-C2MDCMux.cjs} +2 -2
  75. package/dist/{threeSceneView-BUD002PP.js → threeSceneView-F15mW1mm.js} +7 -7
  76. package/dist/threeSceneViewForCPMPIP-DK4G_ZpP.js +687 -0
  77. package/dist/threeSceneViewForCPMPIP-DuPZn_qv.cjs +5 -0
  78. package/dist/threeTrackPathView-C4eBUMef.cjs +370 -0
  79. package/dist/{threeTrackPathView-DDCEu3Gx.js → threeTrackPathView-DMj6YGxT.js} +436 -427
  80. package/dist/{threeViewerHost-BVeUteVd.js → threeViewerHost-C9ipsMff.js} +2 -2
  81. package/dist/{threeViewerHost-Sda_AoRw.cjs → threeViewerHost-CW6JmOUJ.cjs} +2 -2
  82. package/dist/{urdfTree-Br9VYqKp.cjs → urdfTree-CTiMB7ge.cjs} +1 -1
  83. package/dist/{urdfTree-DaWvX-6R.js → urdfTree-DGEACy9-.js} +1 -1
  84. package/dist/{workpieceTreePanel-BdRaFNRp.js → workpieceTreePanel-C1gy5a8r.js} +53 -52
  85. package/dist/workpieceTreePanel-Ded0Gqke.cjs +1 -0
  86. package/package.json +1 -1
  87. package/dist/MTLLoader-DnouUI-8.js +0 -657
  88. package/dist/MTLLoader-zZDM0NQh.cjs +0 -6
  89. package/dist/obj/model.mtl +0 -42
  90. package/dist/obj/model.obj +0 -26110
  91. package/dist/threePreview-DD0br2ae.cjs +0 -1
  92. package/dist/threeSceneViewForCPMPIP-BYYbyqD7.cjs +0 -5
  93. package/dist/threeSceneViewForCPMPIP-D4RC4BAo.js +0 -683
  94. package/dist/threeTrackPathView-BvUihuyk.cjs +0 -370
  95. package/dist/workpieceTreePanel-Z3aVdOWB.cjs +0 -1
  96. package/public/obj/model.mtl +0 -42
  97. package/public/obj/model.obj +0 -26110
@@ -0,0 +1,687 @@
1
+ import { defineComponent as we, ref as u, computed as C, watch as H, onUnmounted as Ze, resolveComponent as K, createElementBlock as A, openBlock as U, createElementVNode as l, createCommentVNode as M, createVNode as i, toDisplayString as N, Fragment as qe, renderList as Qe, withCtx as te, inject as ke, shallowRef as ie, onMounted as el, nextTick as ll, onBeforeUnmount as tl, withDirectives as $, vShow as G, unref as r, renderSlot as ue, createBlock as Pe, isRef as re, vModelRadio as de } from "vue";
2
+ import { aw as al } from "./index.vue_vue_type_style_index_1_lang-Cg1p_3ne.js";
3
+ import { U as nl, s as Ce, u as ol, a as sl, W as il } from "./workpieceTreePanel-C1gy5a8r.js";
4
+ import { u as ul, a as rl, b as dl } from "./iconfont-CUWS5tNH.js";
5
+ import { c as vl, E as P } from "./index-BUYYl2Pc.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CICG8Qah.js";
7
+ import { _ as pe } from "./index-DRizRbU3.js";
8
+ import { g as cl, b as ml, U as pl, J as fl, d as gl } from "./urdfTree-DGEACy9-.js";
9
+ import { _ as xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ import { T as k } from "./svgIcon-D-_fXUBL.js";
11
+ import { i as bl } from "./animationData-C8lM4zZj.js";
12
+ import { l as hl } from "./loaderUtil-B0djdt91.js";
13
+ import { L as yl, j as kl } from "./index-DAUjjqaD.js";
14
+ const Pl = { class: "panel-content" }, Cl = { class: "action-bar" }, _l = {
15
+ key: 0,
16
+ class: "animation-controls"
17
+ }, wl = { class: "control-row" }, xl = { class: "control-row" }, zl = { class: "frame-info" }, Nl = { class: "control-row" }, Ul = {
18
+ key: 1,
19
+ class: "empty-state"
20
+ }, Vl = { class: "dialog-footer" }, $l = /* @__PURE__ */ we({
21
+ __name: "urdfAnimationPanel",
22
+ props: {
23
+ model: {},
24
+ scene: {},
25
+ xyzbcList: {}
26
+ },
27
+ setup(W, { expose: ae }) {
28
+ const L = W, n = u([]), T = u(!1), j = u(""), d = u("stopped"), p = u(0), F = u(0), I = u(10), h = u(null);
29
+ let g = 0;
30
+ const Y = u([]), Z = C(() => L.model ? cl(L.model).map((v) => v.name) : []), O = C(() => [...Z.value]), ne = C(() => O.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
31
+ ${O.value.join(" ")}
32
+ 0 0 0 ...
33
+ 1 2 3 ...` : "请先加载模型。"), E = C(() => n.value[p.value] || {});
34
+ H(() => L.model, (s) => {
35
+ s ? (h.value = new nl(s), Y.value = ml(s), p.value = 0) : (h.value = null, Y.value = []);
36
+ }, { immediate: !0 });
37
+ const B = (s) => {
38
+ if (s < 0 || s >= n.value.length) {
39
+ console.error(`帧索引 ${s} 超出范围`);
40
+ return;
41
+ }
42
+ const a = n.value[s];
43
+ if (h.value) {
44
+ const v = {};
45
+ Z.value.forEach((_) => {
46
+ const f = parseFloat(a[_]);
47
+ isNaN(f) || (v[_] = f);
48
+ }), h.value.setJointAngles(v);
49
+ }
50
+ p.value = s, F.value = n.value.length > 1 ? s / (n.value.length - 1) * 100 : 100;
51
+ }, ve = async (s) => {
52
+ try {
53
+ for (let a = p.value; a < n.value.length; a++) {
54
+ if (s !== g) return;
55
+ const v = n.value[a], _ = {};
56
+ if (h.value)
57
+ Z.value.forEach((f) => {
58
+ const b = parseFloat(v[f]);
59
+ isNaN(b) || (_[f] = b);
60
+ }), await h.value.animateToState(
61
+ _,
62
+ I.value,
63
+ (f) => {
64
+ s === g && (F.value = (a + f) / n.value.length * 100);
65
+ }
66
+ );
67
+ else {
68
+ if (await new Promise((f) => setTimeout(f, I.value)), s !== g) return;
69
+ F.value = (a + 1) / n.value.length * 100;
70
+ }
71
+ p.value = a;
72
+ }
73
+ s === g && (P.success("动画播放完成"), d.value = "stopped", F.value = 100);
74
+ } catch (a) {
75
+ console.error("动画播放出错:", a), P.error("动画播放出错"), d.value = "stopped";
76
+ }
77
+ }, X = () => {
78
+ if (n.value.length === 0) {
79
+ P.error("无动画数据");
80
+ return;
81
+ }
82
+ d.value === "stopped" && (p.value = 0, B(0)), d.value = "playing", g++, ve(g), P.info("动画播放中");
83
+ }, q = () => {
84
+ d.value === "playing" && (g++, d.value = "paused", P.info("动画已暂停"));
85
+ }, Q = () => {
86
+ g++, d.value = "stopped", p.value = 0, F.value = 0, B(0), P.info("动画已停止并重置");
87
+ }, D = () => {
88
+ d.value === "playing" ? q() : X();
89
+ }, x = (s) => {
90
+ g++, d.value = "paused", B(s);
91
+ }, J = () => {
92
+ if (!j.value.trim()) {
93
+ P.warning("导入内容不能为空");
94
+ return;
95
+ }
96
+ const s = j.value.trim().split(`
97
+ `).filter((b) => b.trim() !== "");
98
+ if (s.length < 2) {
99
+ P.error("导入数据至少需要包含表头行和一行数据");
100
+ return;
101
+ }
102
+ const a = s[0].split(" ").map((b) => b.trim()), v = {};
103
+ if (a.forEach((b, c) => {
104
+ O.value.includes(b) && (v[c] = b);
105
+ }), Object.keys(v).length === 0) {
106
+ P.error("没有找到匹配的表头,请检查表头名称是否正确");
107
+ return;
108
+ }
109
+ const f = s.slice(1).map((b) => {
110
+ const c = b.split(" "), z = {};
111
+ return O.value.forEach((S) => {
112
+ z[S] = "0";
113
+ }), Object.entries(v).forEach(([S, ce]) => {
114
+ const ee = c[parseInt(S)];
115
+ ee !== void 0 && ee.trim() !== "" && (z[ce] = ee.trim());
116
+ }), z;
117
+ });
118
+ f.length > 0 ? (n.value = f, P.success(`成功导入 ${f.length} 行数据!`), T.value = !1, j.value = "", Q()) : P.error("未能解析到有效数据,请检查格式。");
119
+ };
120
+ H(() => L.xyzbcList, () => {
121
+ L.xyzbcList && (n.value = vl(L.xyzbcList));
122
+ }, {
123
+ immediate: !0
124
+ });
125
+ const V = (s) => `第 ${s + 1} 帧`;
126
+ return ae({
127
+ handlePlayPause: D,
128
+ playAnimation: X,
129
+ pauseAnimation: q,
130
+ stopAnimation: Q
131
+ }), Ze(() => {
132
+ g++;
133
+ }), (s, a) => {
134
+ const v = K("el-input-number"), _ = K("el-slider"), f = K("el-input"), b = K("el-dialog");
135
+ return U(), A("div", Pl, [
136
+ l("div", Cl, [
137
+ i(pe, {
138
+ onClick: a[0] || (a[0] = (c) => T.value = !0),
139
+ disabled: O.value.length === 0,
140
+ modelValue: "导入数据"
141
+ }, null, 8, ["disabled"])
142
+ ]),
143
+ n.value.length > 0 ? (U(), A("div", _l, [
144
+ l("div", wl, [
145
+ a[6] || (a[6] = l("label", null, "帧间隔 (ms):", -1)),
146
+ i(v, {
147
+ modelValue: I.value,
148
+ "onUpdate:modelValue": a[1] || (a[1] = (c) => I.value = c),
149
+ min: 10,
150
+ max: 5e3,
151
+ step: 100,
152
+ size: "small",
153
+ style: { width: "120px" }
154
+ }, null, 8, ["modelValue"])
155
+ ]),
156
+ l("div", xl, [
157
+ a[7] || (a[7] = l("label", null, "当前帧:", -1)),
158
+ l("span", zl, N(p.value + 1) + " / " + N(n.value.length), 1)
159
+ ]),
160
+ l("div", Nl, [
161
+ a[8] || (a[8] = l("label", null, "动画进度:", -1)),
162
+ i(_, {
163
+ modelValue: p.value,
164
+ "onUpdate:modelValue": a[2] || (a[2] = (c) => p.value = c),
165
+ min: 0,
166
+ max: n.value.length > 0 ? n.value.length - 1 : 0,
167
+ step: 1,
168
+ "format-tooltip": V,
169
+ onInput: x,
170
+ disabled: n.value.length === 0 || d.value === "playing",
171
+ style: { "flex-grow": "1", margin: "0 10px" }
172
+ }, null, 8, ["modelValue", "max", "disabled"])
173
+ ]),
174
+ l("div", null, [
175
+ a[9] || (a[9] = l("label", null, "当前帧数据:", -1)),
176
+ l("div", null, [
177
+ E.value ? (U(!0), A(qe, { key: 0 }, Qe(E.value, (c, z) => (U(), A("div", { key: z }, N(z) + ": " + N(c), 1))), 128)) : M("", !0)
178
+ ])
179
+ ])
180
+ ])) : M("", !0),
181
+ n.value.length === 0 ? (U(), A("div", Ul, a[10] || (a[10] = [
182
+ l("p", null, "请先导入数据", -1)
183
+ ]))) : M("", !0),
184
+ i(b, {
185
+ modelValue: T.value,
186
+ "onUpdate:modelValue": a[5] || (a[5] = (c) => T.value = c),
187
+ title: "导入数据",
188
+ width: "500px"
189
+ }, {
190
+ footer: te(() => [
191
+ l("span", Vl, [
192
+ i(pe, {
193
+ modelValue: "取消",
194
+ onClick: a[4] || (a[4] = (c) => T.value = !1)
195
+ }),
196
+ i(pe, {
197
+ modelValue: "确认导入",
198
+ onClick: J,
199
+ type: "primary"
200
+ })
201
+ ])
202
+ ]),
203
+ default: te(() => [
204
+ a[11] || (a[11] = l("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
205
+ i(f, {
206
+ modelValue: j.value,
207
+ "onUpdate:modelValue": a[3] || (a[3] = (c) => j.value = c),
208
+ type: "textarea",
209
+ rows: 10,
210
+ placeholder: ne.value
211
+ }, null, 8, ["modelValue", "placeholder"])
212
+ ]),
213
+ _: 1,
214
+ __: [11]
215
+ }, 8, ["modelValue"])
216
+ ]);
217
+ };
218
+ }
219
+ }), _e = /* @__PURE__ */ xe($l, [["__scopeId", "data-v-06bc34b3"]]), Tl = async (W) => await hl(W), jl = { class: "obj-viewer-container" }, Al = { class: "buttonGroup-topLeft" }, Ll = { class: "buttonGroup-left" }, Dl = { class: "buttonGroup-right" }, Sl = { class: "buttonGroup-bottom" }, Rl = { class: "top-panel" }, Ml = { class: "panel-header" }, Fl = { class: "panel-body" }, Ol = { class: "left-panel" }, El = { class: "panel-header" }, Bl = { class: "panel-body" }, Jl = {
220
+ key: 1,
221
+ class: "clipping-content"
222
+ }, Il = { class: "radio-group" }, Xl = { class: "radio-label" }, Gl = { class: "radio-label" }, Hl = { class: "radio-label" }, Kl = { class: "radio-label" }, Wl = { class: "right-panel" }, Yl = { class: "panel-header" }, Zl = { class: "panel-body" }, ql = {
223
+ key: 0,
224
+ class: "loading-overlay"
225
+ }, Ql = {
226
+ key: 1,
227
+ class: "brand"
228
+ }, et = { class: "brand-item" }, lt = { class: "item-value" }, tt = { class: "brand-item" }, at = { class: "item-value" }, nt = { class: "brand-item" }, ot = { class: "item-value" }, st = /* @__PURE__ */ we({
229
+ __name: "threeSceneViewForCPMPIP",
230
+ props: {
231
+ fileBlobs: { default: () => [] },
232
+ threeData: {}
233
+ },
234
+ emits: ["getAnimationData", "getThreeData"],
235
+ setup(W, { emit: ae }) {
236
+ const L = ae, n = W, T = ke("setManagementPageTitle"), j = ke("setManagementPageVisible"), d = C(() => {
237
+ var e, o;
238
+ return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
239
+ }), p = C(() => {
240
+ var e;
241
+ return (e = d == null ? void 0 : d.value) == null ? void 0 : e.产品型号;
242
+ }), F = C(() => {
243
+ var e;
244
+ return (e = d == null ? void 0 : d.value) == null ? void 0 : e.编号;
245
+ }), I = C(() => {
246
+ var e;
247
+ return (e = d == null ? void 0 : d.value) == null ? void 0 : e.厂家;
248
+ }), h = C(() => {
249
+ var e, o;
250
+ return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.workpieceInfo;
251
+ }), g = C(() => {
252
+ var e, o;
253
+ return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.knife;
254
+ }), Y = u([]), Z = async (t) => {
255
+ !t || !t.isExtra || (await O(t), T == null || T(t == null ? void 0 : t.pageName), j == null || j(!0));
256
+ }, O = yl(async (t) => {
257
+ await kl();
258
+ const { mainKey: e, baseMenuPath: o } = t || {};
259
+ al(o, e);
260
+ }, 500);
261
+ H(
262
+ () => [p.value, h.value, g.value],
263
+ () => {
264
+ var y, m, he, ye;
265
+ const t = [], e = {
266
+ pageName: "机床",
267
+ name: "机床",
268
+ label: "机床",
269
+ type: "机床",
270
+ id: "机床",
271
+ path: "机床",
272
+ baseMenuPath: "设备库/机床",
273
+ children: [],
274
+ show: !0,
275
+ isPenultimate: !1
276
+ };
277
+ p.value && e.children.push({
278
+ isExtra: !0,
279
+ pageName: "机床",
280
+ mainKey: p.value,
281
+ label: p.value,
282
+ baseMenuPath: "设备库/机床"
283
+ });
284
+ const o = {
285
+ pageName: "工件",
286
+ name: "工件",
287
+ label: "工件",
288
+ type: "工件",
289
+ id: "工件",
290
+ path: "工件",
291
+ baseMenuPath: "设备库/机床",
292
+ children: [],
293
+ show: !0,
294
+ isPenultimate: !1
295
+ };
296
+ h.value && o.children.push({
297
+ isExtra: !0,
298
+ type: (y = h.value) == null ? void 0 : y.type,
299
+ pageName: "工件",
300
+ mainKey: (m = h.value) == null ? void 0 : m.name,
301
+ label: (he = h.value) == null ? void 0 : he.name,
302
+ baseMenuPath: `工件库/${(ye = h.value) == null ? void 0 : ye.type}`
303
+ });
304
+ const se = {
305
+ pageName: "刀具",
306
+ name: "刀具",
307
+ label: "刀具",
308
+ type: "刀具",
309
+ id: "刀具",
310
+ path: "刀具",
311
+ children: [],
312
+ show: !0,
313
+ isPenultimate: !1
314
+ };
315
+ g.value && se.children.push({
316
+ isExtra: !0,
317
+ pageName: "刀具",
318
+ mainKey: g.value,
319
+ label: g.value,
320
+ baseMenuPath: "设备库/刀具"
321
+ }), t.push(e, o, se), Y.value = t;
322
+ },
323
+ {
324
+ immediate: !0
325
+ }
326
+ );
327
+ const ne = u([]), E = C(() => {
328
+ var e, o;
329
+ return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.csvUrl;
330
+ });
331
+ H(() => E.value, async () => {
332
+ if (console.log("three data", n == null ? void 0 : n.threeData), console.log("csvUrl", E.value), E.value) {
333
+ const t = await bl(E.value);
334
+ ne.value = t;
335
+ }
336
+ }, {
337
+ immediate: !0
338
+ });
339
+ const B = C(() => {
340
+ var e, o;
341
+ return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.bladeObjUrl;
342
+ }), ve = u(Ce.ROBOT), X = u(null), q = u(!1), Q = u(""), D = u(!1), x = u(""), J = u(!1), V = u(""), s = u(!1), a = u(""), v = ie(null), _ = u("叶片模型"), f = ie(null), b = ie(null), c = ie(null), z = u(_e), {
343
+ currentModels: S,
344
+ resetView: ce,
345
+ initThreeJS: ee,
346
+ handleResize: fe,
347
+ getThreeJSObjects: le,
348
+ cleanup: ze,
349
+ setModels: ge,
350
+ axesHelperVisible: Ne,
351
+ toggleAxesVisibility: Ue,
352
+ zoomIn: Ve,
353
+ zoomOut: $e
354
+ } = ul(X), { loadSceneFromFile: Te } = sl(
355
+ le,
356
+ S,
357
+ q,
358
+ Q
359
+ ), { isAnimating: be, toggleAnimation: je, stopAnimation: Ae } = rl(le, S), { isClipping: Le, activeClippingAxis: w, toggleClipping: De, updateClippingPlanes: R } = dl(le, S), { initRaycaster: Se, selectedObject3D: Re, setSelectedObjVisible: Me, updatePosition: Fe, updateRotation: Oe, dispose: Ee } = ol(X, le, S), Be = () => {
360
+ Ue();
361
+ }, Je = C(() => ve.value === Ce.ROBOT), oe = (t) => {
362
+ D.value = !0, x.value = t, t === "剖面视图" && !Le.value && De();
363
+ }, me = (t) => {
364
+ J.value = !0, V.value = t, t === "动画仿真" && L("getAnimationData");
365
+ }, Ie = () => {
366
+ var t;
367
+ (t = z.value) == null || t.handlePlayPause();
368
+ }, Xe = () => {
369
+ var t;
370
+ (t = z.value) == null || t.pauseAnimation();
371
+ }, Ge = () => {
372
+ var t;
373
+ (t = z.value) == null || t.stopAnimation();
374
+ }, He = (t, e) => gl(t, e), Ke = async (t) => {
375
+ const e = He(t, _.value);
376
+ if (b.value = e, console.log("bladeObjUrl", B.value), e && e.parent && B.value) {
377
+ const o = await Tl(B.value);
378
+ o.name = "blade_clone", e.parent.add(o), o.position.copy(e.position), o.rotation.copy(e.rotation), o.scale.copy(e.scale), e.visible = !1, f.value = o;
379
+ } else
380
+ _.value && console.warn(`在 Blade '${_.value}' 中未找到可替换的网格或其没有父级。`);
381
+ };
382
+ H(() => n.fileBlobs, (t) => {
383
+ if (t && t.length > 0) {
384
+ const e = t[0];
385
+ if (!e.name.toLowerCase().endsWith(".urdf"))
386
+ return;
387
+ Te(e).then((o) => {
388
+ v.value = o, o && Ke(o);
389
+ }).catch((o) => {
390
+ console.error("加载URDF文件时发生错误:", o), P.error("加载urdf模型失败"), v.value = null;
391
+ });
392
+ } else
393
+ v.value = null;
394
+ }, {
395
+ immediate: !0,
396
+ deep: !0
397
+ }), H(v, (t) => {
398
+ ge(t ? [t] : []), Se();
399
+ });
400
+ const We = () => {
401
+ ee(), window.addEventListener("resize", fe);
402
+ const t = le();
403
+ c.value = t.scene;
404
+ }, Ye = () => {
405
+ x.value = "", V.value = "", window.removeEventListener("resize", fe), be.value && Ae(), ze(), Ee();
406
+ };
407
+ return el(async () => {
408
+ await ll();
409
+ try {
410
+ We();
411
+ } catch (t) {
412
+ console.error("Three.js 初始化失败:", t), P.error("渲染引擎初始化失败!");
413
+ }
414
+ }), tl(() => {
415
+ Ye();
416
+ }), (t, e) => {
417
+ const o = K("el-scrollbar"), se = K("PipeAnalysisPanel");
418
+ return U(), A("div", jl, [
419
+ $(l("div", {
420
+ ref_key: "threejsContainer",
421
+ ref: X,
422
+ class: "threejs-container"
423
+ }, null, 512), [
424
+ [G, Je.value]
425
+ ]),
426
+ l("div", Al, [
427
+ i(k, {
428
+ name: "viewReset",
429
+ size: "24",
430
+ onClick: r(ce),
431
+ title: "重置"
432
+ }, null, 8, ["onClick"]),
433
+ i(k, {
434
+ name: "fangda",
435
+ size: "24",
436
+ title: "放大",
437
+ onClick: r(Ve)
438
+ }, null, 8, ["onClick"]),
439
+ i(k, {
440
+ name: "suoxiao",
441
+ size: "24",
442
+ title: "缩小",
443
+ onClick: r($e)
444
+ }, null, 8, ["onClick"]),
445
+ i(k, {
446
+ name: "lookAround",
447
+ size: "24",
448
+ onClick: r(je),
449
+ title: r(be) ? "停止动画" : "动画视图"
450
+ }, null, 8, ["onClick", "title"]),
451
+ i(k, {
452
+ name: "zuobiaoxi",
453
+ size: "24",
454
+ active: r(Ne),
455
+ onClick: Be,
456
+ title: "显隐坐标轴"
457
+ }, null, 8, ["active"])
458
+ ]),
459
+ l("div", Ll, [
460
+ ue(t.$slots, "button-left", { switchRightPanel: oe }, void 0, !0),
461
+ i(k, {
462
+ name: "jiegoushu",
463
+ size: "24",
464
+ onClick: e[0] || (e[0] = (y) => oe("场景树")),
465
+ active: D.value && x.value === "场景树",
466
+ title: "场景树"
467
+ }, null, 8, ["active"]),
468
+ i(k, {
469
+ name: "clipping",
470
+ size: "24",
471
+ onClick: e[1] || (e[1] = (y) => oe("剖面视图")),
472
+ active: D.value && x.value === "剖面视图",
473
+ title: "剖面视图"
474
+ }, null, 8, ["active"]),
475
+ i(k, {
476
+ name: "donghuafangzhen",
477
+ size: "24",
478
+ onClick: e[2] || (e[2] = (y) => oe("工件树")),
479
+ active: D.value && x.value === "工件树"
480
+ }, null, 8, ["active"])
481
+ ]),
482
+ l("div", Dl, [
483
+ ue(t.$slots, "button-right", { switchRightPanel: me }, void 0, !0),
484
+ i(k, {
485
+ name: "jichuangxuanze",
486
+ size: "24",
487
+ onClick: e[3] || (e[3] = (y) => me("机床控制")),
488
+ active: J.value && V.value === "机床控制",
489
+ title: "机床控制"
490
+ }, null, 8, ["active"]),
491
+ i(k, {
492
+ name: "donghuafangzhen",
493
+ size: "24",
494
+ title: "动画仿真",
495
+ onClick: e[4] || (e[4] = (y) => me("动画仿真")),
496
+ active: J.value && V.value === "动画仿真"
497
+ }, null, 8, ["active"])
498
+ ]),
499
+ l("div", Sl, [
500
+ i(k, {
501
+ name: "bofang",
502
+ size: "24",
503
+ backgroundColor: "#ffffff",
504
+ title: "播放",
505
+ onClick: Ie
506
+ }),
507
+ i(k, {
508
+ name: "zanting",
509
+ size: "24",
510
+ backgroundColor: "#ffffff",
511
+ title: "暂停",
512
+ onClick: Xe
513
+ }),
514
+ i(k, {
515
+ name: "zhongzhi",
516
+ size: "24",
517
+ backgroundColor: "#ffffff",
518
+ title: "停止",
519
+ onClick: Ge
520
+ })
521
+ ]),
522
+ $(l("div", Rl, [
523
+ l("div", Ml, [
524
+ l("span", null, N(a.value), 1),
525
+ l("span", {
526
+ class: "close",
527
+ onClick: e[5] || (e[5] = (y) => s.value = !1)
528
+ }, " X ")
529
+ ]),
530
+ l("div", Fl, [
531
+ i(o, { height: "100%" }, {
532
+ default: te(() => [
533
+ ue(t.$slots, "top-panel", { topPanelType: a.value }, void 0, !0)
534
+ ]),
535
+ _: 3
536
+ })
537
+ ])
538
+ ], 512), [
539
+ [G, s.value]
540
+ ]),
541
+ $(l("div", Ol, [
542
+ l("div", El, [
543
+ l("span", null, N(x.value), 1),
544
+ l("span", {
545
+ class: "close",
546
+ onClick: e[6] || (e[6] = (y) => D.value = !1)
547
+ }, " X ")
548
+ ]),
549
+ l("div", Bl, [
550
+ i(o, { height: "100%" }, {
551
+ default: te(() => {
552
+ var y;
553
+ return [
554
+ x.value === "场景树" ? (U(), Pe(pl, {
555
+ key: 0,
556
+ model: v.value,
557
+ extraNodes: Y.value,
558
+ onNodeClick: Z
559
+ }, null, 8, ["model", "extraNodes"])) : M("", !0),
560
+ x.value === "剖面视图" ? (U(), A("div", Jl, [
561
+ l("div", Il, [
562
+ l("label", Xl, [
563
+ $(l("input", {
564
+ type: "radio",
565
+ name: "clipping-axis",
566
+ value: "none",
567
+ "onUpdate:modelValue": e[7] || (e[7] = (m) => re(w) ? w.value = m : null),
568
+ onChange: e[8] || (e[8] = //@ts-ignore
569
+ (...m) => r(R) && r(R)(...m))
570
+ }, null, 544), [
571
+ [de, r(w)]
572
+ ]),
573
+ e[16] || (e[16] = l("span", { class: "radio-text" }, "无切割", -1))
574
+ ]),
575
+ l("label", Gl, [
576
+ $(l("input", {
577
+ type: "radio",
578
+ name: "clipping-axis",
579
+ value: "x",
580
+ "onUpdate:modelValue": e[9] || (e[9] = (m) => re(w) ? w.value = m : null),
581
+ onChange: e[10] || (e[10] = //@ts-ignore
582
+ (...m) => r(R) && r(R)(...m))
583
+ }, null, 544), [
584
+ [de, r(w)]
585
+ ]),
586
+ e[17] || (e[17] = l("span", { class: "radio-text" }, "X轴切割", -1))
587
+ ]),
588
+ l("label", Hl, [
589
+ $(l("input", {
590
+ type: "radio",
591
+ name: "clipping-axis",
592
+ value: "y",
593
+ "onUpdate:modelValue": e[11] || (e[11] = (m) => re(w) ? w.value = m : null),
594
+ onChange: e[12] || (e[12] = //@ts-ignore
595
+ (...m) => r(R) && r(R)(...m))
596
+ }, null, 544), [
597
+ [de, r(w)]
598
+ ]),
599
+ e[18] || (e[18] = l("span", { class: "radio-text" }, "Y轴切割", -1))
600
+ ]),
601
+ l("label", Kl, [
602
+ $(l("input", {
603
+ type: "radio",
604
+ name: "clipping-axis",
605
+ value: "z",
606
+ "onUpdate:modelValue": e[13] || (e[13] = (m) => re(w) ? w.value = m : null),
607
+ onChange: e[14] || (e[14] = //@ts-ignore
608
+ (...m) => r(R) && r(R)(...m))
609
+ }, null, 544), [
610
+ [de, r(w)]
611
+ ]),
612
+ e[19] || (e[19] = l("span", { class: "radio-text" }, "Z轴切割", -1))
613
+ ])
614
+ ])
615
+ ])) : M("", !0),
616
+ x.value === "工件树" ? (U(), Pe(il, {
617
+ key: 2,
618
+ model: (y = r(Re)) == null ? void 0 : y.obj,
619
+ onVisibleChange: r(Me),
620
+ onUpdatePosition: r(Fe),
621
+ onUpdateRotation: r(Oe)
622
+ }, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : M("", !0)
623
+ ];
624
+ }),
625
+ _: 1
626
+ })
627
+ ])
628
+ ], 512), [
629
+ [G, D.value]
630
+ ]),
631
+ $(l("div", Wl, [
632
+ l("div", Yl, [
633
+ l("span", null, N(V.value), 1),
634
+ l("span", {
635
+ class: "close",
636
+ onClick: e[15] || (e[15] = (y) => J.value = !1)
637
+ }, " X ")
638
+ ]),
639
+ l("div", Zl, [
640
+ i(o, { height: "100%" }, {
641
+ default: te(() => [
642
+ $(i(fl, { model: v.value }, null, 8, ["model"]), [
643
+ [G, V.value === "机床控制"]
644
+ ]),
645
+ $(i(_e, {
646
+ model: v.value,
647
+ scene: c.value,
648
+ xyzbcList: ne.value,
649
+ ref_key: "urdfAnimationPanelRef",
650
+ ref: z
651
+ }, null, 8, ["model", "scene", "xyzbcList"]), [
652
+ [G, V.value === "动画仿真"]
653
+ ]),
654
+ ue(t.$slots, "right-panel", { rightPanelType: V.value }, void 0, !0)
655
+ ]),
656
+ _: 3
657
+ })
658
+ ])
659
+ ], 512), [
660
+ [G, J.value]
661
+ ]),
662
+ q.value ? (U(), A("div", ql, [
663
+ e[20] || (e[20] = l("div", { class: "loading-spinner" }, null, -1)),
664
+ l("p", null, N(Q.value), 1)
665
+ ])) : M("", !0),
666
+ p.value ? (U(), A("div", Ql, [
667
+ l("div", et, [
668
+ e[21] || (e[21] = l("div", { class: "item-label" }, "厂家:", -1)),
669
+ l("div", lt, N(I.value), 1)
670
+ ]),
671
+ l("div", tt, [
672
+ e[22] || (e[22] = l("div", { class: "item-label" }, "型号:", -1)),
673
+ l("div", at, N(p.value), 1)
674
+ ]),
675
+ l("div", nt, [
676
+ e[23] || (e[23] = l("div", { class: "item-label" }, "编号:", -1)),
677
+ l("div", ot, N(F.value), 1)
678
+ ])
679
+ ])) : M("", !0),
680
+ i(se, { ref: "pipeAnalysisPanelRef" }, null, 512)
681
+ ]);
682
+ };
683
+ }
684
+ }), kt = /* @__PURE__ */ xe(st, [["__scopeId", "data-v-8cfdaf24"]]);
685
+ export {
686
+ kt as default
687
+ };