ss-component-new 1.3.39 → 1.3.40

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 (99) hide show
  1. package/dist/{MTLLoader-2i72y41c.js → MTLLoader-CBRDqlja.js} +24 -24
  2. package/dist/{MTLLoader-DXzoNrir.cjs → MTLLoader-YtHulNzU.cjs} +1 -1
  3. package/dist/{OrbitControls-25f9O6FX.cjs → OrbitControls-Bwzpfq8_.cjs} +1 -1
  4. package/dist/{OrbitControls-DLMbmcAk.js → OrbitControls-CKR1ruPg.js} +1 -1
  5. package/dist/{URDFLoader-C9bE_XzP.js → URDFLoader-D-0fnLWu.js} +189 -189
  6. package/dist/{URDFLoader-Cr4cwEF8.cjs → URDFLoader-DIvTWPgk.cjs} +1 -1
  7. package/dist/{animationData-0idWk1St.js → animationData-BBVNOO1d.js} +19 -19
  8. package/dist/{animationData-Bq1xWpzh.cjs → animationData-krmt7b15.cjs} +1 -1
  9. package/dist/{array-D7ZpHOUW.js → array-B7hKAHMR.js} +46 -46
  10. package/dist/{array-BcZ8wZJh.cjs → array-BMhRsnRu.cjs} +1 -1
  11. package/dist/{iconfont-D_lKvP4A.js → iconfont-CSj9Ypb0.js} +29 -29
  12. package/dist/{iconfont-C8smb8wH.cjs → iconfont-CUPzGSlt.cjs} +1 -1
  13. package/dist/index-BDzsGCjm.cjs +11 -0
  14. package/dist/{index-CuwDFx38.cjs → index-BFKUrR1o.cjs} +1 -1
  15. package/dist/{index-Dl-Z36zZ.cjs → index-BG3-boe7.cjs} +1 -1
  16. package/dist/index-BJ8XP3Y-.cjs +1 -0
  17. package/dist/{index-BJPBBWWH.cjs → index-BLxE_tkf.cjs} +1 -1
  18. package/dist/{index-Ddoq7kRQ.js → index-BT6DSXQW.js} +9 -9
  19. package/dist/{index-BFqQiTF3.cjs → index-BUsoO5VT.cjs} +1 -1
  20. package/dist/{index-U0xNmCVP.cjs → index-BVgS3Nd5.cjs} +1 -1
  21. package/dist/{index-BJ4dYIP9.js → index-Bcrscjdm.js} +2 -2
  22. package/dist/{index-2cLYbH8L.js → index-BgUChdje.js} +8 -8
  23. package/dist/index-BteE57Nz.js +103 -0
  24. package/dist/{index-mMYvuatu.js → index-C75tqiG_.js} +41 -41
  25. package/dist/{index-C09fhtZ7.js → index-C7WQ1ky5.js} +2 -2
  26. package/dist/index-C8FzkPpO.cjs +1 -0
  27. package/dist/{index-DRTxe12U.cjs → index-C8fMwErX.cjs} +13 -13
  28. package/dist/{index-BeF439qb.js → index-CCsW4SQb.js} +7 -7
  29. package/dist/{index-nr6V1FzX.js → index-CEq2QX9L.js} +7 -7
  30. package/dist/{index-CXiOVgoz.js → index-CEzEaG0d.js} +1 -1
  31. package/dist/{index-BjVhxFhd.js → index-CGm9oYu2.js} +5 -5
  32. package/dist/{index-Cjqg29ul.cjs → index-CIrXKpNl.cjs} +1 -1
  33. package/dist/{index-CXF4fGBx.cjs → index-CQozkDNK.cjs} +1 -1
  34. package/dist/{index-C-_cejgk.js → index-CTE81JBY.js} +3 -3
  35. package/dist/{index-BSzis22W.cjs → index-CliK2V0E.cjs} +1 -1
  36. package/dist/{index-CYttSa5h.js → index-CppJQDiT.js} +3 -3
  37. package/dist/{index-DM30Ja8n.cjs → index-Cul6hC7f.cjs} +1 -1
  38. package/dist/{index-CMro3YG1.cjs → index-CuvQZsbE.cjs} +1 -1
  39. package/dist/{index-DU9e5EhS.cjs → index-Cw4Pm2PQ.cjs} +1 -1
  40. package/dist/{index-BmPlus3L.cjs → index-CwMhzp9R.cjs} +1 -1
  41. package/dist/{index-DdKUuRez.js → index-D39AtL48.js} +1 -1
  42. package/dist/{index-DQeVX7pl.js → index-D9lVn2ja.js} +5 -5
  43. package/dist/{index-CyiMl_77.js → index-DABBYx7H.js} +1 -1
  44. package/dist/{index-CvwIVk4C.js → index-DDQZOo-o.js} +3 -3
  45. package/dist/{index-Bmjp4oN2.cjs → index-DDsoPHBA.cjs} +1 -1
  46. package/dist/{index-CZZ8Ifs9.js → index-DFjh1qWr.js} +2 -2
  47. package/dist/{index-Va8AOLWi.js → index-DGRL8SEt.js} +1 -1
  48. package/dist/index-DGeMVYJU.js +12544 -0
  49. package/dist/{index-HWbROorb.js → index-DLyb9Q5L.js} +2 -2
  50. package/dist/{index-BFkiAoiG.cjs → index-DN2waPoj.cjs} +1 -1
  51. package/dist/{index-Dhu1H8ka.js → index-DWfxnemZ.js} +2 -2
  52. package/dist/{index-BAu0NK04.cjs → index-DdNJrN4I.cjs} +1 -1
  53. package/dist/{index-BC4zbL4W.cjs → index-Dm-5UkTK.cjs} +1 -1
  54. package/dist/{index-DkCH5VtE.js → index-Dq8v_eJA.js} +6 -6
  55. package/dist/{index-OaeHF7Y4.cjs → index-Du0eSoIx.cjs} +1 -1
  56. package/dist/{index-C0hS-bj5.js → index-DxVKhVHR.js} +7 -7
  57. package/dist/{index-BeqcmxG1.js → index-OYiyhWAy.js} +7 -7
  58. package/dist/{index-DPmCVTf0.cjs → index-OZTa9Fl3.cjs} +1 -1
  59. package/dist/{index-CqvnJnTM.cjs → index-d6tZBTSp.cjs} +1 -1
  60. package/dist/{index-CEcgrss3.cjs → index-euZWOilV.cjs} +1 -1
  61. package/dist/{index-SG3iZ1zi.cjs → index-lDcFCgsk.cjs} +1 -1
  62. package/dist/{index-CldRoanF.js → index-rZKPYWM6.js} +2 -2
  63. package/dist/{index-COQpDVsv.js → index-sMsCzNtW.js} +1535 -1570
  64. package/dist/{index-BWCv7zxy.cjs → index-vCTVD7cV.cjs} +1 -1
  65. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs} +382 -392
  66. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js} +28120 -28781
  67. package/dist/{index.vue_vue_type_style_index_1_lang-BIBuo_6N.cjs → index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs} +1 -1
  68. package/dist/{index.vue_vue_type_style_index_1_lang-M5fbenhC.js → index.vue_vue_type_style_index_1_lang-q8rMzh6x.js} +75 -75
  69. package/dist/{main-CZBz_zjr.js → main-CbBG4x5W.js} +4 -4
  70. package/dist/{main-pPT0wg-M.cjs → main-D7LZI3yR.cjs} +1 -1
  71. package/dist/{menuIndex-D52EAwtb.cjs → menuIndex-8RF_0N_y.cjs} +1 -1
  72. package/dist/{menuIndex-DYaogp2R.js → menuIndex-BwWrdu20.js} +1 -1
  73. package/dist/ss-component.cjs +1 -1
  74. package/dist/ss-component.css +1 -1
  75. package/dist/ss-component.js +10 -10
  76. package/dist/ss-component2.cjs +1 -1
  77. package/dist/ss-component2.js +11 -11
  78. package/dist/{threeModel-BObCDF1v.js → threeModel-CiTIBkkk.js} +45 -45
  79. package/dist/{threeModel-hIc2ofR5.cjs → threeModel-Dd-cfGXr.cjs} +1 -1
  80. package/dist/{threePreview-Dm8s6ZzZ.cjs → threePreview-CBFQtSls.cjs} +1 -1
  81. package/dist/{threePreview-STh6e4ji.js → threePreview-XQG7sQy9.js} +125 -125
  82. package/dist/{threeSceneView-BrPJwJe5.js → threeSceneView-CdZFIImJ.js} +38 -38
  83. package/dist/{threeSceneView-DsimUKrC.cjs → threeSceneView-D97Sc8hd.cjs} +1 -1
  84. package/dist/{threeSceneViewForCPMPIP-C5cYg_nz.cjs → threeSceneViewForCPMPIP-4Cjv1ZS4.cjs} +1 -1
  85. package/dist/{threeSceneViewForCPMPIP-BjnGQodx.js → threeSceneViewForCPMPIP-DH__ogKh.js} +8 -8
  86. package/dist/{threeTrackPathView-BQYAP4DB.js → threeTrackPathView-BFQXaw-a.js} +78 -78
  87. package/dist/{threeTrackPathView-CJsgvwfM.cjs → threeTrackPathView-s17KavQX.cjs} +1 -1
  88. package/dist/{threeViewerHost-Sk5pSWMo.js → threeViewerHost-BgPjA_94.js} +11 -11
  89. package/dist/{threeViewerHost-B9_P3rIV.cjs → threeViewerHost-C39tiQj-.cjs} +1 -1
  90. package/dist/{urdfTree-B1eVnyil.js → urdfTree-DM6uTeXj.js} +10 -10
  91. package/dist/{urdfTree-DoHqwX6e.cjs → urdfTree-HdeBG5se.cjs} +1 -1
  92. package/dist/{workpieceTreePanel-DKNEmjW7.cjs → workpieceTreePanel-BKOHDm85.cjs} +1 -1
  93. package/dist/{workpieceTreePanel-CZA2q-tk.js → workpieceTreePanel-C5qUdbmi.js} +63 -63
  94. package/package.json +1 -1
  95. package/dist/index-Ccqg6q19.cjs +0 -1
  96. package/dist/index-CpbBe_mV.cjs +0 -1
  97. package/dist/index-DIWralYr.js +0 -67
  98. package/dist/index-De99NYNm.cjs +0 -1
  99. package/dist/index-O6tv0Wzx.js +0 -11883
@@ -1,18 +1,18 @@
1
- import { defineComponent as Le, ref as h, watch as ne, shallowRef as be, computed as Pe, onUnmounted as Ie, resolveComponent as U, createElementBlock as Te, openBlock as Q, createElementVNode as u, createVNode as l, withCtx as M, createBlock as ye, createCommentVNode as ke, unref as X, toDisplayString as he, onMounted as Ge, onBeforeUnmount as Ze, Fragment as He, renderList as Ke, nextTick as qe, withDirectives as pe, vShow as de, renderSlot as Me } from "vue";
2
- import { r as De, s as Ye } from "./threeViewerHost-Sk5pSWMo.js";
3
- import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-D_lKvP4A.js";
4
- import { U as lt, u as ot, a as at, W as nt } from "./workpieceTreePanel-CZA2q-tk.js";
5
- import { c as st } from "./index-COQpDVsv.js";
1
+ import { defineComponent as Le, ref as h, watch as ne, shallowRef as be, computed as Pe, onUnmounted as Ie, resolveComponent as U, createElementBlock as Te, openBlock as Q, createElementVNode as u, createVNode as l, withCtx as M, createBlock as ye, createCommentVNode as ke, unref as X, toDisplayString as he, onMounted as Ge, onBeforeUnmount as Ze, Fragment as He, renderList as qe, nextTick as Ke, withDirectives as pe, vShow as de, renderSlot as Me } from "vue";
2
+ import { r as De, s as Ye } from "./threeViewerHost-BgPjA_94.js";
3
+ import { u as Je, a as Qe, b as et, C as tt } from "./iconfont-CSj9Ypb0.js";
4
+ import { U as lt, u as ot, a as at, W as nt } from "./workpieceTreePanel-C5qUdbmi.js";
5
+ import { c as st } from "./index-sMsCzNtW.js";
6
6
  import { a6 as it, E, at as rt, an as ct } from "./index-B8HqIYd5.js";
7
- import { ac as Ve, ad as xe, V, aa as H, ab as ut, aC as pt, a1 as Se, aD as dt, aE as mt, aF as vt, aG as ft, aH as gt, aI as ht, aJ as bt, aK as yt, a7 as _t, aL as Be, aM as wt, aN as Ct, aO as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js";
8
- import "./index.vue_vue_type_style_index_1_lang-M5fbenhC.js";
7
+ import { a7 as Ve, a8 as xe, V, a5 as H, a6 as ut, aw as pt, Y as Se, ax as dt, ay as mt, az as vt, aA as ft, aB as gt, aC as ht, aD as bt, aE as yt, a2 as _t, aF as Be, aG as wt, aH as Ct, aI as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js";
8
+ import "./index.vue_vue_type_style_index_1_lang-q8rMzh6x.js";
9
9
  import "./index-BHtNKL1L.js";
10
10
  import { _ as me } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
11
- import "./index-Ddoq7kRQ.js";
12
- import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-0idWk1St.js";
13
- import { g as Dt, a as Tt, b as Vt, c as St, U as At, J as $t } from "./urdfTree-B1eVnyil.js";
11
+ import "./index-BT6DSXQW.js";
12
+ import { f as Pt, a as xt, g as Rt, b as Mt } from "./animationData-BBVNOO1d.js";
13
+ import { g as Dt, a as Tt, b as Vt, c as St, U as At, J as $t } from "./urdfTree-DM6uTeXj.js";
14
14
  import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- import { s as Ft } from "./index-CyiMl_77.js";
15
+ import { s as Ft } from "./index-DABBYx7H.js";
16
16
  import { T as Y } from "./svgIcon-4u4PW7Is.js";
17
17
  const I = 1e-3, oe = ut.degToRad, Ee = new dt({
18
18
  // 灰色
@@ -270,8 +270,8 @@ const Et = { class: "panel-content" }, jt = { class: "action-bar" }, Ot = { clas
270
270
  animationData: R
271
271
  } = e;
272
272
  $.value = o, g.value = t, T.value = i, a.value = R;
273
- const x = st(a.value), le = fe(G.value), q = (x == null ? void 0 : x["输出(动画数据)"]) || [];
274
- s.value = q.length ? q : [le];
273
+ const x = st(a.value), le = fe(G.value), K = (x == null ? void 0 : x["输出(动画数据)"]) || [];
274
+ s.value = K.length ? K : [le];
275
275
  }, s = h([]), b = h(!1), f = h(""), w = h(!1), n = h(0), C = h(0), p = h(1e3);
276
276
  let k = !1;
277
277
  const r = h(null), c = be(null), D = be(null), A = be(null), $ = h(0), g = h(12.5), T = h(30), B = h([]), L = h(null), Z = Pe(() => d.model ? Dt(d.model).map((t) => t.name) : []), ee = h(["Y", "B", "C", "R"]), G = Pe(() => [...Z.value, ...ee.value]), _e = Pe(() => G.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
@@ -285,14 +285,14 @@ ${G.value.join(" ")}
285
285
  })), se = () => {
286
286
  const e = [], o = [];
287
287
  return s.value.forEach((t) => {
288
- const { Y1: i, B1: R, C1: x, R1: le, Y2: q, B2: ue, C2: Ce, R2: z } = t;
288
+ const { Y1: i, B1: R, C1: x, R1: le, Y2: K, B2: ue, C2: Ce, R2: z } = t;
289
289
  e.push({
290
290
  Y: parseFloat(i) || 0,
291
291
  B: parseFloat(R) || 0,
292
292
  C: parseFloat(x) || 0,
293
293
  R: parseFloat(le) || 0
294
294
  }), o.push({
295
- Y: parseFloat(q) || 0,
295
+ Y: parseFloat(K) || 0,
296
296
  B: parseFloat(ue) || 0,
297
297
  C: parseFloat(Ce) || 0,
298
298
  R: parseFloat(z) || 0
@@ -393,7 +393,7 @@ ${G.value.join(" ")}
393
393
  }
394
394
  }, te = () => {
395
395
  r.value && r.value.resetToZero(), O(), N(), E.success("机器人和管件已重置");
396
- }, K = (e) => `第 ${e + 1} 帧`, W = (e) => {
396
+ }, q = (e) => `第 ${e + 1} 帧`, W = (e) => {
397
397
  w.value && j(), P(e);
398
398
  }, ie = () => {
399
399
  w.value && j(), !(n.value + 1 >= s.value.length) && P(n.value + 1);
@@ -484,20 +484,20 @@ ${G.value.join(" ")}
484
484
  return;
485
485
  }
486
486
  const R = e.slice(1).map((x) => {
487
- const le = x.split(" "), q = {};
487
+ const le = x.split(" "), K = {};
488
488
  return G.value.forEach((ue) => {
489
- q[ue] = "0";
489
+ K[ue] = "0";
490
490
  }), Object.entries(t).forEach(([ue, Ce]) => {
491
491
  const z = le[parseInt(ue)];
492
- z !== void 0 && z.trim() !== "" && (q[Ce] = z.trim());
493
- }), q;
492
+ z !== void 0 && z.trim() !== "" && (K[Ce] = z.trim());
493
+ }), K;
494
494
  });
495
495
  R.length > 0 ? (s.value = R, E.success(`成功导入 ${R.length} 行数据!`), b.value = !1, f.value = "") : E.error("未能解析到有效数据,请检查格式。");
496
496
  };
497
497
  return Ie(() => {
498
498
  ae(), k = !0;
499
499
  }), v({ playAnimation: J, stopAnimation: j, forwardFrame: ie, backwardFrame: F }), (e, o) => {
500
- const t = U("el-icon"), i = U("el-input-number"), R = U("el-form-item"), x = U("el-form"), le = U("el-slider"), q = U("el-progress"), ue = U("el-input"), Ce = U("el-dialog");
500
+ const t = U("el-icon"), i = U("el-input-number"), R = U("el-form-item"), x = U("el-form"), le = U("el-slider"), K = U("el-progress"), ue = U("el-input"), Ce = U("el-dialog");
501
501
  return Q(), Te("div", Et, [
502
502
  u("div", jt, [
503
503
  l(me, {
@@ -623,14 +623,14 @@ ${G.value.join(" ")}
623
623
  min: 0,
624
624
  max: s.value.length > 0 ? s.value.length - 1 : 0,
625
625
  step: 1,
626
- "format-tooltip": K,
626
+ "format-tooltip": q,
627
627
  onInput: W,
628
628
  disabled: s.value.length === 0,
629
629
  style: { "flex-grow": "1", margin: "0 10px" }
630
630
  }, null, 8, ["modelValue", "max", "disabled"])
631
631
  ]),
632
632
  u("div", Nt, [
633
- l(q, {
633
+ l(K, {
634
634
  percentage: C.value,
635
635
  "show-text": !1,
636
636
  "stroke-width": 6
@@ -672,13 +672,13 @@ ${G.value.join(" ")}
672
672
  ]);
673
673
  };
674
674
  }
675
- }), Ht = /* @__PURE__ */ Ue(It, [["__scopeId", "data-v-49a19db9"]]), Kt = async () => {
675
+ }), Ht = /* @__PURE__ */ Ue(It, [["__scopeId", "data-v-49a19db9"]]), qt = async () => {
676
676
  const v = await Rt(["工件库", "弯管"]), d = Be("工件列表", v), a = wt(d);
677
677
  return a == null ? void 0 : a.map((_) => ({
678
678
  name: _,
679
679
  mainKey: _
680
680
  }));
681
- }, qt = async (y) => {
681
+ }, Kt = async (y) => {
682
682
  const d = await Ct(["工件库", "弯管"], y), a = Be("弯管基础参数", d), m = Be("弯管特征尺寸", d), _ = {
683
683
  outerDiameter: 0,
684
684
  ybcrList: []
@@ -724,14 +724,14 @@ ${G.value.join(" ")}
724
724
  const { form: S, list: P } = g.value, {
725
725
  outerDiameter: J
726
726
  } = S, j = J / 2, N = P == null ? void 0 : P.map((te) => {
727
- const { y: K, b: W, c: ie, r: F, Y: ae, B: fe, C: re, R: we } = te;
727
+ const { y: q, b: W, c: ie, r: F, Y: ae, B: fe, C: re, R: we } = te;
728
728
  return ae ? {
729
729
  Y: ae,
730
730
  B: fe,
731
731
  C: re,
732
732
  R: we
733
733
  } : {
734
- Y: K,
734
+ Y: q,
735
735
  B: W,
736
736
  C: ie,
737
737
  R: F
@@ -748,10 +748,10 @@ ${G.value.join(" ")}
748
748
  }, _e = () => {
749
749
  ee.value = !0;
750
750
  }, ve = async () => {
751
- const S = await Kt();
751
+ const S = await qt();
752
752
  $(S);
753
753
  }, se = async (S) => {
754
- const P = await qt(S);
754
+ const P = await Kt(S);
755
755
  T(P);
756
756
  };
757
757
  return ne(() => g, () => {
@@ -773,7 +773,7 @@ ${G.value.join(" ")}
773
773
  }), Ze(() => {
774
774
  window.removeEventListener("resize", f), n();
775
775
  }), v({ openDialog: _e }), (S, P) => {
776
- const J = U("el-icon"), j = U("el-option"), N = U("el-select"), O = U("el-form-item"), te = U("el-form"), K = U("el-input"), W = U("el-table-column"), ie = U("el-table");
776
+ const J = U("el-icon"), j = U("el-option"), N = U("el-select"), O = U("el-form-item"), te = U("el-form"), q = U("el-input"), W = U("el-table-column"), ie = U("el-table");
777
777
  return Q(), ye(Ft, {
778
778
  class: "pipe-analysis-dialog",
779
779
  visible: ee.value,
@@ -826,7 +826,7 @@ ${G.value.join(" ")}
826
826
  onChange: se
827
827
  }, {
828
828
  default: M(() => [
829
- (Q(!0), Te(He, null, Ke(A.value, (F) => (Q(), ye(j, {
829
+ (Q(!0), Te(He, null, qe(A.value, (F) => (Q(), ye(j, {
830
830
  label: F.name,
831
831
  value: F.mainKey
832
832
  }, null, 8, ["label", "value"]))), 256))
@@ -877,7 +877,7 @@ ${G.value.join(" ")}
877
877
  default: M(() => [
878
878
  l(O, { label: "管长" }, {
879
879
  default: M(() => [
880
- l(K, {
880
+ l(q, {
881
881
  modelValue: g.value.form.length,
882
882
  "onUpdate:modelValue": P[2] || (P[2] = (F) => g.value.form.length = F)
883
883
  }, null, 8, ["modelValue"])
@@ -886,7 +886,7 @@ ${G.value.join(" ")}
886
886
  }),
887
887
  l(O, { label: "外径" }, {
888
888
  default: M(() => [
889
- l(K, {
889
+ l(q, {
890
890
  modelValue: g.value.form.outerDiameter,
891
891
  "onUpdate:modelValue": P[3] || (P[3] = (F) => g.value.form.outerDiameter = F)
892
892
  }, null, 8, ["modelValue"])
@@ -895,7 +895,7 @@ ${G.value.join(" ")}
895
895
  }),
896
896
  l(O, { label: "内径" }, {
897
897
  default: M(() => [
898
- l(K, {
898
+ l(q, {
899
899
  modelValue: g.value.form.innerDiameter,
900
900
  "onUpdate:modelValue": P[4] || (P[4] = (F) => g.value.form.innerDiameter = F)
901
901
  }, null, 8, ["modelValue"])
@@ -904,7 +904,7 @@ ${G.value.join(" ")}
904
904
  }),
905
905
  l(O, { label: "壁厚" }, {
906
906
  default: M(() => [
907
- l(K, {
907
+ l(q, {
908
908
  modelValue: g.value.form.thickness,
909
909
  "onUpdate:modelValue": P[5] || (P[5] = (F) => g.value.form.thickness = F)
910
910
  }, null, 8, ["modelValue"])
@@ -990,7 +990,7 @@ ${G.value.join(" ")}
990
990
  D,
991
991
  _,
992
992
  s
993
- ), { isAnimating: se, toggleAnimation: S, startAnimation: P, stopAnimation: J } = Qe(T, D), { isClipping: j, activeClippingAxis: N, toggleClipping: O, updateClippingPlanes: te } = et(T, D), { initRaycaster: K, selectedObject3D: W, setSelectedObjVisible: ie, updatePosition: F, updateRotation: ae, dispose: fe } = ot(a, T, D), re = () => {
993
+ ), { isAnimating: se, toggleAnimation: S, startAnimation: P, stopAnimation: J } = Qe(T, D), { isClipping: j, activeClippingAxis: N, toggleClipping: O, updateClippingPlanes: te } = et(T, D), { initRaycaster: q, selectedObject3D: W, setSelectedObjVisible: ie, updatePosition: F, updateRotation: ae, dispose: fe } = ot(a, T, D), re = () => {
994
994
  ee();
995
995
  }, we = (t) => {
996
996
  N.value = t, te();
@@ -1027,11 +1027,11 @@ ${G.value.join(" ")}
1027
1027
  immediate: !0,
1028
1028
  deep: !0
1029
1029
  }), ne(k, (t) => {
1030
- L(t ? [t] : []), K();
1030
+ L(t ? [t] : []), q();
1031
1031
  });
1032
1032
  let o = null;
1033
1033
  return Ge(async () => {
1034
- await qe();
1034
+ await Ke();
1035
1035
  try {
1036
1036
  $(), a.value && (o = new ResizeObserver(g), o.observe(a.value));
1037
1037
  const t = T();
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ne=require("./threeViewerHost-B9_P3rIV.cjs"),pe=require("./iconfont-C8smb8wH.cjs"),ve=require("./workpieceTreePanel-DKNEmjW7.cjs"),Me=require("./index-DRTxe12U.cjs"),B=require("./index-C5pQXH0_.cjs"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs");require("./index.vue_vue_type_style_index_1_lang-BIBuo_6N.cjs");require("./index-BpPyaNFa.cjs");const le=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index-BJPBBWWH.cjs");const fe=require("./animationData-Bq1xWpzh.cjs"),ie=require("./urdfTree-DoHqwX6e.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=require("./index-BFkiAoiG.cjs"),R=require("./svgIcon-CDPAgQbj.cjs"),G=.001,W=n.MathUtils.degToRad,ye=new n.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:n.DoubleSide});function Ee(V=.005,v=64){const p=new n.CatmullRomCurve3([new n.Vector3(0,0,0),new n.Vector3(0,0,0)]),a=new n.TubeGeometry(p,v,V,16,!1),m=ye;return new n.Mesh(a,m)}const xe=V=>V.reduce((v,p)=>{let a=0;const m=p.Y??0,b=p.C??0,s=p.R??0;return m>0&&(a+=m),b>0&&s>0&&(a+=s*W(b)),v+a},0),ke=V=>{const v=[],p=V.Y??0,a=V.B??0,m=V.C??0,b=V.R??0,s={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!p&&!m)return v;if(v.push(s.pos.clone()),a!==0){const g=new n.Matrix4().makeRotationAxis(s.localY,W(a));s.localX.applyMatrix4(g),s.localZ.applyMatrix4(g)}if(p>0&&(s.pos.add(s.localY.clone().multiplyScalar(p*G)),v.push(s.pos.clone())),m>0&&b>0){const g=W(m),f=b*G,w=s.pos.clone().add(s.localX.clone().multiplyScalar(-f)),r=Math.max(16,Math.ceil(m/5));for(let y=1;y<=r;y++){const d=g*y/r,_=new n.Matrix4().makeRotationAxis(s.localZ,d),u=s.localX.clone().multiplyScalar(f).applyMatrix4(_),k=w.clone().add(u);v.push(k)}}return v};function Se(V,v){const p=new n.Group;p.name="CompletePipe";const a={pos:new n.Vector3(0,0,0),localX:new n.Vector3(1,0,0),localY:new n.Vector3(0,1,0),localZ:new n.Vector3(0,0,1)};let m=0,b=1;for(let s=0;s<V.length;s++){const g=V[s],f=g.Y??0,w=g.B??0,r=g.C??0,y=g.R??0;if(w!==0){const d=new n.Matrix4().makeRotationAxis(a.localY,W(w));a.localX.applyMatrix4(d),a.localZ.applyMatrix4(d)}if(f>0){const d=a.pos.clone();a.pos.add(a.localY.clone().multiplyScalar(f*G));const _=a.pos.clone(),c=De(d,_,v*G);c.userData={segmentType:"straight",segmentIndex:m,frameIndex:s,length:f,frame:{Y:f,B:w,C:r,R:y}},c.name=`直段_${m}`,p.add(c);const u=d.clone();Pe(p,b,u,v*G),m++}if(r>0&&y>0){const d=W(r),_=y*G,c=[];c.push(a.pos.clone());const u=a.pos.clone().add(a.localX.clone().multiplyScalar(-_)),k=Math.max(16,Math.ceil(r/5));for(let h=1;h<=k;h++){const M=d*h/k,A=new n.Matrix4().makeRotationAxis(a.localZ,M),L=a.localX.clone().multiplyScalar(_).applyMatrix4(A),q=u.clone().add(L);c.push(q)}const E=Re(c,v*G);E.userData={segmentType:"bend",segmentIndex:m,frameIndex:s,angle:r,radius:y,centerPoint:u.toArray(),frame:{Y:f,B:w,C:r,R:y}},E.name=`弯段_${m}`,p.add(E),Math.floor(c.length/2),c[0],a.pos=c[c.length-1].clone();const S=new n.Matrix4().makeRotationAxis(a.localZ,d);a.localY.applyMatrix4(S),a.localX.applyMatrix4(S),m++,b++}}return p}function Pe(V,v,p,a){const m=new n.Vector3(0,a*2,a*5),b=p.clone().add(m),s=[p,b],g=new n.BufferGeometry().setFromPoints(s),f=new n.LineDashedMaterial({color:16711680,dashSize:a*.5,gapSize:a*.3,linewidth:1}),w=new n.Line(g,f);w.computeLineDistances(),V.add(w);const r=document.createElement("canvas"),y=r.getContext("2d");r.width=128,r.height=128,y.clearRect(0,0,128,128),y.fillStyle="#FF0000",y.font="bold 80px Arial",y.textAlign="center",y.textBaseline="middle",y.fillText(v.toString(),64,64);const d=new n.CanvasTexture(r),_=new n.SpriteMaterial({map:d,transparent:!0,depthTest:!1,depthWrite:!1}),c=new n.Sprite(_),u=a*3;c.scale.set(u,u,1),c.position.copy(b),c.name=`Label_${v}`,c.userData={labelNumber:v},V.add(c)}function De(V,v,p){const a=new n.LineCurve3(V,v),m=new n.TubeGeometry(a,2,p,18,!1);return new n.Mesh(m,ye)}function Re(V,v){const p=new n.CatmullRomCurve3(V,!1,"catmullrom",.01),a=new n.TubeGeometry(p,Math.max(16,V.length*2),v,18,!1);return new n.Mesh(a,ye)}function _e(V,v,p,a,m,b=0){let s=v.slice(0,m+1);const g=v[m+1];if(g&&b>0){const c={...g,B:(g.B??0)*b,C:(g.C??0)*b};s.push(c)}const f=xe(s),w=Math.max(0,p-f),r=[];r.push(new n.Vector3(0,0,0));const y=new n.Vector3(0,w*G,0);w>0&&r.push(y);let d={pos:y.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const _=[];for(let c=s.length-1;c>=0;c--){const u=s[c],k=ke(u);if(k.length>0){const E=k.map(A=>{const $=A.clone(),L=new n.Matrix4;return L.makeBasis(d.localX,d.localY,d.localZ),$.applyMatrix4(L),$.add(d.pos)});_.push(E);const S=E[E.length-1];d.pos=S.clone();const h=u.B??0,M=u.C??0;if(h!==0){const A=new n.Matrix4().makeRotationAxis(d.localY,W(h));d.localX.applyMatrix4(A),d.localZ.applyMatrix4(A)}if(M>0){const A=W(M),$=new n.Matrix4().makeRotationAxis(d.localZ,A);d.localY.applyMatrix4($),d.localX.applyMatrix4($)}}}for(const c of _)c.length>1&&r.push(...c.slice(1));r.length<2&&r.push(new n.Vector3(0,.001,0));try{const c=new n.CatmullRomCurve3(r,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,r.length*4),a*G,18,!1);V.geometry.dispose(),V.geometry=u}catch(c){console.error("管件更新失败",c)}}function Ce(V,v,p,a=0){let m=V.slice(0,p+1);const b=V[p+1];if(b&&a>0){const d={...b,B:(b.B??0)*a,C:(b.C??0)*a};m.push(d)}const s=xe(m),g=Math.max(0,v-s),f=[];f.push(new n.Vector3(0,0,0));const w=new n.Vector3(0,g*G,0);g>0&&f.push(w);let r={pos:w.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const y=[];for(let d=m.length-1;d>=0;d--){const _=m[d],c=ke(_);if(c.length>0){const u=c.map(h=>{const M=h.clone(),A=new n.Matrix4;return A.makeBasis(r.localX,r.localY,r.localZ),M.applyMatrix4(A),M.add(r.pos)});y.push(u);const k=u[u.length-1];r.pos=k.clone();const E=_.B??0,S=_.C??0;if(E!==0){const h=new n.Matrix4().makeRotationAxis(r.localY,W(E));r.localX.applyMatrix4(h),r.localZ.applyMatrix4(h)}if(S>0){const h=W(S),M=new n.Matrix4().makeRotationAxis(r.localZ,h);r.localY.applyMatrix4(M),r.localX.applyMatrix4(M)}}}for(const d of y)d.length>1&&f.push(...d.slice(1));return f.length<2&&f.push(new n.Vector3(0,.001,0)),f}function Ne(V,v,p,a,m,b,s,g=0,f=0){const w=m-f,r=Ce(a,w,s,g);let d=Ce(p,f,s,g);d.forEach(c=>c.y=-c.y),d.reverse();const _=[...d,...r];try{const c=new n.CatmullRomCurve3(_,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,_.length*4),b*G,18,!1);v.geometry.dispose(),V.geometry.dispose(),v.parent&&v.parent.remove(v),V.geometry=u}catch(c){console.error("管件更新失败",c)}}const Be={class:"panel-content"},Ae={class:"action-bar"},$e={class:"animation-controls"},Fe={class:"control-row"},ze={class:"control-row"},Ye={class:"frame-info"},Le={class:"control-row"},Ue={class:"progress-bar"},Ie={class:"dialog-footer"},je=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},setup(V,{expose:v}){const p=V,a=e.ref(),m=e.ref();e.watch(()=>p.threeData,t=>{const l=t==null?void 0:t.data;m.value=l==null?void 0:l.type},{immediate:!0});const b=async()=>{let t={};m.value===ne.robotMode.SINGLE&&(t=await fe.fetchSingleRobotAnimationData()),m.value===ne.robotMode.DOUBLE&&(t=await fe.fetchDoubleRobotAnimationData());const{initialPipeLength:l=0,pipeRadius:o=0,clampLength:i=0,animationData:x}=t;S.value=l,h.value=o,M.value=i,a.value=x;const N=Me.cloneDeep(a.value),J=re(Y.value),X=(N==null?void 0:N["输出(动画数据)"])||[];s.value=X.length?X:[J]},s=e.ref([]),g=e.ref(!1),f=e.ref(""),w=e.ref(!1),r=e.ref(0),y=e.ref(0),d=e.ref(1e3);let _=!1;const c=e.ref(null),u=e.shallowRef(null),k=e.shallowRef(null),E=e.shallowRef(null),S=e.ref(0),h=e.ref(12.5),M=e.ref(30),A=e.ref([]),$=e.ref(null),L=e.computed(()=>p.model?ie.getNonFixedJoints(p.model).map(o=>o.name):[]),q=e.ref(["Y","B","C","R"]),Y=e.computed(()=>[...L.value,...q.value]),ce=e.computed(()=>Y.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ne=require("./threeViewerHost-C39tiQj-.cjs"),pe=require("./iconfont-CUPzGSlt.cjs"),ve=require("./workpieceTreePanel-BKOHDm85.cjs"),Me=require("./index-C8fMwErX.cjs"),B=require("./index-C5pQXH0_.cjs"),n=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs");require("./index.vue_vue_type_style_index_1_lang-DDedRKQj.cjs");require("./index-BpPyaNFa.cjs");const le=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs");require("./index-BLxE_tkf.cjs");const fe=require("./animationData-krmt7b15.cjs"),ie=require("./urdfTree-HdeBG5se.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Te=require("./index-DN2waPoj.cjs"),R=require("./svgIcon-CDPAgQbj.cjs"),G=.001,W=n.MathUtils.degToRad,ye=new n.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:n.DoubleSide});function Ee(V=.005,v=64){const p=new n.CatmullRomCurve3([new n.Vector3(0,0,0),new n.Vector3(0,0,0)]),a=new n.TubeGeometry(p,v,V,16,!1),m=ye;return new n.Mesh(a,m)}const xe=V=>V.reduce((v,p)=>{let a=0;const m=p.Y??0,b=p.C??0,s=p.R??0;return m>0&&(a+=m),b>0&&s>0&&(a+=s*W(b)),v+a},0),ke=V=>{const v=[],p=V.Y??0,a=V.B??0,m=V.C??0,b=V.R??0,s={pos:new n.Vector3(0,0,0),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};if(!p&&!m)return v;if(v.push(s.pos.clone()),a!==0){const g=new n.Matrix4().makeRotationAxis(s.localY,W(a));s.localX.applyMatrix4(g),s.localZ.applyMatrix4(g)}if(p>0&&(s.pos.add(s.localY.clone().multiplyScalar(p*G)),v.push(s.pos.clone())),m>0&&b>0){const g=W(m),f=b*G,w=s.pos.clone().add(s.localX.clone().multiplyScalar(-f)),r=Math.max(16,Math.ceil(m/5));for(let y=1;y<=r;y++){const d=g*y/r,_=new n.Matrix4().makeRotationAxis(s.localZ,d),u=s.localX.clone().multiplyScalar(f).applyMatrix4(_),k=w.clone().add(u);v.push(k)}}return v};function Se(V,v){const p=new n.Group;p.name="CompletePipe";const a={pos:new n.Vector3(0,0,0),localX:new n.Vector3(1,0,0),localY:new n.Vector3(0,1,0),localZ:new n.Vector3(0,0,1)};let m=0,b=1;for(let s=0;s<V.length;s++){const g=V[s],f=g.Y??0,w=g.B??0,r=g.C??0,y=g.R??0;if(w!==0){const d=new n.Matrix4().makeRotationAxis(a.localY,W(w));a.localX.applyMatrix4(d),a.localZ.applyMatrix4(d)}if(f>0){const d=a.pos.clone();a.pos.add(a.localY.clone().multiplyScalar(f*G));const _=a.pos.clone(),c=De(d,_,v*G);c.userData={segmentType:"straight",segmentIndex:m,frameIndex:s,length:f,frame:{Y:f,B:w,C:r,R:y}},c.name=`直段_${m}`,p.add(c);const u=d.clone();Pe(p,b,u,v*G),m++}if(r>0&&y>0){const d=W(r),_=y*G,c=[];c.push(a.pos.clone());const u=a.pos.clone().add(a.localX.clone().multiplyScalar(-_)),k=Math.max(16,Math.ceil(r/5));for(let h=1;h<=k;h++){const M=d*h/k,A=new n.Matrix4().makeRotationAxis(a.localZ,M),L=a.localX.clone().multiplyScalar(_).applyMatrix4(A),q=u.clone().add(L);c.push(q)}const E=Re(c,v*G);E.userData={segmentType:"bend",segmentIndex:m,frameIndex:s,angle:r,radius:y,centerPoint:u.toArray(),frame:{Y:f,B:w,C:r,R:y}},E.name=`弯段_${m}`,p.add(E),Math.floor(c.length/2),c[0],a.pos=c[c.length-1].clone();const S=new n.Matrix4().makeRotationAxis(a.localZ,d);a.localY.applyMatrix4(S),a.localX.applyMatrix4(S),m++,b++}}return p}function Pe(V,v,p,a){const m=new n.Vector3(0,a*2,a*5),b=p.clone().add(m),s=[p,b],g=new n.BufferGeometry().setFromPoints(s),f=new n.LineDashedMaterial({color:16711680,dashSize:a*.5,gapSize:a*.3,linewidth:1}),w=new n.Line(g,f);w.computeLineDistances(),V.add(w);const r=document.createElement("canvas"),y=r.getContext("2d");r.width=128,r.height=128,y.clearRect(0,0,128,128),y.fillStyle="#FF0000",y.font="bold 80px Arial",y.textAlign="center",y.textBaseline="middle",y.fillText(v.toString(),64,64);const d=new n.CanvasTexture(r),_=new n.SpriteMaterial({map:d,transparent:!0,depthTest:!1,depthWrite:!1}),c=new n.Sprite(_),u=a*3;c.scale.set(u,u,1),c.position.copy(b),c.name=`Label_${v}`,c.userData={labelNumber:v},V.add(c)}function De(V,v,p){const a=new n.LineCurve3(V,v),m=new n.TubeGeometry(a,2,p,18,!1);return new n.Mesh(m,ye)}function Re(V,v){const p=new n.CatmullRomCurve3(V,!1,"catmullrom",.01),a=new n.TubeGeometry(p,Math.max(16,V.length*2),v,18,!1);return new n.Mesh(a,ye)}function _e(V,v,p,a,m,b=0){let s=v.slice(0,m+1);const g=v[m+1];if(g&&b>0){const c={...g,B:(g.B??0)*b,C:(g.C??0)*b};s.push(c)}const f=xe(s),w=Math.max(0,p-f),r=[];r.push(new n.Vector3(0,0,0));const y=new n.Vector3(0,w*G,0);w>0&&r.push(y);let d={pos:y.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const _=[];for(let c=s.length-1;c>=0;c--){const u=s[c],k=ke(u);if(k.length>0){const E=k.map(A=>{const $=A.clone(),L=new n.Matrix4;return L.makeBasis(d.localX,d.localY,d.localZ),$.applyMatrix4(L),$.add(d.pos)});_.push(E);const S=E[E.length-1];d.pos=S.clone();const h=u.B??0,M=u.C??0;if(h!==0){const A=new n.Matrix4().makeRotationAxis(d.localY,W(h));d.localX.applyMatrix4(A),d.localZ.applyMatrix4(A)}if(M>0){const A=W(M),$=new n.Matrix4().makeRotationAxis(d.localZ,A);d.localY.applyMatrix4($),d.localX.applyMatrix4($)}}}for(const c of _)c.length>1&&r.push(...c.slice(1));r.length<2&&r.push(new n.Vector3(0,.001,0));try{const c=new n.CatmullRomCurve3(r,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,r.length*4),a*G,18,!1);V.geometry.dispose(),V.geometry=u}catch(c){console.error("管件更新失败",c)}}function Ce(V,v,p,a=0){let m=V.slice(0,p+1);const b=V[p+1];if(b&&a>0){const d={...b,B:(b.B??0)*a,C:(b.C??0)*a};m.push(d)}const s=xe(m),g=Math.max(0,v-s),f=[];f.push(new n.Vector3(0,0,0));const w=new n.Vector3(0,g*G,0);g>0&&f.push(w);let r={pos:w.clone(),localY:new n.Vector3(0,1,0),localX:new n.Vector3(1,0,0),localZ:new n.Vector3(0,0,1)};const y=[];for(let d=m.length-1;d>=0;d--){const _=m[d],c=ke(_);if(c.length>0){const u=c.map(h=>{const M=h.clone(),A=new n.Matrix4;return A.makeBasis(r.localX,r.localY,r.localZ),M.applyMatrix4(A),M.add(r.pos)});y.push(u);const k=u[u.length-1];r.pos=k.clone();const E=_.B??0,S=_.C??0;if(E!==0){const h=new n.Matrix4().makeRotationAxis(r.localY,W(E));r.localX.applyMatrix4(h),r.localZ.applyMatrix4(h)}if(S>0){const h=W(S),M=new n.Matrix4().makeRotationAxis(r.localZ,h);r.localY.applyMatrix4(M),r.localX.applyMatrix4(M)}}}for(const d of y)d.length>1&&f.push(...d.slice(1));return f.length<2&&f.push(new n.Vector3(0,.001,0)),f}function Ne(V,v,p,a,m,b,s,g=0,f=0){const w=m-f,r=Ce(a,w,s,g);let d=Ce(p,f,s,g);d.forEach(c=>c.y=-c.y),d.reverse();const _=[...d,...r];try{const c=new n.CatmullRomCurve3(_,!1,"catmullrom",.01),u=new n.TubeGeometry(c,Math.max(2,_.length*4),b*G,18,!1);v.geometry.dispose(),V.geometry.dispose(),v.parent&&v.parent.remove(v),V.geometry=u}catch(c){console.error("管件更新失败",c)}}const Be={class:"panel-content"},Ae={class:"action-bar"},$e={class:"animation-controls"},Fe={class:"control-row"},ze={class:"control-row"},Ye={class:"frame-info"},Le={class:"control-row"},Ue={class:"progress-bar"},Ie={class:"dialog-footer"},je=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},setup(V,{expose:v}){const p=V,a=e.ref(),m=e.ref();e.watch(()=>p.threeData,t=>{const l=t==null?void 0:t.data;m.value=l==null?void 0:l.type},{immediate:!0});const b=async()=>{let t={};m.value===ne.robotMode.SINGLE&&(t=await fe.fetchSingleRobotAnimationData()),m.value===ne.robotMode.DOUBLE&&(t=await fe.fetchDoubleRobotAnimationData());const{initialPipeLength:l=0,pipeRadius:o=0,clampLength:i=0,animationData:x}=t;S.value=l,h.value=o,M.value=i,a.value=x;const N=Me.cloneDeep(a.value),J=re(Y.value),X=(N==null?void 0:N["输出(动画数据)"])||[];s.value=X.length?X:[J]},s=e.ref([]),g=e.ref(!1),f=e.ref(""),w=e.ref(!1),r=e.ref(0),y=e.ref(0),d=e.ref(1e3);let _=!1;const c=e.ref(null),u=e.shallowRef(null),k=e.shallowRef(null),E=e.shallowRef(null),S=e.ref(0),h=e.ref(12.5),M=e.ref(30),A=e.ref([]),$=e.ref(null),L=e.computed(()=>p.model?ie.getNonFixedJoints(p.model).map(o=>o.name):[]),q=e.ref(["Y","B","C","R"]),Y=e.computed(()=>[...L.value,...q.value]),ce=e.computed(()=>Y.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
2
  ${Y.value.join(" ")}
3
3
  0 0 0 ...
4
4
  1 2 3 ...`:"请先加载模型。"),ae=()=>s.value.map(t=>({Y:parseFloat(t.Y)||0,B:parseFloat(t.B)||0,C:parseFloat(t.C)||0,R:parseFloat(t.R)||0})),K=()=>{const t=[],l=[];return s.value.forEach(o=>{const{Y1:i,B1:x,C1:N,R1:J,Y2:X,B2:oe,C2:de,R2:D}=o;t.push({Y:parseFloat(i)||0,B:parseFloat(x)||0,C:parseFloat(N)||0,R:parseFloat(J)||0}),l.push({Y:parseFloat(X)||0,B:parseFloat(oe)||0,C:parseFloat(de)||0,R:parseFloat(D)||0})}),{posPipeYbcr:t,negPipeYbcr:l}},T=(t=0,l=0)=>{if(u.value&&k.value){const o=K();Ne(u.value,k.value,o.posPipeYbcr,o.negPipeYbcr,S.value,h.value,t,l,M.value)}else if(u.value){const o=ae();_e(u.value,o,S.value,h.value,t,l)}},C=t=>{if(t<0||t>=s.value.length){console.error(`帧索引 ${t} 超出范围`);return}const l=s.value[t];if(console.log(`应用第 ${t} 帧数据 ${l}`),r.value=t,c.value){const o={};L.value.forEach(i=>{const x=parseFloat(l[i]);isNaN(x)||(o[i]=x)}),c.value.setJointAngles(o)}T(t,0)},U=async()=>{if(s.value.length===0){B.ElMessage.error("无法播放动画:无数据");return}if(!w.value){w.value=!0,_=!1,s.value.length-1===r.value&&(r.value=0);try{for(let t=r.value+1;t<s.value.length&&!_;t++){r.value=t;const l=s.value[t],o={};c.value&&L.value.forEach(i=>{const x=parseFloat(l[i]);isNaN(x)||(o[i]=x)}),c.value?await c.value.animateToState(o,d.value,i=>{y.value=(t+i)/s.value.length*100,T(t-1,i)}):(await new Promise(i=>setTimeout(i,d.value)),y.value=(t+1)/s.value.length*100)}_||B.ElMessage.success("动画播放完成")}catch(t){console.error("动画播放出错:",t),B.ElMessage.error("动画播放出错")}finally{w.value=!1,y.value=0}}},F=()=>{_=!0,w.value=!1,y.value=0,B.ElMessage.info("动画已停止")},I=()=>{r.value=0},z=()=>{if(u.value&&k.value){const t=K();Ne(u.value,k.value,t.posPipeYbcr,t.negPipeYbcr,S.value,h.value,-1,0,M.value)}else if(u.value){const t=ae();_e(u.value,t,S.value,h.value,-1,0)}},Z=()=>{c.value&&c.value.resetToZero(),z(),I(),B.ElMessage.success("机器人和管件已重置")},O=t=>`第 ${t+1} 帧`,j=t=>{w.value&&F(),C(t)},Q=()=>{w.value&&F(),!(r.value+1>=s.value.length)&&C(r.value+1)},P=()=>{w.value&&F(),r.value!==0&&C(r.value-1)},H=()=>{E.value&&(E.value.visible=!0),u.value&&u.value.parent&&u.value.parent.remove(u.value),E.value=null,u.value=null,k.value=null},re=t=>t==null?void 0:t.reduce((l,o)=>(l[o]="0",l),{});e.watch(Y,(t,l)=>{if(JSON.stringify(t)!==JSON.stringify(l))if(t.length>0){const o=re(t);s.value=[o]}else s.value=[]},{immediate:!0});const ee=e.ref(0),ue=t=>{ee.value=t},he=(t,l)=>{if(!t||!l)return;const o=ie.getTargetJoint(t,l),i=Ee();i.visible=!1,o==null||o.add(i)},ge=t=>{c.value=new ve.URDFRobotController(t),A.value=ie.getAllLinkName(t),$.value="Pipe_Joint"},te=()=>{c.value=null,A.value=[],$.value=null},se=t=>{ge(t),he(t,$.value),ue(ee.value+1),Z()};e.watch(()=>p.model,t=>{if(H(),t){se(t);return}te()},{immediate:!0});const me=t=>{var o,i;const l=new n.Mesh(t.geometry.clone(),t.material);return l.name="managed_pipe_clone",(i=(o=t==null?void 0:t.parent)==null?void 0:o.add)==null||i.call(o,l),l.position.copy(t.position),l.rotation.copy(t.rotation),l.scale.copy(t.scale),l};e.watch([$,M,S,ee],([t,l])=>{if(H(),p.model&&t){const o=ie.getMeshFromJoint(p.model,t);if(console.log(o,"meshToReplace"),o&&o.parent){E.value=o,o.visible=!1;const i=me(o);if(m.value===ne.robotMode.SINGLE&&(i.position.y-=l*.001),u.value=i,m.value===ne.robotMode.DOUBLE){const x=me(o);k.value=x}T(0,0)}else t&&console.warn(`在 link '${t}' 中未找到可替换的网格或其没有父级。`)}});const Ve=async()=>{if(Y.value.length===0){B.ElMessage.warning("没有可导出的表头");return}const t=Y.value.join(" ");try{await navigator.clipboard.writeText(t),B.ElMessage.success("表头已成功复制到剪贴板!")}catch(l){console.error("复制失败:",l),B.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},be=()=>{if(!f.value.trim()){B.ElMessage.warning("导入内容不能为空");return}const t=f.value.trim().split(`
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./threeViewerHost-B9_P3rIV.cjs"),q=require("./iconfont-C8smb8wH.cjs"),J=require("./workpieceTreePanel-DKNEmjW7.cjs"),Ce=require("./index-DRTxe12U.cjs"),h=require("./index-C5pQXH0_.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BvJutNeG.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-DoHqwX6e.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CDPAgQbj.cjs"),_e=require("./animationData-Bq1xWpzh.cjs"),we=require("./MTLLoader-DXzoNrir.cjs"),Se={class:"panel-content"},Pe={key:0,class:"animation-controls"},Te={class:"control-row"},Be={class:"control-row"},xe={class:"frame-info"},ze={class:"control-row"},De={key:1,class:"empty-state"},Le={class:"dialog-footer"},je=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(P,{expose:m}){const y=P,s=e.ref([]),_=e.ref(!1),T=e.ref(""),i=e.ref("stopped"),f=e.ref(0),w=e.ref(0),b=e.ref(10),u=e.ref(null);let c=0;const V=e.ref([]),N=e.computed(()=>y.model?U.getNonFixedJoints(y.model).map(p=>p.name):[]),S=e.computed(()=>[...N.value]),H=e.computed(()=>S.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),ee=require("./threeViewerHost-C39tiQj-.cjs"),q=require("./iconfont-CUPzGSlt.cjs"),J=require("./workpieceTreePanel-BKOHDm85.cjs"),Ce=require("./index-C8fMwErX.cjs"),h=require("./index-C5pQXH0_.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-b_9vxv2X.cjs");const te=require("./index.vue_vue_type_script_setup_true_lang-BKTJR2th.cjs"),U=require("./urdfTree-HdeBG5se.cjs"),ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CDPAgQbj.cjs"),_e=require("./animationData-krmt7b15.cjs"),we=require("./MTLLoader-YtHulNzU.cjs"),Se={class:"panel-content"},Pe={key:0,class:"animation-controls"},Te={class:"control-row"},Be={class:"control-row"},xe={class:"frame-info"},ze={class:"control-row"},De={key:1,class:"empty-state"},Le={class:"dialog-footer"},je=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(P,{expose:m}){const y=P,s=e.ref([]),_=e.ref(!1),T=e.ref(""),i=e.ref("stopped"),f=e.ref(0),w=e.ref(0),b=e.ref(10),u=e.ref(null);let c=0;const V=e.ref([]),N=e.computed(()=>y.model?U.getNonFixedJoints(y.model).map(p=>p.name):[]),S=e.computed(()=>[...N.value]),H=e.computed(()=>S.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
2
  ${S.value.join(" ")}
3
3
  0 0 0 ...
4
4
  1 2 3 ...`:"请先加载模型。"),$=e.computed(()=>s.value[f.value]||{});e.watch(()=>y.model,o=>{o?(u.value=new J.URDFRobotController(o),V.value=U.getAllLinkName(o),f.value=0):(u.value=null,V.value=[])},{immediate:!0});const D=o=>{if(o<0||o>=s.value.length){console.error(`帧索引 ${o} 超出范围`);return}const n=s.value[o];if(u.value){const p={};N.value.forEach(k=>{const r=parseFloat(n[k]);isNaN(r)||(p[k]=r)}),u.value.setJointAngles(p)}f.value=o,w.value=s.value.length>1?o/(s.value.length-1)*100:100},L=async o=>{try{for(let n=f.value;n<s.value.length;n++){if(o!==c)return;const p=s.value[n],k={};if(u.value)N.value.forEach(r=>{const d=parseFloat(p[r]);isNaN(d)||(k[r]=d)}),await u.value.animateToState(k,b.value,r=>{o===c&&(w.value=(n+r)/s.value.length*100)});else{if(await new Promise(r=>setTimeout(r,b.value)),o!==c)return;w.value=(n+1)/s.value.length*100}f.value=n}o===c&&(h.ElMessage.success("动画播放完成"),i.value="stopped",w.value=100)}catch(n){console.error("动画播放出错:",n),h.ElMessage.error("动画播放出错"),i.value="stopped"}},B=()=>{if(s.value.length===0){h.ElMessage.error("无动画数据");return}i.value==="stopped"&&(f.value=0,D(0)),i.value="playing",c++,L(c),h.ElMessage.info("动画播放中")},M=()=>{i.value==="playing"&&(c++,i.value="paused",h.ElMessage.info("动画已暂停"))},R=()=>{c++,i.value="stopped",f.value=0,w.value=0,D(0),h.ElMessage.info("动画已停止并重置")},G=()=>{i.value==="playing"?M():B()},x=o=>{c++,i.value="paused",D(o)},X=()=>{if(!T.value.trim()){h.ElMessage.warning("导入内容不能为空");return}const o=T.value.trim().split(`
@@ -1,16 +1,16 @@
1
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-Sk5pSWMo.js";
3
- import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-D_lKvP4A.js";
4
- import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-CZA2q-tk.js";
5
- import { c as Ke } from "./index-COQpDVsv.js";
2
+ import { s as pe } from "./threeViewerHost-BgPjA_94.js";
3
+ import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-CSj9Ypb0.js";
4
+ import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-C5qUdbmi.js";
5
+ import { c as Ke } from "./index-sMsCzNtW.js";
6
6
  import { E as _ } from "./index-B8HqIYd5.js";
7
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cghhtxxz.js";
7
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-n7J00Lcz.js";
8
8
  import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
9
- import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-B1eVnyil.js";
9
+ import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-DM6uTeXj.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 at } from "./animationData-0idWk1St.js";
13
- import { O as ot } from "./MTLLoader-2i72y41c.js";
12
+ import { i as at } from "./animationData-BBVNOO1d.js";
13
+ import { O as ot } from "./MTLLoader-CBRDqlja.js";
14
14
  const st = { class: "panel-content" }, it = {
15
15
  key: 0,
16
16
  class: "animation-controls"