ss-component-new 1.3.615 → 1.3.617

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 (74) hide show
  1. package/dist/{MTLLoader-BL2uYkTJ.js → MTLLoader-B6ottYFV.js} +2 -2
  2. package/dist/{OrbitControls-Zyj23qrC.js → OrbitControls-BFVKU7s-.js} +1 -1
  3. package/dist/{URDFLoader-CRx5L75v.js → URDFLoader-CH-7Pzmq.js} +589 -584
  4. package/dist/{animationData-CJQE6_nu.js → animationData-F0z3GN7j.js} +3 -3
  5. package/dist/{array-CKTk7Sq_.js → array-CQiszLQE.js} +13 -14
  6. package/dist/{clone-ESeDvnJv.js → clone-MyfSNInd.js} +1 -1
  7. package/dist/{eleIcon-C7Pz9jha.js → eleIcon-BoKZ_PzU.js} +2 -2
  8. package/dist/{iconfont-DZGSkx-_.js → iconfont-BJYdStg5.js} +396 -247
  9. package/dist/{index-gXFBfuoD.js → index-0zQirLAy.js} +8 -8
  10. package/dist/{index-BvkIoiVW.js → index-6qXeMn6b.js} +3 -3
  11. package/dist/{index-obXIOkF7.js → index-8OmAlKII.js} +4 -4
  12. package/dist/{index-BXh02EAd.js → index-B2LYEScO.js} +4 -4
  13. package/dist/{index-YvUJL9Us.js → index-B4NcYIuS.js} +1 -1
  14. package/dist/{index-D8UY4uNQ.js → index-B8NQAdR4.js} +966 -967
  15. package/dist/{index-rlStojTL.js → index-BFqUz4pN.js} +1 -1
  16. package/dist/{index-t9LvhXac.js → index-BHtLrI43.js} +5 -5
  17. package/dist/{index--FPbFJB2.js → index-BODochNh.js} +6 -6
  18. package/dist/{index-CPW7tdrA.js → index-BkkvdZXm.js} +17 -20
  19. package/dist/{index-B0M1YCUY.js → index-BvtOLltL.js} +7 -7
  20. package/dist/{index-DsdWSuDi.js → index-BvyM6d06.js} +482 -483
  21. package/dist/{index-CX8Apbo7.js → index-BybrpYzx.js} +1 -1
  22. package/dist/{index-BJFXtH-X.js → index-CAMjP0It.js} +3 -3
  23. package/dist/{index-tMqKF2l6.js → index-CM6aWexA.js} +2 -2
  24. package/dist/{index-BBBCr4Oo.js → index-CT1LWsrT.js} +2 -2
  25. package/dist/{index-CTicGWoS.js → index-CXqqIuf-.js} +3 -3
  26. package/dist/{index-D9xMYIes.js → index-CYjsE5Gs.js} +3 -3
  27. package/dist/{index-B_fRppeJ.js → index-CkO7j_i1.js} +8 -8
  28. package/dist/{index-cYgzND1g.js → index-CnCBS4CT.js} +16268 -16240
  29. package/dist/{index-DlQXFCw8.js → index-CvZcm-Tt.js} +7 -8
  30. package/dist/{index-tniD_xHN.js → index-D2BpwRDj.js} +148 -157
  31. package/dist/{index-DAs4L0hx.js → index-D43kQTBs.js} +6973 -6531
  32. package/dist/{index-DjSJhlad.js → index-D56uKIwO.js} +60 -62
  33. package/dist/{index-XvX6TMzr.js → index-DCY5J8nu.js} +1 -1
  34. package/dist/{index-C3pboX9W.js → index-DIVct0z6.js} +5 -5
  35. package/dist/{index-Dd-8nw2f.js → index-DIzunSUT.js} +18 -20
  36. package/dist/{index-11kpzK0A.js → index-DJrzqi4-.js} +17 -17
  37. package/dist/{index-Cn33Gz2z.js → index-DSrPdLF-.js} +587 -616
  38. package/dist/{index-BUqviBFi.js → index-DcPtyCDm.js} +29 -35
  39. package/dist/{index-D1E8EPxn.js → index-DmILGKv9.js} +57 -61
  40. package/dist/{index-BA1kJZth.js → index-aTEfnfYn.js} +36 -40
  41. package/dist/{index-BHtNKL1L.js → index-dD-mKgue.js} +2 -2
  42. package/dist/{index-DkumSU1-.js → index-hg0CdgKe.js} +4 -4
  43. package/dist/index-mjGbAjJz.js +2623 -0
  44. package/dist/{index.vue_vue_type_script_setup_true_lang-DRzriV-s.js → index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js} +2 -2
  45. package/dist/{index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js → index.vue_vue_type_style_index_0_scoped_39e1db95_lang-Dp7tIi0S.js} +27760 -27735
  46. package/dist/isString-Dxm3W5iX.js +8 -0
  47. package/dist/{localIcon-D5UoFBU5.js → localIcon-CoJHw5ss.js} +1 -1
  48. package/dist/{main-DgwLoFSd.js → main-BDvWHXas.js} +9 -9
  49. package/dist/{menuIndex-DAW9B-9g.js → menuIndex-BiUB7t5q.js} +1 -1
  50. package/dist/{request-B1c8BUkR.js → request-BfrhYBTM.js} +3480 -3062
  51. package/dist/ss-component.css +3 -3
  52. package/dist/ss-component.js +14 -14
  53. package/dist/ss-component2.js +13 -13
  54. package/dist/ss-component3.js +1 -1
  55. package/dist/svgIcon-4m2zaZkj.js +42 -0
  56. package/dist/{threeModel-Df46gQvy.js → threeModel-B7guecMM.js} +174 -174
  57. package/dist/{threePreview-C4Ra7sjU.js → threePreview-CpcrqmFS.js} +554 -554
  58. package/dist/threeSceneView-CWTmvCY4.js +1290 -0
  59. package/dist/{threeSceneViewForCPMPIP-DZ5wkTWo.js → threeSceneViewForCPMPIP-VzWmr9CP.js} +207 -208
  60. package/dist/{threeTrackPathView-DT80eKxv.js → threeTrackPathView-Bw6e-quT.js} +25 -25
  61. package/dist/{threeViewerHost-t6BRTmw8.js → threeViewerHost-DIiGjw_8.js} +4 -4
  62. package/dist/urdfTree-DU02c_91.js +254 -0
  63. package/dist/{workpieceTreePanel-CuXFoEjJ.js → workpieceTreePanel-XH9mYAT2.js} +56 -60
  64. package/package.json +1 -1
  65. package/dist/JSEncrypt-B36c1iN5.js +0 -1983
  66. package/dist/index-BmaW6Me9.js +0 -572
  67. package/dist/isString-BlNsHiyU.js +0 -8
  68. package/dist/obj/model.mtl +0 -42
  69. package/dist/obj/model.obj +0 -26110
  70. package/dist/svgIcon-4u4PW7Is.js +0 -42
  71. package/dist/threeSceneView-tLPMhgrS.js +0 -1291
  72. package/dist/urdfTree-Bu7OVUsr.js +0 -404
  73. package/public/obj/model.mtl +0 -42
  74. package/public/obj/model.obj +0 -26110
@@ -1,80 +1,80 @@
1
- import { defineComponent as be, ref as r, computed as k, watch as X, onUnmounted as Ne, resolveComponent as E, createElementBlock as x, openBlock as b, createElementVNode as n, createCommentVNode as U, createVNode as s, toDisplayString as V, Fragment as De, renderList as Be, withCtx as ne, shallowRef as te, onMounted as Je, nextTick as me, onBeforeUnmount as Me, withDirectives as I, vShow as W, unref as z, renderSlot as ve, createBlock as de } from "vue";
2
- import { s as pe } from "./threeViewerHost-t6BRTmw8.js";
3
- import { u as Ee, C as Ge } from "./iconfont-DZGSkx-_.js";
4
- import { g as He, b as Ie, u as We, d as Xe, U as Ye, J as Ze, e as qe } from "./urdfTree-Bu7OVUsr.js";
5
- import { U as Ke, u as Qe, a as el, W as ll } from "./workpieceTreePanel-CuXFoEjJ.js";
6
- import { c as tl } from "./index-D8UY4uNQ.js";
7
- import "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js";
8
- import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
9
- import { E as _ } from "./request-B1c8BUkR.js";
1
+ import { defineComponent as ge, ref as r, computed as k, watch as X, onUnmounted as De, resolveComponent as G, openBlock as g, createElementBlock as x, createElementVNode as n, createVNode as s, toDisplayString as L, Fragment as Be, renderList as Je, createCommentVNode as U, withCtx as le, shallowRef as te, onMounted as Me, nextTick as me, onBeforeUnmount as Ee, withDirectives as I, vShow as W, unref as z, renderSlot as ve, createBlock as de } from "vue";
2
+ import { s as pe } from "./threeViewerHost-DIiGjw_8.js";
3
+ import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-BJYdStg5.js";
4
+ import { U as Xe, u as Ye, W as Ze, a as qe } from "./workpieceTreePanel-XH9mYAT2.js";
5
+ import { c as Ke } from "./index-B8NQAdR4.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-Dp7tIi0S.js";
7
+ import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js";
8
+ import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-DU02c_91.js";
9
+ import { E as _ } from "./request-BfrhYBTM.js";
10
10
  import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
- import { T as y } from "./svgIcon-4u4PW7Is.js";
12
- import { i as nl } from "./animationData-CJQE6_nu.js";
13
- import { O as al } from "./MTLLoader-BL2uYkTJ.js";
14
- const ol = { class: "panel-content" }, sl = {
11
+ import { T as y } from "./svgIcon-4m2zaZkj.js";
12
+ import { i as at } from "./animationData-F0z3GN7j.js";
13
+ import { O as ot } from "./MTLLoader-B6ottYFV.js";
14
+ const st = { class: "panel-content" }, it = {
15
15
  key: 0,
16
16
  class: "animation-controls"
17
- }, il = { class: "control-row" }, rl = { class: "control-row" }, ul = { class: "frame-info" }, cl = { class: "control-row" }, vl = {
17
+ }, rt = { class: "control-row" }, ut = { class: "control-row" }, ct = { class: "frame-info" }, vt = { class: "control-row" }, dt = {
18
18
  key: 1,
19
19
  class: "empty-state"
20
- }, dl = { class: "dialog-footer" }, ml = /* @__PURE__ */ be({
20
+ }, mt = { class: "dialog-footer" }, pt = /* @__PURE__ */ ge({
21
21
  __name: "urdfAnimationPanel",
22
22
  props: {
23
23
  model: {},
24
24
  scene: {},
25
25
  xyzbcList: {}
26
26
  },
27
- setup(F, { expose: f }) {
28
- const j = F, i = r([]), T = r(!1), N = r(""), c = r("stopped"), h = r(0), O = r(0), C = r(10), v = r(null);
27
+ setup(S, { expose: f }) {
28
+ const j = S, i = r([]), T = r(!1), F = r(""), c = r("stopped"), h = r(0), O = r(0), C = r(10), v = r(null);
29
29
  let d = 0;
30
- const P = r([]), w = k(() => j.model ? He(j.model).map((g) => g.name) : []), R = k(() => [...w.value]), ae = k(() => R.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
30
+ const P = r([]), w = k(() => j.model ? Qe(j.model).map((b) => b.name) : []), R = k(() => [...w.value]), ne = k(() => R.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
31
31
  ${R.value.join(" ")}
32
32
  0 0 0 ...
33
33
  1 2 3 ...` : "请先加载模型。"), Y = k(() => i.value[h.value] || {});
34
34
  X(() => j.model, (a) => {
35
- a ? (v.value = new Ke(a), P.value = Ie(a), h.value = 0) : (v.value = null, P.value = []);
35
+ a ? (v.value = new Xe(a), P.value = et(a), h.value = 0) : (v.value = null, P.value = []);
36
36
  }, { immediate: !0 });
37
37
  const J = (a) => {
38
38
  if (a < 0 || a >= i.value.length) {
39
39
  console.error(`帧索引 ${a} 超出范围`);
40
40
  return;
41
41
  }
42
- const t = i.value[a];
42
+ const l = i.value[a];
43
43
  if (v.value) {
44
- const g = {};
45
- w.value.forEach((L) => {
46
- const u = parseFloat(t[L]);
47
- isNaN(u) || (g[L] = u);
48
- }), v.value.setJointAngles(g);
44
+ const b = {};
45
+ w.value.forEach((A) => {
46
+ const u = parseFloat(l[A]);
47
+ isNaN(u) || (b[A] = u);
48
+ }), v.value.setJointAngles(b);
49
49
  }
50
50
  h.value = a, O.value = i.value.length > 1 ? a / (i.value.length - 1) * 100 : 100;
51
51
  }, M = async (a) => {
52
52
  try {
53
- for (let t = h.value; t < i.value.length; t++) {
53
+ for (let l = h.value; l < i.value.length; l++) {
54
54
  if (a !== d) return;
55
- const g = i.value[t], L = {};
55
+ const b = i.value[l], A = {};
56
56
  if (v.value)
57
57
  w.value.forEach((u) => {
58
- const m = parseFloat(g[u]);
59
- isNaN(m) || (L[u] = m);
58
+ const m = parseFloat(b[u]);
59
+ isNaN(m) || (A[u] = m);
60
60
  }), await v.value.animateToState(
61
- L,
61
+ A,
62
62
  C.value,
63
63
  (u) => {
64
- a === d && (O.value = (t + u) / i.value.length * 100);
64
+ a === d && (O.value = (l + u) / i.value.length * 100);
65
65
  }
66
66
  );
67
67
  else {
68
68
  if (await new Promise((u) => setTimeout(u, C.value)), a !== d) return;
69
- O.value = (t + 1) / i.value.length * 100;
69
+ O.value = (l + 1) / i.value.length * 100;
70
70
  }
71
- h.value = t;
71
+ h.value = l;
72
72
  }
73
73
  a === d && (_.success("动画播放完成"), c.value = "stopped", O.value = 100);
74
- } catch (t) {
75
- console.error("动画播放出错:", t), _.error("动画播放出错"), c.value = "stopped";
74
+ } catch (l) {
75
+ console.error("动画播放出错:", l), _.error("动画播放出错"), c.value = "stopped";
76
76
  }
77
- }, D = () => {
77
+ }, N = () => {
78
78
  if (i.value.length === 0) {
79
79
  _.error("无动画数据");
80
80
  return;
@@ -84,62 +84,62 @@ ${R.value.join(" ")}
84
84
  c.value === "playing" && (d++, c.value = "paused", _.info("动画已暂停"));
85
85
  }, q = () => {
86
86
  d++, c.value = "stopped", h.value = 0, O.value = 0, J(0), _.info("动画已停止并重置");
87
- }, oe = () => {
88
- c.value === "playing" ? Z() : D();
89
- }, B = (a) => {
87
+ }, ae = () => {
88
+ c.value === "playing" ? Z() : N();
89
+ }, D = (a) => {
90
90
  d++, c.value = "paused", J(a);
91
- }, se = () => {
92
- if (!N.value.trim()) {
91
+ }, oe = () => {
92
+ if (!F.value.trim()) {
93
93
  _.warning("导入内容不能为空");
94
94
  return;
95
95
  }
96
- const a = N.value.trim().split(`
96
+ const a = F.value.trim().split(`
97
97
  `).filter((m) => m.trim() !== "");
98
98
  if (a.length < 2) {
99
99
  _.error("导入数据至少需要包含表头行和一行数据");
100
100
  return;
101
101
  }
102
- const t = a[0].split(" ").map((m) => m.trim()), g = {};
103
- if (t.forEach((m, p) => {
104
- R.value.includes(m) && (g[p] = m);
105
- }), Object.keys(g).length === 0) {
102
+ const l = a[0].split(" ").map((m) => m.trim()), b = {};
103
+ if (l.forEach((m, p) => {
104
+ R.value.includes(m) && (b[p] = m);
105
+ }), Object.keys(b).length === 0) {
106
106
  _.error("没有找到匹配的表头,请检查表头名称是否正确");
107
107
  return;
108
108
  }
109
109
  const u = a.slice(1).map((m) => {
110
- const p = m.split(" "), S = {};
111
- return R.value.forEach((G) => {
112
- S[G] = "0";
113
- }), Object.entries(g).forEach(([G, Q]) => {
114
- const H = p[parseInt(G)];
115
- H !== void 0 && H.trim() !== "" && (S[Q] = H.trim());
116
- }), S;
110
+ const p = m.split(" "), B = {};
111
+ return R.value.forEach((H) => {
112
+ B[H] = "0";
113
+ }), Object.entries(b).forEach(([H, se]) => {
114
+ const E = p[parseInt(H)];
115
+ E !== void 0 && E.trim() !== "" && (B[se] = E.trim());
116
+ }), B;
117
117
  });
118
- u.length > 0 ? (i.value = u, _.success(`成功导入 ${u.length} 行数据!`), T.value = !1, N.value = "", q()) : _.error("未能解析到有效数据,请检查格式。");
118
+ u.length > 0 ? (i.value = u, _.success(`成功导入 ${u.length} 行数据!`), T.value = !1, F.value = "", q()) : _.error("未能解析到有效数据,请检查格式。");
119
119
  };
120
120
  X(() => j.xyzbcList, () => {
121
- j.xyzbcList && (i.value = tl(j.xyzbcList));
121
+ j.xyzbcList && (i.value = Ke(j.xyzbcList));
122
122
  }, {
123
123
  immediate: !0
124
124
  });
125
125
  const K = (a) => `第 ${a + 1} 帧`;
126
126
  return f({
127
- handlePlayPause: oe,
128
- playAnimation: D,
127
+ handlePlayPause: ae,
128
+ playAnimation: N,
129
129
  pauseAnimation: Z,
130
130
  stopAnimation: q
131
- }), Ne(() => {
131
+ }), De(() => {
132
132
  d++;
133
- }), (a, t) => {
134
- const g = E("el-input-number"), L = E("el-slider"), u = E("el-input"), m = E("el-dialog");
135
- return b(), x("div", ol, [
136
- t[11] || (t[11] = n("div", { class: "action-bar" }, null, -1)),
137
- i.value.length > 0 ? (b(), x("div", sl, [
138
- n("div", il, [
139
- t[5] || (t[5] = n("label", null, "帧间隔 (ms):", -1)),
140
- s(g, {
133
+ }), (a, l) => {
134
+ const b = G("el-input-number"), A = G("el-slider"), u = G("el-input"), m = G("el-dialog");
135
+ return g(), x("div", st, [
136
+ l[11] || (l[11] = n("div", { class: "action-bar" }, null, -1)),
137
+ i.value.length > 0 ? (g(), x("div", it, [
138
+ n("div", rt, [
139
+ l[5] || (l[5] = n("label", null, "帧间隔 (ms):", -1)),
140
+ s(b, {
141
141
  modelValue: C.value,
142
- "onUpdate:modelValue": t[0] || (t[0] = (p) => C.value = p),
142
+ "onUpdate:modelValue": l[0] || (l[0] = (p) => C.value = p),
143
143
  min: 10,
144
144
  max: 5e3,
145
145
  step: 100,
@@ -147,99 +147,98 @@ ${R.value.join(" ")}
147
147
  style: { width: "120px" }
148
148
  }, null, 8, ["modelValue"])
149
149
  ]),
150
- n("div", rl, [
151
- t[6] || (t[6] = n("label", null, "当前帧:", -1)),
152
- n("span", ul, V(h.value + 1) + " / " + V(i.value.length), 1)
150
+ n("div", ut, [
151
+ l[6] || (l[6] = n("label", null, "当前帧:", -1)),
152
+ n("span", ct, L(h.value + 1) + " / " + L(i.value.length), 1)
153
153
  ]),
154
- n("div", cl, [
155
- t[7] || (t[7] = n("label", null, "动画进度:", -1)),
156
- s(L, {
154
+ n("div", vt, [
155
+ l[7] || (l[7] = n("label", null, "动画进度:", -1)),
156
+ s(A, {
157
157
  modelValue: h.value,
158
- "onUpdate:modelValue": t[1] || (t[1] = (p) => h.value = p),
158
+ "onUpdate:modelValue": l[1] || (l[1] = (p) => h.value = p),
159
159
  min: 0,
160
160
  max: i.value.length > 0 ? i.value.length - 1 : 0,
161
161
  step: 1,
162
162
  "format-tooltip": K,
163
- onInput: B,
163
+ onInput: D,
164
164
  disabled: i.value.length === 0 || c.value === "playing",
165
165
  style: { "flex-grow": "1", margin: "0 10px" }
166
166
  }, null, 8, ["modelValue", "max", "disabled"])
167
167
  ]),
168
168
  n("div", null, [
169
- t[8] || (t[8] = n("label", null, "当前帧数据:", -1)),
169
+ l[8] || (l[8] = n("label", null, "当前帧数据:", -1)),
170
170
  n("div", null, [
171
- Y.value ? (b(!0), x(De, { key: 0 }, Be(Y.value, (p, S) => (b(), x("div", { key: S }, V(S) + ": " + V(p), 1))), 128)) : U("", !0)
171
+ Y.value ? (g(!0), x(Be, { key: 0 }, Je(Y.value, (p, B) => (g(), x("div", { key: B }, L(B) + ": " + L(p), 1))), 128)) : U("", !0)
172
172
  ])
173
173
  ])
174
174
  ])) : U("", !0),
175
- i.value.length === 0 ? (b(), x("div", vl, t[9] || (t[9] = [
175
+ i.value.length === 0 ? (g(), x("div", dt, [...l[9] || (l[9] = [
176
176
  n("p", null, "请先创建数据", -1)
177
- ]))) : U("", !0),
177
+ ])])) : U("", !0),
178
178
  s(m, {
179
179
  modelValue: T.value,
180
- "onUpdate:modelValue": t[4] || (t[4] = (p) => T.value = p),
180
+ "onUpdate:modelValue": l[4] || (l[4] = (p) => T.value = p),
181
181
  title: "导入数据",
182
182
  width: "500px"
183
183
  }, {
184
- footer: ne(() => [
185
- n("span", dl, [
184
+ footer: le(() => [
185
+ n("span", mt, [
186
186
  s(fe, {
187
187
  modelValue: "取消",
188
- onClick: t[3] || (t[3] = (p) => T.value = !1)
188
+ onClick: l[3] || (l[3] = (p) => T.value = !1)
189
189
  }),
190
190
  s(fe, {
191
191
  modelValue: "确认导入",
192
- onClick: se,
192
+ onClick: oe,
193
193
  type: "primary"
194
194
  })
195
195
  ])
196
196
  ]),
197
- default: ne(() => [
198
- t[10] || (t[10] = n("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
197
+ default: le(() => [
198
+ l[10] || (l[10] = n("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
199
199
  s(u, {
200
- modelValue: N.value,
201
- "onUpdate:modelValue": t[2] || (t[2] = (p) => N.value = p),
200
+ modelValue: F.value,
201
+ "onUpdate:modelValue": l[2] || (l[2] = (p) => F.value = p),
202
202
  type: "textarea",
203
203
  rows: 10,
204
- placeholder: ae.value
204
+ placeholder: ne.value
205
205
  }, null, 8, ["modelValue", "placeholder"])
206
206
  ]),
207
- _: 1,
208
- __: [10]
207
+ _: 1
209
208
  }, 8, ["modelValue"])
210
209
  ]);
211
210
  };
212
211
  }
213
- }), ge = /* @__PURE__ */ he(ml, [["__scopeId", "data-v-00d63f4b"]]), pl = async (F) => await new al().loadAsync(F), fl = async (F) => await pl(F), gl = { class: "obj-viewer-container" }, bl = { class: "buttonGroup-topLeft" }, hl = { class: "buttonGroup-left" }, yl = { class: "buttonGroup-right" }, _l = { class: "buttonGroup-bottom" }, kl = { class: "left-panel" }, Cl = { class: "panel-header" }, Pl = { class: "panel-body" }, wl = { class: "right-panel" }, zl = { class: "panel-header" }, Ul = { class: "panel-body" }, xl = {
212
+ }), be = /* @__PURE__ */ he(pt, [["__scopeId", "data-v-00d63f4b"]]), ft = async (S) => await new ot().loadAsync(S), bt = async (S) => await ft(S), gt = { class: "obj-viewer-container" }, ht = { class: "buttonGroup-topLeft" }, yt = { class: "buttonGroup-left" }, _t = { class: "buttonGroup-right" }, kt = { class: "buttonGroup-bottom" }, Ct = { class: "left-panel" }, Pt = { class: "panel-header" }, wt = { class: "panel-body" }, zt = { class: "right-panel" }, Ut = { class: "panel-header" }, xt = { class: "panel-body" }, jt = {
214
213
  key: 0,
215
214
  class: "loading-overlay"
216
- }, jl = {
215
+ }, At = {
217
216
  key: 1,
218
217
  class: "brand"
219
- }, Ll = {
218
+ }, Lt = {
220
219
  key: 0,
221
220
  class: "brand-item"
222
- }, Vl = { class: "item-value" }, $l = {
221
+ }, Vt = { class: "item-value" }, $t = {
223
222
  key: 1,
224
223
  class: "brand-item"
225
- }, Al = { class: "item-value" }, Tl = {
224
+ }, Tt = { class: "item-value" }, Ot = {
226
225
  key: 2,
227
226
  class: "brand-item"
228
- }, Ol = { class: "item-value" }, Rl = /* @__PURE__ */ be({
227
+ }, Rt = { class: "item-value" }, St = /* @__PURE__ */ ge({
229
228
  __name: "threeSceneViewForCPMPIP",
230
229
  props: {
231
230
  fileBlobs: { default: () => [] },
232
231
  threeData: {}
233
232
  },
234
- setup(F) {
235
- const f = F, j = r([]), i = k(() => {
233
+ setup(S) {
234
+ const f = S, j = r([]), i = k(() => {
236
235
  var e, o;
237
236
  return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.csvUrl;
238
237
  });
239
238
  X(() => i.value, async () => {
240
239
  if (console.log("csvUrl", i.value), i.value) {
241
- const l = await nl(i.value);
242
- j.value = l;
240
+ const t = await at(i.value);
241
+ j.value = t;
243
242
  }
244
243
  }, {
245
244
  immediate: !0
@@ -247,67 +246,67 @@ ${R.value.join(" ")}
247
246
  const T = k(() => {
248
247
  var e, o;
249
248
  return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.bladeObjUrl;
250
- }), N = r(pe.ROBOT), c = r(null), h = r(!1), O = r(""), C = r(!1), v = r(""), d = r(!1), P = r(""), w = te(null), R = r("叶片模型"), ae = te(null), Y = te(null), J = te(null), M = r(ge), {
251
- currentModels: D,
249
+ }), F = r(pe.ROBOT), c = r(null), h = r(!1), O = r(""), C = r(!1), v = r(""), d = r(!1), P = r(""), w = te(null), R = r("叶片模型"), ne = te(null), Y = te(null), J = te(null), M = r(be), {
250
+ currentModels: N,
252
251
  resetView: Z,
253
252
  initThreeJS: q,
254
- handleResize: oe,
255
- getThreeJSObjects: B,
256
- cleanup: se,
253
+ handleResize: ae,
254
+ getThreeJSObjects: D,
255
+ cleanup: oe,
257
256
  setAndFitModels: K,
258
257
  axesHelperVisible: a,
259
- toggleAxesVisibility: t,
260
- zoomIn: g,
261
- zoomOut: L
262
- } = Ee(c), { loadSceneFromFile: u } = el(
263
- B,
258
+ toggleAxesVisibility: l,
259
+ zoomIn: b,
260
+ zoomOut: A
261
+ } = Ge(c), { loadSceneFromFile: u } = qe(
264
262
  D,
263
+ N,
265
264
  h,
266
265
  O
267
- ), { isAnimating: m, toggleAnimation: p, stopAnimation: S } = We(B, D), { isClipping: G, activeClippingAxis: Q, toggleClipping: H, updateClippingPlanes: ye } = Xe(B, D), { initRaycaster: _e, selectedObject3D: ke, setSelectedObjVisible: Ce, updatePosition: Pe, updateRotation: we, dispose: ze } = Qe(c, B, D), Ue = () => {
268
- t();
269
- }, xe = (l) => {
270
- Q.value = l, ye();
271
- }, $ = k(() => {
266
+ ), { isAnimating: m, toggleAnimation: p, startAnimation: B, stopAnimation: H } = He(D, N), { isClipping: se, activeClippingAxis: E, toggleClipping: ye, updateClippingPlanes: _e } = Ie(D, N), { initRaycaster: ke, selectedObject3D: Ce, setSelectedObjVisible: Pe, updatePosition: we, updateRotation: ze, dispose: Ue } = Ye(c, D, N), xe = () => {
267
+ l();
268
+ }, je = (t) => {
269
+ E.value = t, _e();
270
+ }, V = k(() => {
272
271
  var e, o;
273
272
  return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
274
273
  }), ie = k(() => {
275
274
  var e;
276
- return (e = $ == null ? void 0 : $.value) == null ? void 0 : e.modelNumber;
275
+ return (e = V == null ? void 0 : V.value) == null ? void 0 : e.modelNumber;
277
276
  }), re = k(() => {
278
277
  var e;
279
- return (e = $ == null ? void 0 : $.value) == null ? void 0 : e.serialNumber;
278
+ return (e = V == null ? void 0 : V.value) == null ? void 0 : e.serialNumber;
280
279
  }), ue = k(() => {
281
280
  var e;
282
- return (e = $ == null ? void 0 : $.value) == null ? void 0 : e.manufacturer;
283
- }), je = k(() => ie.value || re.value || ue.value), Le = k(() => N.value === pe.ROBOT), ee = (l) => {
284
- C.value = !0, v.value = l, l === "剖面视图" && !G.value && H();
285
- }, ce = (l) => {
286
- d.value = !0, P.value = l;
281
+ return (e = V == null ? void 0 : V.value) == null ? void 0 : e.manufacturer;
282
+ }), Ae = k(() => ie.value || re.value || ue.value), Le = k(() => F.value === pe.ROBOT), Q = (t) => {
283
+ C.value = !0, v.value = t, t === "剖面视图" && !se.value && ye();
284
+ }, ce = (t) => {
285
+ d.value = !0, P.value = t;
287
286
  }, Ve = () => {
288
- var l;
289
- (l = M.value) == null || l.handlePlayPause();
287
+ var t;
288
+ (t = M.value) == null || t.handlePlayPause();
290
289
  }, $e = () => {
291
- var l;
292
- (l = M.value) == null || l.pauseAnimation();
293
- }, Ae = () => {
294
- var l;
295
- (l = M.value) == null || l.stopAnimation();
296
- }, Te = (l, e) => qe(l, e), Oe = async (l) => {
297
- const e = Te(l, R.value);
290
+ var t;
291
+ (t = M.value) == null || t.pauseAnimation();
292
+ }, Te = () => {
293
+ var t;
294
+ (t = M.value) == null || t.stopAnimation();
295
+ }, Oe = (t, e) => nt(t, e), Re = async (t) => {
296
+ const e = Oe(t, R.value);
298
297
  if (Y.value = e, console.log("bladeObjUrl", T.value), e && e.parent && T.value) {
299
- const o = await fl(T.value);
300
- 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, ae.value = o;
298
+ const o = await bt(T.value);
299
+ 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, ne.value = o;
301
300
  } else
302
301
  R.value && console.warn(`在 Blade '${R.value}' 中未找到可替换的网格或其没有父级。`);
303
302
  };
304
- X(() => f.fileBlobs, (l) => {
305
- if (l && l.length > 0) {
306
- const e = l[0];
303
+ X(() => f.fileBlobs, (t) => {
304
+ if (t && t.length > 0) {
305
+ const e = t[0];
307
306
  if (!e.name.toLowerCase().endsWith(".urdf"))
308
307
  return;
309
308
  u(e).then((o) => {
310
- w.value = o, o && Oe(o);
309
+ w.value = o, o && Re(o);
311
310
  }).catch((o) => {
312
311
  console.error("加载URDF文件时发生错误:", o), _.error("加载urdf模型失败"), w.value = null;
313
312
  });
@@ -316,31 +315,31 @@ ${R.value.join(" ")}
316
315
  }, {
317
316
  immediate: !0,
318
317
  deep: !0
319
- }), X(w, (l) => {
320
- K(l ? [l] : []), _e();
318
+ }), X(w, (t) => {
319
+ K(t ? [t] : []), ke();
321
320
  });
322
- const Re = () => {
321
+ const Se = () => {
323
322
  q(), me(() => {
324
- c.value && (le = new ResizeObserver(oe), le.observe(c.value));
323
+ c.value && (ee = new ResizeObserver(ae), ee.observe(c.value));
325
324
  });
326
- const l = B();
327
- J.value = l.scene;
328
- }, Se = () => {
329
- v.value = "", P.value = "", le && le.disconnect(), m.value && S(), se(), ze();
325
+ const t = D();
326
+ J.value = t.scene;
327
+ }, Fe = () => {
328
+ v.value = "", P.value = "", ee && ee.disconnect(), m.value && H(), oe(), Ue();
330
329
  };
331
- let le = null;
332
- return Je(async () => {
330
+ let ee = null;
331
+ return Me(async () => {
333
332
  await me();
334
333
  try {
335
- Re();
336
- } catch (l) {
337
- console.error("Three.js 初始化失败:", l), _.error("渲染引擎初始化失败!");
334
+ Se();
335
+ } catch (t) {
336
+ console.error("Three.js 初始化失败:", t), _.error("渲染引擎初始化失败!");
338
337
  }
339
- }), Me(() => {
340
- Se();
341
- }), (l, e) => {
342
- const o = E("el-scrollbar"), Fe = E("PipeAnalysisPanel");
343
- return b(), x("div", gl, [
338
+ }), Ee(() => {
339
+ Fe();
340
+ }), (t, e) => {
341
+ const o = G("el-scrollbar"), Ne = G("PipeAnalysisPanel");
342
+ return g(), x("div", gt, [
344
343
  I(n("div", {
345
344
  ref_key: "threejsContainer",
346
345
  ref: c,
@@ -348,7 +347,7 @@ ${R.value.join(" ")}
348
347
  }, null, 512), [
349
348
  [W, Le.value]
350
349
  ]),
351
- n("div", bl, [
350
+ n("div", ht, [
352
351
  s(y, {
353
352
  name: "viewReset",
354
353
  size: "24",
@@ -359,13 +358,13 @@ ${R.value.join(" ")}
359
358
  name: "fangda",
360
359
  size: "24",
361
360
  title: "放大",
362
- onClick: z(g)
361
+ onClick: z(b)
363
362
  }, null, 8, ["onClick"]),
364
363
  s(y, {
365
364
  name: "suoxiao",
366
365
  size: "24",
367
366
  title: "缩小",
368
- onClick: z(L)
367
+ onClick: z(A)
369
368
  }, null, 8, ["onClick"]),
370
369
  s(y, {
371
370
  name: "lookAround",
@@ -377,39 +376,39 @@ ${R.value.join(" ")}
377
376
  name: "zuobiaoxi",
378
377
  size: "24",
379
378
  active: z(a),
380
- onClick: Ue,
379
+ onClick: xe,
381
380
  title: "显隐坐标轴"
382
381
  }, null, 8, ["active"])
383
382
  ]),
384
- n("div", hl, [
385
- ve(l.$slots, "button-left", { switchRightPanel: ee }, void 0, !0),
383
+ n("div", yt, [
384
+ ve(t.$slots, "button-left", { switchRightPanel: Q }, void 0, !0),
386
385
  s(y, {
387
386
  name: "jiegoushu",
388
387
  size: "24",
389
- onClick: e[0] || (e[0] = (A) => ee("场景树")),
388
+ onClick: e[0] || (e[0] = ($) => Q("场景树")),
390
389
  active: C.value && v.value === "场景树",
391
390
  title: "场景树"
392
391
  }, null, 8, ["active"]),
393
392
  s(y, {
394
393
  name: "clipping",
395
394
  size: "24",
396
- onClick: e[1] || (e[1] = (A) => ee("剖面视图")),
395
+ onClick: e[1] || (e[1] = ($) => Q("剖面视图")),
397
396
  active: C.value && v.value === "剖面视图",
398
397
  title: "剖面视图"
399
398
  }, null, 8, ["active"]),
400
399
  s(y, {
401
400
  name: "donghuafangzhen",
402
401
  size: "24",
403
- onClick: e[2] || (e[2] = (A) => ee("工件树")),
402
+ onClick: e[2] || (e[2] = ($) => Q("工件树")),
404
403
  active: C.value && v.value === "工件树"
405
404
  }, null, 8, ["active"])
406
405
  ]),
407
- n("div", yl, [
408
- ve(l.$slots, "button-right", { switchRightPanel: ce }, void 0, !0),
406
+ n("div", _t, [
407
+ ve(t.$slots, "button-right", { switchRightPanel: ce }, void 0, !0),
409
408
  s(y, {
410
409
  name: "jichuangxuanze",
411
410
  size: "24",
412
- onClick: e[3] || (e[3] = (A) => ce("机床控制")),
411
+ onClick: e[3] || (e[3] = ($) => ce("机床控制")),
413
412
  active: d.value && P.value === "机床控制",
414
413
  title: "机床控制"
415
414
  }, null, 8, ["active"]),
@@ -417,11 +416,11 @@ ${R.value.join(" ")}
417
416
  name: "donghuafangzhen",
418
417
  size: "24",
419
418
  title: "动画仿真",
420
- onClick: e[4] || (e[4] = (A) => ce("动画仿真")),
419
+ onClick: e[4] || (e[4] = ($) => ce("动画仿真")),
421
420
  active: d.value && P.value === "动画仿真"
422
421
  }, null, 8, ["active"])
423
422
  ]),
424
- n("div", _l, [
423
+ n("div", kt, [
425
424
  s(y, {
426
425
  name: "bofang",
427
426
  size: "24",
@@ -441,37 +440,37 @@ ${R.value.join(" ")}
441
440
  size: "24",
442
441
  backgroundColor: "#ffffff",
443
442
  title: "停止",
444
- onClick: Ae
443
+ onClick: Te
445
444
  })
446
445
  ]),
447
- I(n("div", kl, [
448
- n("div", Cl, [
449
- n("span", null, V(v.value), 1),
446
+ I(n("div", Ct, [
447
+ n("div", Pt, [
448
+ n("span", null, L(v.value), 1),
450
449
  n("span", {
451
450
  class: "close",
452
- onClick: e[5] || (e[5] = (A) => C.value = !1)
451
+ onClick: e[5] || (e[5] = ($) => C.value = !1)
453
452
  }, " X ")
454
453
  ]),
455
- n("div", Pl, [
454
+ n("div", wt, [
456
455
  s(o, { height: "100%" }, {
457
- default: ne(() => {
458
- var A;
456
+ default: le(() => {
457
+ var $;
459
458
  return [
460
- v.value === "场景树" ? (b(), de(Ye, {
459
+ v.value === "场景树" ? (g(), de(tt, {
461
460
  key: 0,
462
461
  model: w.value
463
462
  }, null, 8, ["model"])) : U("", !0),
464
- v.value === "剖面视图" ? (b(), de(Ge, {
463
+ v.value === "剖面视图" ? (g(), de(We, {
465
464
  key: 1,
466
- value: z(Q),
467
- onChange: xe
465
+ value: z(E),
466
+ onChange: je
468
467
  }, null, 8, ["value"])) : U("", !0),
469
- v.value === "工件树" ? (b(), de(ll, {
468
+ v.value === "工件树" ? (g(), de(Ze, {
470
469
  key: 2,
471
- model: (A = z(ke)) == null ? void 0 : A.obj,
472
- onVisibleChange: z(Ce),
473
- onUpdatePosition: z(Pe),
474
- onUpdateRotation: z(we)
470
+ model: ($ = z(Ce)) == null ? void 0 : $.obj,
471
+ onVisibleChange: z(Pe),
472
+ onUpdatePosition: z(we),
473
+ onUpdateRotation: z(ze)
475
474
  }, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : U("", !0)
476
475
  ];
477
476
  }),
@@ -481,21 +480,21 @@ ${R.value.join(" ")}
481
480
  ], 512), [
482
481
  [W, C.value]
483
482
  ]),
484
- I(n("div", wl, [
485
- n("div", zl, [
486
- n("span", null, V(P.value), 1),
483
+ I(n("div", zt, [
484
+ n("div", Ut, [
485
+ n("span", null, L(P.value), 1),
487
486
  n("span", {
488
487
  class: "close",
489
- onClick: e[6] || (e[6] = (A) => d.value = !1)
488
+ onClick: e[6] || (e[6] = ($) => d.value = !1)
490
489
  }, " X ")
491
490
  ]),
492
- n("div", Ul, [
491
+ n("div", xt, [
493
492
  s(o, { height: "100%" }, {
494
- default: ne(() => [
495
- I(s(Ze, { model: w.value }, null, 8, ["model"]), [
493
+ default: le(() => [
494
+ I(s(lt, { model: w.value }, null, 8, ["model"]), [
496
495
  [W, P.value === "机床控制"]
497
496
  ]),
498
- I(s(ge, {
497
+ I(s(be, {
499
498
  model: w.value,
500
499
  scene: J.value,
501
500
  xyzbcList: j.value,
@@ -504,7 +503,7 @@ ${R.value.join(" ")}
504
503
  }, null, 8, ["model", "scene", "xyzbcList"]), [
505
504
  [W, P.value === "动画仿真"]
506
505
  ]),
507
- ve(l.$slots, "right-panel", { rightPanelType: P.value }, void 0, !0)
506
+ ve(t.$slots, "right-panel", { rightPanelType: P.value }, void 0, !0)
508
507
  ]),
509
508
  _: 3
510
509
  })
@@ -512,29 +511,29 @@ ${R.value.join(" ")}
512
511
  ], 512), [
513
512
  [W, d.value]
514
513
  ]),
515
- h.value ? (b(), x("div", xl, [
514
+ h.value ? (g(), x("div", jt, [
516
515
  e[7] || (e[7] = n("div", { class: "loading-spinner" }, null, -1)),
517
- n("p", null, V(O.value), 1)
516
+ n("p", null, L(O.value), 1)
518
517
  ])) : U("", !0),
519
- je.value ? (b(), x("div", jl, [
520
- ue.value ? (b(), x("div", Ll, [
518
+ Ae.value ? (g(), x("div", At, [
519
+ ue.value ? (g(), x("div", Lt, [
521
520
  e[8] || (e[8] = n("div", { class: "item-label" }, "厂家:", -1)),
522
- n("div", Vl, V(ue.value), 1)
521
+ n("div", Vt, L(ue.value), 1)
523
522
  ])) : U("", !0),
524
- ie.value ? (b(), x("div", $l, [
523
+ ie.value ? (g(), x("div", $t, [
525
524
  e[9] || (e[9] = n("div", { class: "item-label" }, "型号:", -1)),
526
- n("div", Al, V(ie.value), 1)
525
+ n("div", Tt, L(ie.value), 1)
527
526
  ])) : U("", !0),
528
- re.value ? (b(), x("div", Tl, [
527
+ re.value ? (g(), x("div", Ot, [
529
528
  e[10] || (e[10] = n("div", { class: "item-label" }, "编号:", -1)),
530
- n("div", Ol, V(re.value), 1)
529
+ n("div", Rt, L(re.value), 1)
531
530
  ])) : U("", !0)
532
531
  ])) : U("", !0),
533
- s(Fe, { ref: "pipeAnalysisPanelRef" }, null, 512)
532
+ s(Ne, { ref: "pipeAnalysisPanelRef" }, null, 512)
534
533
  ]);
535
534
  };
536
535
  }
537
- }), Yl = /* @__PURE__ */ he(Rl, [["__scopeId", "data-v-54d53d1f"]]);
536
+ }), Zt = /* @__PURE__ */ he(St, [["__scopeId", "data-v-54d53d1f"]]);
538
537
  export {
539
- Yl as default
538
+ Zt as default
540
539
  };