ss-component-new 1.1.1007 → 1.2.1

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 (132) hide show
  1. package/dist/OrbitControls-D1lM0xvz.cjs +1 -0
  2. package/dist/OrbitControls-DI8fa9gz.js +419 -0
  3. package/dist/STLLoader-KxFIlfhN.cjs +6 -0
  4. package/dist/STLLoader-memlq1bT.js +609 -0
  5. package/dist/{animationData-Bu38Hl4M.js → animationData-BDq02_ir.js} +14 -14
  6. package/dist/animationData-BRDoJBuV.cjs +1 -0
  7. package/dist/{array-DljC5ibo.js → array-A59WrroX.js} +1 -1
  8. package/dist/{array-BPHS7JFA.cjs → array-BtZq8qON.cjs} +1 -1
  9. package/dist/config.js +1 -1
  10. package/dist/{iconfont-pt17sMx3.js → iconfont-7cEds3Xj.js} +2 -2
  11. package/dist/{iconfont-t5epssvu.cjs → iconfont-CsuwJCas.cjs} +1 -1
  12. package/dist/{index-d6tSWKtY.cjs → index-1z9RrjZc.cjs} +1 -1
  13. package/dist/{index-QSIG57Cs.cjs → index-6t33eejU.cjs} +1 -1
  14. package/dist/{index-DqAoBcTD.cjs → index-B1ul2ExO.cjs} +1 -1
  15. package/dist/{index-BlbmO49N.js → index-B35e4i9n.js} +2 -2
  16. package/dist/{index-Da8C2puT.js → index-B9j8fCyS.js} +2 -2
  17. package/dist/index-BB6zZsmY.cjs +1 -0
  18. package/dist/{index-Cxyot1Se.js → index-BTrjEMt1.js} +4 -4
  19. package/dist/{index-CZ3UyOmT.cjs → index-B_k7wRBo.cjs} +1 -1
  20. package/dist/{index-B2lf8ui6.cjs → index-BdL8I_2i.cjs} +1 -1
  21. package/dist/{index-DQ4-s08u.js → index-BeTQ6ief.js} +4 -4
  22. package/dist/{index--7AqRoC1.js → index-BgJn4mlV.js} +4 -4
  23. package/dist/{index-BCeME5xm.js → index-BqCCREh3.js} +6 -6
  24. package/dist/{index-D3DLg4SF.js → index-BvPC1LSv.js} +18 -18
  25. package/dist/{index-oNErZJKp.js → index-BwjuTBrR.js} +1 -1
  26. package/dist/index-BxPnA2or.js +7294 -0
  27. package/dist/{index-CabdCJxd.js → index-C23iUpXa.js} +7 -7
  28. package/dist/{index-VfEaAkaq.cjs → index-C3CD2NW8.cjs} +1 -1
  29. package/dist/{index-DmXN3-YT.js → index-C461j30b.js} +1 -1
  30. package/dist/{index-B8xZFJ-x.js → index-C6Uddqal.js} +2 -2
  31. package/dist/{index-BtHzGwZt.js → index-CFg3-0Tk.js} +2 -2
  32. package/dist/{index-BstWDfX-.cjs → index-CJzA3AAO.cjs} +1 -1
  33. package/dist/{index-BRJVgxUP.cjs → index-CNJzNn6z.cjs} +1 -1
  34. package/dist/{index-C-KrU6Qo.cjs → index-CVl84S8B.cjs} +1 -1
  35. package/dist/{index-CZEK1c2_.js → index-CYp77kPp.js} +176 -176
  36. package/dist/{index-BCIKC9PE.js → index-C_VamYcq.js} +6 -6
  37. package/dist/{index-CmlXlH2b.cjs → index-CjI5pDiU.cjs} +1 -1
  38. package/dist/{index-efKjAh7G.cjs → index-CrWFG4Wb.cjs} +1 -1
  39. package/dist/{index-DIehhXd9.cjs → index-Crd4LGue.cjs} +1 -1
  40. package/dist/{index-feAp8_X8.cjs → index-CtG-uyjY.cjs} +1 -1
  41. package/dist/{index-DHy1RHXi.cjs → index-CtPy-3S1.cjs} +1 -1
  42. package/dist/{index-D3VTHlZh.js → index-CvEj4aiY.js} +4 -4
  43. package/dist/{index-DzcelPVu.cjs → index-Cx302rHQ.cjs} +1 -1
  44. package/dist/{index-BrsIZVyD.cjs → index-CxnH4vfV.cjs} +1 -1
  45. package/dist/{index-hsKO-I_N.js → index-Cz03X-rX.js} +1 -1
  46. package/dist/{index-DxggSUtV.cjs → index-D8S0DVkq.cjs} +1 -1
  47. package/dist/{index-BuBVqjpx.js → index-DH0dVg0N.js} +7 -7
  48. package/dist/{index-oCii55Zs.cjs → index-DIm3MBK_.cjs} +1 -1
  49. package/dist/{index-CnqhOUek.js → index-DNE4QDIf.js} +3 -3
  50. package/dist/{index-BCXz_U9h.cjs → index-DQTI3BuS.cjs} +1 -1
  51. package/dist/{index-De9VWWmT.cjs → index-DS3OziT5.cjs} +1 -1
  52. package/dist/{index-Hm2_zeiV.js → index-DVvt9_w0.js} +1 -1
  53. package/dist/{index-DqhAoamS.cjs → index-DmB0dlGH.cjs} +1 -1
  54. package/dist/index-Dn9I5-1H.cjs +1 -0
  55. package/dist/{index-s1sBvg7-.cjs → index-DqaA5Rvx.cjs} +1 -1
  56. package/dist/{index-Bu-yHmJc.cjs → index-DqquxuCt.cjs} +1 -1
  57. package/dist/{index-DsIUgynO.js → index-DygW4mGC.js} +6 -6
  58. package/dist/{index-1gIP1dMc.cjs → index-HFf3Z0Ft.cjs} +1 -1
  59. package/dist/{index-BvDv1IKK.cjs → index-Kg96Vvn5.cjs} +1 -1
  60. package/dist/{index-DaBbEkRJ.js → index-N7dEiXLQ.js} +13 -13
  61. package/dist/index-TXrydBPq.cjs +1 -0
  62. package/dist/{index-BcBpmCfF.cjs → index-XQxaEXgz.cjs} +1 -1
  63. package/dist/{index-BHNtRl-8.js → index-Y5i13RsM.js} +3 -3
  64. package/dist/{index-CrKg8KZt.js → index-YQnrEK_K.js} +1069 -1061
  65. package/dist/{index-Jyps1gRD.js → index-aneoZx5F.js} +24 -24
  66. package/dist/{index-BdY8Qg-6.cjs → index-byBdKAky.cjs} +1 -1
  67. package/dist/{index-DWuAa5Ws.js → index-db5CgGrA.js} +394 -394
  68. package/dist/{index-TwtUdAMm.js → index-dqBbhGfy.js} +6 -6
  69. package/dist/{index-Dw_nYMhJ.cjs → index-gjDjqhNq.cjs} +2 -2
  70. package/dist/{index-K1m0RQMs.js → index-nq9fleOT.js} +2 -2
  71. package/dist/{index-oI1HUneF.js → index-qoqka5Nb.js} +1 -1
  72. package/dist/{index-DZHLGAn0.js → index-wHil9Fox.js} +2 -2
  73. package/dist/{index-Dtk-Fgm3.js → index-wq8KZGnQ.js} +5 -5
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CPiIzB84.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CzcK5mCc.cjs} +1 -1
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DC4zFlOQ.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dmm4yqcc.js} +2 -2
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DMhv31o4.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-B0Ivzvcp.js} +6 -6
  77. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DV4d1URg.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-xm0hMPwT.cjs} +1 -1
  78. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CMx9TLjC.cjs +56 -0
  79. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-Czu5g16A.js +37436 -0
  80. package/dist/{index.vue_vue_type_style_index_1_lang-DgDibOnl.js → index.vue_vue_type_style_index_1_lang-AXp5rRSK.js} +76 -76
  81. package/dist/{index.vue_vue_type_style_index_1_lang-B1fiFPmj.js → index.vue_vue_type_style_index_1_lang-BxEXAMMV.js} +5012 -5100
  82. package/dist/{index.vue_vue_type_style_index_1_lang-CwJCb_rE.cjs → index.vue_vue_type_style_index_1_lang-CXwGS60-.cjs} +45 -46
  83. package/dist/{index.vue_vue_type_style_index_1_lang-B2vK-1an.cjs → index.vue_vue_type_style_index_1_lang-j5HrYuvy.cjs} +1 -1
  84. package/dist/{isString-D3DhambW.js → isString-BNK38WbE.js} +1 -1
  85. package/dist/{isString-ChvWbctO.cjs → isString-BmAegMGI.cjs} +1 -1
  86. package/dist/{main-YesjKNW0.cjs → main-BgpAXuSa.cjs} +1 -1
  87. package/dist/{main-DjvWp72p.js → main-t7yIujwl.js} +5 -5
  88. package/dist/ss-component.cjs +1 -1
  89. package/dist/ss-component.css +1 -1
  90. package/dist/ss-component.js +11 -11
  91. package/dist/ss-component2.cjs +1 -1
  92. package/dist/ss-component2.js +12 -12
  93. package/dist/three-viewport-gizmo-BxFHxv_x.js +18587 -0
  94. package/dist/three-viewport-gizmo-CwaL5sMV.cjs +4195 -0
  95. package/dist/{threeLatheView-DfSxRY8B.cjs → threeLatheView-BzHB-t_G.cjs} +1 -1
  96. package/dist/{threeLatheView-Mc00lYo0.js → threeLatheView-sTBlm0tt.js} +4 -4
  97. package/dist/{threeModel-DgfyuwYi.js → threeModel-11Yk8w2d.js} +5 -5
  98. package/dist/{threeModel-B7tOOzr9.cjs → threeModel-BudPgWiX.cjs} +1 -1
  99. package/dist/threePreview-Cy7NY-gw.cjs +1 -0
  100. package/dist/threePreview-DPyqhBkJ.js +1873 -0
  101. package/dist/threeSceneView-Bwed326O.js +1469 -0
  102. package/dist/threeSceneView-DT-STxuj.cjs +5 -0
  103. package/dist/{threeSceneViewForCPMPIP-Dw2bZRas.js → threeSceneViewForCPMPIP-PgPPGBxu.js} +90 -91
  104. package/dist/{threeSceneViewForCPMPIP-fWzzwARt.cjs → threeSceneViewForCPMPIP-RRDb_tZ0.cjs} +3 -3
  105. package/dist/{threeViewerHost-C9qoD_Tp.cjs → threeViewerHost-Brgx-J3Q.cjs} +1 -1
  106. package/dist/{threeViewerHost-D6c0lK4U.js → threeViewerHost-k5I66uBW.js} +8 -8
  107. package/dist/useRayCaster-CLcetetd.cjs +1 -0
  108. package/dist/{useRayCaster-Y_Q5getG.js → useRayCaster-TCYe6KMI.js} +14 -14
  109. package/package.json +1 -1
  110. package/public/config.js +1 -1
  111. package/dist/OrbitControls-C0QRmW6_.js +0 -458
  112. package/dist/OrbitControls-Co_9huz0.cjs +0 -1
  113. package/dist/STLLoader-CiUjaQtA.js +0 -657
  114. package/dist/STLLoader-RU7KqloS.cjs +0 -6
  115. package/dist/animationData-BjR16KKI.cjs +0 -1
  116. package/dist/index-BIg5JGtJ.js +0 -3370
  117. package/dist/index-BgImAL2B.cjs +0 -1
  118. package/dist/index-BuijIgJr.cjs +0 -1
  119. package/dist/index-Daqeta0F.cjs +0 -1
  120. package/dist/index-LnraLHWy.js +0 -7214
  121. package/dist/index-ama5teB1.cjs +0 -1
  122. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CycvdKIn.js +0 -34104
  123. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DnbT8HgZ.cjs +0 -56
  124. package/dist/isUndefined-7lpU02Ef.cjs +0 -1
  125. package/dist/isUndefined-BqsKWawv.js +0 -84
  126. package/dist/three-viewport-gizmo-BV37JzRa.cjs +0 -4197
  127. package/dist/three-viewport-gizmo-CkQ98n-T.js +0 -26015
  128. package/dist/threePreview-ByUYJkts.cjs +0 -1
  129. package/dist/threePreview-CkZ9LLXO.js +0 -1972
  130. package/dist/threeSceneView-BxK4ycgs.js +0 -1472
  131. package/dist/threeSceneView-DK1eRng9.cjs +0 -5
  132. package/dist/useRayCaster-BkcK_aF1.cjs +0 -1
@@ -0,0 +1,5 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Z=require("./useRayCaster-CLcetetd.cjs"),T=require("./iconfont-CsuwJCas.cjs"),a=require("./three-viewport-gizmo-CwaL5sMV.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CzcK5mCc.cjs");const Y=require("./index-1z9RrjZc.cjs");require("./index.vue_vue_type_style_index_1_lang-j5HrYuvy.cjs");require("./index-BpPyaNFa.cjs");const W=require("./index-CrWFG4Wb.cjs");require("./index.vue_vue_type_style_index_1_lang-CXwGS60-.cjs");require("./index-CtPy-3S1.cjs");const he=require("./animationData-BRDoJBuV.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=require("./urdfTree-CCktg0FK.cjs"),J=.001,te=a.MathUtils.degToRad,ge=new a.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:a.DoubleSide});function Ne(C=.005,g=64){const E=new a.CatmullRomCurve3([new a.Vector3(0,0,0),new a.Vector3(0,0,0)]),s=new a.TubeGeometry(E,g,C,16,!1),N=ge;return new a.Mesh(s,N)}const be=C=>C.reduce((g,E)=>{let s=0;const N=E.Y??0,S=E.C??0,f=E.R??0;return N>0&&(s+=N),S>0&&f>0&&(s+=f*te(S)),g+s},0),we=C=>{const g=[],E=C.Y??0,s=C.B??0,N=C.C??0,S=C.R??0,f={pos:new a.Vector3(0,0,0),localY:new a.Vector3(0,1,0),localX:new a.Vector3(1,0,0),localZ:new a.Vector3(0,0,1)};if(!E&&!N)return g;if(g.push(f.pos.clone()),s!==0){const M=new a.Matrix4().makeRotationAxis(f.localY,te(s));f.localX.applyMatrix4(M),f.localZ.applyMatrix4(M)}if(E>0&&(f.pos.add(f.localY.clone().multiplyScalar(E*J)),g.push(f.pos.clone())),N>0&&S>0){const M=te(N),P=S*J,d=f.pos.clone().add(f.localX.clone().multiplyScalar(-P)),c=Math.max(16,Math.ceil(N/5));for(let V=1;V<=c;V++){const n=M*V/c,y=new a.Matrix4().makeRotationAxis(f.localZ,n),b=f.localX.clone().multiplyScalar(P).applyMatrix4(y),h=d.clone().add(b);g.push(h)}}return g};function Ce(C,g){const E=new a.Group;E.name="CompletePipe";const s={pos:new a.Vector3(0,0,0),localX:new a.Vector3(1,0,0),localY:new a.Vector3(0,1,0),localZ:new a.Vector3(0,0,1)};let N=0,S=1;for(let f=0;f<C.length;f++){const M=C[f],P=M.Y??0,d=M.B??0,c=M.C??0,V=M.R??0;if(d!==0){const n=new a.Matrix4().makeRotationAxis(s.localY,te(d));s.localX.applyMatrix4(n),s.localZ.applyMatrix4(n)}if(P>0){const n=s.pos.clone();s.pos.add(s.localY.clone().multiplyScalar(P*J));const y=s.pos.clone(),r=Ee(n,y,g*J);r.userData={segmentType:"straight",segmentIndex:N,frameIndex:f,length:P,frame:{Y:P,B:d,C:c,R:V}},r.name=`直段_${N}`,E.add(r);const b=n.clone();_e(E,S,b,g*J),N++}if(c>0&&V>0){const n=te(c),y=V*J,r=[];r.push(s.pos.clone());const b=s.pos.clone().add(s.localX.clone().multiplyScalar(-y)),h=Math.max(16,Math.ceil(c/5));for(let k=1;k<=h;k++){const I=n*k/h,D=new a.Matrix4().makeRotationAxis(s.localZ,I),j=s.localX.clone().multiplyScalar(y).applyMatrix4(D),Q=b.clone().add(j);r.push(Q)}const x=xe(r,g*J);x.userData={segmentType:"bend",segmentIndex:N,frameIndex:f,angle:c,radius:V,centerPoint:b.toArray(),frame:{Y:P,B:d,C:c,R:V}},x.name=`弯段_${N}`,E.add(x),Math.floor(r.length/2),r[0],s.pos=r[r.length-1].clone();const m=new a.Matrix4().makeRotationAxis(s.localZ,n);s.localY.applyMatrix4(m),s.localX.applyMatrix4(m),N++,S++}}return E}function _e(C,g,E,s){const N=new a.Vector3(0,s*2,s*5),S=E.clone().add(N),f=[E,S],M=new a.BufferGeometry().setFromPoints(f),P=new a.LineDashedMaterial({color:16711680,dashSize:s*.5,gapSize:s*.3,linewidth:1}),d=new a.Line(M,P);d.computeLineDistances(),C.add(d);const c=document.createElement("canvas"),V=c.getContext("2d");c.width=128,c.height=128,V.clearRect(0,0,128,128),V.fillStyle="#FF0000",V.font="bold 80px Arial",V.textAlign="center",V.textBaseline="middle",V.fillText(g.toString(),64,64);const n=new a.CanvasTexture(c),y=new a.SpriteMaterial({map:n,transparent:!0,depthTest:!1,depthWrite:!1}),r=new a.Sprite(y),b=s*3;r.scale.set(b,b,1),r.position.copy(S),r.name=`Label_${g}`,r.userData={labelNumber:g},C.add(r)}function Ee(C,g,E){const s=new a.LineCurve3(C,g),N=new a.TubeGeometry(s,2,E,18,!1);return new a.Mesh(N,ge)}function xe(C,g){const E=new a.CatmullRomCurve3(C,!1,"catmullrom",.01),s=new a.TubeGeometry(E,Math.max(16,C.length*2),g,18,!1);return new a.Mesh(s,ge)}function re(C,g,E,s,N,S=0){let f=g.slice(0,N+1);const M=g[N+1];if(M&&S>0){const r={...M,B:(M.B??0)*S,C:(M.C??0)*S};f.push(r)}const P=be(f),d=Math.max(0,E-P),c=[];c.push(new a.Vector3(0,0,0));const V=new a.Vector3(0,d*J,0);d>0&&c.push(V);let n={pos:V.clone(),localY:new a.Vector3(0,1,0),localX:new a.Vector3(1,0,0),localZ:new a.Vector3(0,0,1)};const y=[];for(let r=f.length-1;r>=0;r--){const b=f[r],h=we(b);if(h.length>0){const x=h.map(D=>{const R=D.clone(),j=new a.Matrix4;return j.makeBasis(n.localX,n.localY,n.localZ),R.applyMatrix4(j),R.add(n.pos)});y.push(x);const m=x[x.length-1];n.pos=m.clone();const k=b.B??0,I=b.C??0;if(k!==0){const D=new a.Matrix4().makeRotationAxis(n.localY,te(k));n.localX.applyMatrix4(D),n.localZ.applyMatrix4(D)}if(I>0){const D=te(I),R=new a.Matrix4().makeRotationAxis(n.localZ,D);n.localY.applyMatrix4(R),n.localX.applyMatrix4(R)}}}for(const r of y)r.length>1&&c.push(...r.slice(1));c.length<2&&c.push(new a.Vector3(0,.001,0));try{const r=new a.CatmullRomCurve3(c,!1,"catmullrom",.01),b=new a.TubeGeometry(r,Math.max(2,c.length*4),s*J,18,!1);C.geometry.dispose(),C.geometry=b}catch(r){console.error("管件更新失败",r)}}function ye(C,g,E,s=0){let N=C.slice(0,E+1);const S=C[E+1];if(S&&s>0){const n={...S,B:(S.B??0)*s,C:(S.C??0)*s};N.push(n)}const f=be(N),M=Math.max(0,g-f),P=[];P.push(new a.Vector3(0,0,0));const d=new a.Vector3(0,M*J,0);M>0&&P.push(d);let c={pos:d.clone(),localY:new a.Vector3(0,1,0),localX:new a.Vector3(1,0,0),localZ:new a.Vector3(0,0,1)};const V=[];for(let n=N.length-1;n>=0;n--){const y=N[n],r=we(y);if(r.length>0){const b=r.map(k=>{const I=k.clone(),D=new a.Matrix4;return D.makeBasis(c.localX,c.localY,c.localZ),I.applyMatrix4(D),I.add(c.pos)});V.push(b);const h=b[b.length-1];c.pos=h.clone();const x=y.B??0,m=y.C??0;if(x!==0){const k=new a.Matrix4().makeRotationAxis(c.localY,te(x));c.localX.applyMatrix4(k),c.localZ.applyMatrix4(k)}if(m>0){const k=te(m),I=new a.Matrix4().makeRotationAxis(c.localZ,k);c.localY.applyMatrix4(I),c.localX.applyMatrix4(I)}}}for(const n of V)n.length>1&&P.push(...n.slice(1));return P.length<2&&P.push(new a.Vector3(0,.001,0)),P}function ne(C,g,E,s,N,S,f,M=0,P=0){const d=N-P,c=ye(s,d,f,M);let n=ye(E,P,f,M);n.forEach(r=>r.y=-r.y),n.reverse();const y=[...n,...c];try{const r=new a.CatmullRomCurve3(y,!1,"catmullrom",.01),b=new a.TubeGeometry(r,Math.max(2,y.length*4),S*J,18,!1);g.geometry.dispose(),C.geometry.dispose(),g.parent&&g.parent.remove(g),C.geometry=b}catch(r){console.error("管件更新失败",r)}}const Me={class:"panel-content"},Se={class:"action-bar"},ke={key:0,class:"animation-controls"},Pe={class:"control-row"},De={class:"control-row"},Re={class:"frame-info"},Te={class:"control-row"},$e={class:"progress-bar"},Be={class:"dialog-footer"},Ae=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},emits:["getThreeData"],setup(C,{expose:g,emit:E}){const s=C,N=E,S=e.ref(),f=e.ref(),M=e.ref();e.watch(()=>s.threeData,o=>{const t=o==null?void 0:o.data;M.value=t==null?void 0:t.type},{immediate:!0});const P=async()=>{if(!sessionStorage.getItem("systemKey")){N("getThreeData");return}let t={};M.value===Z.robotMode.SINGLE&&(t=await he.fetchSingleRobotAnimationData()),M.value===Z.robotMode.DOUBLE&&(t=await he.fetchDoubleRobotAnimationData());const{initialPipeLength:u=0,pipeRadius:_=0,clampLength:p=0,animationData:$}=t;D.value=u,R.value=_,j.value=p,S.value=$;const F=Y.cloneDeep(S.value);d.value=(F==null?void 0:F["输出(动画数据)"])||[];let i=(F==null?void 0:F["输出(动画数据)Content"])??[];i&&(f.value=i)},d=e.ref([]),c=e.ref(!1),V=e.ref(""),n=e.ref(!1),y=e.ref(0),r=e.ref(0),b=e.ref(1e3),h=e.ref(null);let x=!1;const m=e.shallowRef(null),k=e.shallowRef(null),I=e.shallowRef(null),D=e.ref(1302),R=e.ref(12.5),j=e.ref(30),Q=e.ref([]),A=e.ref(null),w=e.computed(()=>s.model?Object.values(s.model.joints).filter(o=>o.jointType!=="fixed").map(o=>o.name):[]),X=e.ref(["Y","B","C","R"]),L=e.computed(()=>[...w.value,...X.value]),G=e.computed(()=>L.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
+ ${L.value.join(" ")}
3
+ 0 0 0 ...
4
+ 1 2 3 ...`:"请先加载模型。"),q=(o,t)=>{if(!t)return null;const u=o.joints[t];if(!u)return console.warn(`在模型中未找到名为 '${t}' 的 Joint`),null;let _=null;return u.traverse(p=>{p instanceof a.Mesh&&!_&&(_=p)}),_||console.warn(`在 Joint '${t}' 中未找到可用的 Mesh 对象`),_},oe=(o,t)=>{if(!t)return null;const u=o.joints[t];return u||(console.warn(`在模型中未找到名为 '${t}' 的 Joint`),console.log("可用的链接:",Object.keys(o.links)),null)},ee=()=>{I.value&&(I.value.visible=!0),m.value&&m.value.parent&&m.value.parent.remove(m.value),I.value=null,m.value=null,k.value=null};e.watch(L,(o,t)=>{if(JSON.stringify(o)!==JSON.stringify(t))if(o.length>0){const u=o.reduce((_,p)=>(_[p]="0",_),{});d.value=[u]}else d.value=[]},{immediate:!0});const H=(o,t)=>{const u=oe(o,t),_=Ne();_.visible=!1,u==null||u.add(_)};e.watch(()=>s.model,o=>{ee(),o?(h.value=new Z.URDFRobotController(o),Q.value=Object.keys(o.links),A.value="Pipe_Joint",H(o,A.value)):(h.value=null,Q.value=[],A.value=null)},{immediate:!0}),e.watch([A,j],([o,t])=>{if(ee(),s.model&&o){const u=q(s.model,o);if(console.log(u,"meshToReplace"),u&&u.parent){I.value=u;const _=new a.Mesh(u.geometry.clone(),u.material);if(_.name="managed_pipe_clone",u.parent.add(_),_.position.copy(u.position),_.rotation.copy(u.rotation),_.scale.copy(u.scale),u.visible=!1,M.value===Z.robotMode.SINGLE&&(_.position.y-=t*.001),m.value=_,M.value===Z.robotMode.DOUBLE){const p=new a.Mesh(u.geometry.clone(),u.material);p.name="managed_oppsite_pipe_clone",p.position.copy(u.position),p.rotation.copy(u.rotation),p.scale.copy(u.scale),u.parent.add(p),k.value=p}m.value&&k.value&&ne(m.value,k.value,[],[],D.value,R.value,0,0,j.value)}else o&&console.warn(`在 link '${o}' 中未找到可替换的网格或其没有父级。`)}});const z=()=>d.value.map(o=>({Y:parseFloat(o.Y)||0,B:parseFloat(o.B)||0,C:parseFloat(o.C)||0,R:parseFloat(o.R)||0})),K=()=>{const o=[],t=[];return d.value.forEach(u=>{const{Y1:_,B1:p,C1:$,R1:F,Y2:i,B2:l,C2:O,R2:v}=u;o.push({Y:parseFloat(_)||0,B:parseFloat(p)||0,C:parseFloat($)||0,R:parseFloat(F)||0}),t.push({Y:parseFloat(i)||0,B:parseFloat(l)||0,C:parseFloat(O)||0,R:parseFloat(v)||0})}),{posPipeYbcr:o,negPipeYbcr:t}},B=o=>{if(o<0||o>=d.value.length){console.error(`帧索引 ${o} 超出范围`);return}const t=d.value[o];if(console.log(`应用第 ${o} 帧数据 ${t}`),y.value=o,h.value){const u={};w.value.forEach(_=>{const p=parseFloat(t[_]);isNaN(p)||(u[_]=p)}),h.value.setJointAngles(u)}if(m.value&&k.value){const u=K();console.log("ybcr数据:",u),ne(m.value,k.value,u.posPipeYbcr,u.negPipeYbcr,D.value,R.value,o,0,j.value);return}if(m.value){const u=z();console.log("ybcr数据:",u),re(m.value,u,D.value,R.value,o,0);return}},ae=async()=>{if(d.value.length===0){Y.ElMessage.error("无法播放动画:无数据");return}n.value=!0,x=!1;const o=m.value?z():[];try{for(let t=y.value+1;t<d.value.length&&!x;t++){y.value=t;const u=d.value[t],_={};h.value&&w.value.forEach(p=>{const $=parseFloat(u[p]);isNaN($)||(_[p]=$)}),h.value?await h.value.animateToState(_,b.value,p=>{if(r.value=(t+p)/d.value.length*100,m.value&&k.value){const $=K();console.log("ybcr数据:",o),ne(m.value,k.value,$.posPipeYbcr,$.negPipeYbcr,D.value,R.value,t-1,p,j.value)}else m.value&&re(m.value,o,D.value,R.value,t-1,p)}):m.value&&k.value?await new Promise(p=>{const $=performance.now();let F;const i=l=>{if(x){cancelAnimationFrame(F),p();return}const O=l-$,v=Math.min(O/b.value,1);r.value=(t+v)/d.value.length*100;const U=K();ne(m.value,k.value,U.posPipeYbcr,U.negPipeYbcr,D.value,R.value,t-1,v,j.value),v<1?F=requestAnimationFrame(i):p()};F=requestAnimationFrame(i)}):m.value?await new Promise(p=>{const $=performance.now();let F;const i=l=>{if(x){cancelAnimationFrame(F),p();return}const O=l-$,v=Math.min(O/b.value,1);r.value=(t+v)/d.value.length*100,re(m.value,o,D.value,R.value,t-1,v),v<1?F=requestAnimationFrame(i):p()};F=requestAnimationFrame(i)}):(await new Promise(p=>setTimeout(p,b.value)),r.value=(t+1)/d.value.length*100)}x||Y.ElMessage.success("动画播放完成")}catch(t){console.error("动画播放出错:",t),Y.ElMessage.error("动画播放出错")}finally{n.value=!1,r.value=0}},le=()=>{x=!0,n.value=!1,r.value=0,Y.ElMessage.info("动画已停止")},ie=()=>{if(h.value&&h.value.resetToZero(),console.log("pipeMesh.value",m.value),m.value&&k.value){const o=K();ne(m.value,k.value,o.posPipeYbcr,o.negPipeYbcr,D.value,R.value,-1,0,j.value)}else if(m.value){const o=z();re(m.value,o,D.value,R.value,-1,0)}y.value=0,Y.ElMessage.success("机器人和管件已重置")},ce=()=>{console.log("当前管件Mesh:",m.value)},ue=o=>{n.value&&le(),B(o)},de=()=>{n.value&&le(),!(y.value+1>=d.value.length)&&B(y.value+1)},pe=()=>{n.value&&le(),y.value!==0&&B(y.value-1)},me=async()=>{if(L.value.length===0){Y.ElMessage.warning("没有可导出的表头");return}const o=L.value.join(" ");try{await navigator.clipboard.writeText(o),Y.ElMessage.success("表头已成功复制到剪贴板!")}catch(t){console.error("复制失败:",t),Y.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},ve=()=>{if(!V.value.trim()){Y.ElMessage.warning("导入内容不能为空");return}const o=V.value.trim().split(`
5
+ `).filter($=>$.trim()!=="");if(o.length<2){Y.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const t=o[0].split(" ").map($=>$.trim()),u={};if(t.forEach(($,F)=>{L.value.includes($)&&(u[F]=$)}),Object.keys(u).length===0){Y.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const p=o.slice(1).map($=>{const F=$.split(" "),i={};return L.value.forEach(l=>{i[l]="0"}),Object.entries(u).forEach(([l,O])=>{const v=F[parseInt(l)];v!==void 0&&v.trim()!==""&&(i[O]=v.trim())}),i});p.length>0?(d.value=p,Y.ElMessage.success(`成功导入 ${p.length} 行数据!`),c.value=!1,V.value=""):Y.ElMessage.error("未能解析到有效数据,请检查格式。")},se=o=>`第 ${o+1} 帧`;return e.onUnmounted(()=>{ee(),x=!0}),g({playAnimation:ae,stopAnimation:le,forwardFrame:de,backwardFrame:pe}),(o,t)=>{const u=e.resolveComponent("el-icon"),_=e.resolveComponent("el-input-number"),p=e.resolveComponent("el-form-item"),$=e.resolveComponent("el-form"),F=e.resolveComponent("el-slider"),i=e.resolveComponent("el-progress"),l=e.resolveComponent("el-input"),O=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",Me,[e.createElementVNode("div",Se,[e.createVNode(W._sfc_main,{onClick:P,modelValue:"获取数据"}),e.createVNode(W._sfc_main,{onClick:me,disabled:L.value.length===0,modelValue:"导出表头"},null,8,["disabled"]),e.createVNode(W._sfc_main,{modelValue:"播放",onClick:ae,disabled:d.value.length===0||n.value,buttonType:"primary"},{default:e.withCtx(()=>[n.value?(e.openBlock(),e.createBlock(u,{key:0,class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.loading_default))]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["disabled"]),e.createVNode(W._sfc_main,{onClick:le,modelValue:"停止",buttonType:"danger"}),e.createVNode(W._sfc_main,{onClick:ie,modelValue:"重置",buttonType:"primary"}),e.createVNode(W._sfc_main,{onClick:ce,modelValue:"测试功能",buttonType:"primary"})]),d.value.length>0?(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",Pe,[e.createVNode($,{"label-width":"auto",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(p,{label:"帧间隔 (ms):",prop:"frameDuration"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:b.value,"onUpdate:modelValue":t[0]||(t[0]=v=>b.value=v),min:100,max:5e3,step:100,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"管件总长 (mm):",prop:"initialPipeLength"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:D.value,"onUpdate:modelValue":t[1]||(t[1]=v=>D.value=v),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"管件半径 (mm):",prop:"pipeRadius"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:R.value,"onUpdate:modelValue":t[2]||(t[2]=v=>R.value=v),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"夹持长度 (mm):",prop:"clampLength"},{default:e.withCtx(()=>[e.createVNode(_,{modelValue:j.value,"onUpdate:modelValue":t[3]||(t[3]=v=>j.value=v),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),t[10]||(t[10]=e.createElementVNode("div",{class:"control-row"},[e.createElementVNode("label",null,"管件 Mesh:")],-1)),e.createElementVNode("div",De,[t[8]||(t[8]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Re,e.toDisplayString(y.value+1)+" / "+e.toDisplayString(d.value.length),1)]),e.createElementVNode("div",Te,[t[9]||(t[9]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(F,{modelValue:y.value,"onUpdate:modelValue":t[4]||(t[4]=v=>y.value=v),min:0,max:d.value.length>0?d.value.length-1:0,step:1,"format-tooltip":se,onInput:ue,disabled:d.value.length===0,style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",$e,[e.createVNode(i,{percentage:r.value,"show-text":!1,"stroke-width":6},null,8,["percentage"])])])):e.createCommentVNode("",!0),e.createVNode(O,{modelValue:c.value,"onUpdate:modelValue":t[7]||(t[7]=v=>c.value=v),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",Be,[e.createVNode(W._sfc_main,{modelValue:"取消",onClick:t[6]||(t[6]=v=>c.value=!1)}),e.createVNode(W._sfc_main,{modelValue:"确认导入",onClick:ve,type:"primary"})])]),default:e.withCtx(()=>[t[11]||(t[11]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或csv中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(l,{modelValue:V.value,"onUpdate:modelValue":t[5]||(t[5]=v=>V.value=v),type:"textarea",rows:10,placeholder:G.value},null,8,["modelValue","placeholder"])]),_:1,__:[11]},8,["modelValue"])])}}}),ze=fe._export_sfc(Ae,[["__scopeId","data-v-e955dfd2"]]),Fe="http://139.196.154.85:20018";function Ye(C,g=!1){return console.log(C,"data"),Y.service({url:`${Fe}/api/pipeBendingTraditional/pipeAnsys/${g}`,method:"post",data:C})}const Ie={class:"pipe-analysis-dialog-header"},Le={class:"header-right"},je={class:"pipe-analysis-dialog-body"},Ue={class:"panel-left"},Oe={class:"pipe-analysis-input"},Xe={class:"input-params"},Ge={class:"step-label"},qe={class:"button-group"},Ze={class:"upload-content"},Je={class:"file-item"},He={key:0},Ke={class:"pipe-analysis-output"},We={class:"ouput-params"},Qe=e.defineComponent({__name:"pipeAnalysisPanel",emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(C,{expose:g,emit:E}){const s=e.ref(null),N=e.shallowRef(null),{initThreeJS:S,handleResize:f,cleanup:M,clearAllModels:P,addModelAndFit:d}=T.useThreeJS(s),c=e.ref(null),V=e.ref({file:null}),n=e.ref(null),y=e.ref(!1),r=()=>{var A;(A=c.value)==null||A.click()},b=async A=>{var L;const X=(L=A.target.files)==null?void 0:L[0];X&&(n.value=X)};e.ref("ybcr");const h=e.ref({form:{},list:[],reverse:!1}),x=async()=>{var A;if(!n.value){Y.ElMessage.warning("请先选择文件");return}try{y.value=!0;const w=new FormData;w.set("file",n.value);let X=!1;((A=h.value)==null?void 0:A.reverse)==!0&&(X=!0);const{data:{data:L}={}}=await Ye(w,X);m(L),Y.ElMessage.success("提交成功")}catch(w){Y.ElMessage.error("提交失败,请重试"),console.error("提交错误:",w)}finally{y.value=!1}},m=A=>{const{length:w,outerDiameter:X,innerDiameter:L,thickness:G,ybcrList:q}=A||{};h.value.form={length:w,outerDiameter:X,innerDiameter:L,thickness:G},h.value.list=q},k=()=>{const{form:A,list:w}=h.value,{outerDiameter:X}=A,L=X/2,G=w==null?void 0:w.map(oe=>{const{y:ee,b:H,c:z,r:K}=oe;return{Y:ee,B:H,C:z,R:K}});P();const q=Ce(G,L);d(q)},I=e.ref(!1),D=()=>{const A=I.value;I.value=!A},R=e.ref(!1),j=()=>{R.value=!1},Q=()=>{R.value=!0};return e.watch(()=>h,()=>{k()},{deep:!0}),e.watch(()=>s,()=>{try{if(N.value)return;S(),window.addEventListener("resize",f)}catch(A){console.error("Three.js 初始化失败:",A),Y.ElMessage.error("渲染引擎初始化失败!")}},{deep:!0}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",f),M()}),g({openDialog:Q}),(A,w)=>{const X=e.resolveComponent("el-icon"),L=e.resolveComponent("el-button"),G=e.resolveComponent("el-form-item"),q=e.resolveComponent("el-form"),oe=e.resolveComponent("el-option"),ee=e.resolveComponent("el-select"),H=e.resolveComponent("el-input"),z=e.resolveComponent("el-table-column"),K=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(W.ssDialog,{class:"pipe-analysis-dialog",visible:R.value,onBeforeDestroy:A.onDestroy,showClose:!1,fullScreen:I.value},{header:e.withCtx(()=>[e.createElementVNode("div",Ie,[w[5]||(w[5]=e.createElementVNode("div",{class:"header-left",title:"管件解析"}," 管件解析 ",-1)),e.createElementVNode("div",Le,[e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Y.full_screen_default),{onClick:D})]),_:1}),e.createVNode(X,null,{default:e.withCtx(()=>[e.createVNode(e.unref(Y.close_default),{onClick:j})]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",je,[e.createElementVNode("div",Ue,[e.createElementVNode("div",Oe,[w[8]||(w[8]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输入")],-1)),e.createElementVNode("div",Xe,[e.createVNode(q,{model:V.value,"label-width":"auto","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(G,{label:"step文件"},{label:e.withCtx(()=>[e.createElementVNode("div",Ge,[w[7]||(w[7]=e.createElementVNode("div",null," step文件 ",-1)),e.createElementVNode("div",qe,[e.createVNode(W._sfc_main,{emptyColor:!0,onClickTrigger:r,modelValue:"上传"}),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:c,accept:".step,.csv",onChange:b,style:{display:"none"}},null,544),e.createVNode(L,{type:"primary",onClick:x,loading:y.value,disabled:!n.value},{default:e.withCtx(()=>w[6]||(w[6]=[e.createTextVNode(" 解析 ")])),_:1,__:[6]},8,["loading","disabled"])])])]),default:e.withCtx(()=>{var B;return[e.createElementVNode("div",Ze,[e.createElementVNode("div",Je,[n.value?(e.openBlock(),e.createElementBlock("div",He,e.toDisplayString((B=n.value)==null?void 0:B.name),1)):e.createCommentVNode("",!0)])])]}),_:1})]),_:1},8,["model"])])]),e.createElementVNode("div",Ke,[e.createVNode(G,{label:"加工方向"},{default:e.withCtx(()=>[e.createVNode(ee,{modelValue:h.value.reverse,"onUpdate:modelValue":w[0]||(w[0]=B=>h.value.reverse=B),placeholder:"请选择加工方向"},{default:e.withCtx(()=>[e.createVNode(oe,{label:"正向",value:!1}),e.createVNode(oe,{label:"反向",value:!0})]),_:1},8,["modelValue"])]),_:1}),w[9]||(w[9]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输出(弯管基础参数)")],-1)),e.createElementVNode("div",We,[e.createVNode(q,{model:h.value.form,"label-width":"auto","label-position":"top",inline:!0},{default:e.withCtx(()=>[e.createVNode(G,{label:"管长"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:h.value.form.length,"onUpdate:modelValue":w[1]||(w[1]=B=>h.value.form.length=B)},null,8,["modelValue"])]),_:1}),e.createVNode(G,{label:"外径"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:h.value.form.outerDiameter,"onUpdate:modelValue":w[2]||(w[2]=B=>h.value.form.outerDiameter=B)},null,8,["modelValue"])]),_:1}),e.createVNode(G,{label:"内径"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:h.value.form.innerDiameter,"onUpdate:modelValue":w[3]||(w[3]=B=>h.value.form.innerDiameter=B)},null,8,["modelValue"])]),_:1}),e.createVNode(G,{label:"壁厚"},{default:e.withCtx(()=>[e.createVNode(H,{modelValue:h.value.form.thickness,"onUpdate:modelValue":w[4]||(w[4]=B=>h.value.form.thickness=B)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),e.createVNode(K,{ref:"singleTableRef",data:h.value.list,"highlight-current-rowstyle":"width: 100%"},{default:e.withCtx(()=>[e.createVNode(z,{type:"index",width:"50"}),e.createVNode(z,{property:"y",label:"Y"}),e.createVNode(z,{property:"b",label:"B"}),e.createVNode(z,{property:"c",label:"C"}),e.createVNode(z,{property:"r",label:"R"})]),_:1},8,["data"])])])]),e.createElementVNode("div",{class:"panel-right",ref_key:"threejsContainer",ref:s},null,512)])]),_:1},8,["visible","onBeforeDestroy","fullScreen"])}}}),et=fe._export_sfc(Qe,[["__scopeId","data-v-577e5f83"]]),tt={class:"obj-viewer-container"},ot={class:"pipe-comparison"},lt={ref:"pipe1",class:"pipe-container"},nt={ref:"pipe2",class:"pipe-container"},at={class:"buttonGroup-top"},st={class:"buttonGroup-topLeft"},rt={class:"buttonGroup-left"},it={class:"buttonGroup-right"},ct={class:"buttonGroup-bottom"},ut={class:"top-panel"},dt={class:"panel-header"},pt={class:"panel-body"},mt={class:"left-panel"},vt={class:"panel-header"},ft={class:"panel-body"},gt={key:1,class:"clipping-content"},ht={class:"radio-group"},Vt={class:"radio-label"},yt={class:"radio-label"},bt={class:"radio-label"},wt={class:"radio-label"},Nt={class:"right-panel"},Ct={class:"panel-header"},_t={class:"panel-body"},Et={key:0,class:"loading-overlay"},xt=e.defineComponent({__name:"threeSceneView",props:{fileBlobs:{default:()=>[]},animationData:{default:()=>({})},threeData:{}},emits:["getAnimationData","getThreeData"],setup(C,{emit:g}){const E=g,s=C,N=e.ref(Z.sceneType.ROBOT),S=e.ref(null),f=e.ref(),M=e.ref(!1),P=e.ref(""),d=e.ref(!1),c=e.ref(""),V=e.ref(!1),n=e.ref(""),y=e.ref(!1),r=e.ref(""),b=e.shallowRef(null),h=e.shallowRef(null),x=e.ref(),{currentModels:m,resetView:k,initThreeJS:I,handleResize:D,getThreeJSObjects:R,cleanup:j,setModels:Q,axesHelperVisible:A,toggleAxesVisibility:w,zoomIn:X,zoomOut:L}=T.useThreeJS(S),{loadSceneFromFile:G}=Z.useUrdfLoader(R,m,M,P),{isAnimating:q,toggleAnimation:oe,stopAnimation:ee}=T.useAnimation(R,m),{isClipping:H,activeClippingAxis:z,toggleClipping:K,updateClippingPlanes:B}=T.useClipping(R,m),{initRaycaster:ae,selectedObject3D:le,setSelectedObjVisible:ie,updatePosition:ce,updateRotation:ue,dispose:de}=Z.useRaycaster(S,R,m),pe=()=>{w()},me=e.computed(()=>N.value===Z.sceneType.ROBOT),ve=e.computed(()=>N.value===Z.sceneType.PIPECOMPARSION),se=i=>{var l;r.value=i,r.value==="弯管解析"?(l=f.value)==null||l.openDialog():y.value=!0},o=i=>{d.value=!0,c.value=i,i==="剖面视图"&&!H.value&&K()},t=i=>{V.value=!0,n.value=i,i==="动画仿真"&&E("getAnimationData")},u=()=>{E("getThreeData")},_=()=>{var i;(i=x==null?void 0:x.value)==null||i.playAnimation()},p=()=>{var i;(i=x==null?void 0:x.value)==null||i.stopAnimation()},$=()=>{var i;(i=x==null?void 0:x.value)==null||i.forwardFrame()},F=()=>{var i;(i=x==null?void 0:x.value)==null||i.backwardFrame()};return e.watch(()=>s.fileBlobs,i=>{if(i&&i.length>0){const l=i[0];if(!l.name.toLowerCase().endsWith(".urdf"))return;G(l).then(O=>{b.value=O}).catch(O=>{console.error("加载URDF文件时发生错误:",O),Y.ElMessage.error("加载urdf模型失败"),b.value=null})}else b.value=null},{immediate:!0,deep:!0}),e.watch(b,i=>{Q(i?[i]:[]),ae()}),e.onMounted(async()=>{await e.nextTick();try{I(),window.addEventListener("resize",D);const i=R();h.value=i.scene}catch(i){console.error("Three.js 初始化失败:",i),Y.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{c.value="",n.value="",window.removeEventListener("resize",D),q.value&&ee(),j(),de()}),(i,l)=>{const O=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",tt,[e.withDirectives(e.createElementVNode("div",{ref_key:"threejsContainer",ref:S,class:"threejs-container"},null,512),[[e.vShow,me.value]]),e.withDirectives(e.createElementVNode("div",ot,[e.createElementVNode("div",lt,null,512),e.createElementVNode("div",nt,null,512)],512),[[e.vShow,ve.value]]),e.createElementVNode("div",at,[e.renderSlot(i.$slots,"button-top",{switchTopPanel:se},void 0,!0),e.createVNode(T.SvgIcon,{name:"guanjianjiexi",size:"34",onClick:l[0]||(l[0]=v=>se("弯管解析"))}),e.createVNode(T.SvgIcon,{name:"guanjiekongzhi",size:"34"}),e.createVNode(T.SvgIcon,{name:"gongyishengcheng",size:"34"}),e.createVNode(T.SvgIcon,{name:"buchangshezhi",size:"34"}),e.createVNode(T.SvgIcon,{name:"shuchujiagongchengxu",size:"34"}),e.renderSlot(i.$slots,"logout",{},void 0,!0)]),e.createElementVNode("div",st,[e.createVNode(T.SvgIcon,{name:"viewReset",size:"24",onClick:e.unref(k),title:"重置"},null,8,["onClick"]),e.createVNode(T.SvgIcon,{name:"fangda",size:"24",title:"放大",onClick:e.unref(X)},null,8,["onClick"]),e.createVNode(T.SvgIcon,{name:"suoxiao",size:"24",title:"缩小",onClick:e.unref(L)},null,8,["onClick"]),e.createVNode(T.SvgIcon,{name:"lookAround",size:"24",onClick:e.unref(oe),title:e.unref(q)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode(T.SvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref(A),onClick:pe,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",rt,[e.createVNode(T.SvgIcon,{name:"jiegoushu",size:"24",onClick:l[1]||(l[1]=v=>o("场景树")),active:d.value&&c.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(T.SvgIcon,{name:"clipping",size:"24",onClick:l[2]||(l[2]=v=>o("剖面视图")),active:d.value&&c.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(T.SvgIcon,{name:"zhaozi",size:"24",onClick:l[3]||(l[3]=v=>o("工件树")),active:d.value&&c.value==="工件树",title:"工件 "},null,8,["active"]),e.createVNode(T.SvgIcon,{name:"donghuafangzhen",size:"24",onClick:l[4]||(l[4]=v=>o("场景4"))})]),e.createElementVNode("div",it,[e.renderSlot(i.$slots,"button-right",{switchRightPanel:t},void 0,!0),e.createVNode(T.SvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode(T.SvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode(T.SvgIcon,{name:"guanjiekongzhi",size:"24",onClick:l[5]||(l[5]=v=>t("关节控制")),active:V.value&&n.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(T.SvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:l[6]||(l[6]=v=>t("动画仿真")),active:V.value&&n.value==="动画仿真"},null,8,["active"]),e.createVNode(T.SvgIcon,{name:"donghuafangzhen",size:"24",title:"urdf动画",onClick:l[7]||(l[7]=v=>t("urdf动画")),active:V.value&&n.value==="urdf动画"},null,8,["active"]),e.createVNode(T.SvgIcon,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",ct,[e.createVNode(T.SvgIcon,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:F}),e.createVNode(T.SvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:_}),e.createVNode(T.SvgIcon,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:$}),e.createVNode(T.SvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:p})]),e.withDirectives(e.createElementVNode("div",ut,[e.createElementVNode("div",dt,[e.createElementVNode("span",null,e.toDisplayString(r.value),1),e.createElementVNode("span",{class:"close",onClick:l[8]||(l[8]=v=>y.value=!1)}," X ")]),e.createElementVNode("div",pt,[e.createVNode(O,{height:"100%"},{default:e.withCtx(()=>[e.renderSlot(i.$slots,"top-panel",{topPanelType:r.value},void 0,!0)]),_:3})])],512),[[e.vShow,y.value]]),e.withDirectives(e.createElementVNode("div",mt,[e.createElementVNode("div",vt,[e.createElementVNode("span",null,e.toDisplayString(c.value),1),e.createElementVNode("span",{class:"close",onClick:l[9]||(l[9]=v=>d.value=!1)}," X ")]),e.createElementVNode("div",ft,[e.createVNode(O,{height:"100%"},{default:e.withCtx(()=>{var v;return[c.value==="场景树"?(e.openBlock(),e.createBlock(Ve.UrdfTree,{key:0,model:b.value},null,8,["model"])):e.createCommentVNode("",!0),c.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",gt,[e.createElementVNode("div",ht,[e.createElementVNode("label",Vt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":l[10]||(l[10]=U=>e.isRef(z)?z.value=U:null),onChange:l[11]||(l[11]=(...U)=>e.unref(B)&&e.unref(B)(...U))},null,544),[[e.vModelRadio,e.unref(z)]]),l[19]||(l[19]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",yt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":l[12]||(l[12]=U=>e.isRef(z)?z.value=U:null),onChange:l[13]||(l[13]=(...U)=>e.unref(B)&&e.unref(B)(...U))},null,544),[[e.vModelRadio,e.unref(z)]]),l[20]||(l[20]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",bt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":l[14]||(l[14]=U=>e.isRef(z)?z.value=U:null),onChange:l[15]||(l[15]=(...U)=>e.unref(B)&&e.unref(B)(...U))},null,544),[[e.vModelRadio,e.unref(z)]]),l[21]||(l[21]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":l[16]||(l[16]=U=>e.isRef(z)?z.value=U:null),onChange:l[17]||(l[17]=(...U)=>e.unref(B)&&e.unref(B)(...U))},null,544),[[e.vModelRadio,e.unref(z)]]),l[22]||(l[22]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0),c.value==="工件树"?(e.openBlock(),e.createBlock(Z.WorkpieceTreePanel,{key:2,model:(v=e.unref(le))==null?void 0:v.obj,onVisibleChange:e.unref(ie),onUpdatePosition:e.unref(ce),onUpdateRotation:e.unref(ue)},null,8,["model","onVisibleChange","onUpdatePosition","onUpdateRotation"])):e.createCommentVNode("",!0)]}),_:1})])],512),[[e.vShow,d.value]]),e.withDirectives(e.createElementVNode("div",Nt,[e.createElementVNode("div",Ct,[e.createElementVNode("span",null,e.toDisplayString(n.value),1),e.createElementVNode("span",{class:"close",onClick:l[18]||(l[18]=v=>V.value=!1)}," X ")]),e.createElementVNode("div",_t,[e.createVNode(O,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Ve.JointPanel,{model:b.value},null,8,["model"]),[[e.vShow,n.value==="关节控制"]]),e.withDirectives(e.createVNode(ze,{ref_key:"animationPanelRef",ref:x,model:b.value,onGetThreeData:u,threeData:s.threeData},null,8,["model","threeData"]),[[e.vShow,n.value==="动画仿真"]]),e.renderSlot(i.$slots,"right-panel",{rightPanelType:n.value},void 0,!0)]),_:3})])],512),[[e.vShow,V.value]]),M.value?(e.openBlock(),e.createElementBlock("div",Et,[l[23]||(l[23]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(P.value),1)])):e.createCommentVNode("",!0),e.createVNode(et,{ref_key:"pipeAnalysisPanelRef",ref:f},null,512)])}}}),Mt=fe._export_sfc(xt,[["__scopeId","data-v-3bada747"]]);exports.default=Mt;
@@ -1,24 +1,23 @@
1
- import { defineComponent as Ue, ref as u, computed as T, watch as H, onUnmounted as at, resolveComponent as K, createElementBlock as O, openBlock as z, createElementVNode as l, createCommentVNode as I, createVNode as i, toDisplayString as R, Fragment as nt, renderList as ot, withCtx as ne, inject as ve, shallowRef as pe, onMounted as st, nextTick as it, onBeforeUnmount as ut, withDirectives as x, vShow as F, renderSlot as ae, unref as c, createBlock as $e, isRef as me, vModelRadio as fe } from "vue";
2
- import { c as rt, E as y, p as be, s as ye, u as dt } from "./index-CZEK1c2_.js";
3
- import { k as ct, a as vt, u as pt, aD as mt } from "./index.vue_vue_type_style_index_1_lang-DgDibOnl.js";
4
- import { U as ft, s as ke, u as gt, a as ht, W as bt } from "./useRayCaster-Y_Q5getG.js";
5
- import { u as yt, a as kt, b as Pt, S as h } from "./iconfont-pt17sMx3.js";
6
- import { _ as Pe } from "./index-Hm2_zeiV.js";
7
- import "./index.vue_vue_type_style_index_1_lang-B1fiFPmj.js";
8
- import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
9
- import { U as Ct, J as wt } from "./urdfTree-BuTtRGdl.js";
10
- import { i as _t } from "./animationData-Bu38Hl4M.js";
11
- import { O as xt } from "./STLLoader-CiUjaQtA.js";
12
- import { h as Tt } from "./index-LnraLHWy.js";
13
- import { d as $t } from "./isUndefined-BqsKWawv.js";
14
- import { e as zt } from "./three-viewport-gizmo-CkQ98n-T.js";
15
- const Ut = { class: "panel-content" }, jt = { class: "action-bar" }, Vt = {
1
+ import { defineComponent as ze, ref as u, computed as T, watch as H, onUnmounted as at, resolveComponent as K, createElementBlock as O, openBlock as j, createElementVNode as l, createCommentVNode as I, createVNode as i, toDisplayString as R, Fragment as nt, renderList as ot, withCtx as ne, inject as ve, shallowRef as pe, onMounted as st, nextTick as it, onBeforeUnmount as ut, withDirectives as x, vShow as F, renderSlot as ae, unref as d, createBlock as $e, isRef as me, vModelRadio as fe } from "vue";
2
+ import { e as rt } from "./three-viewport-gizmo-BxFHxv_x.js";
3
+ import { c as ct, E as y, p as be, s as ye, u as dt } from "./index-CYp77kPp.js";
4
+ import { j as vt, a as pt, u as mt, aD as ft } from "./index.vue_vue_type_style_index_1_lang-AXp5rRSK.js";
5
+ import { U as gt, s as ke, u as ht, a as bt, W as yt } from "./useRayCaster-TCYe6KMI.js";
6
+ import { u as kt, a as Pt, b as Ct, S as h } from "./iconfont-7cEds3Xj.js";
7
+ import { _ as Pe } from "./index-DVvt9_w0.js";
8
+ import "./index.vue_vue_type_style_index_1_lang-BxEXAMMV.js";
9
+ import { _ as Ue } from "./_plugin-vue_export-helper-CHgC5LLL.js";
10
+ import { U as wt, J as _t } from "./urdfTree-BuTtRGdl.js";
11
+ import { i as xt } from "./animationData-BDq02_ir.js";
12
+ import { O as Tt } from "./STLLoader-memlq1bT.js";
13
+ import { t as $t, h as jt } from "./index-BxPnA2or.js";
14
+ const zt = { class: "panel-content" }, Ut = { class: "action-bar" }, Vt = {
16
15
  key: 0,
17
16
  class: "animation-controls"
18
17
  }, Lt = { class: "control-row" }, St = { class: "control-row" }, At = { class: "frame-info" }, Dt = { class: "control-row" }, Ot = {
19
18
  key: 1,
20
19
  class: "empty-state"
21
- }, Rt = { class: "dialog-footer" }, Mt = /* @__PURE__ */ Ue({
20
+ }, Rt = { class: "dialog-footer" }, Mt = /* @__PURE__ */ ze({
22
21
  __name: "urdfAnimationPanel",
23
22
  props: {
24
23
  model: {},
@@ -26,14 +25,14 @@ const Ut = { class: "panel-content" }, jt = { class: "action-bar" }, Vt = {
26
25
  xyzbcList: {}
27
26
  },
28
27
  setup(W, { expose: oe }) {
29
- const U = W, o = u([]), M = u(!1), J = u(""), k = u("stopped"), C = u(0), N = u(0), Y = u(10), w = u(null);
28
+ const z = W, o = u([]), M = u(!1), J = u(""), k = u("stopped"), C = u(0), N = u(0), Y = u(10), w = u(null);
30
29
  let g = 0;
31
- const j = u([]), E = T(() => U.model ? Object.values(U.model.joints).filter((s) => s.jointType !== "fixed").map((s) => s.name) : []), B = T(() => [...E.value]), G = T(() => B.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
30
+ const U = u([]), E = T(() => z.model ? Object.values(z.model.joints).filter((s) => s.jointType !== "fixed").map((s) => s.name) : []), B = T(() => [...E.value]), G = T(() => B.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
32
31
  ${B.value.join(" ")}
33
32
  0 0 0 ...
34
33
  1 2 3 ...` : "请先加载模型。"), V = T(() => o.value[C.value] || {});
35
- H(() => U.model, (s) => {
36
- s ? (w.value = new ft(s), j.value = Object.keys(s.links), C.value = 0) : (w.value = null, j.value = []);
34
+ H(() => z.model, (s) => {
35
+ s ? (w.value = new gt(s), U.value = Object.keys(s.links), C.value = 0) : (w.value = null, U.value = []);
37
36
  }, { immediate: !0 });
38
37
  const S = (s) => {
39
38
  if (s < 0 || s >= o.value.length) {
@@ -44,8 +43,8 @@ ${B.value.join(" ")}
44
43
  if (w.value) {
45
44
  const f = {};
46
45
  E.value.forEach((p) => {
47
- const d = parseFloat(a[p]);
48
- isNaN(d) || (f[p] = d);
46
+ const c = parseFloat(a[p]);
47
+ isNaN(c) || (f[p] = c);
49
48
  }), w.value.setJointAngles(f);
50
49
  }
51
50
  C.value = s, N.value = o.value.length > 1 ? s / (o.value.length - 1) * 100 : 100;
@@ -55,18 +54,18 @@ ${B.value.join(" ")}
55
54
  if (s !== g) return;
56
55
  const f = o.value[a], p = {};
57
56
  if (w.value)
58
- E.value.forEach((d) => {
59
- const r = parseFloat(f[d]);
60
- isNaN(r) || (p[d] = r);
57
+ E.value.forEach((c) => {
58
+ const r = parseFloat(f[c]);
59
+ isNaN(r) || (p[c] = r);
61
60
  }), await w.value.animateToState(
62
61
  p,
63
62
  Y.value,
64
- (d) => {
65
- s === g && (N.value = (a + d) / o.value.length * 100);
63
+ (c) => {
64
+ s === g && (N.value = (a + c) / o.value.length * 100);
66
65
  }
67
66
  );
68
67
  else {
69
- if (await new Promise((d) => setTimeout(d, Y.value)), s !== g) return;
68
+ if (await new Promise((c) => setTimeout(c, Y.value)), s !== g) return;
70
69
  N.value = (a + 1) / o.value.length * 100;
71
70
  }
72
71
  C.value = a;
@@ -107,7 +106,7 @@ ${B.value.join(" ")}
107
106
  y.error("没有找到匹配的表头,请检查表头名称是否正确");
108
107
  return;
109
108
  }
110
- const d = s.slice(1).map((r) => {
109
+ const c = s.slice(1).map((r) => {
111
110
  const v = r.split(" "), $ = {};
112
111
  return B.value.forEach((_) => {
113
112
  $[_] = "0";
@@ -116,10 +115,10 @@ ${B.value.join(" ")}
116
115
  te !== void 0 && te.trim() !== "" && ($[ee] = te.trim());
117
116
  }), $;
118
117
  });
119
- d.length > 0 ? (o.value = d, y.success(`成功导入 ${d.length} 行数据!`), M.value = !1, J.value = "", Z()) : y.error("未能解析到有效数据,请检查格式。");
118
+ c.length > 0 ? (o.value = c, y.success(`成功导入 ${c.length} 行数据!`), M.value = !1, J.value = "", Z()) : y.error("未能解析到有效数据,请检查格式。");
120
119
  };
121
- H(() => U.xyzbcList, () => {
122
- U.xyzbcList && (o.value = rt(U.xyzbcList));
120
+ H(() => z.xyzbcList, () => {
121
+ z.xyzbcList && (o.value = ct(z.xyzbcList));
123
122
  }, {
124
123
  immediate: !0
125
124
  });
@@ -132,16 +131,16 @@ ${B.value.join(" ")}
132
131
  }), at(() => {
133
132
  g++;
134
133
  }), (s, a) => {
135
- const f = K("el-input-number"), p = K("el-slider"), d = K("el-input"), r = K("el-dialog");
136
- return z(), O("div", Ut, [
137
- l("div", jt, [
134
+ const f = K("el-input-number"), p = K("el-slider"), c = K("el-input"), r = K("el-dialog");
135
+ return j(), O("div", zt, [
136
+ l("div", Ut, [
138
137
  i(Pe, {
139
138
  onClick: a[0] || (a[0] = (v) => M.value = !0),
140
139
  disabled: B.value.length === 0,
141
140
  modelValue: "导入数据"
142
141
  }, null, 8, ["disabled"])
143
142
  ]),
144
- o.value.length > 0 ? (z(), O("div", Vt, [
143
+ o.value.length > 0 ? (j(), O("div", Vt, [
145
144
  l("div", Lt, [
146
145
  a[6] || (a[6] = l("label", null, "帧间隔 (ms):", -1)),
147
146
  i(f, {
@@ -175,11 +174,11 @@ ${B.value.join(" ")}
175
174
  l("div", null, [
176
175
  a[9] || (a[9] = l("label", null, "当前帧数据:", -1)),
177
176
  l("div", null, [
178
- V.value ? (z(!0), O(nt, { key: 0 }, ot(V.value, (v, $) => (z(), O("div", { key: $ }, R($) + ": " + R(v), 1))), 128)) : I("", !0)
177
+ V.value ? (j(!0), O(nt, { key: 0 }, ot(V.value, (v, $) => (j(), O("div", { key: $ }, R($) + ": " + R(v), 1))), 128)) : I("", !0)
179
178
  ])
180
179
  ])
181
180
  ])) : I("", !0),
182
- o.value.length === 0 ? (z(), O("div", Ot, a[10] || (a[10] = [
181
+ o.value.length === 0 ? (j(), O("div", Ot, a[10] || (a[10] = [
183
182
  l("p", null, "请先导入数据", -1)
184
183
  ]))) : I("", !0),
185
184
  i(r, {
@@ -203,7 +202,7 @@ ${B.value.join(" ")}
203
202
  ]),
204
203
  default: ne(() => [
205
204
  a[11] || (a[11] = l("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
206
- i(d, {
205
+ i(c, {
207
206
  modelValue: J.value,
208
207
  "onUpdate:modelValue": a[3] || (a[3] = (v) => J.value = v),
209
208
  type: "textarea",
@@ -217,7 +216,7 @@ ${B.value.join(" ")}
217
216
  ]);
218
217
  };
219
218
  }
220
- }), ze = /* @__PURE__ */ je(Mt, [["__scopeId", "data-v-0833d9bc"]]), Nt = async (W) => await new xt().loadAsync(W), Et = { class: "obj-viewer-container" }, Bt = { class: "pipe-comparison" }, Ft = {
219
+ }), je = /* @__PURE__ */ Ue(Mt, [["__scopeId", "data-v-0833d9bc"]]), Nt = async (W) => await new Tt().loadAsync(W), Et = { class: "obj-viewer-container" }, Bt = { class: "pipe-comparison" }, Ft = {
221
220
  ref: "pipe1",
222
221
  class: "pipe-container"
223
222
  }, It = {
@@ -226,10 +225,10 @@ ${B.value.join(" ")}
226
225
  }, Jt = { class: "buttonGroup-top" }, Gt = { class: "buttonGroup-topLeft" }, Xt = { class: "buttonGroup-left" }, Ht = { class: "buttonGroup-right" }, Kt = { class: "buttonGroup-bottom" }, Wt = { class: "top-panel" }, Yt = { class: "panel-header" }, Zt = { class: "panel-body" }, qt = { class: "left-panel" }, Qt = { class: "panel-header" }, el = { class: "panel-body" }, tl = {
227
226
  key: 1,
228
227
  class: "clipping-content"
229
- }, ll = { class: "radio-group" }, al = { class: "radio-label" }, nl = { class: "radio-label" }, ol = { class: "radio-label" }, sl = { class: "radio-label" }, il = { class: "right-panel" }, ul = { class: "panel-header" }, rl = { class: "panel-body" }, dl = {
228
+ }, ll = { class: "radio-group" }, al = { class: "radio-label" }, nl = { class: "radio-label" }, ol = { class: "radio-label" }, sl = { class: "radio-label" }, il = { class: "right-panel" }, ul = { class: "panel-header" }, rl = { class: "panel-body" }, cl = {
230
229
  key: 0,
231
230
  class: "loading-overlay"
232
- }, cl = /* @__PURE__ */ Ue({
231
+ }, dl = /* @__PURE__ */ ze({
233
232
  __name: "threeSceneViewForCPMPIP",
234
233
  props: {
235
234
  fileBlobs: { default: () => [] },
@@ -239,10 +238,10 @@ ${B.value.join(" ")}
239
238
  },
240
239
  emits: ["getAnimationData", "getThreeData"],
241
240
  setup(W, { emit: oe }) {
242
- const U = oe, o = W, M = ct(be), { originalPath: J } = ye(M);
243
- vt(be);
244
- const k = pt(), { activeMenuPath: C } = ye(k), N = dt(be), { loginUserInfo: Y } = ye(N), w = ve("managementPageVisible"), g = ve("setManagementPageTitle"), j = ve("setManagementPageVisible"), E = ve("setPositionType"), B = () => {
245
- j == null || j(!(w != null && w.value));
241
+ const z = oe, o = W, M = vt(be), { originalPath: J } = ye(M);
242
+ pt(be);
243
+ const k = mt(), { activeMenuPath: C } = ye(k), N = dt(be), { loginUserInfo: Y } = ye(N), w = ve("managementPageVisible"), g = ve("setManagementPageTitle"), U = ve("setManagementPageVisible"), E = ve("setPositionType"), B = () => {
244
+ U == null || U(!(w != null && w.value));
246
245
  }, G = T(() => {
247
246
  var e, n;
248
247
  return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.machine;
@@ -253,11 +252,11 @@ ${B.value.join(" ")}
253
252
  var e, n;
254
253
  return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.knife;
255
254
  }), se = u([]), ie = async (t) => {
256
- !t || !t.isExtra || (await ue(t), E == null || E("right"), g == null || g(t == null ? void 0 : t.pageName), j == null || j(!0));
255
+ !t || !t.isExtra || (await ue(t), E == null || E("right"), g == null || g(t == null ? void 0 : t.pageName), U == null || U(!0));
257
256
  }, ue = $t(async (t) => {
258
- await Tt();
257
+ await jt();
259
258
  const { mainKey: e, baseMenuPath: n } = t || {};
260
- mt(n, e);
259
+ ft(n, e);
261
260
  }, 500);
262
261
  H(
263
262
  () => [G.value, V.value, S.value],
@@ -331,7 +330,7 @@ ${B.value.join(" ")}
331
330
  });
332
331
  H(() => X.value, async () => {
333
332
  if (console.log("three data", o == null ? void 0 : o.threeData), console.log("csvUrl", X.value), X.value) {
334
- const t = await _t(X.value);
333
+ const t = await xt(X.value);
335
334
  Z.value = t;
336
335
  }
337
336
  }, {
@@ -340,8 +339,8 @@ ${B.value.join(" ")}
340
339
  const q = T(() => {
341
340
  var e, n;
342
341
  return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.bladeObjUrl;
343
- }), re = u(ke.ROBOT), Q = u(null), s = u(!1), a = u(""), f = u(!1), p = u(""), d = u(!1), r = u(""), v = u(!1), $ = u(""), _ = pe(null), ee = u("叶片模型"), te = pe(null), Ve = pe(null), Ce = pe(null), de = u(ze), {
344
- currentModels: ce,
342
+ }), re = u(ke.ROBOT), Q = u(null), s = u(!1), a = u(""), f = u(!1), p = u(""), c = u(!1), r = u(""), v = u(!1), $ = u(""), _ = pe(null), ee = u("叶片模型"), te = pe(null), Ve = pe(null), Ce = pe(null), ce = u(je), {
343
+ currentModels: de,
345
344
  resetView: Le,
346
345
  initThreeJS: Se,
347
346
  handleResize: we,
@@ -350,28 +349,28 @@ ${B.value.join(" ")}
350
349
  setModels: _e,
351
350
  axesHelperVisible: De,
352
351
  toggleAxesVisibility: Oe
353
- } = yt(Q), { loadSceneFromFile: Re } = ht(
352
+ } = kt(Q), { loadSceneFromFile: Re } = bt(
354
353
  le,
355
- ce,
354
+ de,
356
355
  s,
357
356
  a
358
- ), { isAnimating: xe, toggleAnimation: Me, stopAnimation: Ne } = kt(le, ce), { isClipping: Ee, activeClippingAxis: P, toggleClipping: Be, updateClippingPlanes: A } = Pt(le, ce), { initRaycaster: Fe, selectedObject3D: Ie, setSelectedObjVisible: Je, updatePosition: Ge, updateRotation: Xe, dispose: He } = gt(Q, le, ce), Ke = () => {
357
+ ), { isAnimating: xe, toggleAnimation: Me, stopAnimation: Ne } = Pt(le, de), { isClipping: Ee, activeClippingAxis: P, toggleClipping: Be, updateClippingPlanes: A } = Ct(le, de), { initRaycaster: Fe, selectedObject3D: Ie, setSelectedObjVisible: Je, updatePosition: Ge, updateRotation: Xe, dispose: He } = ht(Q, le, de), Ke = () => {
359
358
  Oe();
360
359
  }, We = T(() => re.value === ke.ROBOT), Ye = T(() => re.value === ke.PIPECOMPARSION), Ze = (t) => {
361
360
  $.value = t, v.value = !0;
362
361
  }, ge = (t) => {
363
362
  f.value = !0, p.value = t, t === "剖面视图" && !Ee.value && Be();
364
363
  }, he = (t) => {
365
- d.value = !0, r.value = t, t === "动画仿真" && U("getAnimationData");
364
+ c.value = !0, r.value = t, t === "动画仿真" && z("getAnimationData");
366
365
  }, qe = () => {
367
366
  var t;
368
- (t = de.value) == null || t.handlePlayPause();
367
+ (t = ce.value) == null || t.handlePlayPause();
369
368
  }, Qe = () => {
370
369
  var t;
371
- (t = de.value) == null || t.pauseAnimation();
370
+ (t = ce.value) == null || t.pauseAnimation();
372
371
  }, et = () => {
373
372
  var t;
374
- (t = de.value) == null || t.stopAnimation();
373
+ (t = ce.value) == null || t.stopAnimation();
375
374
  }, tt = (t, e) => {
376
375
  if (!e)
377
376
  return null;
@@ -380,7 +379,7 @@ ${B.value.join(" ")}
380
379
  return console.warn(`在模型中未找到名为 '${e}' 的 link`), console.log("可用的链接:", Object.keys(t.links)), null;
381
380
  let L = null;
382
381
  return n.traverse((D) => {
383
- D instanceof zt && !L && (L = D);
382
+ D instanceof rt && !L && (L = D);
384
383
  }), L || console.warn(`在 link '${e}' 中未找到可用的 Mesh 对象`), L;
385
384
  }, lt = async (t) => {
386
385
  const e = tt(t, ee.value);
@@ -421,7 +420,7 @@ ${B.value.join(" ")}
421
420
  }), (t, e) => {
422
421
  var D;
423
422
  const n = K("el-scrollbar"), L = K("PipeAnalysisPanel");
424
- return z(), O("div", Et, [
423
+ return j(), O("div", Et, [
425
424
  x(l("div", {
426
425
  ref_key: "threejsContainer",
427
426
  ref: Q,
@@ -443,7 +442,7 @@ ${B.value.join(" ")}
443
442
  i(h, {
444
443
  name: "viewReset",
445
444
  size: "24",
446
- onClick: c(Le),
445
+ onClick: d(Le),
447
446
  title: "重置"
448
447
  }, null, 8, ["onClick"]),
449
448
  i(h, {
@@ -459,13 +458,13 @@ ${B.value.join(" ")}
459
458
  i(h, {
460
459
  name: "lookAround",
461
460
  size: "24",
462
- onClick: c(Me),
463
- title: c(xe) ? "停止动画" : "动画视图"
461
+ onClick: d(Me),
462
+ title: d(xe) ? "停止动画" : "动画视图"
464
463
  }, null, 8, ["onClick", "title"]),
465
464
  i(h, {
466
465
  name: "zuobiaoxi",
467
466
  size: "24",
468
- active: c(De),
467
+ active: d(De),
469
468
  onClick: Ke,
470
469
  title: "显隐坐标轴"
471
470
  }, null, 8, ["active"])
@@ -498,14 +497,14 @@ ${B.value.join(" ")}
498
497
  name: "yemian",
499
498
  size: "24",
500
499
  onClick: B,
501
- active: (D = c(w)) == null ? void 0 : D.value,
500
+ active: (D = d(w)) == null ? void 0 : D.value,
502
501
  title: "数据管理"
503
502
  }, null, 8, ["active"]),
504
503
  i(h, {
505
504
  name: "jichuangxuanze",
506
505
  size: "24",
507
506
  onClick: e[3] || (e[3] = (b) => he("机床控制")),
508
- active: d.value && r.value === "机床控制",
507
+ active: c.value && r.value === "机床控制",
509
508
  title: "机床控制"
510
509
  }, null, 8, ["active"]),
511
510
  i(h, {
@@ -513,7 +512,7 @@ ${B.value.join(" ")}
513
512
  size: "24",
514
513
  title: "动画仿真",
515
514
  onClick: e[4] || (e[4] = (b) => he("动画仿真")),
516
- active: d.value && r.value === "动画仿真"
515
+ active: c.value && r.value === "动画仿真"
517
516
  }, null, 8, ["active"])
518
517
  ]),
519
518
  l("div", Kt, [
@@ -571,13 +570,13 @@ ${B.value.join(" ")}
571
570
  default: ne(() => {
572
571
  var b;
573
572
  return [
574
- p.value === "场景树" ? (z(), $e(Ct, {
573
+ p.value === "场景树" ? (j(), $e(wt, {
575
574
  key: 0,
576
575
  model: _.value,
577
576
  extraNodes: se.value,
578
577
  onNodeClick: ie
579
578
  }, null, 8, ["model", "extraNodes"])) : I("", !0),
580
- p.value === "剖面视图" ? (z(), O("div", tl, [
579
+ p.value === "剖面视图" ? (j(), O("div", tl, [
581
580
  l("div", ll, [
582
581
  l("label", al, [
583
582
  x(l("input", {
@@ -586,9 +585,9 @@ ${B.value.join(" ")}
586
585
  value: "none",
587
586
  "onUpdate:modelValue": e[7] || (e[7] = (m) => me(P) ? P.value = m : null),
588
587
  onChange: e[8] || (e[8] = //@ts-ignore
589
- (...m) => c(A) && c(A)(...m))
588
+ (...m) => d(A) && d(A)(...m))
590
589
  }, null, 544), [
591
- [fe, c(P)]
590
+ [fe, d(P)]
592
591
  ]),
593
592
  e[16] || (e[16] = l("span", { class: "radio-text" }, "无切割", -1))
594
593
  ]),
@@ -599,9 +598,9 @@ ${B.value.join(" ")}
599
598
  value: "x",
600
599
  "onUpdate:modelValue": e[9] || (e[9] = (m) => me(P) ? P.value = m : null),
601
600
  onChange: e[10] || (e[10] = //@ts-ignore
602
- (...m) => c(A) && c(A)(...m))
601
+ (...m) => d(A) && d(A)(...m))
603
602
  }, null, 544), [
604
- [fe, c(P)]
603
+ [fe, d(P)]
605
604
  ]),
606
605
  e[17] || (e[17] = l("span", { class: "radio-text" }, "X轴切割", -1))
607
606
  ]),
@@ -612,9 +611,9 @@ ${B.value.join(" ")}
612
611
  value: "y",
613
612
  "onUpdate:modelValue": e[11] || (e[11] = (m) => me(P) ? P.value = m : null),
614
613
  onChange: e[12] || (e[12] = //@ts-ignore
615
- (...m) => c(A) && c(A)(...m))
614
+ (...m) => d(A) && d(A)(...m))
616
615
  }, null, 544), [
617
- [fe, c(P)]
616
+ [fe, d(P)]
618
617
  ]),
619
618
  e[18] || (e[18] = l("span", { class: "radio-text" }, "Y轴切割", -1))
620
619
  ]),
@@ -625,20 +624,20 @@ ${B.value.join(" ")}
625
624
  value: "z",
626
625
  "onUpdate:modelValue": e[13] || (e[13] = (m) => me(P) ? P.value = m : null),
627
626
  onChange: e[14] || (e[14] = //@ts-ignore
628
- (...m) => c(A) && c(A)(...m))
627
+ (...m) => d(A) && d(A)(...m))
629
628
  }, null, 544), [
630
- [fe, c(P)]
629
+ [fe, d(P)]
631
630
  ]),
632
631
  e[19] || (e[19] = l("span", { class: "radio-text" }, "Z轴切割", -1))
633
632
  ])
634
633
  ])
635
634
  ])) : I("", !0),
636
- p.value === "工件树" ? (z(), $e(bt, {
635
+ p.value === "工件树" ? (j(), $e(yt, {
637
636
  key: 2,
638
- model: (b = c(Ie)) == null ? void 0 : b.obj,
639
- onVisibleChange: c(Je),
640
- onUpdatePosition: c(Ge),
641
- onUpdateRotation: c(Xe)
637
+ model: (b = d(Ie)) == null ? void 0 : b.obj,
638
+ onVisibleChange: d(Je),
639
+ onUpdatePosition: d(Ge),
640
+ onUpdateRotation: d(Xe)
642
641
  }, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : I("", !0)
643
642
  ];
644
643
  }),
@@ -653,21 +652,21 @@ ${B.value.join(" ")}
653
652
  l("span", null, R(r.value), 1),
654
653
  l("span", {
655
654
  class: "close",
656
- onClick: e[15] || (e[15] = (b) => d.value = !1)
655
+ onClick: e[15] || (e[15] = (b) => c.value = !1)
657
656
  }, " X ")
658
657
  ]),
659
658
  l("div", rl, [
660
659
  i(n, { height: "100%" }, {
661
660
  default: ne(() => [
662
- x(i(wt, { model: _.value }, null, 8, ["model"]), [
661
+ x(i(_t, { model: _.value }, null, 8, ["model"]), [
663
662
  [F, r.value === "机床控制"]
664
663
  ]),
665
- x(i(ze, {
664
+ x(i(je, {
666
665
  model: _.value,
667
666
  scene: Ce.value,
668
667
  xyzbcList: Z.value,
669
668
  ref_key: "urdfAnimationPanelRef",
670
- ref: de
669
+ ref: ce
671
670
  }, null, 8, ["model", "scene", "xyzbcList"]), [
672
671
  [F, r.value === "动画仿真"]
673
672
  ]),
@@ -677,9 +676,9 @@ ${B.value.join(" ")}
677
676
  })
678
677
  ])
679
678
  ], 512), [
680
- [F, d.value]
679
+ [F, c.value]
681
680
  ]),
682
- s.value ? (z(), O("div", dl, [
681
+ s.value ? (j(), O("div", cl, [
683
682
  e[20] || (e[20] = l("div", { class: "loading-spinner" }, null, -1)),
684
683
  l("p", null, R(a.value), 1)
685
684
  ])) : I("", !0),
@@ -687,7 +686,7 @@ ${B.value.join(" ")}
687
686
  ]);
688
687
  };
689
688
  }
690
- }), Tl = /* @__PURE__ */ je(cl, [["__scopeId", "data-v-d9156359"]]);
689
+ }), xl = /* @__PURE__ */ Ue(dl, [["__scopeId", "data-v-d9156359"]]);
691
690
  export {
692
- Tl as default
691
+ xl as default
693
692
  };