ss-component-new 1.3.615 → 1.3.616

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 (29) hide show
  1. package/dist/{array-CKTk7Sq_.js → array-B7zhh661.js} +2 -2
  2. package/dist/{iconfont-DZGSkx-_.js → iconfont-BnmSp7qc.js} +396 -247
  3. package/dist/{index-Cn33Gz2z.js → index-B8KEncMz.js} +21 -15
  4. package/dist/{index-obXIOkF7.js → index-BB-4cx6M.js} +1 -1
  5. package/dist/{index-DAs4L0hx.js → index-BcmwtTXG.js} +1 -1
  6. package/dist/{index-t9LvhXac.js → index-CZGJIvyy.js} +1 -1
  7. package/dist/{index-tniD_xHN.js → index-Cm8PZAB-.js} +2 -2
  8. package/dist/{index-BJFXtH-X.js → index-D6d2WMUQ.js} +1 -1
  9. package/dist/{index-DjSJhlad.js → index-DCQMsqSL.js} +3 -3
  10. package/dist/{index-Dd-8nw2f.js → index-DLGS4MnS.js} +2 -2
  11. package/dist/{index--FPbFJB2.js → index-DRpUuthr.js} +1 -1
  12. package/dist/{index-BmaW6Me9.js → index-SQa7vB3n.js} +1 -1
  13. package/dist/{index-gXFBfuoD.js → index-ai2FZBc1.js} +2 -2
  14. package/dist/{index-cYgzND1g.js → index-v9NjEtsA.js} +5062 -5011
  15. package/dist/{main-DgwLoFSd.js → main-DaQzJVV5.js} +2 -2
  16. package/dist/ss-component.css +1 -1
  17. package/dist/ss-component.js +5 -5
  18. package/dist/ss-component2.js +8 -8
  19. package/dist/{threeModel-Df46gQvy.js → threeModel-DgRu_LfA.js} +1 -1
  20. package/dist/{threePreview-C4Ra7sjU.js → threePreview-CVO6XMIe.js} +555 -555
  21. package/dist/threeSceneView-DkImpdm3.js +1291 -0
  22. package/dist/{threeSceneViewForCPMPIP-DZ5wkTWo.js → threeSceneViewForCPMPIP-7gyDxeiN.js} +201 -201
  23. package/dist/{threeTrackPathView-DT80eKxv.js → threeTrackPathView-7_x3jeap.js} +20 -20
  24. package/dist/{threeViewerHost-t6BRTmw8.js → threeViewerHost-BBXv1FPJ.js} +1 -1
  25. package/dist/urdfTree-D0Iom75E.js +254 -0
  26. package/dist/{workpieceTreePanel-CuXFoEjJ.js → workpieceTreePanel-DEEMKY1v.js} +1 -1
  27. package/package.json +1 -1
  28. package/dist/threeSceneView-tLPMhgrS.js +0 -1291
  29. package/dist/urdfTree-Bu7OVUsr.js +0 -404
@@ -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";
1
+ import { defineComponent as ge, ref as r, computed as k, watch as X, onUnmounted as De, resolveComponent as G, createElementBlock as x, openBlock as g, createElementVNode as n, createCommentVNode as U, createVNode as s, toDisplayString as L, Fragment as Be, renderList as Je, 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-BBXv1FPJ.js";
3
+ import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-BnmSp7qc.js";
4
+ import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-DEEMKY1v.js";
5
+ import { c as Ke } from "./index-D8UY4uNQ.js";
7
6
  import "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js";
8
7
  import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
8
+ import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-D0Iom75E.js";
9
9
  import { E as _ } from "./request-B1c8BUkR.js";
10
10
  import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
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 = {
12
+ import { i as at } from "./animationData-CJQE6_nu.js";
13
+ import { O as ot } from "./MTLLoader-BL2uYkTJ.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,61 +147,61 @@ ${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
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
207
  _: 1,
@@ -210,36 +210,36 @@ ${R.value.join(" ")}
210
210
  ]);
211
211
  };
212
212
  }
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 = {
213
+ }), 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
214
  key: 0,
215
215
  class: "loading-overlay"
216
- }, jl = {
216
+ }, At = {
217
217
  key: 1,
218
218
  class: "brand"
219
- }, Ll = {
219
+ }, Lt = {
220
220
  key: 0,
221
221
  class: "brand-item"
222
- }, Vl = { class: "item-value" }, $l = {
222
+ }, Vt = { class: "item-value" }, $t = {
223
223
  key: 1,
224
224
  class: "brand-item"
225
- }, Al = { class: "item-value" }, Tl = {
225
+ }, Tt = { class: "item-value" }, Ot = {
226
226
  key: 2,
227
227
  class: "brand-item"
228
- }, Ol = { class: "item-value" }, Rl = /* @__PURE__ */ be({
228
+ }, Rt = { class: "item-value" }, St = /* @__PURE__ */ ge({
229
229
  __name: "threeSceneViewForCPMPIP",
230
230
  props: {
231
231
  fileBlobs: { default: () => [] },
232
232
  threeData: {}
233
233
  },
234
- setup(F) {
235
- const f = F, j = r([]), i = k(() => {
234
+ setup(S) {
235
+ const f = S, j = r([]), i = k(() => {
236
236
  var e, o;
237
237
  return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.csvUrl;
238
238
  });
239
239
  X(() => i.value, async () => {
240
240
  if (console.log("csvUrl", i.value), i.value) {
241
- const l = await nl(i.value);
242
- j.value = l;
241
+ const t = await at(i.value);
242
+ j.value = t;
243
243
  }
244
244
  }, {
245
245
  immediate: !0
@@ -247,67 +247,67 @@ ${R.value.join(" ")}
247
247
  const T = k(() => {
248
248
  var e, o;
249
249
  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,
250
+ }), 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), {
251
+ currentModels: N,
252
252
  resetView: Z,
253
253
  initThreeJS: q,
254
- handleResize: oe,
255
- getThreeJSObjects: B,
256
- cleanup: se,
254
+ handleResize: ae,
255
+ getThreeJSObjects: D,
256
+ cleanup: oe,
257
257
  setAndFitModels: K,
258
258
  axesHelperVisible: a,
259
- toggleAxesVisibility: t,
260
- zoomIn: g,
261
- zoomOut: L
262
- } = Ee(c), { loadSceneFromFile: u } = el(
263
- B,
259
+ toggleAxesVisibility: l,
260
+ zoomIn: b,
261
+ zoomOut: A
262
+ } = Ge(c), { loadSceneFromFile: u } = Ze(
264
263
  D,
264
+ N,
265
265
  h,
266
266
  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(() => {
267
+ ), { 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 = () => {
268
+ l();
269
+ }, je = (t) => {
270
+ E.value = t, _e();
271
+ }, V = k(() => {
272
272
  var e, o;
273
273
  return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
274
274
  }), ie = k(() => {
275
275
  var e;
276
- return (e = $ == null ? void 0 : $.value) == null ? void 0 : e.modelNumber;
276
+ return (e = V == null ? void 0 : V.value) == null ? void 0 : e.modelNumber;
277
277
  }), re = k(() => {
278
278
  var e;
279
- return (e = $ == null ? void 0 : $.value) == null ? void 0 : e.serialNumber;
279
+ return (e = V == null ? void 0 : V.value) == null ? void 0 : e.serialNumber;
280
280
  }), ue = k(() => {
281
281
  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;
282
+ return (e = V == null ? void 0 : V.value) == null ? void 0 : e.manufacturer;
283
+ }), Ae = k(() => ie.value || re.value || ue.value), Le = k(() => F.value === pe.ROBOT), Q = (t) => {
284
+ C.value = !0, v.value = t, t === "剖面视图" && !se.value && ye();
285
+ }, ce = (t) => {
286
+ d.value = !0, P.value = t;
287
287
  }, Ve = () => {
288
- var l;
289
- (l = M.value) == null || l.handlePlayPause();
288
+ var t;
289
+ (t = M.value) == null || t.handlePlayPause();
290
290
  }, $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);
291
+ var t;
292
+ (t = M.value) == null || t.pauseAnimation();
293
+ }, Te = () => {
294
+ var t;
295
+ (t = M.value) == null || t.stopAnimation();
296
+ }, Oe = (t, e) => nt(t, e), Re = async (t) => {
297
+ const e = Oe(t, R.value);
298
298
  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;
299
+ const o = await bt(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, ne.value = o;
301
301
  } else
302
302
  R.value && console.warn(`在 Blade '${R.value}' 中未找到可替换的网格或其没有父级。`);
303
303
  };
304
- X(() => f.fileBlobs, (l) => {
305
- if (l && l.length > 0) {
306
- const e = l[0];
304
+ X(() => f.fileBlobs, (t) => {
305
+ if (t && t.length > 0) {
306
+ const e = t[0];
307
307
  if (!e.name.toLowerCase().endsWith(".urdf"))
308
308
  return;
309
309
  u(e).then((o) => {
310
- w.value = o, o && Oe(o);
310
+ w.value = o, o && Re(o);
311
311
  }).catch((o) => {
312
312
  console.error("加载URDF文件时发生错误:", o), _.error("加载urdf模型失败"), w.value = null;
313
313
  });
@@ -316,31 +316,31 @@ ${R.value.join(" ")}
316
316
  }, {
317
317
  immediate: !0,
318
318
  deep: !0
319
- }), X(w, (l) => {
320
- K(l ? [l] : []), _e();
319
+ }), X(w, (t) => {
320
+ K(t ? [t] : []), ke();
321
321
  });
322
- const Re = () => {
322
+ const Se = () => {
323
323
  q(), me(() => {
324
- c.value && (le = new ResizeObserver(oe), le.observe(c.value));
324
+ c.value && (ee = new ResizeObserver(ae), ee.observe(c.value));
325
325
  });
326
- const l = B();
327
- J.value = l.scene;
328
- }, Se = () => {
329
- v.value = "", P.value = "", le && le.disconnect(), m.value && S(), se(), ze();
326
+ const t = D();
327
+ J.value = t.scene;
328
+ }, Fe = () => {
329
+ v.value = "", P.value = "", ee && ee.disconnect(), m.value && H(), oe(), Ue();
330
330
  };
331
- let le = null;
332
- return Je(async () => {
331
+ let ee = null;
332
+ return Me(async () => {
333
333
  await me();
334
334
  try {
335
- Re();
336
- } catch (l) {
337
- console.error("Three.js 初始化失败:", l), _.error("渲染引擎初始化失败!");
335
+ Se();
336
+ } catch (t) {
337
+ console.error("Three.js 初始化失败:", t), _.error("渲染引擎初始化失败!");
338
338
  }
339
- }), Me(() => {
340
- Se();
341
- }), (l, e) => {
342
- const o = E("el-scrollbar"), Fe = E("PipeAnalysisPanel");
343
- return b(), x("div", gl, [
339
+ }), Ee(() => {
340
+ Fe();
341
+ }), (t, e) => {
342
+ const o = G("el-scrollbar"), Ne = G("PipeAnalysisPanel");
343
+ return g(), x("div", gt, [
344
344
  I(n("div", {
345
345
  ref_key: "threejsContainer",
346
346
  ref: c,
@@ -348,7 +348,7 @@ ${R.value.join(" ")}
348
348
  }, null, 512), [
349
349
  [W, Le.value]
350
350
  ]),
351
- n("div", bl, [
351
+ n("div", ht, [
352
352
  s(y, {
353
353
  name: "viewReset",
354
354
  size: "24",
@@ -359,13 +359,13 @@ ${R.value.join(" ")}
359
359
  name: "fangda",
360
360
  size: "24",
361
361
  title: "放大",
362
- onClick: z(g)
362
+ onClick: z(b)
363
363
  }, null, 8, ["onClick"]),
364
364
  s(y, {
365
365
  name: "suoxiao",
366
366
  size: "24",
367
367
  title: "缩小",
368
- onClick: z(L)
368
+ onClick: z(A)
369
369
  }, null, 8, ["onClick"]),
370
370
  s(y, {
371
371
  name: "lookAround",
@@ -377,39 +377,39 @@ ${R.value.join(" ")}
377
377
  name: "zuobiaoxi",
378
378
  size: "24",
379
379
  active: z(a),
380
- onClick: Ue,
380
+ onClick: xe,
381
381
  title: "显隐坐标轴"
382
382
  }, null, 8, ["active"])
383
383
  ]),
384
- n("div", hl, [
385
- ve(l.$slots, "button-left", { switchRightPanel: ee }, void 0, !0),
384
+ n("div", yt, [
385
+ ve(t.$slots, "button-left", { switchRightPanel: Q }, void 0, !0),
386
386
  s(y, {
387
387
  name: "jiegoushu",
388
388
  size: "24",
389
- onClick: e[0] || (e[0] = (A) => ee("场景树")),
389
+ onClick: e[0] || (e[0] = ($) => Q("场景树")),
390
390
  active: C.value && v.value === "场景树",
391
391
  title: "场景树"
392
392
  }, null, 8, ["active"]),
393
393
  s(y, {
394
394
  name: "clipping",
395
395
  size: "24",
396
- onClick: e[1] || (e[1] = (A) => ee("剖面视图")),
396
+ onClick: e[1] || (e[1] = ($) => Q("剖面视图")),
397
397
  active: C.value && v.value === "剖面视图",
398
398
  title: "剖面视图"
399
399
  }, null, 8, ["active"]),
400
400
  s(y, {
401
401
  name: "donghuafangzhen",
402
402
  size: "24",
403
- onClick: e[2] || (e[2] = (A) => ee("工件树")),
403
+ onClick: e[2] || (e[2] = ($) => Q("工件树")),
404
404
  active: C.value && v.value === "工件树"
405
405
  }, null, 8, ["active"])
406
406
  ]),
407
- n("div", yl, [
408
- ve(l.$slots, "button-right", { switchRightPanel: ce }, void 0, !0),
407
+ n("div", _t, [
408
+ ve(t.$slots, "button-right", { switchRightPanel: ce }, void 0, !0),
409
409
  s(y, {
410
410
  name: "jichuangxuanze",
411
411
  size: "24",
412
- onClick: e[3] || (e[3] = (A) => ce("机床控制")),
412
+ onClick: e[3] || (e[3] = ($) => ce("机床控制")),
413
413
  active: d.value && P.value === "机床控制",
414
414
  title: "机床控制"
415
415
  }, null, 8, ["active"]),
@@ -417,11 +417,11 @@ ${R.value.join(" ")}
417
417
  name: "donghuafangzhen",
418
418
  size: "24",
419
419
  title: "动画仿真",
420
- onClick: e[4] || (e[4] = (A) => ce("动画仿真")),
420
+ onClick: e[4] || (e[4] = ($) => ce("动画仿真")),
421
421
  active: d.value && P.value === "动画仿真"
422
422
  }, null, 8, ["active"])
423
423
  ]),
424
- n("div", _l, [
424
+ n("div", kt, [
425
425
  s(y, {
426
426
  name: "bofang",
427
427
  size: "24",
@@ -441,37 +441,37 @@ ${R.value.join(" ")}
441
441
  size: "24",
442
442
  backgroundColor: "#ffffff",
443
443
  title: "停止",
444
- onClick: Ae
444
+ onClick: Te
445
445
  })
446
446
  ]),
447
- I(n("div", kl, [
448
- n("div", Cl, [
449
- n("span", null, V(v.value), 1),
447
+ I(n("div", Ct, [
448
+ n("div", Pt, [
449
+ n("span", null, L(v.value), 1),
450
450
  n("span", {
451
451
  class: "close",
452
- onClick: e[5] || (e[5] = (A) => C.value = !1)
452
+ onClick: e[5] || (e[5] = ($) => C.value = !1)
453
453
  }, " X ")
454
454
  ]),
455
- n("div", Pl, [
455
+ n("div", wt, [
456
456
  s(o, { height: "100%" }, {
457
- default: ne(() => {
458
- var A;
457
+ default: le(() => {
458
+ var $;
459
459
  return [
460
- v.value === "场景树" ? (b(), de(Ye, {
460
+ v.value === "场景树" ? (g(), de(tt, {
461
461
  key: 0,
462
462
  model: w.value
463
463
  }, null, 8, ["model"])) : U("", !0),
464
- v.value === "剖面视图" ? (b(), de(Ge, {
464
+ v.value === "剖面视图" ? (g(), de(We, {
465
465
  key: 1,
466
- value: z(Q),
467
- onChange: xe
466
+ value: z(E),
467
+ onChange: je
468
468
  }, null, 8, ["value"])) : U("", !0),
469
- v.value === "工件树" ? (b(), de(ll, {
469
+ v.value === "工件树" ? (g(), de(qe, {
470
470
  key: 2,
471
- model: (A = z(ke)) == null ? void 0 : A.obj,
472
- onVisibleChange: z(Ce),
473
- onUpdatePosition: z(Pe),
474
- onUpdateRotation: z(we)
471
+ model: ($ = z(Ce)) == null ? void 0 : $.obj,
472
+ onVisibleChange: z(Pe),
473
+ onUpdatePosition: z(we),
474
+ onUpdateRotation: z(ze)
475
475
  }, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : U("", !0)
476
476
  ];
477
477
  }),
@@ -481,21 +481,21 @@ ${R.value.join(" ")}
481
481
  ], 512), [
482
482
  [W, C.value]
483
483
  ]),
484
- I(n("div", wl, [
485
- n("div", zl, [
486
- n("span", null, V(P.value), 1),
484
+ I(n("div", zt, [
485
+ n("div", Ut, [
486
+ n("span", null, L(P.value), 1),
487
487
  n("span", {
488
488
  class: "close",
489
- onClick: e[6] || (e[6] = (A) => d.value = !1)
489
+ onClick: e[6] || (e[6] = ($) => d.value = !1)
490
490
  }, " X ")
491
491
  ]),
492
- n("div", Ul, [
492
+ n("div", xt, [
493
493
  s(o, { height: "100%" }, {
494
- default: ne(() => [
495
- I(s(Ze, { model: w.value }, null, 8, ["model"]), [
494
+ default: le(() => [
495
+ I(s(lt, { model: w.value }, null, 8, ["model"]), [
496
496
  [W, P.value === "机床控制"]
497
497
  ]),
498
- I(s(ge, {
498
+ I(s(be, {
499
499
  model: w.value,
500
500
  scene: J.value,
501
501
  xyzbcList: j.value,
@@ -504,7 +504,7 @@ ${R.value.join(" ")}
504
504
  }, null, 8, ["model", "scene", "xyzbcList"]), [
505
505
  [W, P.value === "动画仿真"]
506
506
  ]),
507
- ve(l.$slots, "right-panel", { rightPanelType: P.value }, void 0, !0)
507
+ ve(t.$slots, "right-panel", { rightPanelType: P.value }, void 0, !0)
508
508
  ]),
509
509
  _: 3
510
510
  })
@@ -512,29 +512,29 @@ ${R.value.join(" ")}
512
512
  ], 512), [
513
513
  [W, d.value]
514
514
  ]),
515
- h.value ? (b(), x("div", xl, [
515
+ h.value ? (g(), x("div", jt, [
516
516
  e[7] || (e[7] = n("div", { class: "loading-spinner" }, null, -1)),
517
- n("p", null, V(O.value), 1)
517
+ n("p", null, L(O.value), 1)
518
518
  ])) : U("", !0),
519
- je.value ? (b(), x("div", jl, [
520
- ue.value ? (b(), x("div", Ll, [
519
+ Ae.value ? (g(), x("div", At, [
520
+ ue.value ? (g(), x("div", Lt, [
521
521
  e[8] || (e[8] = n("div", { class: "item-label" }, "厂家:", -1)),
522
- n("div", Vl, V(ue.value), 1)
522
+ n("div", Vt, L(ue.value), 1)
523
523
  ])) : U("", !0),
524
- ie.value ? (b(), x("div", $l, [
524
+ ie.value ? (g(), x("div", $t, [
525
525
  e[9] || (e[9] = n("div", { class: "item-label" }, "型号:", -1)),
526
- n("div", Al, V(ie.value), 1)
526
+ n("div", Tt, L(ie.value), 1)
527
527
  ])) : U("", !0),
528
- re.value ? (b(), x("div", Tl, [
528
+ re.value ? (g(), x("div", Ot, [
529
529
  e[10] || (e[10] = n("div", { class: "item-label" }, "编号:", -1)),
530
- n("div", Ol, V(re.value), 1)
530
+ n("div", Rt, L(re.value), 1)
531
531
  ])) : U("", !0)
532
532
  ])) : U("", !0),
533
- s(Fe, { ref: "pipeAnalysisPanelRef" }, null, 512)
533
+ s(Ne, { ref: "pipeAnalysisPanelRef" }, null, 512)
534
534
  ]);
535
535
  };
536
536
  }
537
- }), Yl = /* @__PURE__ */ he(Rl, [["__scopeId", "data-v-54d53d1f"]]);
537
+ }), Zt = /* @__PURE__ */ he(St, [["__scopeId", "data-v-54d53d1f"]]);
538
538
  export {
539
- Yl as default
539
+ Zt as default
540
540
  };