ss-component-new 1.2.10 → 1.2.12

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 (117) hide show
  1. package/dist/{animationData-_I5Ta9Mb.js → animationData-C_gV7XAN.js} +16 -16
  2. package/dist/animationData-CyP8-u7i.cjs +1 -0
  3. package/dist/array-A59WrroX.js +1207 -0
  4. package/dist/array-BtZq8qON.cjs +11 -0
  5. package/dist/index-2nEz-J89.js +24 -0
  6. package/dist/{index-EDiWyCbT.cjs → index-7eyGTvr0.cjs} +1 -1
  7. package/dist/{index-o4i99pOt.cjs → index-Adqs5vHH.cjs} +1 -1
  8. package/dist/{index-mUa2IQX2.js → index-B7g38Yte.js} +2 -2
  9. package/dist/{index-Dn1cF4a6.cjs → index-B9OZcnHm.cjs} +13 -13
  10. package/dist/index-BAOnUk_J.cjs +1 -0
  11. package/dist/{index-gxTF9iU0.js → index-BDaeo6qO.js} +2 -2
  12. package/dist/{index-Ck-Pyzel.cjs → index-BJBNtx2b.cjs} +1 -1
  13. package/dist/{index-dkJup9RS.js → index-BMYtLkw8.js} +4 -4
  14. package/dist/{index-Dzo3UK7P.js → index-BQ4Rjf8F.js} +6 -6
  15. package/dist/{index-Czne009c.cjs → index-BUUEqGRN.cjs} +1 -1
  16. package/dist/{index-CTQJw9gg.js → index-B_ZGJtId.js} +1 -1
  17. package/dist/{index-DTx1lKjf.cjs → index-B_mFQujY.cjs} +1 -1
  18. package/dist/{index-CdBwsDHj.js → index-BbI9_JbX.js} +32 -48
  19. package/dist/index-BeYNgEHV.js +144 -0
  20. package/dist/{index-CKHNyMzP.js → index-BwjuTBrR.js} +1 -1
  21. package/dist/{index-tBF9s086.js → index-C-c1pt-2.js} +1 -1
  22. package/dist/{index-CcZtXwBy.cjs → index-C40ofXP7.cjs} +1 -1
  23. package/dist/{index-CvrTrN91.js → index-C461j30b.js} +1 -1
  24. package/dist/{index-CKw9V7SH.cjs → index-C5gPrwPs.cjs} +1 -1
  25. package/dist/{index-BtTZ3EU5.cjs → index-C68Hri2v.cjs} +1 -1
  26. package/dist/{index-CIeESMCL.cjs → index-CAewC69j.cjs} +1 -1
  27. package/dist/index-CApZYDIm.cjs +1 -0
  28. package/dist/{index-DcK-QFLd.js → index-CKLBlQoK.js} +2122 -2129
  29. package/dist/{index-DIiXHX3o.cjs → index-CKt6cj9f.cjs} +1 -1
  30. package/dist/index-CN29uy_G.js +7293 -0
  31. package/dist/{index-Bju4088G.js → index-CRiovRyR.js} +2 -2
  32. package/dist/index-CTRmgnKQ.js +2643 -0
  33. package/dist/{index-sDYlQpWf.js → index-CVDv-Zz-.js} +1012 -1009
  34. package/dist/index-CVadHkfS.cjs +1 -0
  35. package/dist/{index-DbzvXPKu.js → index-CYp77kPp.js} +175 -175
  36. package/dist/{index-0ud2Po_J.js → index-CjB5ZP_P.js} +2 -2
  37. package/dist/{index-B-a5HS4_.js → index-CkA2IZJB.js} +5 -5
  38. package/dist/{index-w5zmoNRw.js → index-CoVAbxHN.js} +1 -1
  39. package/dist/index-CwhX2vaq.cjs +1 -0
  40. package/dist/{index-BVlthzKV.js → index-D4CVC2Sk.js} +4 -4
  41. package/dist/{index-B-tEg91u.cjs → index-D55zzS4D.cjs} +1 -1
  42. package/dist/{index-CDMtXN-6.cjs → index-D5ShC3zu.cjs} +1 -1
  43. package/dist/{index-D2K5hwYt.cjs → index-D9l1Z4TO.cjs} +1 -1
  44. package/dist/index-DDhAMgrO.js +22 -0
  45. package/dist/{index--_dC4FBE.cjs → index-DGBDGLOK.cjs} +1 -1
  46. package/dist/{index-D4Axp_O-.js → index-DHQH1rlQ.js} +2 -2
  47. package/dist/{index-No8P9Ao2.js → index-DJMHw-xb.js} +11 -11
  48. package/dist/index-DP7rcz4I.cjs +1 -0
  49. package/dist/{index-DZ1QNkXN.js → index-DQZ_oAyj.js} +6 -6
  50. package/dist/{index-CR9tXV-b.js → index-DTkAIcvV.js} +13 -13
  51. package/dist/{index-bN9Uw0Q1.js → index-DfKkN76b.js} +3 -3
  52. package/dist/{index-tpadNrUw.cjs → index-DkG4A3iE.cjs} +1 -1
  53. package/dist/{index-BNkldtkn.cjs → index-DnU2slQv.cjs} +1 -1
  54. package/dist/{index-yN-prski.cjs → index-DsQ-qtQ9.cjs} +1 -1
  55. package/dist/index-Dwr4RHei.cjs +1 -0
  56. package/dist/{index-BvLcKRn_.js → index-ESNVepXU.js} +6 -6
  57. package/dist/{index-Bx3pGJI8.js → index-H_3u1NA_.js} +24 -24
  58. package/dist/{index-DTEwonWc.cjs → index-QkDZ18PI.cjs} +1 -1
  59. package/dist/index-RVDLy1iy.cjs +1 -0
  60. package/dist/{index-Cw7EHgAH.js → index-ecVCII_e.js} +5 -5
  61. package/dist/{index-D5Ge7afE.cjs → index-i50hp6po.cjs} +1 -1
  62. package/dist/{index-yIgyb0hz.js → index-qu3KI1yZ.js} +5 -5
  63. package/dist/{index-BDGnm6c8.cjs → index-t6--MDLB.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DupE6w_h.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BRxOMo6y.js} +8749 -8765
  65. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_eQQ80N.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs} +108 -108
  66. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-xER5xJ0G.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DfqsvuRy.cjs} +1 -1
  67. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-By1Hrwna.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-e_PTrAf6.js} +6 -6
  68. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-7HSISF9c.cjs +56 -0
  69. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BqmMCEyN.js +37436 -0
  70. package/dist/{index.vue_vue_type_style_index_1_lang-B7DhfWIS.js → index.vue_vue_type_style_index_1_lang-CsY5rIO4.js} +3 -3
  71. package/dist/{index.vue_vue_type_style_index_1_lang-CQV0PEvz.cjs → index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs} +1 -1
  72. package/dist/index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs +32 -0
  73. package/dist/index.vue_vue_type_style_index_1_lang-Ds1cd7yg.js +7806 -0
  74. package/dist/{isString-CZMLuMzD.js → isString-BNK38WbE.js} +1 -1
  75. package/dist/{main-Ba0GCSQr.cjs → main-CVaemyhm.cjs} +1 -1
  76. package/dist/{main-DFY6Z82x.js → main-DIbH2rlN.js} +5 -5
  77. package/dist/ss-component.cjs +1 -1
  78. package/dist/ss-component.css +2 -2
  79. package/dist/ss-component.js +11 -11
  80. package/dist/ss-component2.cjs +1 -1
  81. package/dist/ss-component2.js +12 -12
  82. package/dist/{threeLatheView-BmVBnC8n.js → threeLatheView-Bp0kjo_V.js} +2 -2
  83. package/dist/{threeModel-BiLTPWZc.js → threeModel-27sl0tTS.js} +3 -3
  84. package/dist/{threeModel-BlbCxxhC.cjs → threeModel-C0Jdw2O3.cjs} +1 -1
  85. package/dist/{threePreview-CYX5wKoL.js → threePreview-DFFjm93P.js} +1 -1
  86. package/dist/threeSceneView-CEpBvJSV.cjs +5 -0
  87. package/dist/threeSceneView-ZDXqO8ZA.js +1413 -0
  88. package/dist/{threeSceneViewForCPMPIP-C9Ujac4S.cjs → threeSceneViewForCPMPIP-B0VPmBWd.cjs} +3 -3
  89. package/dist/{threeSceneViewForCPMPIP-XM1smwTG.js → threeSceneViewForCPMPIP-BPPWM68P.js} +83 -84
  90. package/dist/{threeViewerHost-CPLLWPXa.js → threeViewerHost-CKE2a4PV.js} +65 -78
  91. package/dist/threeViewerHost-yHvsk7TK.cjs +1 -0
  92. package/dist/useRayCaster-1DNcSYPR.cjs +1 -0
  93. package/dist/{useRayCaster-DmL8uPfl.js → useRayCaster-BM9XKGKx.js} +3 -3
  94. package/package.json +1 -1
  95. package/dist/animationData-CZgXSZj6.cjs +0 -1
  96. package/dist/array-CibDR1WD.js +0 -1142
  97. package/dist/array-CuhJ8NbH.cjs +0 -11
  98. package/dist/index-B3mDmf7s.js +0 -7211
  99. package/dist/index-BvCS9t_Y.js +0 -2567
  100. package/dist/index-CBZ52OZo.cjs +0 -1
  101. package/dist/index-CSt381YJ.js +0 -3370
  102. package/dist/index-DPz8gNWB.cjs +0 -1
  103. package/dist/index-DZCVaUOY.cjs +0 -1
  104. package/dist/index-Dg_Riles.js +0 -158
  105. package/dist/index-Dh1Y0XF1.cjs +0 -1
  106. package/dist/index-Iq_U20xc.cjs +0 -1
  107. package/dist/index-xeZL-vfA.cjs +0 -1
  108. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-B1Qlnp33.js +0 -34129
  109. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CYe2Mod4.cjs +0 -56
  110. package/dist/index.vue_vue_type_style_index_1_lang-kn2HGYiz.cjs +0 -32
  111. package/dist/index.vue_vue_type_style_index_1_lang-pV-HGjB2.js +0 -8126
  112. package/dist/isUndefined-ClRzgwTy.cjs +0 -1
  113. package/dist/isUndefined-chfCDxUU.js +0 -84
  114. package/dist/threeSceneView-Cj9A_P6F.cjs +0 -5
  115. package/dist/threeSceneView-DG8GKpe0.js +0 -1472
  116. package/dist/threeViewerHost-BX4apXHF.cjs +0 -1
  117. package/dist/useRayCaster-D5RIG3dr.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";const l=require("./index-1z9RrjZc.cjs");var L=/\s/;function M(e){for(var i=e.length;i--&&L.test(e.charAt(i)););return i}var N=/^\s+/;function j(e){return e&&e.slice(0,M(e)+1).replace(N,"")}var O=NaN,B=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,U=/^0o[0-7]+$/i,$=parseInt;function k(e){if(typeof e=="number")return e;if(l.isSymbol(e))return O;if(l.isObject(e)){var i=typeof e.valueOf=="function"?e.valueOf():e;e=l.isObject(i)?i+"":i}if(typeof e!="string")return e===0?e:+e;e=j(e);var t=R.test(e);return t||U.test(e)?$(e.slice(2),t?2:8):B.test(e)?O:+e}var h=function(){return l.root.Date.now()},F="Expected a function",_=Math.max,q=Math.min;function D(e,i,t){var u,d,g,c,r,a,s=0,v=!1,o=!1,x=!0;if(typeof e!="function")throw new TypeError(F);i=k(i)||0,l.isObject(t)&&(v=!!t.leading,o="maxWait"in t,g=o?_(k(t.maxWait)||0,i):g,x="trailing"in t?!!t.trailing:x);function I(n){var f=u,m=d;return u=d=void 0,s=n,c=e.apply(m,f),c}function S(n){return s=n,r=setTimeout(T,i),v?I(n):c}function W(n){var f=n-a,m=n-s,p=i-f;return o?q(p,g-m):p}function y(n){var f=n-a,m=n-s;return a===void 0||f>=i||f<0||o&&m>=g}function T(){var n=h();if(y(n))return E(n);r=setTimeout(T,W(n))}function E(n){return r=void 0,x&&u?I(n):(u=d=void 0,c)}function A(){r!==void 0&&clearTimeout(r),s=0,u=a=d=r=void 0}function C(){return r===void 0?c:E(h())}function b(){var n=h(),f=y(n);if(u=arguments,d=this,a=n,f){if(r===void 0)return S(a);if(o)return clearTimeout(r),r=setTimeout(T,i),I(a)}return r===void 0&&(r=setTimeout(T,i)),c}return b.cancel=A,b.flush=C,b}function H(e){return e===void 0}exports.debounce=D;exports.isUndefined=H;
@@ -1,84 +0,0 @@
1
- import { c7 as L, i as v, c8 as M } from "./index-DbzvXPKu.js";
2
- var N = /\s/;
3
- function B(n) {
4
- for (var i = n.length; i-- && N.test(n.charAt(i)); )
5
- ;
6
- return i;
7
- }
8
- var R = /^\s+/;
9
- function $(n) {
10
- return n && n.slice(0, B(n) + 1).replace(R, "");
11
- }
12
- var k = NaN, F = /^[-+]0x[0-9a-f]+$/i, U = /^0b[01]+$/i, _ = /^0o[0-7]+$/i, j = parseInt;
13
- function S(n) {
14
- if (typeof n == "number")
15
- return n;
16
- if (L(n))
17
- return k;
18
- if (v(n)) {
19
- var i = typeof n.valueOf == "function" ? n.valueOf() : n;
20
- n = v(i) ? i + "" : i;
21
- }
22
- if (typeof n != "string")
23
- return n === 0 ? n : +n;
24
- n = $(n);
25
- var t = U.test(n);
26
- return t || _.test(n) ? j(n.slice(2), t ? 2 : 8) : F.test(n) ? k : +n;
27
- }
28
- var h = function() {
29
- return M.Date.now();
30
- }, D = "Expected a function", H = Math.max, P = Math.min;
31
- function q(n, i, t) {
32
- var u, c, l, s, r, f, d = 0, p = !1, o = !1, T = !0;
33
- if (typeof n != "function")
34
- throw new TypeError(D);
35
- i = S(i) || 0, v(t) && (p = !!t.leading, o = "maxWait" in t, l = o ? H(S(t.maxWait) || 0, i) : l, T = "trailing" in t ? !!t.trailing : T);
36
- function x(e) {
37
- var a = u, m = c;
38
- return u = c = void 0, d = e, s = n.apply(m, a), s;
39
- }
40
- function W(e) {
41
- return d = e, r = setTimeout(g, i), p ? x(e) : s;
42
- }
43
- function O(e) {
44
- var a = e - f, m = e - d, E = i - a;
45
- return o ? P(E, l - m) : E;
46
- }
47
- function y(e) {
48
- var a = e - f, m = e - d;
49
- return f === void 0 || a >= i || a < 0 || o && m >= l;
50
- }
51
- function g() {
52
- var e = h();
53
- if (y(e))
54
- return b(e);
55
- r = setTimeout(g, O(e));
56
- }
57
- function b(e) {
58
- return r = void 0, T && u ? x(e) : (u = c = void 0, s);
59
- }
60
- function A() {
61
- r !== void 0 && clearTimeout(r), d = 0, u = f = c = r = void 0;
62
- }
63
- function C() {
64
- return r === void 0 ? s : b(h());
65
- }
66
- function I() {
67
- var e = h(), a = y(e);
68
- if (u = arguments, c = this, f = e, a) {
69
- if (r === void 0)
70
- return W(f);
71
- if (o)
72
- return clearTimeout(r), r = setTimeout(g, i), x(f);
73
- }
74
- return r === void 0 && (r = setTimeout(g, i)), s;
75
- }
76
- return I.cancel = A, I.flush = C, I;
77
- }
78
- function z(n) {
79
- return n === void 0;
80
- }
81
- export {
82
- q as d,
83
- z as i
84
- };
@@ -1,5 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),K=require("./useRayCaster-D5RIG3dr.cjs"),R=require("./iconfont-t5epssvu.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D_eQQ80N.cjs");const F=require("./index-1z9RrjZc.cjs");require("./index.vue_vue_type_style_index_1_lang-kn2HGYiz.cjs");require("./index-BpPyaNFa.cjs");const te=require("./index-B-tEg91u.cjs");require("./index.vue_vue_type_style_index_1_lang-CQV0PEvz.cjs");const r=require("./three-viewport-gizmo-BV37JzRa.cjs");require("./index-DIiXHX3o.cjs");const ge=require("./animationData-CZgXSZj6.cjs"),he=require("./index-CBZ52OZo.cjs"),fe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ve=require("./urdfTree-CCktg0FK.cjs"),W=.001,le=r.MathUtils.degToRad,be=new r.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:r.DoubleSide}),we=C=>C.reduce((b,E)=>{let s=0;const N=E.Y??0,k=E.C??0,v=E.R??0;return N>0&&(s+=N),k>0&&v>0&&(s+=v*le(k)),b+s},0),Ne=C=>{const b=[],E=C.Y??0,s=C.B??0,N=C.C??0,k=C.R??0,v={pos:new r.Vector3(0,0,0),localY:new r.Vector3(0,1,0),localX:new r.Vector3(1,0,0),localZ:new r.Vector3(0,0,1)};if(!E&&!N)return b;if(b.push(v.pos.clone()),s!==0){const x=new r.Matrix4().makeRotationAxis(v.localY,le(s));v.localX.applyMatrix4(x),v.localZ.applyMatrix4(x)}if(E>0&&(v.pos.add(v.localY.clone().multiplyScalar(E*W)),b.push(v.pos.clone())),N>0&&k>0){const x=le(N),S=k*W,c=v.pos.clone().add(v.localX.clone().multiplyScalar(-S)),i=Math.max(16,Math.ceil(N/5));for(let g=1;g<=i;g++){const l=x*g/i,h=new r.Matrix4().makeRotationAxis(v.localZ,l),V=v.localX.clone().multiplyScalar(S).applyMatrix4(h),f=c.clone().add(V);b.push(f)}}return b};function Ce(C,b){const E=new r.Group;E.name="CompletePipe";const s={pos:new r.Vector3(0,0,0),localX:new r.Vector3(1,0,0),localY:new r.Vector3(0,1,0),localZ:new r.Vector3(0,0,1)};let N=0,k=1;for(let v=0;v<C.length;v++){const x=C[v],S=x.Y??0,c=x.B??0,i=x.C??0,g=x.R??0;if(c!==0){const l=new r.Matrix4().makeRotationAxis(s.localY,le(c));s.localX.applyMatrix4(l),s.localZ.applyMatrix4(l)}if(S>0){const l=s.pos.clone();s.pos.add(s.localY.clone().multiplyScalar(S*W));const h=s.pos.clone(),a=Ee(l,h,b*W);a.userData={segmentType:"straight",segmentIndex:N,frameIndex:v,length:S,frame:{Y:S,B:c,C:i,R:g}},a.name=`直段_${N}`,E.add(a);const V=l.clone();_e(E,k,V,b*W),N++}if(i>0&&g>0){const l=le(i),h=g*W,a=[];a.push(s.pos.clone());const V=s.pos.clone().add(s.localX.clone().multiplyScalar(-h)),f=Math.max(16,Math.ceil(i/5));for(let M=1;M<=f;M++){const Y=l*M/f,P=new r.Matrix4().makeRotationAxis(s.localZ,Y),I=s.localX.clone().multiplyScalar(h).applyMatrix4(P),J=V.clone().add(I);a.push(J)}const _=xe(a,b*W);_.userData={segmentType:"bend",segmentIndex:N,frameIndex:v,angle:i,radius:g,centerPoint:V.toArray(),frame:{Y:S,B:c,C:i,R:g}},_.name=`弯段_${N}`,E.add(_),Math.floor(a.length/2),a[0],s.pos=a[a.length-1].clone();const m=new r.Matrix4().makeRotationAxis(s.localZ,l);s.localY.applyMatrix4(m),s.localX.applyMatrix4(m),N++,k++}}return E}function _e(C,b,E,s){const N=new r.Vector3(0,s*2,s*5),k=E.clone().add(N),v=[E,k],x=new r.BufferGeometry().setFromPoints(v),S=new r.LineDashedMaterial({color:16711680,dashSize:s*.5,gapSize:s*.3,linewidth:1}),c=new r.Line(x,S);c.computeLineDistances(),C.add(c);const i=document.createElement("canvas"),g=i.getContext("2d");i.width=128,i.height=128,g.clearRect(0,0,128,128),g.fillStyle="#FF0000",g.font="bold 80px Arial",g.textAlign="center",g.textBaseline="middle",g.fillText(b.toString(),64,64);const l=new r.CanvasTexture(i),h=new r.SpriteMaterial({map:l,transparent:!0,depthTest:!1,depthWrite:!1}),a=new r.Sprite(h),V=s*3;a.scale.set(V,V,1),a.position.copy(k),a.name=`Label_${b}`,a.userData={labelNumber:b},C.add(a)}function Ee(C,b,E){const s=new r.LineCurve3(C,b),N=new r.TubeGeometry(s,2,E,18,!1);return new r.Mesh(N,be)}function xe(C,b){const E=new r.CatmullRomCurve3(C,!1,"catmullrom",.01),s=new r.TubeGeometry(E,Math.max(16,C.length*2),b,18,!1);return new r.Mesh(s,be)}function se(C,b,E,s,N,k=0){let v=b.slice(0,N+1);const x=b[N+1];if(x&&k>0){const a={...x,B:(x.B??0)*k,C:(x.C??0)*k};v.push(a)}const S=we(v),c=Math.max(0,E-S),i=[];i.push(new r.Vector3(0,0,0));const g=new r.Vector3(0,c*W,0);c>0&&i.push(g);let l={pos:g.clone(),localY:new r.Vector3(0,1,0),localX:new r.Vector3(1,0,0),localZ:new r.Vector3(0,0,1)};const h=[];for(let a=v.length-1;a>=0;a--){const V=v[a],f=Ne(V);if(f.length>0){const _=f.map(P=>{const D=P.clone(),I=new r.Matrix4;return I.makeBasis(l.localX,l.localY,l.localZ),D.applyMatrix4(I),D.add(l.pos)});h.push(_);const m=_[_.length-1];l.pos=m.clone();const M=V.B??0,Y=V.C??0;if(M!==0){const P=new r.Matrix4().makeRotationAxis(l.localY,le(M));l.localX.applyMatrix4(P),l.localZ.applyMatrix4(P)}if(Y>0){const P=le(Y),D=new r.Matrix4().makeRotationAxis(l.localZ,P);l.localY.applyMatrix4(D),l.localX.applyMatrix4(D)}}}for(const a of h)a.length>1&&i.push(...a.slice(1));i.length<2&&i.push(new r.Vector3(0,.001,0));try{const a=new r.CatmullRomCurve3(i,!1,"catmullrom",.01),V=new r.TubeGeometry(a,Math.max(2,i.length*4),s*W,18,!1);C.geometry.dispose(),C.geometry=V}catch(a){console.error("管件更新失败",a)}}function ye(C,b,E,s=0){let N=C.slice(0,E+1);const k=C[E+1];if(k&&s>0){const l={...k,B:(k.B??0)*s,C:(k.C??0)*s};N.push(l)}const v=we(N),x=Math.max(0,b-v),S=[];S.push(new r.Vector3(0,0,0));const c=new r.Vector3(0,x*W,0);x>0&&S.push(c);let i={pos:c.clone(),localY:new r.Vector3(0,1,0),localX:new r.Vector3(1,0,0),localZ:new r.Vector3(0,0,1)};const g=[];for(let l=N.length-1;l>=0;l--){const h=N[l],a=Ne(h);if(a.length>0){const V=a.map(M=>{const Y=M.clone(),P=new r.Matrix4;return P.makeBasis(i.localX,i.localY,i.localZ),Y.applyMatrix4(P),Y.add(i.pos)});g.push(V);const f=V[V.length-1];i.pos=f.clone();const _=h.B??0,m=h.C??0;if(_!==0){const M=new r.Matrix4().makeRotationAxis(i.localY,le(_));i.localX.applyMatrix4(M),i.localZ.applyMatrix4(M)}if(m>0){const M=le(m),Y=new r.Matrix4().makeRotationAxis(i.localZ,M);i.localY.applyMatrix4(Y),i.localX.applyMatrix4(Y)}}}for(const l of g)l.length>1&&S.push(...l.slice(1));return S.length<2&&S.push(new r.Vector3(0,.001,0)),S}function ae(C,b,E,s,N,k,v,x=0,S=0){const c=N-S,i=ye(s,c,v,x);let l=ye(E,S,v,x);l.forEach(a=>a.y=-a.y),l.reverse();const h=[...l,...i];try{const a=new r.CatmullRomCurve3(h,!1,"catmullrom",.01),V=new r.TubeGeometry(a,Math.max(2,h.length*4),k*W,18,!1);b.geometry.dispose(),C.geometry.dispose(),b.parent&&b.parent.remove(b),C.geometry=V}catch(a){console.error("管件更新失败",a)}}const ke={class:"panel-content"},Me={class:"action-bar"},Se={key:0,class:"animation-controls"},Pe={class:"control-row"},De={class:"control-row"},Re={class:"control-row"},Te={class:"frame-info"},$e={class:"control-row"},Be={class:"progress-bar"},ze={class:"dialog-footer"},Ae=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},emits:["getThreeData"],setup(C,{expose:b,emit:E}){const s=C,N=E,k=e.ref(),v=e.ref(),x=e.ref("单机器人弯管");e.watch(()=>s.threeData,n=>{const o=n==null?void 0:n.data;x.value=o==null?void 0:o.任务类型},{immediate:!0});const S=async()=>{if(!sessionStorage.getItem("systemKey")){N("getThreeData");return}let o={};x.value===K.robotMode.SINGLE&&(o=await ge.fetchSingleRobotAnimationData()),x.value===K.robotMode.DOUBLE&&(o=await ge.fetchDoubleRobotAnimationData());const{initialPipeLength:u=0,pipeRadius:w=0,clampLength:p=0,animationData:B}=o;P.value=u,D.value=w,I.value=p,k.value=B;const A=F.cloneDeep(k.value);c.value=(A==null?void 0:A["输出(动画数据)"])||[];let j=(A==null?void 0:A["输出(动画数据)Content"])??[];j&&(v.value=j)},c=e.ref([]),i=e.ref(!1),g=e.ref(""),l=e.ref(!1),h=e.ref(0),a=e.ref(0),V=e.ref(1e3),f=e.ref(null);let _=!1;const m=e.shallowRef(null),M=e.shallowRef(null),Y=e.shallowRef(null),P=e.ref(1302),D=e.ref(12.5),I=e.ref(30),J=e.ref([]),$=e.ref(null),y=e.computed(()=>s.model?Object.values(s.model.joints).filter(n=>n.jointType!=="fixed").map(n=>n.name):[]),U=e.ref(["Y","B","C","R"]),L=e.computed(()=>[...y.value,...U.value]),X=e.computed(()=>L.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
2
- ${L.value.join(" ")}
3
- 0 0 0 ...
4
- 1 2 3 ...`:"请先加载模型。"),H=(n,o)=>{if(!o)return null;const u=n.links[o];if(!u)return console.warn(`在模型中未找到名为 '${o}' 的 link`),console.log("可用的链接:",Object.keys(n.links)),null;let w=null;return u.traverse(p=>{p instanceof r.Mesh&&!w&&(w=p)}),w||console.warn(`在 link '${o}' 中未找到可用的 Mesh 对象`),w},Q=()=>{Y.value&&(Y.value.visible=!0),m.value&&m.value.parent&&m.value.parent.remove(m.value),Y.value=null,m.value=null,M.value=null};e.watch(L,(n,o)=>{if(JSON.stringify(n)!==JSON.stringify(o))if(n.length>0){const u=n.reduce((w,p)=>(w[p]="0",w),{});c.value=[u]}else c.value=[]},{immediate:!0}),e.watch(()=>s.model,n=>{Q(),n?(f.value=new K.URDFRobotController(n),J.value=Object.keys(n.links),J.value.includes("Pipe_Link")?$.value="Pipe_Link":$.value=null):(f.value=null,J.value=[],$.value=null)},{immediate:!0}),e.watch([$,I],([n,o])=>{if(Q(),s.model&&n){const u=H(s.model,n);if(console.log(u,"meshToReplace"),u&&u.parent){Y.value=u;const w=new r.Mesh(u.geometry.clone(),u.material);if(w.name="managed_pipe_clone",u.parent.add(w),w.position.copy(u.position),w.rotation.copy(u.rotation),w.scale.copy(u.scale),u.visible=!1,x.value===K.robotMode.SINGLE&&(w.position.y-=o*.001),m.value=w,x.value===K.robotMode.DOUBLE){const p=new r.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),M.value=p}m.value&&M.value&&ae(m.value,M.value,[],[],P.value,D.value,0,0,I.value)}else n&&console.warn(`在 link '${n}' 中未找到可替换的网格或其没有父级。`)}});const oe=()=>c.value.map(n=>({Y:parseFloat(n.Y)||0,B:parseFloat(n.B)||0,C:parseFloat(n.C)||0,R:parseFloat(n.R)||0})),q=()=>{const n=[],o=[];return c.value.forEach(u=>{const{Y1:w,B1:p,C1:B,R1:A,Y2:j,B2:G,C2:d,R2:t}=u;n.push({Y:parseFloat(w)||0,B:parseFloat(p)||0,C:parseFloat(B)||0,R:parseFloat(A)||0}),o.push({Y:parseFloat(j)||0,B:parseFloat(G)||0,C:parseFloat(d)||0,R:parseFloat(t)||0})}),{posPipeYbcr:n,negPipeYbcr:o}},z=n=>{if(n<0||n>=c.value.length){console.error(`帧索引 ${n} 超出范围`);return}const o=c.value[n];if(console.log(`应用第 ${n} 帧数据 ${o}`),h.value=n,f.value){const u={};y.value.forEach(w=>{const p=parseFloat(o[w]);isNaN(p)||(u[w]=p)}),f.value.setJointAngles(u)}if(m.value&&M.value){const u=q();console.log("ybcr数据:",u),ae(m.value,M.value,u.posPipeYbcr,u.negPipeYbcr,P.value,D.value,n,0,I.value);return}if(m.value){const u=oe();console.log("ybcr数据:",u),se(m.value,u,P.value,D.value,n,0);return}},ne=async()=>{if(c.value.length===0){F.ElMessage.error("无法播放动画:无数据");return}l.value=!0,_=!1;const n=m.value?oe():[];try{for(let o=h.value+1;o<c.value.length&&!_;o++){h.value=o;const u=c.value[o],w={};f.value&&y.value.forEach(p=>{const B=parseFloat(u[p]);isNaN(B)||(w[p]=B)}),f.value?await f.value.animateToState(w,V.value,p=>{if(a.value=(o+p)/c.value.length*100,m.value&&M.value){const B=q();console.log("ybcr数据:",n),ae(m.value,M.value,B.posPipeYbcr,B.negPipeYbcr,P.value,D.value,o-1,p,I.value)}else m.value&&se(m.value,n,P.value,D.value,o-1,p)}):m.value&&M.value?await new Promise(p=>{const B=performance.now();let A;const j=G=>{if(_){cancelAnimationFrame(A),p();return}const d=G-B,t=Math.min(d/V.value,1);a.value=(o+t)/c.value.length*100;const ee=q();ae(m.value,M.value,ee.posPipeYbcr,ee.negPipeYbcr,P.value,D.value,o-1,t,I.value),t<1?A=requestAnimationFrame(j):p()};A=requestAnimationFrame(j)}):m.value?await new Promise(p=>{const B=performance.now();let A;const j=G=>{if(_){cancelAnimationFrame(A),p();return}const d=G-B,t=Math.min(d/V.value,1);a.value=(o+t)/c.value.length*100,se(m.value,n,P.value,D.value,o-1,t),t<1?A=requestAnimationFrame(j):p()};A=requestAnimationFrame(j)}):(await new Promise(p=>setTimeout(p,V.value)),a.value=(o+1)/c.value.length*100)}_||F.ElMessage.success("动画播放完成")}catch(o){console.error("动画播放出错:",o),F.ElMessage.error("动画播放出错")}finally{l.value=!1,a.value=0}},T=()=>{_=!0,l.value=!1,a.value=0,F.ElMessage.info("动画已停止")},re=()=>{if(f.value&&f.value.resetToZero(),console.log("pipeMesh.value",m.value),m.value&&M.value){const n=q();ae(m.value,M.value,n.posPipeYbcr,n.negPipeYbcr,P.value,D.value,-1,0,I.value)}else if(m.value){const n=oe();se(m.value,n,P.value,D.value,-1,0)}h.value=0,F.ElMessage.success("机器人和管件已重置")},ie=()=>{console.log("当前管件Mesh:",m.value)},ce=n=>{l.value&&T(),z(n)},ue=()=>{l.value&&T(),!(h.value+1>=c.value.length)&&z(h.value+1)},de=()=>{l.value&&T(),h.value!==0&&z(h.value-1)},pe=async()=>{if(L.value.length===0){F.ElMessage.warning("没有可导出的表头");return}const n=L.value.join(" ");try{await navigator.clipboard.writeText(n),F.ElMessage.success("表头已成功复制到剪贴板!")}catch(o){console.error("复制失败:",o),F.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},me=()=>{if(!g.value.trim()){F.ElMessage.warning("导入内容不能为空");return}const n=g.value.trim().split(`
5
- `).filter(B=>B.trim()!=="");if(n.length<2){F.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const o=n[0].split(" ").map(B=>B.trim()),u={};if(o.forEach((B,A)=>{L.value.includes(B)&&(u[A]=B)}),Object.keys(u).length===0){F.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const p=n.slice(1).map(B=>{const A=B.split(" "),j={};return L.value.forEach(G=>{j[G]="0"}),Object.entries(u).forEach(([G,d])=>{const t=A[parseInt(G)];t!==void 0&&t.trim()!==""&&(j[d]=t.trim())}),j});p.length>0?(c.value=p,F.ElMessage.success(`成功导入 ${p.length} 行数据!`),i.value=!1,g.value=""):F.ElMessage.error("未能解析到有效数据,请检查格式。")},ve=n=>`第 ${n+1} 帧`;return e.onUnmounted(()=>{Q(),_=!0}),b({playAnimation:ne,stopAnimation:T,forwardFrame:ue,backwardFrame:de}),(n,o)=>{const u=e.resolveComponent("el-icon"),w=e.resolveComponent("el-input-number"),p=e.resolveComponent("el-form-item"),B=e.resolveComponent("el-form"),A=e.resolveComponent("el-slider"),j=e.resolveComponent("el-progress"),G=e.resolveComponent("el-input"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",Me,[e.createVNode(te._sfc_main,{onClick:S,modelValue:"获取数据"}),e.createVNode(te._sfc_main,{onClick:pe,disabled:L.value.length===0,modelValue:"导出表头"},null,8,["disabled"]),e.createVNode(te._sfc_main,{modelValue:"播放",onClick:ne,disabled:c.value.length===0||l.value,buttonType:"primary"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createBlock(u,{key:0,class:"is-loading"},{default:e.withCtx(()=>[e.createVNode(e.unref(F.loading_default))]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["disabled"]),e.createVNode(te._sfc_main,{onClick:T,modelValue:"停止",buttonType:"danger"}),e.createVNode(te._sfc_main,{onClick:re,modelValue:"重置",buttonType:"primary"}),e.createVNode(te._sfc_main,{onClick:ie,modelValue:"测试功能",buttonType:"primary"})]),c.value.length>0?(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",Pe,[e.createVNode(B,{"label-width":"auto",style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(p,{label:"帧间隔 (ms):",prop:"frameDuration"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:V.value,"onUpdate:modelValue":o[0]||(o[0]=t=>V.value=t),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(w,{modelValue:P.value,"onUpdate:modelValue":o[1]||(o[1]=t=>P.value=t),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"管件半径 (mm):",prop:"pipeRadius"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:D.value,"onUpdate:modelValue":o[2]||(o[2]=t=>D.value=t),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1}),e.createVNode(p,{label:"夹持长度 (mm):",prop:"clampLength"},{default:e.withCtx(()=>[e.createVNode(w,{modelValue:I.value,"onUpdate:modelValue":o[3]||(o[3]=t=>I.value=t),min:0,style:{width:"100%"}},null,8,["modelValue"])]),_:1})]),_:1})]),e.createElementVNode("div",De,[o[9]||(o[9]=e.createElementVNode("label",null,"管件 Mesh:",-1)),e.createVNode(e.unref(he.ElSelect),{modelValue:$.value,"onUpdate:modelValue":o[4]||(o[4]=t=>$.value=t),placeholder:"选择管件Link",size:"small",disabled:"",style:{width:"180px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(J.value,t=>(e.openBlock(),e.createBlock(e.unref(he.ElOption),{key:t,label:t,value:t},null,8,["label","value"]))),128))]),_:1},8,["modelValue","disabled"])]),e.createElementVNode("div",Re,[o[10]||(o[10]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Te,e.toDisplayString(h.value+1)+" / "+e.toDisplayString(c.value.length),1)]),e.createElementVNode("div",$e,[o[11]||(o[11]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(A,{modelValue:h.value,"onUpdate:modelValue":o[5]||(o[5]=t=>h.value=t),min:0,max:c.value.length>0?c.value.length-1:0,step:1,"format-tooltip":ve,onInput:ce,disabled:c.value.length===0,style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",Be,[e.createVNode(j,{percentage:a.value,"show-text":!1,"stroke-width":6},null,8,["percentage"])])])):e.createCommentVNode("",!0),e.createVNode(d,{modelValue:i.value,"onUpdate:modelValue":o[8]||(o[8]=t=>i.value=t),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",ze,[e.createVNode(te._sfc_main,{modelValue:"取消",onClick:o[7]||(o[7]=t=>i.value=!1)}),e.createVNode(te._sfc_main,{modelValue:"确认导入",onClick:me,type:"primary"})])]),default:e.withCtx(()=>[o[12]||(o[12]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或csv中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(G,{modelValue:g.value,"onUpdate:modelValue":o[6]||(o[6]=t=>g.value=t),type:"textarea",rows:10,placeholder:X.value},null,8,["modelValue","placeholder"])]),_:1,__:[12]},8,["modelValue"])])}}}),Fe=fe._export_sfc(Ae,[["__scopeId","data-v-6903e33c"]]),Ye="http://139.196.154.85:20018";function Le(C,b=!1){return console.log(C,"data"),F.service({url:`${Ye}/api/pipeBendingTraditional/pipeAnsys/${b}`,method:"post",data:C})}const Ie={class:"pipe-analysis-dialog-header"},je={class:"header-right"},Ue={class:"pipe-analysis-dialog-body"},Oe={class:"panel-left"},Xe={class:"pipe-analysis-input"},qe={class:"input-params"},Ge={class:"step-label"},Ze={class:"button-group"},Je={class:"upload-content"},He={class:"file-item"},Ke={key:0},We={class:"pipe-analysis-output"},Qe={class:"ouput-params"},et=e.defineComponent({__name:"pipeAnalysisPanel",emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(C,{expose:b,emit:E}){const s=e.ref(null),N=e.shallowRef(null),{initThreeJS:k,handleResize:v,cleanup:x,clearAllModels:S,addModelAndFit:c}=R.useThreeJS(s),i=e.ref(null),g=e.ref({file:null}),l=e.ref(null),h=e.ref(!1),a=()=>{var $;($=i.value)==null||$.click()},V=async $=>{var L;const U=(L=$.target.files)==null?void 0:L[0];U&&(l.value=U)};e.ref("ybcr");const f=e.ref({form:{},list:[],reverse:!1}),_=async()=>{var $;if(!l.value){F.ElMessage.warning("请先选择文件");return}try{h.value=!0;const y=new FormData;y.set("file",l.value);let U=!1;(($=f.value)==null?void 0:$.reverse)==!0&&(U=!0);const{data:{data:L}={}}=await Le(y,U);m(L),F.ElMessage.success("提交成功")}catch(y){F.ElMessage.error("提交失败,请重试"),console.error("提交错误:",y)}finally{h.value=!1}},m=$=>{const{length:y,outerDiameter:U,innerDiameter:L,thickness:X,ybcrList:H}=$||{};f.value.form={length:y,outerDiameter:U,innerDiameter:L,thickness:X},f.value.list=H},M=()=>{const{form:$,list:y}=f.value,{outerDiameter:U}=$,L=U/2,X=y==null?void 0:y.map(Q=>{const{y:oe,b:q,c:z,r:ne}=Q;return{Y:oe,B:q,C:z,R:ne}});S();const H=Ce(X,L);c(H)},Y=e.ref(!1),P=()=>{const $=Y.value;Y.value=!$},D=e.ref(!1),I=()=>{D.value=!1},J=()=>{D.value=!0};return e.watch(()=>f,()=>{M()},{deep:!0}),e.watch(()=>s,()=>{try{if(N.value)return;k(),window.addEventListener("resize",v)}catch($){console.error("Three.js 初始化失败:",$),F.ElMessage.error("渲染引擎初始化失败!")}},{deep:!0}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",v),x()}),b({openDialog:J}),($,y)=>{const U=e.resolveComponent("el-icon"),L=e.resolveComponent("el-button"),X=e.resolveComponent("el-form-item"),H=e.resolveComponent("el-form"),Q=e.resolveComponent("el-option"),oe=e.resolveComponent("el-select"),q=e.resolveComponent("el-input"),z=e.resolveComponent("el-table-column"),ne=e.resolveComponent("el-table");return e.openBlock(),e.createBlock(te.ssDialog,{class:"pipe-analysis-dialog",visible:D.value,onBeforeDestroy:$.onDestroy,showClose:!1,fullScreen:Y.value},{header:e.withCtx(()=>[e.createElementVNode("div",Ie,[y[5]||(y[5]=e.createElementVNode("div",{class:"header-left",title:"管件解析"}," 管件解析 ",-1)),e.createElementVNode("div",je,[e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.full_screen_default),{onClick:P})]),_:1}),e.createVNode(U,null,{default:e.withCtx(()=>[e.createVNode(e.unref(F.close_default),{onClick:I})]),_:1})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Ue,[e.createElementVNode("div",Oe,[e.createElementVNode("div",Xe,[y[8]||(y[8]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输入")],-1)),e.createElementVNode("div",qe,[e.createVNode(H,{model:g.value,"label-width":"auto","label-position":"top"},{default:e.withCtx(()=>[e.createVNode(X,{label:"step文件"},{label:e.withCtx(()=>[e.createElementVNode("div",Ge,[y[7]||(y[7]=e.createElementVNode("div",null," step文件 ",-1)),e.createElementVNode("div",Ze,[e.createVNode(te._sfc_main,{emptyColor:!0,onClickTrigger:a,modelValue:"上传"}),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:i,accept:".step,.csv",onChange:V,style:{display:"none"}},null,544),e.createVNode(L,{type:"primary",onClick:_,loading:h.value,disabled:!l.value},{default:e.withCtx(()=>y[6]||(y[6]=[e.createTextVNode(" 解析 ")])),_:1,__:[6]},8,["loading","disabled"])])])]),default:e.withCtx(()=>{var T;return[e.createElementVNode("div",Je,[e.createElementVNode("div",He,[l.value?(e.openBlock(),e.createElementBlock("div",Ke,e.toDisplayString((T=l.value)==null?void 0:T.name),1)):e.createCommentVNode("",!0)])])]}),_:1})]),_:1},8,["model"])])]),e.createElementVNode("div",We,[e.createVNode(X,{label:"加工方向"},{default:e.withCtx(()=>[e.createVNode(oe,{modelValue:f.value.reverse,"onUpdate:modelValue":y[0]||(y[0]=T=>f.value.reverse=T),placeholder:"请选择加工方向"},{default:e.withCtx(()=>[e.createVNode(Q,{label:"正向",value:!1}),e.createVNode(Q,{label:"反向",value:!0})]),_:1},8,["modelValue"])]),_:1}),y[9]||(y[9]=e.createElementVNode("span",{class:"item-view-group"},[e.createElementVNode("span",{class:"group-name-wrap"},"输出(弯管基础参数)")],-1)),e.createElementVNode("div",Qe,[e.createVNode(H,{model:f.value.form,"label-width":"auto","label-position":"top",inline:!0},{default:e.withCtx(()=>[e.createVNode(X,{label:"管长"},{default:e.withCtx(()=>[e.createVNode(q,{modelValue:f.value.form.length,"onUpdate:modelValue":y[1]||(y[1]=T=>f.value.form.length=T)},null,8,["modelValue"])]),_:1}),e.createVNode(X,{label:"外径"},{default:e.withCtx(()=>[e.createVNode(q,{modelValue:f.value.form.outerDiameter,"onUpdate:modelValue":y[2]||(y[2]=T=>f.value.form.outerDiameter=T)},null,8,["modelValue"])]),_:1}),e.createVNode(X,{label:"内径"},{default:e.withCtx(()=>[e.createVNode(q,{modelValue:f.value.form.innerDiameter,"onUpdate:modelValue":y[3]||(y[3]=T=>f.value.form.innerDiameter=T)},null,8,["modelValue"])]),_:1}),e.createVNode(X,{label:"壁厚"},{default:e.withCtx(()=>[e.createVNode(q,{modelValue:f.value.form.thickness,"onUpdate:modelValue":y[4]||(y[4]=T=>f.value.form.thickness=T)},null,8,["modelValue"])]),_:1})]),_:1},8,["model"]),e.createVNode(ne,{ref:"singleTableRef",data:f.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"])}}}),tt=fe._export_sfc(et,[["__scopeId","data-v-577e5f83"]]),ot={class:"obj-viewer-container"},lt={class:"pipe-comparison"},nt={ref:"pipe1",class:"pipe-container"},at={ref:"pipe2",class:"pipe-container"},st={class:"buttonGroup-top"},rt={class:"buttonGroup-topLeft"},it={class:"buttonGroup-left"},ct={class:"buttonGroup-right"},ut={class:"buttonGroup-bottom"},dt={class:"top-panel"},pt={class:"panel-header"},mt={class:"panel-body"},vt={class:"left-panel"},ft={class:"panel-header"},gt={class:"panel-body"},ht={key:1,class:"clipping-content"},Vt={class:"radio-group"},yt={class:"radio-label"},bt={class:"radio-label"},wt={class:"radio-label"},Nt={class:"radio-label"},Ct={class:"right-panel"},_t={class:"panel-header"},Et={class:"panel-body"},xt={key:0,class:"loading-overlay"},kt=e.defineComponent({__name:"threeSceneView",props:{fileBlobs:{default:()=>[]},animationData:{default:()=>({})},threeData:{}},emits:["getAnimationData","getThreeData"],setup(C,{emit:b}){const E=b,s=C,N=e.ref(K.sceneType.ROBOT),k=e.ref(null),v=e.ref(),x=e.ref(!1),S=e.ref(""),c=e.ref(!1),i=e.ref(""),g=e.ref(!1),l=e.ref(""),h=e.ref(!1),a=e.ref(""),V=e.shallowRef(null),f=e.shallowRef(null),_=e.ref(),{currentModels:m,resetView:M,initThreeJS:Y,handleResize:P,getThreeJSObjects:D,cleanup:I,setModels:J,axesHelperVisible:$,toggleAxesVisibility:y,zoomIn:U,zoomOut:L}=R.useThreeJS(k),{loadSceneFromFile:X}=K.useUrdfLoader(D,m,x,S),{isAnimating:H,toggleAnimation:Q,stopAnimation:oe}=R.useAnimation(D,m),{isClipping:q,activeClippingAxis:z,toggleClipping:ne,updateClippingPlanes:T}=R.useClipping(D,m),{initRaycaster:re,selectedObject3D:ie,setSelectedObjVisible:ce,updatePosition:ue,updateRotation:de,dispose:pe}=K.useRaycaster(k,D,m),me=()=>{y()},ve=e.computed(()=>N.value===K.sceneType.ROBOT),n=e.computed(()=>N.value===K.sceneType.PIPECOMPARSION),o=d=>{var t;a.value=d,a.value==="弯管解析"?(t=v.value)==null||t.openDialog():h.value=!0},u=d=>{c.value=!0,i.value=d,d==="剖面视图"&&!q.value&&ne()},w=d=>{g.value=!0,l.value=d,d==="动画仿真"&&E("getAnimationData")},p=()=>{E("getThreeData")},B=()=>{var d;(d=_==null?void 0:_.value)==null||d.playAnimation()},A=()=>{var d;(d=_==null?void 0:_.value)==null||d.stopAnimation()},j=()=>{var d;(d=_==null?void 0:_.value)==null||d.forwardFrame()},G=()=>{var d;(d=_==null?void 0:_.value)==null||d.backwardFrame()};return e.watch(()=>s.fileBlobs,d=>{if(d&&d.length>0){const t=d[0];if(!t.name.toLowerCase().endsWith(".urdf"))return;X(t).then(ee=>{V.value=ee}).catch(ee=>{console.error("加载URDF文件时发生错误:",ee),F.ElMessage.error("加载urdf模型失败"),V.value=null})}else V.value=null},{immediate:!0,deep:!0}),e.watch(V,d=>{J(d?[d]:[]),re()}),e.onMounted(async()=>{await e.nextTick();try{Y(),window.addEventListener("resize",P);const d=D();f.value=d.scene}catch(d){console.error("Three.js 初始化失败:",d),F.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{i.value="",l.value="",window.removeEventListener("resize",P),H.value&&oe(),I(),pe()}),(d,t)=>{const ee=e.resolveComponent("el-scrollbar");return e.openBlock(),e.createElementBlock("div",ot,[e.withDirectives(e.createElementVNode("div",{ref_key:"threejsContainer",ref:k,class:"threejs-container"},null,512),[[e.vShow,ve.value]]),e.withDirectives(e.createElementVNode("div",lt,[e.createElementVNode("div",nt,null,512),e.createElementVNode("div",at,null,512)],512),[[e.vShow,n.value]]),e.createElementVNode("div",st,[e.renderSlot(d.$slots,"button-top",{switchTopPanel:o},void 0,!0),e.createVNode(R.SvgIcon,{name:"guanjianjiexi",size:"34",onClick:t[0]||(t[0]=Z=>o("弯管解析"))}),e.createVNode(R.SvgIcon,{name:"guanjiekongzhi",size:"34"}),e.createVNode(R.SvgIcon,{name:"gongyishengcheng",size:"34"}),e.createVNode(R.SvgIcon,{name:"buchangshezhi",size:"34"}),e.createVNode(R.SvgIcon,{name:"shuchujiagongchengxu",size:"34"}),e.renderSlot(d.$slots,"logout",{},void 0,!0)]),e.createElementVNode("div",rt,[e.createVNode(R.SvgIcon,{name:"viewReset",size:"24",onClick:e.unref(M),title:"重置"},null,8,["onClick"]),e.createVNode(R.SvgIcon,{name:"fangda",size:"24",title:"放大",onClick:e.unref(U)},null,8,["onClick"]),e.createVNode(R.SvgIcon,{name:"suoxiao",size:"24",title:"缩小",onClick:e.unref(L)},null,8,["onClick"]),e.createVNode(R.SvgIcon,{name:"lookAround",size:"24",onClick:e.unref(Q),title:e.unref(H)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode(R.SvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref($),onClick:me,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",it,[e.createVNode(R.SvgIcon,{name:"jiegoushu",size:"24",onClick:t[1]||(t[1]=Z=>u("场景树")),active:c.value&&i.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(R.SvgIcon,{name:"clipping",size:"24",onClick:t[2]||(t[2]=Z=>u("剖面视图")),active:c.value&&i.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(R.SvgIcon,{name:"zhaozi",size:"24",onClick:t[3]||(t[3]=Z=>u("工件树")),active:c.value&&i.value==="工件树",title:"工件 "},null,8,["active"]),e.createVNode(R.SvgIcon,{name:"donghuafangzhen",size:"24",onClick:t[4]||(t[4]=Z=>u("场景4"))})]),e.createElementVNode("div",ct,[e.renderSlot(d.$slots,"button-right",{switchRightPanel:w},void 0,!0),e.createVNode(R.SvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode(R.SvgIcon,{name:"donghuafangzhen",size:"24"}),e.createVNode(R.SvgIcon,{name:"guanjiekongzhi",size:"24",onClick:t[5]||(t[5]=Z=>w("关节控制")),active:g.value&&l.value==="关节控制",title:"关节控制"},null,8,["active"]),e.createVNode(R.SvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:t[6]||(t[6]=Z=>w("动画仿真")),active:g.value&&l.value==="动画仿真"},null,8,["active"]),e.createVNode(R.SvgIcon,{name:"donghuafangzhen",size:"24",title:"urdf动画",onClick:t[7]||(t[7]=Z=>w("urdf动画")),active:g.value&&l.value==="urdf动画"},null,8,["active"]),e.createVNode(R.SvgIcon,{name:"donghuafangzhen",size:"24"})]),e.createElementVNode("div",ut,[e.createVNode(R.SvgIcon,{name:"kuaitui",size:"24",backgroundColor:"#ffffff",title:"快退",onClick:G}),e.createVNode(R.SvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:B}),e.createVNode(R.SvgIcon,{name:"kuaijin",size:"24",backgroundColor:"#ffffff",title:"快进",onClick:j}),e.createVNode(R.SvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:A})]),e.withDirectives(e.createElementVNode("div",dt,[e.createElementVNode("div",pt,[e.createElementVNode("span",null,e.toDisplayString(a.value),1),e.createElementVNode("span",{class:"close",onClick:t[8]||(t[8]=Z=>h.value=!1)}," X ")]),e.createElementVNode("div",mt,[e.createVNode(ee,{height:"100%"},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"top-panel",{topPanelType:a.value},void 0,!0)]),_:3})])],512),[[e.vShow,h.value]]),e.withDirectives(e.createElementVNode("div",vt,[e.createElementVNode("div",ft,[e.createElementVNode("span",null,e.toDisplayString(i.value),1),e.createElementVNode("span",{class:"close",onClick:t[9]||(t[9]=Z=>c.value=!1)}," X ")]),e.createElementVNode("div",gt,[e.createVNode(ee,{height:"100%"},{default:e.withCtx(()=>{var Z;return[i.value==="场景树"?(e.openBlock(),e.createBlock(Ve.UrdfTree,{key:0,model:V.value},null,8,["model"])):e.createCommentVNode("",!0),i.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",ht,[e.createElementVNode("div",Vt,[e.createElementVNode("label",yt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":t[10]||(t[10]=O=>e.isRef(z)?z.value=O:null),onChange:t[11]||(t[11]=(...O)=>e.unref(T)&&e.unref(T)(...O))},null,544),[[e.vModelRadio,e.unref(z)]]),t[19]||(t[19]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",bt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":t[12]||(t[12]=O=>e.isRef(z)?z.value=O:null),onChange:t[13]||(t[13]=(...O)=>e.unref(T)&&e.unref(T)(...O))},null,544),[[e.vModelRadio,e.unref(z)]]),t[20]||(t[20]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":t[14]||(t[14]=O=>e.isRef(z)?z.value=O:null),onChange:t[15]||(t[15]=(...O)=>e.unref(T)&&e.unref(T)(...O))},null,544),[[e.vModelRadio,e.unref(z)]]),t[21]||(t[21]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Nt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":t[16]||(t[16]=O=>e.isRef(z)?z.value=O:null),onChange:t[17]||(t[17]=(...O)=>e.unref(T)&&e.unref(T)(...O))},null,544),[[e.vModelRadio,e.unref(z)]]),t[22]||(t[22]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0),i.value==="工件树"?(e.openBlock(),e.createBlock(K.WorkpieceTreePanel,{key:2,model:(Z=e.unref(ie))==null?void 0:Z.obj,onVisibleChange:e.unref(ce),onUpdatePosition:e.unref(ue),onUpdateRotation:e.unref(de)},null,8,["model","onVisibleChange","onUpdatePosition","onUpdateRotation"])):e.createCommentVNode("",!0)]}),_:1})])],512),[[e.vShow,c.value]]),e.withDirectives(e.createElementVNode("div",Ct,[e.createElementVNode("div",_t,[e.createElementVNode("span",null,e.toDisplayString(l.value),1),e.createElementVNode("span",{class:"close",onClick:t[18]||(t[18]=Z=>g.value=!1)}," X ")]),e.createElementVNode("div",Et,[e.createVNode(ee,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(Ve.JointPanel,{model:V.value},null,8,["model"]),[[e.vShow,l.value==="关节控制"]]),e.withDirectives(e.createVNode(Fe,{ref_key:"animationPanelRef",ref:_,model:V.value,onGetThreeData:p,threeData:s.threeData},null,8,["model","threeData"]),[[e.vShow,l.value==="动画仿真"]]),e.renderSlot(d.$slots,"right-panel",{rightPanelType:l.value},void 0,!0)]),_:3})])],512),[[e.vShow,g.value]]),x.value?(e.openBlock(),e.createElementBlock("div",xt,[t[23]||(t[23]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(S.value),1)])):e.createCommentVNode("",!0),e.createVNode(tt,{ref_key:"pipeAnalysisPanelRef",ref:v},null,512)])}}}),Mt=fe._export_sfc(kt,[["__scopeId","data-v-3bada747"]]);exports.default=Mt;