ss-component-new 1.2.22 → 1.2.23

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 (136) hide show
  1. package/dist/{MTLLoader-Cgu6hVsY.cjs → MTLLoader-B8MnfNfT.cjs} +1 -1
  2. package/dist/{MTLLoader-6BGR4SPQ.js → MTLLoader-BD3cbBAW.js} +1 -1
  3. package/dist/{OrbitControls-KuEu6kM3.cjs → OrbitControls-2UHRU9Fu.cjs} +1 -1
  4. package/dist/{OrbitControls-CqrkpfUW.js → OrbitControls-D1pz0uFI.js} +1 -1
  5. package/dist/{animationData-FMGneVai.cjs → animationData-Bwh55Xw6.cjs} +1 -1
  6. package/dist/{animationData-OlBnUG8w.js → animationData-D0TJ-9dd.js} +4 -4
  7. package/dist/array-DMPAgNcb.cjs +11 -0
  8. package/dist/array-DTXrs6ZK.js +1207 -0
  9. package/dist/{dataUtil-DPRubJA4.js → dataUtil-gEKo7CEq.js} +2 -2
  10. package/dist/{dataUtil-D2dUTgHP.cjs → dataUtil-i5X2xhin.cjs} +1 -1
  11. package/dist/{fileUtil-D4f4EJ9p.js → fileUtil-CN00xr9W.js} +1 -1
  12. package/dist/{fileUtil-DWuPXxGz.cjs → fileUtil-GIRXMs25.cjs} +1 -1
  13. package/dist/{iconfont-CiYOe1nN.cjs → iconfont-C9-pGpAJ.cjs} +1 -1
  14. package/dist/{iconfont-D1aDkauN.js → iconfont-DTSZW2AU.js} +2 -2
  15. package/dist/icons/svg/LowCodeEvent.svg +1 -1
  16. package/dist/icons/svg/LowCodeExtend.svg +1 -1
  17. package/dist/icons/svg/LowCodeSetting.svg +1 -1
  18. package/dist/icons/svg/LowCodeStyle.svg +1 -1
  19. package/dist/{index-Dv32OdnH.js → index-2fqHNrPg.js} +4 -4
  20. package/dist/{index-CfrqPhLf.cjs → index-7Ru3e632.cjs} +1 -1
  21. package/dist/{index-DyA4ALuY.cjs → index-7gU0r1We.cjs} +1 -1
  22. package/dist/{index-Cgs7cequ.js → index-7oJ8Ile4.js} +1 -1
  23. package/dist/{index-C9o3guTc.js → index-B0dydZDW.js} +17 -17
  24. package/dist/{index-CIn_YMID.js → index-BD5yZDAq.js} +2 -2
  25. package/dist/index-BLwwxnzs.cjs +1 -0
  26. package/dist/{index-BQ1gqL2T.cjs → index-BNYeBPmi.cjs} +1 -1
  27. package/dist/{index-DEBf-IBT.cjs → index-BOJUyAaV.cjs} +9 -9
  28. package/dist/{index-BsXwkKZt.js → index-BQBxzTyE.js} +2 -2
  29. package/dist/{index-CJhLlcnS.js → index-BTTpV9o2.js} +3 -3
  30. package/dist/{index-CdNhl58g.cjs → index-BTfg83yY.cjs} +1 -1
  31. package/dist/{index-CkdrE77c.js → index-BVFL7Z_0.js} +3 -3
  32. package/dist/index-BVdolwlx.js +7293 -0
  33. package/dist/{index-D_zs3Ywk.cjs → index-BXEOQo2c.cjs} +1 -1
  34. package/dist/{index-C0eoTBsi.js → index-Be1LJMUR.js} +2 -2
  35. package/dist/{index-y9I5saNf.cjs → index-BkIFY0hK.cjs} +1 -1
  36. package/dist/{index-BvyKSIqa.js → index-Bm3FE_ss.js} +3 -3
  37. package/dist/{index-i1HrhN2m.js → index-BpTrDbkf.js} +4 -4
  38. package/dist/{index-DcgnW8IS.js → index-Bt2MaT2G.js} +6 -6
  39. package/dist/{index-BOwTBtjA.js → index-BuSsSHAY.js} +2733 -2817
  40. package/dist/{index-Vo9hn1HO.js → index-Bvk4OpkL.js} +2 -2
  41. package/dist/{index-Br1HQap-.js → index-BwEfrokO.js} +2 -2
  42. package/dist/{index-dJ_vyooa.cjs → index-C54wX50t.cjs} +1 -1
  43. package/dist/{index-CMSMrWWB.cjs → index-C6C5VWbs.cjs} +1 -1
  44. package/dist/{index-wFocLxVz.cjs → index-CADH_aSQ.cjs} +1 -1
  45. package/dist/{index-GVURdQmb.cjs → index-CFriKZ-T.cjs} +1 -1
  46. package/dist/index-CK54pscx.cjs +1 -0
  47. package/dist/{index-DdYGa8y9.js → index-Cl6HMOao.js} +1 -1
  48. package/dist/{index-C1xFocJD.js → index-CptCatmL.js} +2 -2
  49. package/dist/{index-BdEr19ln.js → index-CqYUVCh5.js} +12 -12
  50. package/dist/index-CsOz5vsv.cjs +1 -0
  51. package/dist/{index-kFjfkR4F.cjs → index-CtXpoEg0.cjs} +1 -1
  52. package/dist/{index-Dw_mx2E5.js → index-CvC2498b.js} +2 -2
  53. package/dist/{index-DN2RDo7w.js → index-CvrBt7bU.js} +3 -3
  54. package/dist/{index-B0mK1X2Z.js → index-D4pN9YmB.js} +2 -2
  55. package/dist/index-D8Y3imz9.cjs +1 -0
  56. package/dist/index-DEEZPcpU.cjs +1 -0
  57. package/dist/index-DEs8s152.js +3621 -0
  58. package/dist/{index-DV1Onr_-.cjs → index-DHp714Ep.cjs} +1 -1
  59. package/dist/index-DMbCaqEC.cjs +15 -0
  60. package/dist/{index-C7Wgog15.js → index-DNs9XPOG.js} +2 -2
  61. package/dist/{index-B3vewIE0.js → index-DOhvzke2.js} +5 -5
  62. package/dist/index-DPX3w6cO.js +2643 -0
  63. package/dist/{index-D6aL_qQ4.cjs → index-DQ3y1xkr.cjs} +1 -1
  64. package/dist/{index-Gqf0Dw_K.cjs → index-DR9beXhk.cjs} +1 -1
  65. package/dist/{index-C8YYklCT.cjs → index-DSchKIyh.cjs} +1 -1
  66. package/dist/{index-vIQwCbI-.cjs → index-DSlPg3dk.cjs} +1 -1
  67. package/dist/{index-CYvWTBiC.cjs → index-DbCNaQ87.cjs} +1 -1
  68. package/dist/{index-B1KcMjms.cjs → index-Dfwm0xPp.cjs} +1 -1
  69. package/dist/index-DiRBJiMW.js +43 -0
  70. package/dist/{index-BuQNI1CB.js → index-DlIkbsRf.js} +6 -6
  71. package/dist/{index-B__9hFoC.cjs → index-DllJulGH.cjs} +1 -1
  72. package/dist/{index-BJadEVee.js → index-Dm_WlV6R.js} +5542 -5543
  73. package/dist/{index-D4nuGSp1.cjs → index-Do8zI4DM.cjs} +1 -1
  74. package/dist/{index-7w9QLGZ8.cjs → index-DrWIUUZK.cjs} +1 -1
  75. package/dist/index-G_cKl_J4.js +2379 -0
  76. package/dist/{index-CkJaR30x.js → index-NlkdTb--.js} +4 -4
  77. package/dist/{index-CuYt_7-p.js → index-ThNNBX7h.js} +1 -1
  78. package/dist/{index-DzuOO-jn.js → index-XXKsLOYd.js} +2 -2
  79. package/dist/{index-_7Qm6usF.cjs → index-dwX_BHyo.cjs} +1 -1
  80. package/dist/{index-D-ygp57X.cjs → index-eH9RMVXv.cjs} +1 -1
  81. package/dist/index-pmcRbjPd.cjs +1 -0
  82. package/dist/{index-B5KCSN4c.cjs → index-tttYIzsn.cjs} +1 -1
  83. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js} +2 -2
  84. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs} +1 -1
  85. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DbaX17jD.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-De0avjy5.js} +6 -6
  86. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-B0Slk6gv.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DhMDLOg8.cjs} +1 -1
  87. package/dist/{index.vue_vue_type_style_index_0_scoped_980cb04a_lang-BmYxcD8z.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEcxaThh.js} +13 -13
  88. package/dist/{index.vue_vue_type_style_index_0_scoped_980cb04a_lang-DGpKXuuO.cjs → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DLuOs1IZ.cjs} +1 -1
  89. package/dist/{index.vue_vue_type_style_index_1_lang-8MlG6f_5.js → index.vue_vue_type_style_index_1_lang-B0l6QIWy.js} +531 -536
  90. package/dist/{index.vue_vue_type_style_index_1_lang-BMAOkg3Y.cjs → index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs} +8 -8
  91. package/dist/{index.vue_vue_type_style_index_1_lang-C5-R1ghT.cjs → index.vue_vue_type_style_index_1_lang-Chzrrthw.cjs} +1 -1
  92. package/dist/{index.vue_vue_type_style_index_1_lang-QVwLsuO7.js → index.vue_vue_type_style_index_1_lang-DzZEPkuk.js} +5 -5
  93. package/dist/{isString-D6Z6SOrb.cjs → isString-CELwppr9.cjs} +1 -1
  94. package/dist/{isString-DOZgMp8l.js → isString-DvY0kl3S.js} +1 -1
  95. package/dist/{main-BCD-Orm3.js → main-DQXqHTYg.js} +5 -5
  96. package/dist/{main-DUUTokjq.cjs → main-yiUkyrA7.cjs} +1 -1
  97. package/dist/ss-component.cjs +1 -1
  98. package/dist/ss-component.css +2 -2
  99. package/dist/ss-component.js +12 -12
  100. package/dist/ss-component2.cjs +1 -1
  101. package/dist/ss-component2.js +12 -12
  102. package/dist/{threeModel-DWfIRtBe.js → threeModel-BiWZCOOI.js} +5 -5
  103. package/dist/{threeModel-D-cNRyXR.cjs → threeModel-Cva5i9Dy.cjs} +1 -1
  104. package/dist/{threePreview-CB4s2usq.cjs → threePreview-BNvDY6xx.cjs} +1 -1
  105. package/dist/{threePreview-BelyhkDx.js → threePreview-CjFKHY3_.js} +4 -4
  106. package/dist/{threeSceneView-9pPPVjCA.cjs → threeSceneView-DM8uof_D.cjs} +1 -1
  107. package/dist/{threeSceneView-C66YfUi3.js → threeSceneView-DPTQ_xR-.js} +11 -11
  108. package/dist/{threeSceneViewForCPMPIP-WBguXbnU.js → threeSceneViewForCPMPIP-Bqb44i-c.js} +50 -50
  109. package/dist/{threeSceneViewForCPMPIP-DLVSylJ7.cjs → threeSceneViewForCPMPIP-D5jl1r-h.cjs} +1 -1
  110. package/dist/{threeTrackPathView-DxO-9BKu.js → threeTrackPathView-BvxoafSz.js} +6 -6
  111. package/dist/{threeTrackPathView-C4c7FI2n.cjs → threeTrackPathView-DgnuPrBe.cjs} +1 -1
  112. package/dist/{threeViewerHost-CNs819Rf.js → threeViewerHost-CKmZPGir.js} +4 -4
  113. package/dist/{threeViewerHost-Ihdu1cjR.cjs → threeViewerHost-D80V4Cfh.cjs} +1 -1
  114. package/dist/{urdfTree-CLhAUUAD.js → urdfTree-BxuavyNQ.js} +1 -1
  115. package/dist/{urdfTree-Di3A1LA8.cjs → urdfTree-wR2vnG4s.cjs} +1 -1
  116. package/dist/{workpieceTreePanel-CzDrMcRN.cjs → workpieceTreePanel-C2BXrv3k.cjs} +1 -1
  117. package/dist/{workpieceTreePanel--iaoqT8x.js → workpieceTreePanel-CSKzSdIt.js} +5 -5
  118. package/package.json +1 -1
  119. package/public/icons/svg/LowCodeEvent.svg +1 -1
  120. package/public/icons/svg/LowCodeExtend.svg +1 -1
  121. package/public/icons/svg/LowCodeSetting.svg +1 -1
  122. package/public/icons/svg/LowCodeStyle.svg +1 -1
  123. package/dist/array-Ct7vOLI-.cjs +0 -11
  124. package/dist/array-W5079asF.js +0 -691
  125. package/dist/index-4WD9Ho5n.js +0 -2933
  126. package/dist/index-BA9JRDoC.cjs +0 -1
  127. package/dist/index-BVaHwt5f.cjs +0 -1
  128. package/dist/index-CFI3jKGA.js +0 -2671
  129. package/dist/index-CO41Br9G.cjs +0 -1
  130. package/dist/index-CTq3U1p_.cjs +0 -1
  131. package/dist/index-CvZk_MDD.cjs +0 -15
  132. package/dist/index-Db9w-sM_.cjs +0 -1
  133. package/dist/index-DitsEkB9.js +0 -673
  134. package/dist/index-DooNp_Nd.js +0 -12047
  135. package/dist/index-JAuJmfCC.cjs +0 -1
  136. package/dist/index-rlStojTL.js +0 -52
@@ -1,8 +1,8 @@
1
1
  import { ref as K, shallowRef as Be, defineComponent as Ke, watch as Z, onMounted as Ve, nextTick as ze, onBeforeUnmount as Xe, resolveComponent as qe, createElementBlock as ee, openBlock as te, createElementVNode as L, withDirectives as z, createCommentVNode as pe, createVNode as H, unref as b, renderSlot as me, toDisplayString as ge, withCtx as We, isRef as $, vModelRadio as J, vShow as Ye } from "vue";
2
- import { u as $e, a as Je, b as Qe } from "./iconfont-D1aDkauN.js";
3
- import { J as Ze, K as ce, N as Se, O as et, Q as W, R as Ne, U as O, Y as Ie, C as G, Z as P, f as Y, _ as tt, n as nt, D as st, r as Q, V as B, $ as rt, a0 as Ce, a1 as it, a2 as Oe, a3 as ot, a4 as at, a5 as ne, a6 as ct, a7 as ve, a8 as lt, a9 as ut, aa as ft, ab as le, ac as ke, ad as ue, ae as dt, af as ht, ag as pt, ah as se, ai as mt, v as Pe, p as gt, aj as q, ak as Tt, w as xt, al as Rt, k as Fe, am as Et, y as At, an as _t, ao as Lt, u as re, P as Mt, s as wt, ap as yt, aq as bt, ar as St, as as Nt, at as It, au as De, av as Ct, aw as Te, ax as xe, ay as Re, az as Ee, aA as Ae, aB as Ot, aC as vt, B as He, aD as kt, o as Pt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js";
4
- import { E as _e } from "./index-BJadEVee.js";
5
- import { M as Ft, O as Dt, S as Ht } from "./MTLLoader-6BGR4SPQ.js";
2
+ import { u as $e, a as Je, b as Qe } from "./iconfont-DTSZW2AU.js";
3
+ import { J as Ze, K as ce, N as Se, O as et, Q as W, R as Ne, U as O, Y as Ie, C as G, Z as P, f as Y, _ as tt, n as nt, D as st, r as Q, V as B, $ as rt, a0 as Ce, a1 as it, a2 as Oe, a3 as ot, a4 as at, a5 as ne, a6 as ct, a7 as ve, a8 as lt, a9 as ut, aa as ft, ab as le, ac as ke, ad as ue, ae as dt, af as ht, ag as pt, ah as se, ai as mt, v as Pe, p as gt, aj as q, ak as Tt, w as xt, al as Rt, k as Fe, am as Et, y as At, an as _t, ao as Lt, u as re, P as Mt, s as wt, ap as yt, aq as bt, ar as St, as as Nt, at as It, au as De, av as Ct, aw as Te, ax as xe, ay as Re, az as Ee, aA as Ae, aB as Ot, aC as vt, B as He, aD as kt, o as Pt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
4
+ import { E as _e } from "./index-Dm_WlV6R.js";
5
+ import { M as Ft, O as Dt, S as Ht } from "./MTLLoader-BD3cbBAW.js";
6
6
  import { T as j } from "./svgIcon-D-_fXUBL.js";
7
7
  import { _ as Ut } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  function Le(f, t) {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("./workpieceTreePanel-CzDrMcRN.cjs"),pe=require("./iconfont-CiYOe1nN.cjs"),$=require("./index-DEBf-IBT.cjs"),s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs");require("./index.vue_vue_type_style_index_1_lang-BMAOkg3Y.cjs");require("./index-BpPyaNFa.cjs");const Q=require("./index-Db9w-sM_.cjs");require("./index.vue_vue_type_style_index_1_lang-C5-R1ghT.cjs");require("./index-y9I5saNf.cjs");const Ce=require("./animationData-FMGneVai.cjs"),ne=require("./urdfTree-Di3A1LA8.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=require("./dataUtil-D2dUTgHP.cjs"),M=require("./svgIcon-CUM54R6L.cjs"),Z=.001,H=s.MathUtils.degToRad,Ne=new s.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:s.DoubleSide});function Me(V=.005,m=64){const f=new s.CatmullRomCurve3([new s.Vector3(0,0,0),new s.Vector3(0,0,0)]),n=new s.TubeGeometry(f,m,V,16,!1),g=Ne;return new s.Mesh(n,g)}const ke=V=>V.reduce((m,f)=>{let n=0;const g=f.Y??0,h=f.C??0,c=f.R??0;return g>0&&(n+=g),h>0&&c>0&&(n+=c*H(h)),m+n},0),Te=V=>{const m=[],f=V.Y??0,n=V.B??0,g=V.C??0,h=V.R??0,c={pos:new s.Vector3(0,0,0),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};if(!f&&!g)return m;if(m.push(c.pos.clone()),n!==0){const C=new s.Matrix4().makeRotationAxis(c.localY,H(n));c.localX.applyMatrix4(C),c.localZ.applyMatrix4(C)}if(f>0&&(c.pos.add(c.localY.clone().multiplyScalar(f*Z)),m.push(c.pos.clone())),g>0&&h>0){const C=H(g),u=h*Z,_=c.pos.clone().add(c.localX.clone().multiplyScalar(-u)),r=Math.max(16,Math.ceil(g/5));for(let p=1;p<=r;p++){const a=C*p/r,d=new s.Matrix4().makeRotationAxis(c.localZ,a),b=c.localX.clone().multiplyScalar(u).applyMatrix4(d),E=_.clone().add(b);m.push(E)}}return m};function Se(V,m){const f=new s.Group;f.name="CompletePipe";const n={pos:new s.Vector3(0,0,0),localX:new s.Vector3(1,0,0),localY:new s.Vector3(0,1,0),localZ:new s.Vector3(0,0,1)};let g=0,h=1;for(let c=0;c<V.length;c++){const C=V[c],u=C.Y??0,_=C.B??0,r=C.C??0,p=C.R??0;if(_!==0){const a=new s.Matrix4().makeRotationAxis(n.localY,H(_));n.localX.applyMatrix4(a),n.localZ.applyMatrix4(a)}if(u>0){const a=n.pos.clone();n.pos.add(n.localY.clone().multiplyScalar(u*Z));const d=n.pos.clone(),i=Pe(a,d,m*Z);i.userData={segmentType:"straight",segmentIndex:g,frameIndex:c,length:u,frame:{Y:u,B:_,C:r,R:p}},i.name=`直段_${g}`,f.add(i);const b=a.clone();De(f,h,b,m*Z),g++}if(r>0&&p>0){const a=H(r),d=p*Z,i=[];i.push(n.pos.clone());const b=n.pos.clone().add(n.localX.clone().multiplyScalar(-d)),E=Math.max(16,Math.ceil(r/5));for(let P=1;P<=E;P++){const D=a*P/E,T=new s.Matrix4().makeRotationAxis(n.localZ,D),k=n.localX.clone().multiplyScalar(d).applyMatrix4(T),w=b.clone().add(k);i.push(w)}const v=Re(i,m*Z);v.userData={segmentType:"bend",segmentIndex:g,frameIndex:c,angle:r,radius:p,centerPoint:b.toArray(),frame:{Y:u,B:_,C:r,R:p}},v.name=`弯段_${g}`,f.add(v),Math.floor(i.length/2),i[0],n.pos=i[i.length-1].clone();const S=new s.Matrix4().makeRotationAxis(n.localZ,a);n.localY.applyMatrix4(S),n.localX.applyMatrix4(S),g++,h++}}return f}function De(V,m,f,n){const g=new s.Vector3(0,n*2,n*5),h=f.clone().add(g),c=[f,h],C=new s.BufferGeometry().setFromPoints(c),u=new s.LineDashedMaterial({color:16711680,dashSize:n*.5,gapSize:n*.3,linewidth:1}),_=new s.Line(C,u);_.computeLineDistances(),V.add(_);const r=document.createElement("canvas"),p=r.getContext("2d");r.width=128,r.height=128,p.clearRect(0,0,128,128),p.fillStyle="#FF0000",p.font="bold 80px Arial",p.textAlign="center",p.textBaseline="middle",p.fillText(m.toString(),64,64);const a=new s.CanvasTexture(r),d=new s.SpriteMaterial({map:a,transparent:!0,depthTest:!1,depthWrite:!1}),i=new s.Sprite(d),b=n*3;i.scale.set(b,b,1),i.position.copy(h),i.name=`Label_${m}`,i.userData={labelNumber:m},V.add(i)}function Pe(V,m,f){const n=new s.LineCurve3(V,m),g=new s.TubeGeometry(n,2,f,18,!1);return new s.Mesh(g,Ne)}function Re(V,m){const f=new s.CatmullRomCurve3(V,!1,"catmullrom",.01),n=new s.TubeGeometry(f,Math.max(16,V.length*2),m,18,!1);return new s.Mesh(n,Ne)}function _e(V,m,f,n,g,h=0){let c=m.slice(0,g+1);const C=m[g+1];if(C&&h>0){const i={...C,B:(C.B??0)*h,C:(C.C??0)*h};c.push(i)}const u=ke(c),_=Math.max(0,f-u),r=[];r.push(new s.Vector3(0,0,0));const p=new s.Vector3(0,_*Z,0);_>0&&r.push(p);let a={pos:p.clone(),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};const d=[];for(let i=c.length-1;i>=0;i--){const b=c[i],E=Te(b);if(E.length>0){const v=E.map(T=>{const R=T.clone(),k=new s.Matrix4;return k.makeBasis(a.localX,a.localY,a.localZ),R.applyMatrix4(k),R.add(a.pos)});d.push(v);const S=v[v.length-1];a.pos=S.clone();const P=b.B??0,D=b.C??0;if(P!==0){const T=new s.Matrix4().makeRotationAxis(a.localY,H(P));a.localX.applyMatrix4(T),a.localZ.applyMatrix4(T)}if(D>0){const T=H(D),R=new s.Matrix4().makeRotationAxis(a.localZ,T);a.localY.applyMatrix4(R),a.localX.applyMatrix4(R)}}}for(const i of d)i.length>1&&r.push(...i.slice(1));r.length<2&&r.push(new s.Vector3(0,.001,0));try{const i=new s.CatmullRomCurve3(r,!1,"catmullrom",.01),b=new s.TubeGeometry(i,Math.max(2,r.length*4),n*Z,18,!1);V.geometry.dispose(),V.geometry=b}catch(i){console.error("管件更新失败",i)}}function xe(V,m,f,n=0){let g=V.slice(0,f+1);const h=V[f+1];if(h&&n>0){const a={...h,B:(h.B??0)*n,C:(h.C??0)*n};g.push(a)}const c=ke(g),C=Math.max(0,m-c),u=[];u.push(new s.Vector3(0,0,0));const _=new s.Vector3(0,C*Z,0);C>0&&u.push(_);let r={pos:_.clone(),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};const p=[];for(let a=g.length-1;a>=0;a--){const d=g[a],i=Te(d);if(i.length>0){const b=i.map(P=>{const D=P.clone(),T=new s.Matrix4;return T.makeBasis(r.localX,r.localY,r.localZ),D.applyMatrix4(T),D.add(r.pos)});p.push(b);const E=b[b.length-1];r.pos=E.clone();const v=d.B??0,S=d.C??0;if(v!==0){const P=new s.Matrix4().makeRotationAxis(r.localY,H(v));r.localX.applyMatrix4(P),r.localZ.applyMatrix4(P)}if(S>0){const P=H(S),D=new s.Matrix4().makeRotationAxis(r.localZ,P);r.localY.applyMatrix4(D),r.localX.applyMatrix4(D)}}}for(const a of p)a.length>1&&u.push(...a.slice(1));return u.length<2&&u.push(new s.Vector3(0,.001,0)),u}function Ee(V,m,f,n,g,h,c,C=0,u=0){const _=g-u,r=xe(n,_,c,C);let a=xe(f,u,c,C);a.forEach(i=>i.y=-i.y),a.reverse();const d=[...a,...r];try{const i=new s.CatmullRomCurve3(d,!1,"catmullrom",.01),b=new s.TubeGeometry(i,Math.max(2,d.length*4),h*Z,18,!1);m.geometry.dispose(),V.geometry.dispose(),m.parent&&m.parent.remove(m),V.geometry=b}catch(i){console.error("管件更新失败",i)}}const Be={class:"panel-content"},ze={class:"action-bar"},Ae={class:"animation-controls"},$e={class:"control-row"},Fe={class:"control-row"},Ye={class:"frame-info"},Le={class:"control-row"},Ie={class:"progress-bar"},Ue={class:"dialog-footer"},je=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},emits:["getThreeData"],setup(V,{expose:m,emit:f}){const n=V,g=f,h=e.ref(),c=e.ref();e.watch(()=>n.threeData,l=>{const t=l==null?void 0:l.data;c.value=t==null?void 0:t.type},{immediate:!0});const C=async()=>{if(!sessionStorage.getItem("systemKey")){g("getThreeData");return}let t={};c.value===X.robotMode.SINGLE&&(t=await Ce.fetchSingleRobotAnimationData()),c.value===X.robotMode.DOUBLE&&(t=await Ce.fetchDoubleRobotAnimationData());const{initialPipeLength:o=0,pipeRadius:y=0,clampLength:N=0,animationData:x}=t;D.value=o,T.value=y,R.value=N,h.value=x;const O=$.cloneDeep(h.value),K=ce(F.value),q=(O==null?void 0:O["输出(动画数据)"])||[];u.value=q.length?q:[K]},u=e.ref([]),_=e.ref(!1),r=e.ref(""),p=e.ref(!1),a=e.ref(0),d=e.ref(0),i=e.ref(1e3);let b=!1;const E=e.ref(null),v=e.shallowRef(null),S=e.shallowRef(null),P=e.shallowRef(null),D=e.ref(0),T=e.ref(12.5),R=e.ref(30),k=e.ref([]),w=e.ref(null),I=e.computed(()=>n.model?ne.getNonFixedJoints(n.model).map(o=>o.name):[]),G=e.ref(["Y","B","C","R"]),F=e.computed(()=>[...I.value,...G.value]),Y=e.computed(()=>F.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("./workpieceTreePanel-C2BXrv3k.cjs"),pe=require("./iconfont-C9-pGpAJ.cjs"),$=require("./index-BOJUyAaV.cjs"),s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs");require("./index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs");require("./index-BpPyaNFa.cjs");const Q=require("./index-D8Y3imz9.cjs");require("./index.vue_vue_type_style_index_1_lang-Chzrrthw.cjs");require("./index-BkIFY0hK.cjs");const Ce=require("./animationData-Bwh55Xw6.cjs"),ne=require("./urdfTree-wR2vnG4s.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=require("./dataUtil-i5X2xhin.cjs"),M=require("./svgIcon-CUM54R6L.cjs"),Z=.001,H=s.MathUtils.degToRad,Ne=new s.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:s.DoubleSide});function Me(V=.005,m=64){const f=new s.CatmullRomCurve3([new s.Vector3(0,0,0),new s.Vector3(0,0,0)]),n=new s.TubeGeometry(f,m,V,16,!1),g=Ne;return new s.Mesh(n,g)}const ke=V=>V.reduce((m,f)=>{let n=0;const g=f.Y??0,h=f.C??0,c=f.R??0;return g>0&&(n+=g),h>0&&c>0&&(n+=c*H(h)),m+n},0),Te=V=>{const m=[],f=V.Y??0,n=V.B??0,g=V.C??0,h=V.R??0,c={pos:new s.Vector3(0,0,0),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};if(!f&&!g)return m;if(m.push(c.pos.clone()),n!==0){const C=new s.Matrix4().makeRotationAxis(c.localY,H(n));c.localX.applyMatrix4(C),c.localZ.applyMatrix4(C)}if(f>0&&(c.pos.add(c.localY.clone().multiplyScalar(f*Z)),m.push(c.pos.clone())),g>0&&h>0){const C=H(g),u=h*Z,_=c.pos.clone().add(c.localX.clone().multiplyScalar(-u)),r=Math.max(16,Math.ceil(g/5));for(let p=1;p<=r;p++){const a=C*p/r,d=new s.Matrix4().makeRotationAxis(c.localZ,a),b=c.localX.clone().multiplyScalar(u).applyMatrix4(d),E=_.clone().add(b);m.push(E)}}return m};function Se(V,m){const f=new s.Group;f.name="CompletePipe";const n={pos:new s.Vector3(0,0,0),localX:new s.Vector3(1,0,0),localY:new s.Vector3(0,1,0),localZ:new s.Vector3(0,0,1)};let g=0,h=1;for(let c=0;c<V.length;c++){const C=V[c],u=C.Y??0,_=C.B??0,r=C.C??0,p=C.R??0;if(_!==0){const a=new s.Matrix4().makeRotationAxis(n.localY,H(_));n.localX.applyMatrix4(a),n.localZ.applyMatrix4(a)}if(u>0){const a=n.pos.clone();n.pos.add(n.localY.clone().multiplyScalar(u*Z));const d=n.pos.clone(),i=Pe(a,d,m*Z);i.userData={segmentType:"straight",segmentIndex:g,frameIndex:c,length:u,frame:{Y:u,B:_,C:r,R:p}},i.name=`直段_${g}`,f.add(i);const b=a.clone();De(f,h,b,m*Z),g++}if(r>0&&p>0){const a=H(r),d=p*Z,i=[];i.push(n.pos.clone());const b=n.pos.clone().add(n.localX.clone().multiplyScalar(-d)),E=Math.max(16,Math.ceil(r/5));for(let P=1;P<=E;P++){const D=a*P/E,T=new s.Matrix4().makeRotationAxis(n.localZ,D),k=n.localX.clone().multiplyScalar(d).applyMatrix4(T),w=b.clone().add(k);i.push(w)}const v=Re(i,m*Z);v.userData={segmentType:"bend",segmentIndex:g,frameIndex:c,angle:r,radius:p,centerPoint:b.toArray(),frame:{Y:u,B:_,C:r,R:p}},v.name=`弯段_${g}`,f.add(v),Math.floor(i.length/2),i[0],n.pos=i[i.length-1].clone();const S=new s.Matrix4().makeRotationAxis(n.localZ,a);n.localY.applyMatrix4(S),n.localX.applyMatrix4(S),g++,h++}}return f}function De(V,m,f,n){const g=new s.Vector3(0,n*2,n*5),h=f.clone().add(g),c=[f,h],C=new s.BufferGeometry().setFromPoints(c),u=new s.LineDashedMaterial({color:16711680,dashSize:n*.5,gapSize:n*.3,linewidth:1}),_=new s.Line(C,u);_.computeLineDistances(),V.add(_);const r=document.createElement("canvas"),p=r.getContext("2d");r.width=128,r.height=128,p.clearRect(0,0,128,128),p.fillStyle="#FF0000",p.font="bold 80px Arial",p.textAlign="center",p.textBaseline="middle",p.fillText(m.toString(),64,64);const a=new s.CanvasTexture(r),d=new s.SpriteMaterial({map:a,transparent:!0,depthTest:!1,depthWrite:!1}),i=new s.Sprite(d),b=n*3;i.scale.set(b,b,1),i.position.copy(h),i.name=`Label_${m}`,i.userData={labelNumber:m},V.add(i)}function Pe(V,m,f){const n=new s.LineCurve3(V,m),g=new s.TubeGeometry(n,2,f,18,!1);return new s.Mesh(g,Ne)}function Re(V,m){const f=new s.CatmullRomCurve3(V,!1,"catmullrom",.01),n=new s.TubeGeometry(f,Math.max(16,V.length*2),m,18,!1);return new s.Mesh(n,Ne)}function _e(V,m,f,n,g,h=0){let c=m.slice(0,g+1);const C=m[g+1];if(C&&h>0){const i={...C,B:(C.B??0)*h,C:(C.C??0)*h};c.push(i)}const u=ke(c),_=Math.max(0,f-u),r=[];r.push(new s.Vector3(0,0,0));const p=new s.Vector3(0,_*Z,0);_>0&&r.push(p);let a={pos:p.clone(),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};const d=[];for(let i=c.length-1;i>=0;i--){const b=c[i],E=Te(b);if(E.length>0){const v=E.map(T=>{const R=T.clone(),k=new s.Matrix4;return k.makeBasis(a.localX,a.localY,a.localZ),R.applyMatrix4(k),R.add(a.pos)});d.push(v);const S=v[v.length-1];a.pos=S.clone();const P=b.B??0,D=b.C??0;if(P!==0){const T=new s.Matrix4().makeRotationAxis(a.localY,H(P));a.localX.applyMatrix4(T),a.localZ.applyMatrix4(T)}if(D>0){const T=H(D),R=new s.Matrix4().makeRotationAxis(a.localZ,T);a.localY.applyMatrix4(R),a.localX.applyMatrix4(R)}}}for(const i of d)i.length>1&&r.push(...i.slice(1));r.length<2&&r.push(new s.Vector3(0,.001,0));try{const i=new s.CatmullRomCurve3(r,!1,"catmullrom",.01),b=new s.TubeGeometry(i,Math.max(2,r.length*4),n*Z,18,!1);V.geometry.dispose(),V.geometry=b}catch(i){console.error("管件更新失败",i)}}function xe(V,m,f,n=0){let g=V.slice(0,f+1);const h=V[f+1];if(h&&n>0){const a={...h,B:(h.B??0)*n,C:(h.C??0)*n};g.push(a)}const c=ke(g),C=Math.max(0,m-c),u=[];u.push(new s.Vector3(0,0,0));const _=new s.Vector3(0,C*Z,0);C>0&&u.push(_);let r={pos:_.clone(),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};const p=[];for(let a=g.length-1;a>=0;a--){const d=g[a],i=Te(d);if(i.length>0){const b=i.map(P=>{const D=P.clone(),T=new s.Matrix4;return T.makeBasis(r.localX,r.localY,r.localZ),D.applyMatrix4(T),D.add(r.pos)});p.push(b);const E=b[b.length-1];r.pos=E.clone();const v=d.B??0,S=d.C??0;if(v!==0){const P=new s.Matrix4().makeRotationAxis(r.localY,H(v));r.localX.applyMatrix4(P),r.localZ.applyMatrix4(P)}if(S>0){const P=H(S),D=new s.Matrix4().makeRotationAxis(r.localZ,P);r.localY.applyMatrix4(D),r.localX.applyMatrix4(D)}}}for(const a of p)a.length>1&&u.push(...a.slice(1));return u.length<2&&u.push(new s.Vector3(0,.001,0)),u}function Ee(V,m,f,n,g,h,c,C=0,u=0){const _=g-u,r=xe(n,_,c,C);let a=xe(f,u,c,C);a.forEach(i=>i.y=-i.y),a.reverse();const d=[...a,...r];try{const i=new s.CatmullRomCurve3(d,!1,"catmullrom",.01),b=new s.TubeGeometry(i,Math.max(2,d.length*4),h*Z,18,!1);m.geometry.dispose(),V.geometry.dispose(),m.parent&&m.parent.remove(m),V.geometry=b}catch(i){console.error("管件更新失败",i)}}const Be={class:"panel-content"},ze={class:"action-bar"},Ae={class:"animation-controls"},$e={class:"control-row"},Fe={class:"control-row"},Ye={class:"frame-info"},Le={class:"control-row"},Ie={class:"progress-bar"},Ue={class:"dialog-footer"},je=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},emits:["getThreeData"],setup(V,{expose:m,emit:f}){const n=V,g=f,h=e.ref(),c=e.ref();e.watch(()=>n.threeData,l=>{const t=l==null?void 0:l.data;c.value=t==null?void 0:t.type},{immediate:!0});const C=async()=>{if(!sessionStorage.getItem("systemKey")){g("getThreeData");return}let t={};c.value===X.robotMode.SINGLE&&(t=await Ce.fetchSingleRobotAnimationData()),c.value===X.robotMode.DOUBLE&&(t=await Ce.fetchDoubleRobotAnimationData());const{initialPipeLength:o=0,pipeRadius:y=0,clampLength:N=0,animationData:x}=t;D.value=o,T.value=y,R.value=N,h.value=x;const O=$.cloneDeep(h.value),K=ce(F.value),q=(O==null?void 0:O["输出(动画数据)"])||[];u.value=q.length?q:[K]},u=e.ref([]),_=e.ref(!1),r=e.ref(""),p=e.ref(!1),a=e.ref(0),d=e.ref(0),i=e.ref(1e3);let b=!1;const E=e.ref(null),v=e.shallowRef(null),S=e.shallowRef(null),P=e.shallowRef(null),D=e.ref(0),T=e.ref(12.5),R=e.ref(30),k=e.ref([]),w=e.ref(null),I=e.computed(()=>n.model?ne.getNonFixedJoints(n.model).map(o=>o.name):[]),G=e.ref(["Y","B","C","R"]),F=e.computed(()=>[...I.value,...G.value]),Y=e.computed(()=>F.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
2
  ${F.value.join(" ")}
3
3
  0 0 0 ...
4
4
  1 2 3 ...`:"请先加载模型。"),J=()=>u.value.map(l=>({Y:parseFloat(l.Y)||0,B:parseFloat(l.B)||0,C:parseFloat(l.C)||0,R:parseFloat(l.R)||0})),U=()=>{const l=[],t=[];return u.value.forEach(o=>{const{Y1:y,B1:N,C1:x,R1:O,Y2:K,B2:q,C2:ie,R2:A}=o;l.push({Y:parseFloat(y)||0,B:parseFloat(N)||0,C:parseFloat(x)||0,R:parseFloat(O)||0}),t.push({Y:parseFloat(K)||0,B:parseFloat(q)||0,C:parseFloat(ie)||0,R:parseFloat(A)||0})}),{posPipeYbcr:l,negPipeYbcr:t}},L=(l=0,t=0)=>{if(v.value&&S.value){const o=U();Ee(v.value,S.value,o.posPipeYbcr,o.negPipeYbcr,D.value,T.value,l,t,R.value)}else if(v.value){const o=J();_e(v.value,o,D.value,T.value,l,t)}},W=l=>{if(l<0||l>=u.value.length){console.error(`帧索引 ${l} 超出范围`);return}const t=u.value[l];if(console.log(`应用第 ${l} 帧数据 ${t}`),a.value=l,E.value){const o={};I.value.forEach(y=>{const N=parseFloat(t[y]);isNaN(N)||(o[y]=N)}),E.value.setJointAngles(o)}L(l,0)},B=async()=>{if(u.value.length===0){$.ElMessage.error("无法播放动画:无数据");return}if(!p.value){p.value=!0,b=!1,u.value.length-1===a.value&&(a.value=0);try{for(let l=a.value+1;l<u.value.length&&!b;l++){a.value=l;const t=u.value[l],o={};E.value&&I.value.forEach(y=>{const N=parseFloat(t[y]);isNaN(N)||(o[y]=N)}),E.value?await E.value.animateToState(o,i.value,y=>{d.value=(l+y)/u.value.length*100,L(l-1,y)}):(await new Promise(y=>setTimeout(y,i.value)),d.value=(l+1)/u.value.length*100)}b||$.ElMessage.success("动画播放完成")}catch(l){console.error("动画播放出错:",l),$.ElMessage.error("动画播放出错")}finally{p.value=!1,d.value=0}}},z=()=>{b=!0,p.value=!1,d.value=0,$.ElMessage.info("动画已停止")},ae=()=>{a.value=0},j=()=>{if(v.value&&S.value){const l=U();Ee(v.value,S.value,l.posPipeYbcr,l.negPipeYbcr,D.value,T.value,-1,0,R.value)}else if(v.value){const l=J();_e(v.value,l,D.value,T.value,-1,0)}},oe=()=>{E.value&&E.value.resetToZero(),j(),ae(),$.ElMessage.success("机器人和管件已重置")},me=l=>`第 ${l+1} 帧`,ve=l=>{p.value&&z(),W(l)},fe=()=>{p.value&&z(),!(a.value+1>=u.value.length)&&W(a.value+1)},ge=()=>{p.value&&z(),a.value!==0&&W(a.value-1)},se=()=>{P.value&&(P.value.visible=!0),v.value&&v.value.parent&&v.value.parent.remove(v.value),P.value=null,v.value=null,S.value=null},ce=l=>l==null?void 0:l.reduce((t,o)=>(t[o]="0",t),{});e.watch(F,(l,t)=>{if(JSON.stringify(l)!==JSON.stringify(t))if(l.length>0){const o=ce(l);u.value=[o]}else u.value=[]},{immediate:!0});const re=e.ref(0),he=l=>{re.value=l},ue=(l,t)=>{if(!l||!t)return;const o=ne.getTargetJoint(l,t),y=Me();y.visible=!1,o==null||o.add(y)},te=l=>{E.value=new X.URDFRobotController(l),k.value=ne.getAllLinkName(l),w.value="Pipe_Joint"},le=()=>{E.value=null,k.value=[],w.value=null},Ve=l=>{te(l),ue(l,w.value),he(re.value+1),oe()};e.watch(()=>n.model,l=>{if(se(),l){Ve(l);return}le()},{immediate:!0});const de=l=>{var o,y;const t=new s.Mesh(l.geometry.clone(),l.material);return t.name="managed_pipe_clone",(y=(o=l==null?void 0:l.parent)==null?void 0:o.add)==null||y.call(o,t),t.position.copy(l.position),t.rotation.copy(l.rotation),t.scale.copy(l.scale),t};e.watch([w,R,D,re],([l,t])=>{if(se(),n.model&&l){const o=ne.getMeshFromJoint(n.model,l);if(console.log(o,"meshToReplace"),o&&o.parent){P.value=o,o.visible=!1;const y=de(o);if(c.value===X.robotMode.SINGLE&&(y.position.y-=t*.001),v.value=y,c.value===X.robotMode.DOUBLE){const N=de(o);S.value=N}L(0,0)}else l&&console.warn(`在 link '${l}' 中未找到可替换的网格或其没有父级。`)}});const be=async()=>{if(F.value.length===0){$.ElMessage.warning("没有可导出的表头");return}const l=F.value.join(" ");try{await navigator.clipboard.writeText(l),$.ElMessage.success("表头已成功复制到剪贴板!")}catch(t){console.error("复制失败:",t),$.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},ye=()=>{if(!r.value.trim()){$.ElMessage.warning("导入内容不能为空");return}const l=r.value.trim().split(`
@@ -1,17 +1,17 @@
1
1
  import { defineComponent as Oe, ref as h, watch as se, shallowRef as ve, computed as we, onUnmounted as Qe, resolveComponent as O, createElementBlock as _e, openBlock as te, createElementVNode as n, createVNode as o, withCtx as T, createBlock as Ce, createCommentVNode as ye, unref as V, toDisplayString as me, onMounted as Ie, onBeforeUnmount as We, Fragment as et, renderList as tt, nextTick as lt, withDirectives as q, vShow as re, renderSlot as de, isRef as Te, vModelRadio as Re } from "vue";
2
- import { r as Me, U as ot, s as je, u as nt, a as at, W as st } from "./workpieceTreePanel--iaoqT8x.js";
3
- import { u as Ke, a as it, b as rt } from "./iconfont-D1aDkauN.js";
4
- import { a9 as ut, c as ct, E as X, aM as pt, ao as dt } from "./index-BJadEVee.js";
5
- import { t as Ve, T as ke, V as F, r as Q, s as mt, u as vt, k as Se, v as ft, L as gt, w as ht, x as bt, y as yt, z as wt, F as _t, I as Ct, p as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js";
6
- import "./index.vue_vue_type_style_index_1_lang-8MlG6f_5.js";
2
+ import { r as Me, U as ot, s as je, u as nt, a as at, W as st } from "./workpieceTreePanel-CSKzSdIt.js";
3
+ import { u as Ke, a as it, b as rt } from "./iconfont-DTSZW2AU.js";
4
+ import { a9 as ut, c as ct, E as X, aM as pt, ao as dt } from "./index-Dm_WlV6R.js";
5
+ import { t as Ve, T as ke, V as F, r as Q, s as mt, u as vt, k as Se, v as ft, L as gt, w as ht, x as bt, y as yt, z as wt, F as _t, I as Ct, p as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
6
+ import "./index.vue_vue_type_style_index_1_lang-B0l6QIWy.js";
7
7
  import "./index-BHtNKL1L.js";
8
- import { _ as ue, s as Pt } from "./index-C9o3guTc.js";
9
- import "./index.vue_vue_type_style_index_1_lang-QVwLsuO7.js";
10
- import "./index-Dw_mx2E5.js";
11
- import { f as xt, a as Dt } from "./animationData-OlBnUG8w.js";
12
- import { g as Tt, a as Rt, b as Mt, c as Vt, U as St, J as At } from "./urdfTree-CLhAUUAD.js";
8
+ import { _ as ue, s as Pt } from "./index-B0dydZDW.js";
9
+ import "./index.vue_vue_type_style_index_1_lang-DzZEPkuk.js";
10
+ import "./index-CvC2498b.js";
11
+ import { f as xt, a as Dt } from "./animationData-D0TJ-9dd.js";
12
+ import { g as Tt, a as Rt, b as Mt, c as Vt, U as St, J as At } from "./urdfTree-BxuavyNQ.js";
13
13
  import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
- import { g as zt, a as Ee, d as $t, c as Ft, e as Yt, b as Lt } from "./dataUtil-DPRubJA4.js";
14
+ import { g as zt, a as Ee, d as $t, c as Ft, e as Yt, b as Lt } from "./dataUtil-gEKo7CEq.js";
15
15
  import { T as A } from "./svgIcon-D-_fXUBL.js";
16
16
  const H = 1e-3, ae = mt.degToRad, Ge = new ft({
17
17
  // 灰色
@@ -1,16 +1,16 @@
1
- import { defineComponent as we, ref as u, computed as U, watch as Z, onUnmounted as Xe, resolveComponent as q, createElementBlock as M, openBlock as z, createElementVNode as l, createCommentVNode as G, createVNode as i, toDisplayString as B, Fragment as Ke, renderList as We, withCtx as ne, inject as he, shallowRef as ue, onMounted as Ye, nextTick as Ze, onBeforeUnmount as qe, withDirectives as $, vShow as W, renderSlot as Y, unref as d, createBlock as ye, isRef as re, vModelRadio as de } from "vue";
2
- import { aD as Qe } from "./index.vue_vue_type_style_index_1_lang-8MlG6f_5.js";
3
- import { U as et, s as ke, u as tt, a as lt, W as at } from "./workpieceTreePanel--iaoqT8x.js";
4
- import { u as nt, a as ot, b as st } from "./iconfont-D1aDkauN.js";
5
- import { c as it, E as y } from "./index-BJadEVee.js";
6
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js";
7
- import { _ as pe } from "./index-C9o3guTc.js";
8
- import { g as ut, b as rt, U as dt, J as ct, d as vt } from "./urdfTree-CLhAUUAD.js";
1
+ import { defineComponent as we, ref as u, computed as U, watch as Z, onUnmounted as He, resolveComponent as q, createElementBlock as M, openBlock as z, createElementVNode as l, createCommentVNode as G, createVNode as i, toDisplayString as B, Fragment as Ke, renderList as We, withCtx as ne, inject as he, shallowRef as ue, onMounted as Ye, nextTick as Ze, onBeforeUnmount as qe, withDirectives as $, vShow as W, renderSlot as Y, unref as d, createBlock as ye, isRef as re, vModelRadio as de } from "vue";
2
+ import { aD as Qe } from "./index.vue_vue_type_style_index_1_lang-B0l6QIWy.js";
3
+ import { U as et, s as ke, u as tt, a as lt, W as at } from "./workpieceTreePanel-CSKzSdIt.js";
4
+ import { u as nt, a as ot, b as st } from "./iconfont-DTSZW2AU.js";
5
+ import { c as it, E as y } from "./index-Dm_WlV6R.js";
6
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
7
+ import { _ as pe } from "./index-B0dydZDW.js";
8
+ import { g as ut, b as rt, U as dt, J as ct, d as vt } from "./urdfTree-BxuavyNQ.js";
9
9
  import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  import { T as h } from "./svgIcon-D-_fXUBL.js";
11
- import { i as pt } from "./animationData-OlBnUG8w.js";
12
- import { O as mt } from "./MTLLoader-6BGR4SPQ.js";
13
- import { H as ft, j as gt } from "./index-DooNp_Nd.js";
11
+ import { i as pt } from "./animationData-D0TJ-9dd.js";
12
+ import { O as mt } from "./MTLLoader-BD3cbBAW.js";
13
+ import { t as ft, h as gt } from "./index-BVdolwlx.js";
14
14
  const bt = { class: "panel-content" }, ht = { class: "action-bar" }, yt = {
15
15
  key: 0,
16
16
  class: "animation-controls"
@@ -25,16 +25,16 @@ const bt = { class: "panel-content" }, ht = { class: "action-bar" }, yt = {
25
25
  xyzbcList: {}
26
26
  },
27
27
  setup(E, { expose: Q }) {
28
- const T = E, n = u([]), V = u(!1), j = u(""), f = u("stopped"), p = u(0), x = u(0), J = u(10), D = u(null);
28
+ const T = E, n = u([]), V = u(!1), L = u(""), f = u("stopped"), p = u(0), x = u(0), J = u(10), D = u(null);
29
29
  let k = 0;
30
- const ee = u([]), R = U(() => T.model ? ut(T.model).map((g) => g.name) : []), L = U(() => [...R.value]), ce = U(() => L.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
31
- ${L.value.join(" ")}
30
+ const ee = u([]), R = U(() => T.model ? ut(T.model).map((g) => g.name) : []), j = U(() => [...R.value]), ce = U(() => j.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
31
+ ${j.value.join(" ")}
32
32
  0 0 0 ...
33
- 1 2 3 ...` : "请先加载模型。"), H = U(() => n.value[p.value] || {});
33
+ 1 2 3 ...` : "请先加载模型。"), X = U(() => n.value[p.value] || {});
34
34
  Z(() => T.model, (s) => {
35
35
  s ? (D.value = new et(s), ee.value = rt(s), p.value = 0) : (D.value = null, ee.value = []);
36
36
  }, { immediate: !0 });
37
- const X = (s) => {
37
+ const H = (s) => {
38
38
  if (s < 0 || s >= n.value.length) {
39
39
  console.error(`帧索引 ${s} 超出范围`);
40
40
  return;
@@ -79,21 +79,21 @@ ${L.value.join(" ")}
79
79
  y.error("无动画数据");
80
80
  return;
81
81
  }
82
- f.value === "stopped" && (p.value = 0, X(0)), f.value = "playing", k++, oe(k), y.info("动画播放中");
82
+ f.value === "stopped" && (p.value = 0, H(0)), f.value = "playing", k++, oe(k), y.info("动画播放中");
83
83
  }, P = () => {
84
84
  f.value === "playing" && (k++, f.value = "paused", y.info("动画已暂停"));
85
85
  }, O = () => {
86
- k++, f.value = "stopped", p.value = 0, x.value = 0, X(0), y.info("动画已停止并重置");
86
+ k++, f.value = "stopped", p.value = 0, x.value = 0, H(0), y.info("动画已停止并重置");
87
87
  }, _ = () => {
88
88
  f.value === "playing" ? P() : A();
89
89
  }, te = (s) => {
90
- k++, f.value = "paused", X(s);
90
+ k++, f.value = "paused", H(s);
91
91
  }, le = () => {
92
- if (!j.value.trim()) {
92
+ if (!L.value.trim()) {
93
93
  y.warning("导入内容不能为空");
94
94
  return;
95
95
  }
96
- const s = j.value.trim().split(`
96
+ const s = L.value.trim().split(`
97
97
  `).filter((c) => c.trim() !== "");
98
98
  if (s.length < 2) {
99
99
  y.error("导入数据至少需要包含表头行和一行数据");
@@ -101,21 +101,21 @@ ${L.value.join(" ")}
101
101
  }
102
102
  const a = s[0].split(" ").map((c) => c.trim()), g = {};
103
103
  if (a.forEach((c, m) => {
104
- L.value.includes(c) && (g[m] = c);
104
+ j.value.includes(c) && (g[m] = c);
105
105
  }), Object.keys(g).length === 0) {
106
106
  y.error("没有找到匹配的表头,请检查表头名称是否正确");
107
107
  return;
108
108
  }
109
109
  const r = s.slice(1).map((c) => {
110
110
  const m = c.split(" "), S = {};
111
- return L.value.forEach((K) => {
111
+ return j.value.forEach((K) => {
112
112
  S[K] = "0";
113
113
  }), Object.entries(g).forEach(([K, I]) => {
114
114
  const ae = m[parseInt(K)];
115
115
  ae !== void 0 && ae.trim() !== "" && (S[I] = ae.trim());
116
116
  }), S;
117
117
  });
118
- r.length > 0 ? (n.value = r, y.success(`成功导入 ${r.length} 行数据!`), V.value = !1, j.value = "", O()) : y.error("未能解析到有效数据,请检查格式。");
118
+ r.length > 0 ? (n.value = r, y.success(`成功导入 ${r.length} 行数据!`), V.value = !1, L.value = "", O()) : y.error("未能解析到有效数据,请检查格式。");
119
119
  };
120
120
  Z(() => T.xyzbcList, () => {
121
121
  T.xyzbcList && (n.value = it(T.xyzbcList));
@@ -128,7 +128,7 @@ ${L.value.join(" ")}
128
128
  playAnimation: A,
129
129
  pauseAnimation: P,
130
130
  stopAnimation: O
131
- }), Xe(() => {
131
+ }), He(() => {
132
132
  k++;
133
133
  }), (s, a) => {
134
134
  const g = q("el-input-number"), C = q("el-slider"), r = q("el-input"), c = q("el-dialog");
@@ -136,7 +136,7 @@ ${L.value.join(" ")}
136
136
  l("div", ht, [
137
137
  i(pe, {
138
138
  onClick: a[0] || (a[0] = (m) => V.value = !0),
139
- disabled: L.value.length === 0,
139
+ disabled: j.value.length === 0,
140
140
  modelValue: "导入数据"
141
141
  }, null, 8, ["disabled"])
142
142
  ]),
@@ -174,7 +174,7 @@ ${L.value.join(" ")}
174
174
  l("div", null, [
175
175
  a[9] || (a[9] = l("label", null, "当前帧数据:", -1)),
176
176
  l("div", null, [
177
- H.value ? (z(!0), M(Ke, { key: 0 }, We(H.value, (m, S) => (z(), M("div", { key: S }, B(S) + ": " + B(m), 1))), 128)) : G("", !0)
177
+ X.value ? (z(!0), M(Ke, { key: 0 }, We(X.value, (m, S) => (z(), M("div", { key: S }, B(S) + ": " + B(m), 1))), 128)) : G("", !0)
178
178
  ])
179
179
  ])
180
180
  ])) : G("", !0),
@@ -203,8 +203,8 @@ ${L.value.join(" ")}
203
203
  default: ne(() => [
204
204
  a[11] || (a[11] = l("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
205
205
  i(r, {
206
- modelValue: j.value,
207
- "onUpdate:modelValue": a[3] || (a[3] = (m) => j.value = m),
206
+ modelValue: L.value,
207
+ "onUpdate:modelValue": a[3] || (a[3] = (m) => L.value = m),
208
208
  type: "textarea",
209
209
  rows: 10,
210
210
  placeholder: ce.value
@@ -216,10 +216,10 @@ ${L.value.join(" ")}
216
216
  ]);
217
217
  };
218
218
  }
219
- }), Pe = /* @__PURE__ */ Ce($t, [["__scopeId", "data-v-06bc34b3"]]), Ut = async (E) => await new mt().loadAsync(E), zt = async (E) => await Ut(E), Tt = { class: "obj-viewer-container" }, Vt = { class: "buttonGroup-top" }, jt = { class: "buttonGroup-topLeft" }, Lt = { class: "buttonGroup-left" }, At = { class: "buttonGroup-right" }, Nt = { class: "buttonGroup-bottom" }, Dt = { class: "top-panel" }, Rt = { class: "panel-header" }, Ot = { class: "panel-body" }, St = { class: "left-panel" }, Ft = { class: "panel-header" }, Mt = { class: "panel-body" }, Bt = {
219
+ }), Pe = /* @__PURE__ */ Ce($t, [["__scopeId", "data-v-06bc34b3"]]), Ut = async (E) => await new mt().loadAsync(E), zt = async (E) => await Ut(E), Tt = { class: "obj-viewer-container" }, Vt = { class: "buttonGroup-top" }, Lt = { class: "buttonGroup-topLeft" }, jt = { class: "buttonGroup-left" }, At = { class: "buttonGroup-right" }, Nt = { class: "buttonGroup-bottom" }, Dt = { class: "top-panel" }, Rt = { class: "panel-header" }, Ot = { class: "panel-body" }, St = { class: "left-panel" }, Ft = { class: "panel-header" }, Mt = { class: "panel-body" }, Bt = {
220
220
  key: 1,
221
221
  class: "clipping-content"
222
- }, Et = { class: "radio-group" }, Jt = { class: "radio-label" }, It = { class: "radio-label" }, Gt = { class: "radio-label" }, Ht = { class: "radio-label" }, Xt = { class: "right-panel" }, Kt = { class: "panel-header" }, Wt = { class: "panel-body" }, Yt = {
222
+ }, Et = { class: "radio-group" }, Jt = { class: "radio-label" }, It = { class: "radio-label" }, Gt = { class: "radio-label" }, Xt = { class: "radio-label" }, Ht = { class: "right-panel" }, Kt = { class: "panel-header" }, Wt = { class: "panel-body" }, Yt = {
223
223
  key: 0,
224
224
  class: "loading-overlay"
225
225
  }, Zt = /* @__PURE__ */ we({
@@ -230,7 +230,7 @@ ${L.value.join(" ")}
230
230
  },
231
231
  emits: ["getAnimationData", "getThreeData"],
232
232
  setup(E, { emit: Q }) {
233
- const T = Q, n = E, V = he("setManagementPageTitle"), j = he("setManagementPageVisible"), f = U(() => {
233
+ const T = Q, n = E, V = he("setManagementPageTitle"), L = he("setManagementPageVisible"), f = U(() => {
234
234
  var e, o;
235
235
  return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
236
236
  }), p = U(() => {
@@ -240,7 +240,7 @@ ${L.value.join(" ")}
240
240
  var e, o;
241
241
  return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.knife;
242
242
  }), J = u([]), D = async (t) => {
243
- !t || !t.isExtra || (await k(t), V == null || V(t == null ? void 0 : t.pageName), j == null || j(!0));
243
+ !t || !t.isExtra || (await k(t), V == null || V(t == null ? void 0 : t.pageName), L == null || L(!0));
244
244
  }, k = ft(async (t) => {
245
245
  await gt();
246
246
  const { mainKey: e, baseMenuPath: o } = t || {};
@@ -324,10 +324,10 @@ ${L.value.join(" ")}
324
324
  }, {
325
325
  immediate: !0
326
326
  });
327
- const L = U(() => {
327
+ const j = U(() => {
328
328
  var e, o;
329
329
  return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.bladeObjUrl;
330
- }), ce = u(ke.ROBOT), H = u(null), X = u(!1), oe = u(""), A = u(!1), P = u(""), O = u(!1), _ = u(""), te = u(!1), le = u(""), N = ue(null), s = u("叶片模型"), a = ue(null), g = ue(null), C = ue(null), r = u(Pe), {
330
+ }), ce = u(ke.ROBOT), X = u(null), H = u(!1), oe = u(""), A = u(!1), P = u(""), O = u(!1), _ = u(""), te = u(!1), le = u(""), N = ue(null), s = u("叶片模型"), a = ue(null), g = ue(null), C = ue(null), r = u(Pe), {
331
331
  currentModels: c,
332
332
  resetView: m,
333
333
  initThreeJS: S,
@@ -337,12 +337,12 @@ ${L.value.join(" ")}
337
337
  setModels: me,
338
338
  axesHelperVisible: xe,
339
339
  toggleAxesVisibility: _e
340
- } = nt(H), { loadSceneFromFile: $e } = lt(
340
+ } = nt(X), { loadSceneFromFile: $e } = lt(
341
341
  I,
342
342
  c,
343
- X,
343
+ H,
344
344
  oe
345
- ), { isAnimating: fe, toggleAnimation: Ue, stopAnimation: ze } = ot(I, c), { isClipping: Te, activeClippingAxis: w, toggleClipping: Ve, updateClippingPlanes: F } = st(I, c), { initRaycaster: je, selectedObject3D: Le, setSelectedObjVisible: Ae, updatePosition: Ne, updateRotation: De, dispose: Re } = tt(H, I, c), Oe = () => {
345
+ ), { isAnimating: fe, toggleAnimation: Ue, stopAnimation: ze } = ot(I, c), { isClipping: Te, activeClippingAxis: w, toggleClipping: Ve, updateClippingPlanes: F } = st(I, c), { initRaycaster: Le, selectedObject3D: je, setSelectedObjVisible: Ae, updatePosition: Ne, updateRotation: De, dispose: Re } = tt(X, I, c), Oe = () => {
346
346
  _e();
347
347
  }, Se = U(() => ce.value === ke.ROBOT), Fe = (t) => {
348
348
  le.value = t, te.value = !0;
@@ -361,8 +361,8 @@ ${L.value.join(" ")}
361
361
  (t = r.value) == null || t.stopAnimation();
362
362
  }, Je = (t, e) => vt(t, e), Ie = async (t) => {
363
363
  const e = Je(t, s.value);
364
- if (g.value = e, console.log("bladeObjUrl", L.value), e && e.parent && L.value) {
365
- const o = await zt(L.value);
364
+ if (g.value = e, console.log("bladeObjUrl", j.value), e && e.parent && j.value) {
365
+ const o = await zt(j.value);
366
366
  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, a.value = o;
367
367
  } else
368
368
  s.value && console.warn(`在 Blade '${s.value}' 中未找到可替换的网格或其没有父级。`);
@@ -383,13 +383,13 @@ ${L.value.join(" ")}
383
383
  immediate: !0,
384
384
  deep: !0
385
385
  }), Z(N, (t) => {
386
- me(t ? [t] : []), je();
386
+ me(t ? [t] : []), Le();
387
387
  });
388
388
  const Ge = () => {
389
389
  S(), window.addEventListener("resize", K);
390
390
  const t = I();
391
391
  C.value = t.scene;
392
- }, He = () => {
392
+ }, Xe = () => {
393
393
  P.value = "", _.value = "", window.removeEventListener("resize", K), fe.value && ze(), ae(), Re();
394
394
  };
395
395
  return Ye(async () => {
@@ -400,13 +400,13 @@ ${L.value.join(" ")}
400
400
  console.error("Three.js 初始化失败:", t), y.error("渲染引擎初始化失败!");
401
401
  }
402
402
  }), qe(() => {
403
- He();
403
+ Xe();
404
404
  }), (t, e) => {
405
405
  const o = q("el-scrollbar"), ie = q("PipeAnalysisPanel");
406
406
  return z(), M("div", Tt, [
407
407
  $(l("div", {
408
408
  ref_key: "threejsContainer",
409
- ref: H,
409
+ ref: X,
410
410
  class: "threejs-container"
411
411
  }, null, 512), [
412
412
  [W, Se.value]
@@ -415,7 +415,7 @@ ${L.value.join(" ")}
415
415
  Y(t.$slots, "button-top", { switchTopPanel: Fe }, void 0, !0),
416
416
  Y(t.$slots, "logout", {}, void 0, !0)
417
417
  ]),
418
- l("div", jt, [
418
+ l("div", Lt, [
419
419
  i(h, {
420
420
  name: "viewReset",
421
421
  size: "24",
@@ -446,7 +446,7 @@ ${L.value.join(" ")}
446
446
  title: "显隐坐标轴"
447
447
  }, null, 8, ["active"])
448
448
  ]),
449
- l("div", Lt, [
449
+ l("div", jt, [
450
450
  Y(t.$slots, "button-left", { switchRightPanel: se }, void 0, !0),
451
451
  i(h, {
452
452
  name: "jiegoushu",
@@ -588,7 +588,7 @@ ${L.value.join(" ")}
588
588
  ]),
589
589
  e[18] || (e[18] = l("span", { class: "radio-text" }, "Y轴切割", -1))
590
590
  ]),
591
- l("label", Ht, [
591
+ l("label", Xt, [
592
592
  $(l("input", {
593
593
  type: "radio",
594
594
  name: "clipping-axis",
@@ -605,7 +605,7 @@ ${L.value.join(" ")}
605
605
  ])) : G("", !0),
606
606
  P.value === "工件树" ? (z(), ye(at, {
607
607
  key: 2,
608
- model: (b = d(Le)) == null ? void 0 : b.obj,
608
+ model: (b = d(je)) == null ? void 0 : b.obj,
609
609
  onVisibleChange: d(Ae),
610
610
  onUpdatePosition: d(Ne),
611
611
  onUpdateRotation: d(De)
@@ -618,7 +618,7 @@ ${L.value.join(" ")}
618
618
  ], 512), [
619
619
  [W, A.value]
620
620
  ]),
621
- $(l("div", Xt, [
621
+ $(l("div", Ht, [
622
622
  l("div", Kt, [
623
623
  l("span", null, B(_.value), 1),
624
624
  l("span", {
@@ -649,7 +649,7 @@ ${L.value.join(" ")}
649
649
  ], 512), [
650
650
  [W, O.value]
651
651
  ]),
652
- X.value ? (z(), M("div", Yt, [
652
+ H.value ? (z(), M("div", Yt, [
653
653
  e[20] || (e[20] = l("div", { class: "loading-spinner" }, null, -1)),
654
654
  l("p", null, B(oe.value), 1)
655
655
  ])) : G("", !0),
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Te=require("./index.vue_vue_type_style_index_1_lang-BMAOkg3Y.cjs"),A=require("./workpieceTreePanel-CzDrMcRN.cjs"),Z=require("./iconfont-CiYOe1nN.cjs"),p=require("./index-DEBf-IBT.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs");const Q=require("./index-Db9w-sM_.cjs"),G=require("./urdfTree-Di3A1LA8.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CUM54R6L.cjs"),De=require("./animationData-FMGneVai.cjs"),Me=require("./MTLLoader-Cgu6hVsY.cjs"),oe=require("./index-CTq3U1p_.cjs"),$e={class:"panel-content"},Be={class:"action-bar"},ze={key:0,class:"animation-controls"},Le={class:"control-row"},Re={class:"control-row"},Ue={class:"frame-info"},je={class:"control-row"},Ae={key:1,class:"empty-state"},Ie={class:"dialog-footer"},Oe=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(B,{expose:I}){const k=B,o=e.ref([]),w=e.ref(!1),C=e.ref(""),v=e.ref("stopped"),c=e.ref(0),y=e.ref(0),z=e.ref(10),S=e.ref(null);let h=0;const O=e.ref([]),T=e.computed(()=>k.model?G.getNonFixedJoints(k.model).map(m=>m.name):[]),P=e.computed(()=>[...T.value]),W=e.computed(()=>P.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Te=require("./index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs"),A=require("./workpieceTreePanel-C2BXrv3k.cjs"),Z=require("./iconfont-C9-pGpAJ.cjs"),p=require("./index-BOJUyAaV.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs");const Q=require("./index-D8Y3imz9.cjs"),G=require("./urdfTree-wR2vnG4s.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CUM54R6L.cjs"),De=require("./animationData-Bwh55Xw6.cjs"),Me=require("./MTLLoader-B8MnfNfT.cjs"),oe=require("./index-BLwwxnzs.cjs"),$e={class:"panel-content"},Be={class:"action-bar"},ze={key:0,class:"animation-controls"},Le={class:"control-row"},Re={class:"control-row"},Ue={class:"frame-info"},je={class:"control-row"},Ae={key:1,class:"empty-state"},Ie={class:"dialog-footer"},Oe=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(B,{expose:I}){const k=B,o=e.ref([]),w=e.ref(!1),C=e.ref(""),v=e.ref("stopped"),c=e.ref(0),y=e.ref(0),z=e.ref(10),S=e.ref(null);let h=0;const O=e.ref([]),T=e.computed(()=>k.model?G.getNonFixedJoints(k.model).map(m=>m.name):[]),P=e.computed(()=>[...T.value]),W=e.computed(()=>P.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
2
  ${P.value.join(" ")}
3
3
  0 0 0 ...
4
4
  1 2 3 ...`:"请先加载模型。"),R=e.computed(()=>o.value[c.value]||{});e.watch(()=>k.model,s=>{s?(S.value=new A.URDFRobotController(s),O.value=G.getAllLinkName(s),c.value=0):(S.value=null,O.value=[])},{immediate:!0});const U=s=>{if(s<0||s>=o.value.length){console.error(`帧索引 ${s} 超出范围`);return}const n=o.value[s];if(S.value){const m={};T.value.forEach(N=>{const i=parseFloat(n[N]);isNaN(i)||(m[N]=i)}),S.value.setJointAngles(m)}c.value=s,y.value=o.value.length>1?s/(o.value.length-1)*100:100},H=async s=>{try{for(let n=c.value;n<o.value.length;n++){if(s!==h)return;const m=o.value[n],N={};if(S.value)T.value.forEach(i=>{const r=parseFloat(m[i]);isNaN(r)||(N[i]=r)}),await S.value.animateToState(N,z.value,i=>{s===h&&(y.value=(n+i)/o.value.length*100)});else{if(await new Promise(i=>setTimeout(i,z.value)),s!==h)return;y.value=(n+1)/o.value.length*100}c.value=n}s===h&&(p.ElMessage.success("动画播放完成"),v.value="stopped",y.value=100)}catch(n){console.error("动画播放出错:",n),p.ElMessage.error("动画播放出错"),v.value="stopped"}},_=()=>{if(o.value.length===0){p.ElMessage.error("无动画数据");return}v.value==="stopped"&&(c.value=0,U(0)),v.value="playing",h++,H(h),p.ElMessage.info("动画播放中")},V=()=>{v.value==="playing"&&(h++,v.value="paused",p.ElMessage.info("动画已暂停"))},D=()=>{h++,v.value="stopped",c.value=0,y.value=0,U(0),p.ElMessage.info("动画已停止并重置")},E=()=>{v.value==="playing"?V():_()},F=s=>{h++,v.value="paused",U(s)},q=()=>{if(!C.value.trim()){p.ElMessage.warning("导入内容不能为空");return}const s=C.value.trim().split(`
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as We, ref as B, shallowRef as he, computed as $, watch as Ve, onMounted as He, onBeforeUnmount as Ne, resolveComponent as $e, createElementBlock as te, openBlock as X, createElementVNode as d, withDirectives as k, createCommentVNode as ne, createVNode as p, unref as b, renderSlot as ve, toDisplayString as ie, withCtx as ge, createBlock as Xe, isRef as Y, vModelRadio as q, vShow as se } from "vue";
2
- import { u as Ye, a as qe, b as Je, f as Ze, d as Ke } from "./iconfont-D1aDkauN.js";
3
- import { aE as Qe, aF as le, aG as de, av as R, aH as et, B as ce, aD as Ce, V as P, aI as tt, aJ as Q, aK as _e, Y as Ue, aL as ee, k as nt, aM as V, aN as it, r as st, s as Ee, t as ot, w as at, ag as rt, ao as lt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js";
4
- import { r as dt } from "./fileUtil-D4f4EJ9p.js";
5
- import { E as ct } from "./index-BJadEVee.js";
6
- import { U as ut, J as ft } from "./urdfTree-CLhAUUAD.js";
2
+ import { u as Ye, a as qe, b as Je, f as Ze, d as Ke } from "./iconfont-DTSZW2AU.js";
3
+ import { aE as Qe, aF as le, aG as de, av as R, aH as et, B as ce, aD as Ce, V as P, aI as tt, aJ as Q, aK as _e, Y as Ue, aL as ee, k as nt, aM as V, aN as it, r as st, s as Ee, t as ot, w as at, ag as rt, ao as lt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
4
+ import { r as dt } from "./fileUtil-CN00xr9W.js";
5
+ import { E as ct } from "./index-Dm_WlV6R.js";
6
+ import { U as ut, J as ft } from "./urdfTree-BxuavyNQ.js";
7
7
  import { T as v } from "./svgIcon-D-_fXUBL.js";
8
- import { i as pt } from "./isString-DOZgMp8l.js";
8
+ import { i as pt } from "./isString-DvY0kl3S.js";
9
9
  import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
10
  const ye = new ce(), J = new P();
11
11
  class Ae extends Qe {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),D=require("./iconfont-CiYOe1nN.cjs"),s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs"),ye=require("./fileUtil-DWuPXxGz.cjs"),we=require("./index-DEBf-IBT.cjs"),J=require("./urdfTree-Di3A1LA8.cjs"),v=require("./svgIcon-CUM54R6L.cjs"),Se=require("./isString-D6Z6SOrb.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=new s.Box3,R=new s.Vector3;class oe extends s.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],i=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],o=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(o),this.setAttribute("position",new s.Float32BufferAttribute(e,3)),this.setAttribute("uv",new s.Float32BufferAttribute(i,2))}applyMatrix4(e){const i=this.attributes.instanceStart,o=this.attributes.instanceEnd;return i!==void 0&&(i.applyMatrix4(e),o.applyMatrix4(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new s.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceStart",new s.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceEnd",new s.InterleavedBufferAttribute(o,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new s.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceColorStart",new s.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceColorEnd",new s.InterleavedBufferAttribute(o,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new s.WireframeGeometry(e.geometry)),this}fromLineSegments(e){const i=e.geometry;return this.setPositions(i.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new s.Box3);const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;e!==void 0&&i!==void 0&&(this.boundingBox.setFromBufferAttribute(e),K.setFromBufferAttribute(i),this.boundingBox.union(K))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new s.Sphere),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;if(e!==void 0&&i!==void 0){const o=this.boundingSphere.center;this.boundingBox.getCenter(o);let n=0;for(let c=0,d=e.count;c<d;c++)R.fromBufferAttribute(e,c),n=Math.max(n,o.distanceToSquared(R)),R.fromBufferAttribute(i,c),n=Math.max(n,o.distanceToSquared(R));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}s.UniformsLib.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new s.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};s.ShaderLib.line={uniforms:s.UniformsUtils.merge([s.UniformsLib.common,s.UniformsLib.fog,s.UniformsLib.line]),vertexShader:`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),D=require("./iconfont-C9-pGpAJ.cjs"),s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs"),ye=require("./fileUtil-GIRXMs25.cjs"),we=require("./index-BOJUyAaV.cjs"),J=require("./urdfTree-wR2vnG4s.cjs"),v=require("./svgIcon-CUM54R6L.cjs"),Se=require("./isString-CELwppr9.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=new s.Box3,R=new s.Vector3;class oe extends s.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],i=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],o=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(o),this.setAttribute("position",new s.Float32BufferAttribute(e,3)),this.setAttribute("uv",new s.Float32BufferAttribute(i,2))}applyMatrix4(e){const i=this.attributes.instanceStart,o=this.attributes.instanceEnd;return i!==void 0&&(i.applyMatrix4(e),o.applyMatrix4(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new s.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceStart",new s.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceEnd",new s.InterleavedBufferAttribute(o,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new s.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceColorStart",new s.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceColorEnd",new s.InterleavedBufferAttribute(o,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new s.WireframeGeometry(e.geometry)),this}fromLineSegments(e){const i=e.geometry;return this.setPositions(i.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new s.Box3);const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;e!==void 0&&i!==void 0&&(this.boundingBox.setFromBufferAttribute(e),K.setFromBufferAttribute(i),this.boundingBox.union(K))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new s.Sphere),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;if(e!==void 0&&i!==void 0){const o=this.boundingSphere.center;this.boundingBox.getCenter(o);let n=0;for(let c=0,d=e.count;c<d;c++)R.fromBufferAttribute(e,c),n=Math.max(n,o.distanceToSquared(R)),R.fromBufferAttribute(i,c),n=Math.max(n,o.distanceToSquared(R));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}s.UniformsLib.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new s.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};s.ShaderLib.line={uniforms:s.UniformsUtils.merge([s.UniformsLib.common,s.UniformsLib.fog,s.UniformsLib.line]),vertexShader:`
2
2
  #include <common>
3
3
  #include <color_pars_vertex>
4
4
  #include <fog_pars_vertex>
@@ -1,7 +1,7 @@
1
1
  import { computed as _, defineComponent as Y, defineAsyncComponent as S, ref as M, watch as q, createElementBlock as B, openBlock as y, normalizeClass as J, createElementVNode as K, createBlock as P, createCommentVNode as O, renderSlot as f, unref as D, withCtx as h } from "vue";
2
- import { a as L, b$ as Q, p as N, s as H } from "./index-BJadEVee.js";
3
- import { u as W } from "./index.vue_vue_type_style_index_1_lang-8MlG6f_5.js";
4
- import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js";
2
+ import { a as L, b$ as Q, p as N, s as H } from "./index-Dm_WlV6R.js";
3
+ import { u as W } from "./index.vue_vue_type_style_index_1_lang-B0l6QIWy.js";
4
+ import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
5
5
  import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
6
6
  function ue(u) {
7
7
  const T = sessionStorage.getItem("loginToken") ?? "123456";
@@ -125,7 +125,7 @@ const te = { class: "top-menu" }, ne = {
125
125
  },
126
126
  emits: ["getThreeData"],
127
127
  setup(u, { emit: T }) {
128
- const v = S(() => import("./threeSceneView-C66YfUi3.js")), U = S(() => import("./threePreview-BelyhkDx.js")), m = S(() => import("./threeTrackPathView-DxO-9BKu.js")), E = S(() => import("./threeSceneViewForCPMPIP-WBguXbnU.js")), o = {
128
+ const v = S(() => import("./threeSceneView-DPTQ_xR-.js")), U = S(() => import("./threePreview-CjFKHY3_.js")), m = S(() => import("./threeTrackPathView-BvxoafSz.js")), E = S(() => import("./threeSceneViewForCPMPIP-Bqb44i-c.js")), o = {
129
129
  ROBOT_SCENE: "robot",
130
130
  // 机器人场景
131
131
  LATHE_SCENE: "latheScene",
@@ -1 +1 @@
1
- "use strict";const e=require("vue"),h=require("./index-DEBf-IBT.cjs"),B=require("./index.vue_vue_type_style_index_1_lang-BMAOkg3Y.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs");const H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function O(d){const v=sessionStorage.getItem("loginToken")??"123456";return h.service({url:"/api/sysFile/uploadFile",method:"post",data:d,headers:{Authorization:v,"Content-Type":"multipart/form-data"}})}function R(d){const v=sessionStorage.getItem("loginToken")??"123456";return h.service({url:"/api/sysFile/downloadFile",method:"post",data:d,headers:{Authorization:v,Accept:"application/octet-stream"},responseType:"blob"})}const I=h.defineStore("threeState",{state:()=>({data:{extension:"",url:[],data:{},isThreeScene:!0}}),actions:{setData(d){this.data=d},getData(){return this.data}}});function V(){const d=B.useMenuState(h.pinia),{platform:v}=h.storeToRefs(d),T=I(h.pinia),b=e.computed(()=>{var n;return(n=T==null?void 0:T.data)==null?void 0:n.extension}),m=["uv","cpt","cyd"],y=["urdf"],s=["obj","stl"],o=[...m,...y,...s],P=n=>{if(!C())throw new Error("不是三维系统");T.setData(n)},f=()=>T.getData(),C=()=>v.value==="three",c=n=>{const i=n==null?void 0:n.toLowerCase(),l=i==null?void 0:i.lastIndexOf(".");let p=i;return l>=0&&(p=p==null?void 0:p.slice(l+1)),p},S=n=>{if(!n)return!1;const i=c(n);return o==null?void 0:o.includes(i)};return{getData:f,setData:P,isThreeSystem:C,isUrdf:n=>{if(!n)return!1;const i=c(n);return y==null?void 0:y.includes(i)},isGeneralFile:n=>{if(!n)return!1;const i=c(n);return s==null?void 0:s.includes(i)},isTrackPathFile:n=>{if(!n)return!1;const i=c(n);return m==null?void 0:m.includes(i)},isThreeFile:S,isUseBackdrop:n=>C()&&S(n),initTrackFileType:n=>{if(!n)return{isCpt:!1,isCyd:!1,isUv:!1};const i=c(n),l=m==null?void 0:m.find(_=>_===i);return{isCpt:l==="cpt",isCyd:l==="cyd",isUv:l==="uv"}},getFileExtension:c,extraExtension:b}}const q={class:"top-menu"},L={key:4,class:"loading"},x=e.defineComponent({__name:"threeViewerHost",props:{fileUrls:{default:()=>[]},host:{default:"inline"},extension:{},animationData:{default:()=>({})},width:{default:"100%"},height:{default:"100%"},threeData:{},componentType:{}},emits:["getThreeData"],setup(d,{emit:v}){const T=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-9pPPVjCA.cjs"))),b=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-CB4s2usq.cjs"))),m=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-C4c7FI2n.cjs"))),y=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-DLVSylJ7.cjs"))),s={ROBOT_SCENE:"robot",LATHE_SCENE:"latheScene",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},o=d,P=B.useMenuState(h.pinia),{platName:f}=h.storeToRefs(P),{isGeneralFile:C,isUrdf:c,isTrackPathFile:S,extraExtension:k}=V(),g=e.computed(()=>(o==null?void 0:o.extension)||k.value),F=e.computed(()=>{var t,r;return(r=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:r.trackFileType}),E=e.computed(()=>{var r;if(o.componentType)switch(o.componentType){case"robot":return s.ROBOT_SCENE;case"latheScene":return s.LATHE_SCENE;case"cpmpip":return s.CPMPIP_SCENE;case"preview":return s.PREVIEW}const t=(r=o==null?void 0:o.fileUrls)==null?void 0:r[0];return C(t)?s.PREVIEW:(f==null?void 0:f.value)==="CPMPIP"&&(c(t)||c(g.value))?s.CPMPIP_SCENE:(f==null?void 0:f.value)==="SFRTubeBend"&&(c(t)||c(g.value))?s.ROBOT_SCENE:S(g.value)&&F.value?s.LATHE_SCENE:s.PREVIEW}),D=v,n=e.ref([]),i=e.ref(!1);function l(t){try{const r=new URL(t).pathname,u=r.substring(r.lastIndexOf("/")+1);return decodeURIComponent(u)}catch(r){return console.error("无法解析URL以提取文件名:",t,r),"未知文件名"}}async function p(t){let r,u;if(/^https?:\/\//.test(t))try{const a=await fetch(t);if(!a.ok)throw new Error(`下载文件失败: ${a.statusText} (URL: ${t})`);r=await a.blob(),u=l(t)}catch(a){throw console.error("使用 fetch 下载文件时出错:",a),a}else try{const a=await R({url:t});if(a.status!==200)throw new Error(`下载失败: ${a.status}`);const w=a.headers["content-disposition"];u=_(w)||"无文件名",r=a.data}catch(a){throw console.error("通过 API 下载文件时出错:",a),a}return new File([r],u,{type:r.type})}function _(t){if(!t)return;const r=t.match(/filename\*\s*=\s*([^;]+)/i);if(r){let a=r[1].trim();a=a.replace(/^"(.*)"$/,"$1");const w=a.split("''");if(w.length===2){const M=w[0].toUpperCase(),U=w[1];try{if(M==="UTF-8")return decodeURIComponent(U)}catch{}return U}try{return decodeURIComponent(a)}catch{return a}}const u=t.match(/filename\s*=\s*("?)([^";]+)\1/i);if(u)return u[2].trim()}async function N(t){if(!t||!t.length){n.value=[];return}i.value=!0;try{const r=await Promise.all(t.map(u=>p(u)));n.value=r}catch(r){console.error("文件下载时发生错误:",r),n.value=[]}finally{i.value=!1}}const $=()=>{D("getThreeData")};return e.watch(()=>o.fileUrls,async t=>{await N(t??[])},{immediate:!0,deep:!0}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.host==="electron"?"mv-electron":"mv-inline","three-platform"])},[e.createElementVNode("div",q,[e.renderSlot(t.$slots,"top-menu",{},void 0,!0)]),E.value===s.ROBOT_SCENE?(e.openBlock(),e.createBlock(e.unref(T),{key:0,"file-blobs":n.value,"animation-data":t.animationData,onGetThreeData:$,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data","threeData"])):E.value===s.LATHE_SCENE?(e.openBlock(),e.createBlock(e.unref(m),{key:1,fileUrls:t.fileUrls,threeData:o.threeData,trackFileType:F.value},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileUrls","threeData","trackFileType"])):E.value===s.CPMPIP_SCENE?(e.openBlock(),e.createBlock(e.unref(y),{key:2,"file-blobs":n.value,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","threeData"])):E.value===s.PREVIEW?(e.openBlock(),e.createBlock(e.unref(b),{key:3,"file-blobs":n.value,"animation-data":t.animationData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",L," 文件下载中,请稍候... ")):e.createCommentVNode("",!0)],2))}}),A=H._export_sfc(x,[["__scopeId","data-v-a4f0efb1"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:A},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=A;exports.downloadAvatarApi=R;exports.threeViewerHost=W;exports.uploadFile=O;exports.useThreeState=I;exports.useThreeSystem=V;
1
+ "use strict";const e=require("vue"),h=require("./index-BOJUyAaV.cjs"),B=require("./index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs");const H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function O(d){const v=sessionStorage.getItem("loginToken")??"123456";return h.service({url:"/api/sysFile/uploadFile",method:"post",data:d,headers:{Authorization:v,"Content-Type":"multipart/form-data"}})}function R(d){const v=sessionStorage.getItem("loginToken")??"123456";return h.service({url:"/api/sysFile/downloadFile",method:"post",data:d,headers:{Authorization:v,Accept:"application/octet-stream"},responseType:"blob"})}const I=h.defineStore("threeState",{state:()=>({data:{extension:"",url:[],data:{},isThreeScene:!0}}),actions:{setData(d){this.data=d},getData(){return this.data}}});function V(){const d=B.useMenuState(h.pinia),{platform:v}=h.storeToRefs(d),T=I(h.pinia),b=e.computed(()=>{var n;return(n=T==null?void 0:T.data)==null?void 0:n.extension}),m=["uv","cpt","cyd"],y=["urdf"],s=["obj","stl"],o=[...m,...y,...s],P=n=>{if(!C())throw new Error("不是三维系统");T.setData(n)},f=()=>T.getData(),C=()=>v.value==="three",c=n=>{const i=n==null?void 0:n.toLowerCase(),l=i==null?void 0:i.lastIndexOf(".");let p=i;return l>=0&&(p=p==null?void 0:p.slice(l+1)),p},S=n=>{if(!n)return!1;const i=c(n);return o==null?void 0:o.includes(i)};return{getData:f,setData:P,isThreeSystem:C,isUrdf:n=>{if(!n)return!1;const i=c(n);return y==null?void 0:y.includes(i)},isGeneralFile:n=>{if(!n)return!1;const i=c(n);return s==null?void 0:s.includes(i)},isTrackPathFile:n=>{if(!n)return!1;const i=c(n);return m==null?void 0:m.includes(i)},isThreeFile:S,isUseBackdrop:n=>C()&&S(n),initTrackFileType:n=>{if(!n)return{isCpt:!1,isCyd:!1,isUv:!1};const i=c(n),l=m==null?void 0:m.find(_=>_===i);return{isCpt:l==="cpt",isCyd:l==="cyd",isUv:l==="uv"}},getFileExtension:c,extraExtension:b}}const q={class:"top-menu"},L={key:4,class:"loading"},x=e.defineComponent({__name:"threeViewerHost",props:{fileUrls:{default:()=>[]},host:{default:"inline"},extension:{},animationData:{default:()=>({})},width:{default:"100%"},height:{default:"100%"},threeData:{},componentType:{}},emits:["getThreeData"],setup(d,{emit:v}){const T=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-DM8uof_D.cjs"))),b=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-BNvDY6xx.cjs"))),m=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-DgnuPrBe.cjs"))),y=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-D5jl1r-h.cjs"))),s={ROBOT_SCENE:"robot",LATHE_SCENE:"latheScene",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},o=d,P=B.useMenuState(h.pinia),{platName:f}=h.storeToRefs(P),{isGeneralFile:C,isUrdf:c,isTrackPathFile:S,extraExtension:k}=V(),g=e.computed(()=>(o==null?void 0:o.extension)||k.value),F=e.computed(()=>{var t,r;return(r=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:r.trackFileType}),E=e.computed(()=>{var r;if(o.componentType)switch(o.componentType){case"robot":return s.ROBOT_SCENE;case"latheScene":return s.LATHE_SCENE;case"cpmpip":return s.CPMPIP_SCENE;case"preview":return s.PREVIEW}const t=(r=o==null?void 0:o.fileUrls)==null?void 0:r[0];return C(t)?s.PREVIEW:(f==null?void 0:f.value)==="CPMPIP"&&(c(t)||c(g.value))?s.CPMPIP_SCENE:(f==null?void 0:f.value)==="SFRTubeBend"&&(c(t)||c(g.value))?s.ROBOT_SCENE:S(g.value)&&F.value?s.LATHE_SCENE:s.PREVIEW}),D=v,n=e.ref([]),i=e.ref(!1);function l(t){try{const r=new URL(t).pathname,u=r.substring(r.lastIndexOf("/")+1);return decodeURIComponent(u)}catch(r){return console.error("无法解析URL以提取文件名:",t,r),"未知文件名"}}async function p(t){let r,u;if(/^https?:\/\//.test(t))try{const a=await fetch(t);if(!a.ok)throw new Error(`下载文件失败: ${a.statusText} (URL: ${t})`);r=await a.blob(),u=l(t)}catch(a){throw console.error("使用 fetch 下载文件时出错:",a),a}else try{const a=await R({url:t});if(a.status!==200)throw new Error(`下载失败: ${a.status}`);const w=a.headers["content-disposition"];u=_(w)||"无文件名",r=a.data}catch(a){throw console.error("通过 API 下载文件时出错:",a),a}return new File([r],u,{type:r.type})}function _(t){if(!t)return;const r=t.match(/filename\*\s*=\s*([^;]+)/i);if(r){let a=r[1].trim();a=a.replace(/^"(.*)"$/,"$1");const w=a.split("''");if(w.length===2){const M=w[0].toUpperCase(),U=w[1];try{if(M==="UTF-8")return decodeURIComponent(U)}catch{}return U}try{return decodeURIComponent(a)}catch{return a}}const u=t.match(/filename\s*=\s*("?)([^";]+)\1/i);if(u)return u[2].trim()}async function N(t){if(!t||!t.length){n.value=[];return}i.value=!0;try{const r=await Promise.all(t.map(u=>p(u)));n.value=r}catch(r){console.error("文件下载时发生错误:",r),n.value=[]}finally{i.value=!1}}const $=()=>{D("getThreeData")};return e.watch(()=>o.fileUrls,async t=>{await N(t??[])},{immediate:!0,deep:!0}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.host==="electron"?"mv-electron":"mv-inline","three-platform"])},[e.createElementVNode("div",q,[e.renderSlot(t.$slots,"top-menu",{},void 0,!0)]),E.value===s.ROBOT_SCENE?(e.openBlock(),e.createBlock(e.unref(T),{key:0,"file-blobs":n.value,"animation-data":t.animationData,onGetThreeData:$,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data","threeData"])):E.value===s.LATHE_SCENE?(e.openBlock(),e.createBlock(e.unref(m),{key:1,fileUrls:t.fileUrls,threeData:o.threeData,trackFileType:F.value},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileUrls","threeData","trackFileType"])):E.value===s.CPMPIP_SCENE?(e.openBlock(),e.createBlock(e.unref(y),{key:2,"file-blobs":n.value,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","threeData"])):E.value===s.PREVIEW?(e.openBlock(),e.createBlock(e.unref(b),{key:3,"file-blobs":n.value,"animation-data":t.animationData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",L," 文件下载中,请稍候... ")):e.createCommentVNode("",!0)],2))}}),A=H._export_sfc(x,[["__scopeId","data-v-a4f0efb1"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:A},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=A;exports.downloadAvatarApi=R;exports.threeViewerHost=W;exports.uploadFile=O;exports.useThreeState=I;exports.useThreeSystem=V;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as I, ref as L, watch as b, onMounted as C, onUnmounted as P, createElementBlock as m, openBlock as f, Fragment as T, renderList as N, createElementVNode as p, createCommentVNode as U, toDisplayString as h, computed as M, resolveComponent as A, createVNode as S } from "vue";
2
- import { k as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bhj73Dii.js";
2
+ import { k as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js";
3
3
  import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
4
  const D = (i, l) => {
5
5
  if (!l)
@@ -1 +1 @@
1
- "use strict";const t=require("vue"),x=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DAjyk3_9.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E=(o,i)=>{if(!i)return null;const l=o.joints[i];return l||null},F=(o,i)=>{if(!i)return null;const l=E(o,i);if(!l)return null;let u=null;return l.traverse(c=>{c instanceof x.Mesh&&!u&&(u=c)}),u},N=(o,i)=>{if(!i)return null;const l=o.links[i];return l||null},L=(o,i)=>{if(!i)return null;const l=N(o,i);if(!l)return null;let u=null;return l.traverse(c=>{c instanceof x.Mesh&&!u&&(u=c)}),u},V=o=>{const i=o.joints;return Object.values(i)},M=o=>V(o).filter(u=>u.jointType!=="fixed"),w=o=>{const i=o.links;return Object.keys(i)},B={class:"panel-content"},b={key:0,class:"joints-list"},I={class:"joint-info-row"},S={class:"joint-left"},C={class:"joint-name"},D={class:"joint-range"},P={class:"joint-type"},T={key:0,class:"joint-control-row"},A={class:"slider-container"},U=["min","max","value","onInput"],R={class:"value-display"},q={class:"joint-value"},O={class:"unit"},K={key:1,class:"empty-state"},$=t.defineComponent({__name:"urdfJointPanel",props:{model:{}},setup(o,{expose:i}){const l=o,u=t.ref([]),c=t.ref(null),f=(s,p=!1)=>s==="revolute"?p?Math.PI:-Math.PI:s==="prismatic"?p?1:-1:0,_=s=>{if(!s||!s.joints)return console.warn("URDF模型无效或不包含关节信息"),[];const p=[];return V(s).forEach(r=>{var n,d;if(r.jointType==="fixed")return;let a={lower:((n=r.limit)==null?void 0:n.lower)??f(r.jointType,!1),upper:((d=r.limit)==null?void 0:d.upper)??f(r.jointType,!0)};r.jointType==="continuous"&&(a={lower:-10*Math.PI,upper:10*Math.PI}),p.push({name:r.name,type:r.jointType||"unknown",limit:a,currentValue:r.angle||0,urdfJoint:r})}),p},m=(s,p)=>{var n;const e=u.value.find(d=>d.name===s);if(!e)return;const r=parseFloat(p),a=Math.max(e.limit.lower,Math.min(e.limit.upper,r));e.currentValue=a,(n=l.model)!=null&&n.setJointValue?l.model.setJointValue(s,a):e.urdfJoint.setJointValue(a)},v=()=>{u.value.forEach(s=>{(s.type==="revolute"||s.type==="continuous"||s.type==="prismatic")&&m(s.name,0)})},y=()=>{l.model&&u.value.forEach(s=>{s.urdfJoint.angle!==void 0&&s.currentValue!==s.urdfJoint.angle&&(s.currentValue=s.urdfJoint.angle)})},g=()=>{const s=()=>{y(),c.value=requestAnimationFrame(s)};s()},k=()=>{c.value&&(cancelAnimationFrame(c.value),c.value=null)};return t.watch(()=>l.model,s=>{s?u.value=_(s):u.value=[]},{immediate:!0}),t.onMounted(()=>{g()}),t.onUnmounted(()=>{k()}),i({resetAllJoints:v}),(s,p)=>(t.openBlock(),t.createElementBlock("div",B,[u.value.length>0?(t.openBlock(),t.createElementBlock("div",b,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,e=>(t.openBlock(),t.createElementBlock("div",{key:e.name,class:"joint-item"},[t.createElementVNode("div",I,[t.createElementVNode("div",S,[t.createElementVNode("span",C,t.toDisplayString(e.name),1),t.createElementVNode("span",D," ["+t.toDisplayString(e.limit.lower.toFixed(2))+", "+t.toDisplayString(e.limit.upper.toFixed(2))+"] ",1)]),t.createElementVNode("span",P,t.toDisplayString(e.type),1)]),e.type==="revolute"||e.type==="prismatic"||e.type==="continuous"?(t.openBlock(),t.createElementBlock("div",T,[t.createElementVNode("div",A,[t.createElementVNode("input",{type:"range",min:e.limit.lower,max:e.limit.upper,step:"0.001",value:e.currentValue,onInput:r=>m(e.name,r.target.value),class:"joint-slider"},null,40,U)]),t.createElementVNode("div",R,[t.createElementVNode("span",q,t.toDisplayString(e.currentValue?Number(e.currentValue).toFixed(3):"0.000"),1),t.createElementVNode("span",O,t.toDisplayString(e.type==="prismatic"?"m":"rad"),1)])])):t.createCommentVNode("",!0)]))),128))])):(t.openBlock(),t.createElementBlock("div",K,p[0]||(p[0]=[t.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}}),H=J._export_sfc($,[["__scopeId","data-v-750b831d"]]),z={class:"panel-content"},G="id",Q={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:o=>["breadth","firstLevel"].includes(o)},extraNodes:{type:Array,default:[]}},emits:["nodeClick"],setup(o,{emit:i}){const l=o,u=i,c=t.ref([]),f={children:"children",label:"label"},_=e=>{u("nodeClick",e)},m=(e,r=0)=>{const a=[];return Array.isArray(e)&&(e==null?void 0:e.length)>0&&e.forEach(n=>{if(!(n!=null&&n.isMesh)&&((n==null?void 0:n.type)==="URDFJoint"||(n==null?void 0:n.type)==="URDFLink")){const d={name:n==null?void 0:n.name,label:n==null?void 0:n.name,show:!0,level:r+1,isPenultimate:!1,type:n==null?void 0:n.type,id:n==null?void 0:n.id,limit:(n==null?void 0:n.limit)??"",children:m(n==null?void 0:n.children,r+1),path:n==null?void 0:n.name};a.push(d)}}),a},v=e=>e?[{name:e==null?void 0:e.name,label:e==null?void 0:e.name,show:!0,level:1,isPenultimate:!1,type:e==null?void 0:e.type,id:e==null?void 0:e.id,limit:(e==null?void 0:e.limit)??"",children:m(e==null?void 0:e.children,1)||[],path:e==null?void 0:e.name}]:[],y=(e,r)=>{const a=[],n=[...e];for(;n.length>0&&a.length<r;){const d=n.shift();d.children&&d.children.length>0&&(a.push(d.id),n.push(...d.children))}return a},g=(e,r)=>{const a=[];return e.forEach(n=>{if(n.children&&n.children.length>0){a.push(n.id);const d=n.children.filter(h=>h.children&&h.children.length>0).slice(0,r).map(h=>h.id);a.push(...d)}}),a.slice(0,r+1)},k=t.computed(()=>!c.value||c.value.length===0?[]:l.expandStrategy==="firstLevel"?g(c.value,l.maxExpandCount):y(c.value,l.maxExpandCount)),s=t.computed(()=>[{name:"场景",label:"场景",show:!0,level:1,isPenultimate:!1,type:"场景",id:"场景",children:l!=null&&l.model?v(l.model):[],path:"场景"}]),p=()=>{const e=l.extraNodes||[],r=e==null?void 0:e.map(a=>({...a,level:0}));c.value.push(...r)};return t.watch(s,e=>{c.value=JSON.parse(JSON.stringify(e)),p()},{immediate:!0}),(e,r)=>{const a=t.resolveComponent("el-tree");return t.openBlock(),t.createElementBlock("div",z,[t.createVNode(a,{data:c.value,props:f,"default-expanded-keys":k.value,"node-key":G,onNodeClick:_},null,8,["data","default-expanded-keys"])])}}},W=J._export_sfc(Q,[["__scopeId","data-v-7f54bf51"]]);exports.JointPanel=H;exports.UrdfTree=W;exports.getAllLinkName=w;exports.getMeshFromJoint=F;exports.getMeshFromLink=L;exports.getNonFixedJoints=M;exports.getTargetJoint=E;
1
+ "use strict";const t=require("vue"),x=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E=(o,i)=>{if(!i)return null;const l=o.joints[i];return l||null},F=(o,i)=>{if(!i)return null;const l=E(o,i);if(!l)return null;let u=null;return l.traverse(c=>{c instanceof x.Mesh&&!u&&(u=c)}),u},N=(o,i)=>{if(!i)return null;const l=o.links[i];return l||null},L=(o,i)=>{if(!i)return null;const l=N(o,i);if(!l)return null;let u=null;return l.traverse(c=>{c instanceof x.Mesh&&!u&&(u=c)}),u},V=o=>{const i=o.joints;return Object.values(i)},M=o=>V(o).filter(u=>u.jointType!=="fixed"),w=o=>{const i=o.links;return Object.keys(i)},B={class:"panel-content"},b={key:0,class:"joints-list"},I={class:"joint-info-row"},S={class:"joint-left"},C={class:"joint-name"},D={class:"joint-range"},P={class:"joint-type"},T={key:0,class:"joint-control-row"},A={class:"slider-container"},U=["min","max","value","onInput"],R={class:"value-display"},q={class:"joint-value"},O={class:"unit"},K={key:1,class:"empty-state"},$=t.defineComponent({__name:"urdfJointPanel",props:{model:{}},setup(o,{expose:i}){const l=o,u=t.ref([]),c=t.ref(null),f=(s,p=!1)=>s==="revolute"?p?Math.PI:-Math.PI:s==="prismatic"?p?1:-1:0,_=s=>{if(!s||!s.joints)return console.warn("URDF模型无效或不包含关节信息"),[];const p=[];return V(s).forEach(r=>{var n,d;if(r.jointType==="fixed")return;let a={lower:((n=r.limit)==null?void 0:n.lower)??f(r.jointType,!1),upper:((d=r.limit)==null?void 0:d.upper)??f(r.jointType,!0)};r.jointType==="continuous"&&(a={lower:-10*Math.PI,upper:10*Math.PI}),p.push({name:r.name,type:r.jointType||"unknown",limit:a,currentValue:r.angle||0,urdfJoint:r})}),p},m=(s,p)=>{var n;const e=u.value.find(d=>d.name===s);if(!e)return;const r=parseFloat(p),a=Math.max(e.limit.lower,Math.min(e.limit.upper,r));e.currentValue=a,(n=l.model)!=null&&n.setJointValue?l.model.setJointValue(s,a):e.urdfJoint.setJointValue(a)},v=()=>{u.value.forEach(s=>{(s.type==="revolute"||s.type==="continuous"||s.type==="prismatic")&&m(s.name,0)})},y=()=>{l.model&&u.value.forEach(s=>{s.urdfJoint.angle!==void 0&&s.currentValue!==s.urdfJoint.angle&&(s.currentValue=s.urdfJoint.angle)})},g=()=>{const s=()=>{y(),c.value=requestAnimationFrame(s)};s()},k=()=>{c.value&&(cancelAnimationFrame(c.value),c.value=null)};return t.watch(()=>l.model,s=>{s?u.value=_(s):u.value=[]},{immediate:!0}),t.onMounted(()=>{g()}),t.onUnmounted(()=>{k()}),i({resetAllJoints:v}),(s,p)=>(t.openBlock(),t.createElementBlock("div",B,[u.value.length>0?(t.openBlock(),t.createElementBlock("div",b,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,e=>(t.openBlock(),t.createElementBlock("div",{key:e.name,class:"joint-item"},[t.createElementVNode("div",I,[t.createElementVNode("div",S,[t.createElementVNode("span",C,t.toDisplayString(e.name),1),t.createElementVNode("span",D," ["+t.toDisplayString(e.limit.lower.toFixed(2))+", "+t.toDisplayString(e.limit.upper.toFixed(2))+"] ",1)]),t.createElementVNode("span",P,t.toDisplayString(e.type),1)]),e.type==="revolute"||e.type==="prismatic"||e.type==="continuous"?(t.openBlock(),t.createElementBlock("div",T,[t.createElementVNode("div",A,[t.createElementVNode("input",{type:"range",min:e.limit.lower,max:e.limit.upper,step:"0.001",value:e.currentValue,onInput:r=>m(e.name,r.target.value),class:"joint-slider"},null,40,U)]),t.createElementVNode("div",R,[t.createElementVNode("span",q,t.toDisplayString(e.currentValue?Number(e.currentValue).toFixed(3):"0.000"),1),t.createElementVNode("span",O,t.toDisplayString(e.type==="prismatic"?"m":"rad"),1)])])):t.createCommentVNode("",!0)]))),128))])):(t.openBlock(),t.createElementBlock("div",K,p[0]||(p[0]=[t.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}}),H=J._export_sfc($,[["__scopeId","data-v-750b831d"]]),z={class:"panel-content"},G="id",Q={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:o=>["breadth","firstLevel"].includes(o)},extraNodes:{type:Array,default:[]}},emits:["nodeClick"],setup(o,{emit:i}){const l=o,u=i,c=t.ref([]),f={children:"children",label:"label"},_=e=>{u("nodeClick",e)},m=(e,r=0)=>{const a=[];return Array.isArray(e)&&(e==null?void 0:e.length)>0&&e.forEach(n=>{if(!(n!=null&&n.isMesh)&&((n==null?void 0:n.type)==="URDFJoint"||(n==null?void 0:n.type)==="URDFLink")){const d={name:n==null?void 0:n.name,label:n==null?void 0:n.name,show:!0,level:r+1,isPenultimate:!1,type:n==null?void 0:n.type,id:n==null?void 0:n.id,limit:(n==null?void 0:n.limit)??"",children:m(n==null?void 0:n.children,r+1),path:n==null?void 0:n.name};a.push(d)}}),a},v=e=>e?[{name:e==null?void 0:e.name,label:e==null?void 0:e.name,show:!0,level:1,isPenultimate:!1,type:e==null?void 0:e.type,id:e==null?void 0:e.id,limit:(e==null?void 0:e.limit)??"",children:m(e==null?void 0:e.children,1)||[],path:e==null?void 0:e.name}]:[],y=(e,r)=>{const a=[],n=[...e];for(;n.length>0&&a.length<r;){const d=n.shift();d.children&&d.children.length>0&&(a.push(d.id),n.push(...d.children))}return a},g=(e,r)=>{const a=[];return e.forEach(n=>{if(n.children&&n.children.length>0){a.push(n.id);const d=n.children.filter(h=>h.children&&h.children.length>0).slice(0,r).map(h=>h.id);a.push(...d)}}),a.slice(0,r+1)},k=t.computed(()=>!c.value||c.value.length===0?[]:l.expandStrategy==="firstLevel"?g(c.value,l.maxExpandCount):y(c.value,l.maxExpandCount)),s=t.computed(()=>[{name:"场景",label:"场景",show:!0,level:1,isPenultimate:!1,type:"场景",id:"场景",children:l!=null&&l.model?v(l.model):[],path:"场景"}]),p=()=>{const e=l.extraNodes||[],r=e==null?void 0:e.map(a=>({...a,level:0}));c.value.push(...r)};return t.watch(s,e=>{c.value=JSON.parse(JSON.stringify(e)),p()},{immediate:!0}),(e,r)=>{const a=t.resolveComponent("el-tree");return t.openBlock(),t.createElementBlock("div",z,[t.createVNode(a,{data:c.value,props:f,"default-expanded-keys":k.value,"node-key":G,onNodeClick:_},null,8,["data","default-expanded-keys"])])}}},W=J._export_sfc(Q,[["__scopeId","data-v-7f54bf51"]]);exports.JointPanel=H;exports.UrdfTree=W;exports.getAllLinkName=w;exports.getMeshFromJoint=F;exports.getMeshFromLink=L;exports.getNonFixedJoints=M;exports.getTargetJoint=E;