ss-component-new 1.2.6 → 1.2.7
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.
- package/dist/{OrbitControls-DA4VpOM_.js → OrbitControls-C0QRmW6_.js} +1 -1
- package/dist/{STLLoader-DmGTF0Nv.js → STLLoader-CiUjaQtA.js} +1 -1
- package/dist/{animationData-GqECkAbz.js → animationData-CMKGpOzN.js} +14 -14
- package/dist/animationData-CjOlng3t.cjs +1 -0
- package/dist/array-BI6c3lN7.cjs +11 -0
- package/dist/array-zuPH84bL.js +1142 -0
- package/dist/{iconfont-ljBfzBSE.js → iconfont-pt17sMx3.js} +2 -2
- package/dist/{index-C5CKSB0e.cjs → index-1aEh3d97.cjs} +1 -1
- package/dist/{index-BOJUyAaV.cjs → index-1z9RrjZc.cjs} +1 -1
- package/dist/{index-DJGsDpDp.js → index-Ah-8x9yf.js} +13 -13
- package/dist/{index-DPBmAgEA.cjs → index-B3bZrnX5.cjs} +1 -1
- package/dist/{index-HvKjB6_P.js → index-B5Qn4jv8.js} +5 -5
- package/dist/{index-67QO-qDa.cjs → index-B7PZ70Ke.cjs} +1 -1
- package/dist/{index-CRrAiL5l.js → index-BPOERPtt.js} +4 -4
- package/dist/{index-DcUUpSE1.cjs → index-BQ7is--r.cjs} +1 -1
- package/dist/{index-BpR7F1Fp.cjs → index-BQdJqnJf.cjs} +1 -1
- package/dist/{index-CBuqdsPh.js → index-BX3CpqTk.js} +4 -4
- package/dist/{index-DPWc4No_.js → index-B_HoaLPL.js} +2 -2
- package/dist/{index-B7hLDNQ6.cjs → index-BaOQV1JK.cjs} +1 -1
- package/dist/{index-BNvpuVyw.cjs → index-Bc20prdj.cjs} +1 -1
- package/dist/index-BhLnI2fF.cjs +1 -0
- package/dist/{index-Bs2K1FVH.js → index-BnNuMzEv.js} +2 -2
- package/dist/{index-CArSUfnV.js → index-BniAk5Lo.js} +1010 -1013
- package/dist/{index-_66uQhcl.js → index-BoHTgzWr.js} +2129 -2122
- package/dist/{index--rLSLEk3.js → index-Br5wm1ow.js} +24 -24
- package/dist/{index-mtuIEfrj.cjs → index-BxL4p0ej.cjs} +1 -1
- package/dist/{index-8yRiF_z8.cjs → index-BzOBvH4x.cjs} +1 -1
- package/dist/{index-D9oqICYV.cjs → index-C2WJz0OJ.cjs} +1 -1
- package/dist/{index-DVmoPvzr.cjs → index-C2aGGJxk.cjs} +1 -1
- package/dist/{index-DGepdvRW.js → index-CHksmnYA.js} +2 -2
- package/dist/{index-CMCrQ36H.js → index-CJW7oNUN.js} +5 -5
- package/dist/index-CJXXl1EN.cjs +1 -0
- package/dist/{index-CTkF2kl_.js → index-CKHNyMzP.js} +1 -1
- package/dist/{index-DZ8a7BZ1.cjs → index-CQAvn30B.cjs} +1 -1
- package/dist/{index-C8UOMPgt.js → index-CQzgMbjC.js} +2 -2
- package/dist/{index-LADv0t0E.js → index-CUUjf1P3.js} +12 -12
- package/dist/{index-CedgKpsz.cjs → index-CW99kzgY.cjs} +1 -1
- package/dist/{index-BHJ-tVLT.cjs → index-CXbvmuYZ.cjs} +1 -1
- package/dist/{index-BsfJJu0R.js → index-CXchqN8w.js} +6 -6
- package/dist/{index-BaRkv5oc.cjs → index-Cia5yg2S.cjs} +1 -1
- package/dist/{index-tttYIzsn.cjs → index-CjI5pDiU.cjs} +1 -1
- package/dist/{index-D-WcrLQv.js → index-CkCmJLPU.js} +4 -4
- package/dist/{index-C1FOuBuy.js → index-CvrTrN91.js} +1 -1
- package/dist/{index-DSchKIyh.cjs → index-CxnH4vfV.cjs} +1 -1
- package/dist/{index-D6mwkqWY.cjs → index-Czw_p2Ax.cjs} +13 -13
- package/dist/index-D46pfmEc.js +2567 -0
- package/dist/{index-g4qw0jRy.js → index-DDNAWKqD.js} +6 -6
- package/dist/{index-CA-FC_OL.cjs → index-DKHaw4wr.cjs} +1 -1
- package/dist/{index-CbA74tCL.js → index-DLN_fbq6.js} +4 -4
- package/dist/{index-DWs7-g1h.cjs → index-DauH8AzR.cjs} +1 -1
- package/dist/{index-DV_ZZQBO.js → index-DbzvXPKu.js} +176 -176
- package/dist/{index-9zEdW6xv.js → index-DsnxblRp.js} +6 -6
- package/dist/{index-_uyv24Pt.cjs → index-Duqrg0DV.cjs} +1 -1
- package/dist/{index-FK1YYpjN.cjs → index-Dv_9EftF.cjs} +1 -1
- package/dist/{index-B14iwpkN.cjs → index-Dx63Z3PG.cjs} +1 -1
- package/dist/index-DxukQK2k.cjs +1 -0
- package/dist/index-Dy3FE211.cjs +1 -0
- package/dist/{index-CRj9VM12.js → index-HZr3I0-O.js} +6 -6
- package/dist/{index-CbDu4gfZ.js → index-IknA4u4L.js} +5 -5
- package/dist/{index-DGi-ANHr.js → index-Kbl8xHWJ.js} +7 -7
- package/dist/{index-BMMYAqF1.js → index-MqvNXMd6.js} +1 -1
- package/dist/{index-Cm3z0Vmi.cjs → index-PBT5kNaR.cjs} +1 -1
- package/dist/{index-CShBWCYm.js → index-UDddsXT4.js} +1 -1
- package/dist/{index-Bw_JtuzR.js → index-UuJKyKlu.js} +3 -3
- package/dist/index-W6FccWpW.js +7210 -0
- package/dist/index-d3F4mRMM.js +3370 -0
- package/dist/{index-BNOx3XL5.js → index-fnqbVNnP.js} +1 -1
- package/dist/{index-CZaBF851.cjs → index-hseXzBbE.cjs} +1 -1
- package/dist/{index-87kRWJv8.cjs → index-k3lVcyGc.cjs} +1 -1
- package/dist/{index-DvpVQvAe.js → index-sBAb1SLC.js} +2 -2
- package/dist/{index-BYUPvuvs.cjs → index-tEinx-qZ.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DIMJusrg.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DULpc85o.js} +10383 -10362
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BSOYWm_U.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-hGi9c2Ju.cjs} +123 -123
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-D2VLEzGB.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-CtqR5lQb.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-D58IzjOR.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-DuybmJnl.js} +6 -6
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang--PcXwjiH.cjs +56 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-C-NVC3BN.js +34117 -0
- package/dist/index.vue_vue_type_style_index_1_lang-Cb3WPLY1.cjs +32 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-H_pReDxj.cjs → index.vue_vue_type_style_index_1_lang-Ck3aGjUr.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-hBa3nAgx.js → index.vue_vue_type_style_index_1_lang-D909xoIu.js} +5 -5
- package/dist/index.vue_vue_type_style_index_1_lang-Dy1Zc_t-.js +8126 -0
- package/dist/{isString-CELwppr9.cjs → isString-BmAegMGI.cjs} +1 -1
- package/dist/{isString--ZVOCy4V.js → isString-CZMLuMzD.js} +1 -1
- package/dist/isUndefined-ClRzgwTy.cjs +1 -0
- package/dist/isUndefined-chfCDxUU.js +84 -0
- package/dist/{main-C6Iw-pcH.cjs → main-CSuKoOz4.cjs} +1 -1
- package/dist/{main-CygliYyN.js → main-D6-NZoCw.js} +5 -5
- package/dist/obj/model.mtl +42 -0
- package/dist/obj/model.obj +26110 -0
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{three-viewport-gizmo-BHznJ6W3.js → three-viewport-gizmo-CkQ98n-T.js} +2 -2
- package/dist/{threeLatheView-DzpPpdDr.js → threeLatheView-BmVBnC8n.js} +4 -4
- package/dist/{threeLatheView-CdUoB0Te.cjs → threeLatheView-CZdorls1.cjs} +1 -1
- package/dist/{threeModel-BUCLJlE5.cjs → threeModel-CIXJ7OQA.cjs} +1 -1
- package/dist/{threeModel-BfMMeZCc.js → threeModel-CPolYsAh.js} +5 -5
- package/dist/{threePreview-BEqzg370.js → threePreview-CYX5wKoL.js} +4 -4
- package/dist/{threePreview-C-JW_pcY.cjs → threePreview-C_mY_TBC.cjs} +1 -1
- package/dist/threeSceneView-CUBwHIv3.js +1472 -0
- package/dist/threeSceneView-C_0lI1AI.cjs +5 -0
- package/dist/{threeSceneViewForCPMPIP-Bexwqkry.js → threeSceneViewForCPMPIP-BHhBMxdP.js} +86 -85
- package/dist/{threeSceneViewForCPMPIP-DwLWGNUd.cjs → threeSceneViewForCPMPIP-D4KdOIxO.cjs} +3 -3
- package/dist/{threeViewerHost-CTjd2V1D.js → threeViewerHost-Cbz8Cw7s.js} +78 -65
- package/dist/threeViewerHost-DOwyFQG3.cjs +1 -0
- package/dist/{useRayCaster-D0_7oJan.js → useRayCaster-CF6KDZ1R.js} +5 -5
- package/dist/useRayCaster-CqS7g8Ix.cjs +1 -0
- package/package.json +1 -1
- package/public/obj/model.mtl +42 -0
- package/public/obj/model.obj +26110 -0
- package/dist/animationData-B0K2ghu6.cjs +0 -1
- package/dist/array-D65aMM6H.js +0 -1207
- package/dist/array-DMPAgNcb.cjs +0 -11
- package/dist/index-8Dyi4QCI.js +0 -7293
- package/dist/index-BEoEUXZe.js +0 -2643
- package/dist/index-BsM9qdbC.cjs +0 -1
- package/dist/index-CePZE-QA.cjs +0 -1
- package/dist/index-D8510-YQ.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BnNwKutS.cjs +0 -56
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CJCvJvBM.js +0 -37436
- package/dist/index.vue_vue_type_style_index_1_lang-D5Hjs-g0.js +0 -7804
- package/dist/index.vue_vue_type_style_index_1_lang-N-_9ZJEf.cjs +0 -32
- package/dist/threeSceneView-BTsG2QJg.cjs +0 -5
- package/dist/threeSceneView-DV5dsTZZ.js +0 -1471
- package/dist/threeViewerHost-CRqcYbJE.cjs +0 -1
- package/dist/useRayCaster-DN56HpNP.cjs +0 -1
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),K=require("./useRayCaster-CqS7g8Ix.cjs"),R=require("./iconfont-t5epssvu.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-hGi9c2Ju.cjs");const F=require("./index-1z9RrjZc.cjs");require("./index.vue_vue_type_style_index_1_lang-Cb3WPLY1.cjs");require("./index-BpPyaNFa.cjs");const te=require("./index-BzOBvH4x.cjs");require("./index.vue_vue_type_style_index_1_lang-Ck3aGjUr.cjs");const r=require("./three-viewport-gizmo-BV37JzRa.cjs");require("./index-BaOQV1JK.cjs");const ge=require("./animationData-CjOlng3t.cjs"),he=require("./index-Dy3FE211.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;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { c as rt, E as y, p as be, s as ye, u as
|
|
3
|
-
import {
|
|
4
|
-
import { U as ft, s as ke, u as gt, a as ht, W as bt } from "./useRayCaster-
|
|
5
|
-
import { u as yt, a as kt, b as Pt, S as h } from "./iconfont-
|
|
6
|
-
import { _ as Pe } from "./index-
|
|
7
|
-
import "./index.vue_vue_type_style_index_1_lang-
|
|
8
|
-
import { _ as
|
|
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-DbzvXPKu.js";
|
|
3
|
+
import { k as ct, a as vt, u as pt, aG as mt } from "./index.vue_vue_type_style_index_1_lang-Dy1Zc_t-.js";
|
|
4
|
+
import { U as ft, s as ke, u as gt, a as ht, W as bt } from "./useRayCaster-CF6KDZ1R.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-MqvNXMd6.js";
|
|
7
|
+
import "./index.vue_vue_type_style_index_1_lang-D909xoIu.js";
|
|
8
|
+
import { _ as je } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
9
|
import { U as Ct, J as wt } from "./urdfTree-BuTtRGdl.js";
|
|
10
|
-
import { i as _t } from "./animationData-
|
|
11
|
-
import { O as xt } from "./STLLoader-
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
10
|
+
import { i as _t } from "./animationData-CMKGpOzN.js";
|
|
11
|
+
import { O as xt } from "./STLLoader-CiUjaQtA.js";
|
|
12
|
+
import { h as Tt } from "./index-W6FccWpW.js";
|
|
13
|
+
import { d as $t } from "./isUndefined-chfCDxUU.js";
|
|
14
|
+
import { e as zt } from "./three-viewport-gizmo-CkQ98n-T.js";
|
|
15
|
+
const Ut = { class: "panel-content" }, jt = { class: "action-bar" }, Vt = {
|
|
15
16
|
key: 0,
|
|
16
17
|
class: "animation-controls"
|
|
17
18
|
}, Lt = { class: "control-row" }, St = { class: "control-row" }, At = { class: "frame-info" }, Dt = { class: "control-row" }, Ot = {
|
|
18
19
|
key: 1,
|
|
19
20
|
class: "empty-state"
|
|
20
|
-
}, Rt = { class: "dialog-footer" }, Mt = /* @__PURE__ */
|
|
21
|
+
}, Rt = { class: "dialog-footer" }, Mt = /* @__PURE__ */ Ue({
|
|
21
22
|
__name: "urdfAnimationPanel",
|
|
22
23
|
props: {
|
|
23
24
|
model: {},
|
|
@@ -25,14 +26,14 @@ const zt = { class: "panel-content" }, Ut = { class: "action-bar" }, Vt = {
|
|
|
25
26
|
xyzbcList: {}
|
|
26
27
|
},
|
|
27
28
|
setup(W, { expose: oe }) {
|
|
28
|
-
const
|
|
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);
|
|
29
30
|
let g = 0;
|
|
30
|
-
const
|
|
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 分隔):
|
|
31
32
|
${B.value.join(" ")}
|
|
32
33
|
0 0 0 ...
|
|
33
34
|
1 2 3 ...` : "请先加载模型。"), V = T(() => o.value[C.value] || {});
|
|
34
|
-
H(() =>
|
|
35
|
-
s ? (w.value = new ft(s),
|
|
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 = []);
|
|
36
37
|
}, { immediate: !0 });
|
|
37
38
|
const S = (s) => {
|
|
38
39
|
if (s < 0 || s >= o.value.length) {
|
|
@@ -43,8 +44,8 @@ ${B.value.join(" ")}
|
|
|
43
44
|
if (w.value) {
|
|
44
45
|
const f = {};
|
|
45
46
|
E.value.forEach((p) => {
|
|
46
|
-
const
|
|
47
|
-
isNaN(
|
|
47
|
+
const d = parseFloat(a[p]);
|
|
48
|
+
isNaN(d) || (f[p] = d);
|
|
48
49
|
}), w.value.setJointAngles(f);
|
|
49
50
|
}
|
|
50
51
|
C.value = s, N.value = o.value.length > 1 ? s / (o.value.length - 1) * 100 : 100;
|
|
@@ -54,18 +55,18 @@ ${B.value.join(" ")}
|
|
|
54
55
|
if (s !== g) return;
|
|
55
56
|
const f = o.value[a], p = {};
|
|
56
57
|
if (w.value)
|
|
57
|
-
E.value.forEach((
|
|
58
|
-
const r = parseFloat(f[
|
|
59
|
-
isNaN(r) || (p[
|
|
58
|
+
E.value.forEach((d) => {
|
|
59
|
+
const r = parseFloat(f[d]);
|
|
60
|
+
isNaN(r) || (p[d] = r);
|
|
60
61
|
}), await w.value.animateToState(
|
|
61
62
|
p,
|
|
62
63
|
Y.value,
|
|
63
|
-
(
|
|
64
|
-
s === g && (N.value = (a +
|
|
64
|
+
(d) => {
|
|
65
|
+
s === g && (N.value = (a + d) / o.value.length * 100);
|
|
65
66
|
}
|
|
66
67
|
);
|
|
67
68
|
else {
|
|
68
|
-
if (await new Promise((
|
|
69
|
+
if (await new Promise((d) => setTimeout(d, Y.value)), s !== g) return;
|
|
69
70
|
N.value = (a + 1) / o.value.length * 100;
|
|
70
71
|
}
|
|
71
72
|
C.value = a;
|
|
@@ -106,7 +107,7 @@ ${B.value.join(" ")}
|
|
|
106
107
|
y.error("没有找到匹配的表头,请检查表头名称是否正确");
|
|
107
108
|
return;
|
|
108
109
|
}
|
|
109
|
-
const
|
|
110
|
+
const d = s.slice(1).map((r) => {
|
|
110
111
|
const v = r.split(" "), $ = {};
|
|
111
112
|
return B.value.forEach((_) => {
|
|
112
113
|
$[_] = "0";
|
|
@@ -115,10 +116,10 @@ ${B.value.join(" ")}
|
|
|
115
116
|
te !== void 0 && te.trim() !== "" && ($[ee] = te.trim());
|
|
116
117
|
}), $;
|
|
117
118
|
});
|
|
118
|
-
|
|
119
|
+
d.length > 0 ? (o.value = d, y.success(`成功导入 ${d.length} 行数据!`), M.value = !1, J.value = "", Z()) : y.error("未能解析到有效数据,请检查格式。");
|
|
119
120
|
};
|
|
120
|
-
H(() =>
|
|
121
|
-
|
|
121
|
+
H(() => U.xyzbcList, () => {
|
|
122
|
+
U.xyzbcList && (o.value = rt(U.xyzbcList));
|
|
122
123
|
}, {
|
|
123
124
|
immediate: !0
|
|
124
125
|
});
|
|
@@ -131,16 +132,16 @@ ${B.value.join(" ")}
|
|
|
131
132
|
}), at(() => {
|
|
132
133
|
g++;
|
|
133
134
|
}), (s, a) => {
|
|
134
|
-
const f = K("el-input-number"), p = K("el-slider"),
|
|
135
|
-
return
|
|
136
|
-
l("div",
|
|
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, [
|
|
137
138
|
i(Pe, {
|
|
138
139
|
onClick: a[0] || (a[0] = (v) => M.value = !0),
|
|
139
140
|
disabled: B.value.length === 0,
|
|
140
141
|
modelValue: "导入数据"
|
|
141
142
|
}, null, 8, ["disabled"])
|
|
142
143
|
]),
|
|
143
|
-
o.value.length > 0 ? (
|
|
144
|
+
o.value.length > 0 ? (z(), O("div", Vt, [
|
|
144
145
|
l("div", Lt, [
|
|
145
146
|
a[6] || (a[6] = l("label", null, "帧间隔 (ms):", -1)),
|
|
146
147
|
i(f, {
|
|
@@ -174,11 +175,11 @@ ${B.value.join(" ")}
|
|
|
174
175
|
l("div", null, [
|
|
175
176
|
a[9] || (a[9] = l("label", null, "当前帧数据:", -1)),
|
|
176
177
|
l("div", null, [
|
|
177
|
-
V.value ? (
|
|
178
|
+
V.value ? (z(!0), O(nt, { key: 0 }, ot(V.value, (v, $) => (z(), O("div", { key: $ }, R($) + ": " + R(v), 1))), 128)) : I("", !0)
|
|
178
179
|
])
|
|
179
180
|
])
|
|
180
181
|
])) : I("", !0),
|
|
181
|
-
o.value.length === 0 ? (
|
|
182
|
+
o.value.length === 0 ? (z(), O("div", Ot, a[10] || (a[10] = [
|
|
182
183
|
l("p", null, "请先导入数据", -1)
|
|
183
184
|
]))) : I("", !0),
|
|
184
185
|
i(r, {
|
|
@@ -202,7 +203,7 @@ ${B.value.join(" ")}
|
|
|
202
203
|
]),
|
|
203
204
|
default: ne(() => [
|
|
204
205
|
a[11] || (a[11] = l("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
|
|
205
|
-
i(
|
|
206
|
+
i(d, {
|
|
206
207
|
modelValue: J.value,
|
|
207
208
|
"onUpdate:modelValue": a[3] || (a[3] = (v) => J.value = v),
|
|
208
209
|
type: "textarea",
|
|
@@ -216,7 +217,7 @@ ${B.value.join(" ")}
|
|
|
216
217
|
]);
|
|
217
218
|
};
|
|
218
219
|
}
|
|
219
|
-
}),
|
|
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 = {
|
|
220
221
|
ref: "pipe1",
|
|
221
222
|
class: "pipe-container"
|
|
222
223
|
}, It = {
|
|
@@ -225,10 +226,10 @@ ${B.value.join(" ")}
|
|
|
225
226
|
}, 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 = {
|
|
226
227
|
key: 1,
|
|
227
228
|
class: "clipping-content"
|
|
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" },
|
|
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 = {
|
|
229
230
|
key: 0,
|
|
230
231
|
class: "loading-overlay"
|
|
231
|
-
},
|
|
232
|
+
}, cl = /* @__PURE__ */ Ue({
|
|
232
233
|
__name: "threeSceneViewForCPMPIP",
|
|
233
234
|
props: {
|
|
234
235
|
fileBlobs: { default: () => [] },
|
|
@@ -238,10 +239,10 @@ ${B.value.join(" ")}
|
|
|
238
239
|
},
|
|
239
240
|
emits: ["getAnimationData", "getThreeData"],
|
|
240
241
|
setup(W, { emit: oe }) {
|
|
241
|
-
const
|
|
242
|
+
const U = oe, o = W, M = ct(be), { originalPath: J } = ye(M);
|
|
242
243
|
vt(be);
|
|
243
|
-
const k = pt(), { activeMenuPath: C } = ye(k), N =
|
|
244
|
-
|
|
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));
|
|
245
246
|
}, G = T(() => {
|
|
246
247
|
var e, n;
|
|
247
248
|
return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.machine;
|
|
@@ -252,9 +253,9 @@ ${B.value.join(" ")}
|
|
|
252
253
|
var e, n;
|
|
253
254
|
return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.knife;
|
|
254
255
|
}), se = u([]), ie = async (t) => {
|
|
255
|
-
!t || !t.isExtra || (await ue(t), E == null || E("right"), g == null || g(t == null ? void 0 : t.pageName),
|
|
256
|
-
}, ue =
|
|
257
|
-
await
|
|
256
|
+
!t || !t.isExtra || (await ue(t), E == null || E("right"), g == null || g(t == null ? void 0 : t.pageName), j == null || j(!0));
|
|
257
|
+
}, ue = $t(async (t) => {
|
|
258
|
+
await Tt();
|
|
258
259
|
const { mainKey: e, baseMenuPath: n } = t || {};
|
|
259
260
|
mt(n, e);
|
|
260
261
|
}, 500);
|
|
@@ -339,8 +340,8 @@ ${B.value.join(" ")}
|
|
|
339
340
|
const q = T(() => {
|
|
340
341
|
var e, n;
|
|
341
342
|
return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.bladeObjUrl;
|
|
342
|
-
}), re = u(ke.ROBOT), Q = u(null), s = u(!1), a = u(""), f = u(!1), p = u(""),
|
|
343
|
-
currentModels:
|
|
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,
|
|
344
345
|
resetView: Le,
|
|
345
346
|
initThreeJS: Se,
|
|
346
347
|
handleResize: we,
|
|
@@ -351,26 +352,26 @@ ${B.value.join(" ")}
|
|
|
351
352
|
toggleAxesVisibility: Oe
|
|
352
353
|
} = yt(Q), { loadSceneFromFile: Re } = ht(
|
|
353
354
|
le,
|
|
354
|
-
|
|
355
|
+
ce,
|
|
355
356
|
s,
|
|
356
357
|
a
|
|
357
|
-
), { isAnimating: xe, toggleAnimation: Me, stopAnimation: Ne } = kt(le,
|
|
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 = () => {
|
|
358
359
|
Oe();
|
|
359
360
|
}, We = T(() => re.value === ke.ROBOT), Ye = T(() => re.value === ke.PIPECOMPARSION), Ze = (t) => {
|
|
360
361
|
$.value = t, v.value = !0;
|
|
361
362
|
}, ge = (t) => {
|
|
362
363
|
f.value = !0, p.value = t, t === "剖面视图" && !Ee.value && Be();
|
|
363
364
|
}, he = (t) => {
|
|
364
|
-
|
|
365
|
+
d.value = !0, r.value = t, t === "动画仿真" && U("getAnimationData");
|
|
365
366
|
}, qe = () => {
|
|
366
367
|
var t;
|
|
367
|
-
(t =
|
|
368
|
+
(t = de.value) == null || t.handlePlayPause();
|
|
368
369
|
}, Qe = () => {
|
|
369
370
|
var t;
|
|
370
|
-
(t =
|
|
371
|
+
(t = de.value) == null || t.pauseAnimation();
|
|
371
372
|
}, et = () => {
|
|
372
373
|
var t;
|
|
373
|
-
(t =
|
|
374
|
+
(t = de.value) == null || t.stopAnimation();
|
|
374
375
|
}, tt = (t, e) => {
|
|
375
376
|
if (!e)
|
|
376
377
|
return null;
|
|
@@ -379,7 +380,7 @@ ${B.value.join(" ")}
|
|
|
379
380
|
return console.warn(`在模型中未找到名为 '${e}' 的 link`), console.log("可用的链接:", Object.keys(t.links)), null;
|
|
380
381
|
let L = null;
|
|
381
382
|
return n.traverse((D) => {
|
|
382
|
-
D instanceof
|
|
383
|
+
D instanceof zt && !L && (L = D);
|
|
383
384
|
}), L || console.warn(`在 link '${e}' 中未找到可用的 Mesh 对象`), L;
|
|
384
385
|
}, lt = async (t) => {
|
|
385
386
|
const e = tt(t, ee.value);
|
|
@@ -420,7 +421,7 @@ ${B.value.join(" ")}
|
|
|
420
421
|
}), (t, e) => {
|
|
421
422
|
var D;
|
|
422
423
|
const n = K("el-scrollbar"), L = K("PipeAnalysisPanel");
|
|
423
|
-
return
|
|
424
|
+
return z(), O("div", Et, [
|
|
424
425
|
x(l("div", {
|
|
425
426
|
ref_key: "threejsContainer",
|
|
426
427
|
ref: Q,
|
|
@@ -442,7 +443,7 @@ ${B.value.join(" ")}
|
|
|
442
443
|
i(h, {
|
|
443
444
|
name: "viewReset",
|
|
444
445
|
size: "24",
|
|
445
|
-
onClick:
|
|
446
|
+
onClick: c(Le),
|
|
446
447
|
title: "重置"
|
|
447
448
|
}, null, 8, ["onClick"]),
|
|
448
449
|
i(h, {
|
|
@@ -458,13 +459,13 @@ ${B.value.join(" ")}
|
|
|
458
459
|
i(h, {
|
|
459
460
|
name: "lookAround",
|
|
460
461
|
size: "24",
|
|
461
|
-
onClick:
|
|
462
|
-
title:
|
|
462
|
+
onClick: c(Me),
|
|
463
|
+
title: c(xe) ? "停止动画" : "动画视图"
|
|
463
464
|
}, null, 8, ["onClick", "title"]),
|
|
464
465
|
i(h, {
|
|
465
466
|
name: "zuobiaoxi",
|
|
466
467
|
size: "24",
|
|
467
|
-
active:
|
|
468
|
+
active: c(De),
|
|
468
469
|
onClick: Ke,
|
|
469
470
|
title: "显隐坐标轴"
|
|
470
471
|
}, null, 8, ["active"])
|
|
@@ -497,14 +498,14 @@ ${B.value.join(" ")}
|
|
|
497
498
|
name: "yemian",
|
|
498
499
|
size: "24",
|
|
499
500
|
onClick: B,
|
|
500
|
-
active: (D =
|
|
501
|
+
active: (D = c(w)) == null ? void 0 : D.value,
|
|
501
502
|
title: "数据管理"
|
|
502
503
|
}, null, 8, ["active"]),
|
|
503
504
|
i(h, {
|
|
504
505
|
name: "jichuangxuanze",
|
|
505
506
|
size: "24",
|
|
506
507
|
onClick: e[3] || (e[3] = (b) => he("机床控制")),
|
|
507
|
-
active:
|
|
508
|
+
active: d.value && r.value === "机床控制",
|
|
508
509
|
title: "机床控制"
|
|
509
510
|
}, null, 8, ["active"]),
|
|
510
511
|
i(h, {
|
|
@@ -512,7 +513,7 @@ ${B.value.join(" ")}
|
|
|
512
513
|
size: "24",
|
|
513
514
|
title: "动画仿真",
|
|
514
515
|
onClick: e[4] || (e[4] = (b) => he("动画仿真")),
|
|
515
|
-
active:
|
|
516
|
+
active: d.value && r.value === "动画仿真"
|
|
516
517
|
}, null, 8, ["active"])
|
|
517
518
|
]),
|
|
518
519
|
l("div", Kt, [
|
|
@@ -570,13 +571,13 @@ ${B.value.join(" ")}
|
|
|
570
571
|
default: ne(() => {
|
|
571
572
|
var b;
|
|
572
573
|
return [
|
|
573
|
-
p.value === "场景树" ? (
|
|
574
|
+
p.value === "场景树" ? (z(), $e(Ct, {
|
|
574
575
|
key: 0,
|
|
575
576
|
model: _.value,
|
|
576
577
|
extraNodes: se.value,
|
|
577
578
|
onNodeClick: ie
|
|
578
579
|
}, null, 8, ["model", "extraNodes"])) : I("", !0),
|
|
579
|
-
p.value === "剖面视图" ? (
|
|
580
|
+
p.value === "剖面视图" ? (z(), O("div", tl, [
|
|
580
581
|
l("div", ll, [
|
|
581
582
|
l("label", al, [
|
|
582
583
|
x(l("input", {
|
|
@@ -585,9 +586,9 @@ ${B.value.join(" ")}
|
|
|
585
586
|
value: "none",
|
|
586
587
|
"onUpdate:modelValue": e[7] || (e[7] = (m) => me(P) ? P.value = m : null),
|
|
587
588
|
onChange: e[8] || (e[8] = //@ts-ignore
|
|
588
|
-
(...m) =>
|
|
589
|
+
(...m) => c(A) && c(A)(...m))
|
|
589
590
|
}, null, 544), [
|
|
590
|
-
[fe,
|
|
591
|
+
[fe, c(P)]
|
|
591
592
|
]),
|
|
592
593
|
e[16] || (e[16] = l("span", { class: "radio-text" }, "无切割", -1))
|
|
593
594
|
]),
|
|
@@ -598,9 +599,9 @@ ${B.value.join(" ")}
|
|
|
598
599
|
value: "x",
|
|
599
600
|
"onUpdate:modelValue": e[9] || (e[9] = (m) => me(P) ? P.value = m : null),
|
|
600
601
|
onChange: e[10] || (e[10] = //@ts-ignore
|
|
601
|
-
(...m) =>
|
|
602
|
+
(...m) => c(A) && c(A)(...m))
|
|
602
603
|
}, null, 544), [
|
|
603
|
-
[fe,
|
|
604
|
+
[fe, c(P)]
|
|
604
605
|
]),
|
|
605
606
|
e[17] || (e[17] = l("span", { class: "radio-text" }, "X轴切割", -1))
|
|
606
607
|
]),
|
|
@@ -611,9 +612,9 @@ ${B.value.join(" ")}
|
|
|
611
612
|
value: "y",
|
|
612
613
|
"onUpdate:modelValue": e[11] || (e[11] = (m) => me(P) ? P.value = m : null),
|
|
613
614
|
onChange: e[12] || (e[12] = //@ts-ignore
|
|
614
|
-
(...m) =>
|
|
615
|
+
(...m) => c(A) && c(A)(...m))
|
|
615
616
|
}, null, 544), [
|
|
616
|
-
[fe,
|
|
617
|
+
[fe, c(P)]
|
|
617
618
|
]),
|
|
618
619
|
e[18] || (e[18] = l("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
619
620
|
]),
|
|
@@ -624,20 +625,20 @@ ${B.value.join(" ")}
|
|
|
624
625
|
value: "z",
|
|
625
626
|
"onUpdate:modelValue": e[13] || (e[13] = (m) => me(P) ? P.value = m : null),
|
|
626
627
|
onChange: e[14] || (e[14] = //@ts-ignore
|
|
627
|
-
(...m) =>
|
|
628
|
+
(...m) => c(A) && c(A)(...m))
|
|
628
629
|
}, null, 544), [
|
|
629
|
-
[fe,
|
|
630
|
+
[fe, c(P)]
|
|
630
631
|
]),
|
|
631
632
|
e[19] || (e[19] = l("span", { class: "radio-text" }, "Z轴切割", -1))
|
|
632
633
|
])
|
|
633
634
|
])
|
|
634
635
|
])) : I("", !0),
|
|
635
|
-
p.value === "工件树" ? (
|
|
636
|
+
p.value === "工件树" ? (z(), $e(bt, {
|
|
636
637
|
key: 2,
|
|
637
|
-
model: (b =
|
|
638
|
-
onVisibleChange:
|
|
639
|
-
onUpdatePosition:
|
|
640
|
-
onUpdateRotation:
|
|
638
|
+
model: (b = c(Ie)) == null ? void 0 : b.obj,
|
|
639
|
+
onVisibleChange: c(Je),
|
|
640
|
+
onUpdatePosition: c(Ge),
|
|
641
|
+
onUpdateRotation: c(Xe)
|
|
641
642
|
}, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : I("", !0)
|
|
642
643
|
];
|
|
643
644
|
}),
|
|
@@ -652,7 +653,7 @@ ${B.value.join(" ")}
|
|
|
652
653
|
l("span", null, R(r.value), 1),
|
|
653
654
|
l("span", {
|
|
654
655
|
class: "close",
|
|
655
|
-
onClick: e[15] || (e[15] = (b) =>
|
|
656
|
+
onClick: e[15] || (e[15] = (b) => d.value = !1)
|
|
656
657
|
}, " X ")
|
|
657
658
|
]),
|
|
658
659
|
l("div", rl, [
|
|
@@ -661,12 +662,12 @@ ${B.value.join(" ")}
|
|
|
661
662
|
x(i(wt, { model: _.value }, null, 8, ["model"]), [
|
|
662
663
|
[F, r.value === "机床控制"]
|
|
663
664
|
]),
|
|
664
|
-
x(i(
|
|
665
|
+
x(i(ze, {
|
|
665
666
|
model: _.value,
|
|
666
667
|
scene: Ce.value,
|
|
667
668
|
xyzbcList: Z.value,
|
|
668
669
|
ref_key: "urdfAnimationPanelRef",
|
|
669
|
-
ref:
|
|
670
|
+
ref: de
|
|
670
671
|
}, null, 8, ["model", "scene", "xyzbcList"]), [
|
|
671
672
|
[F, r.value === "动画仿真"]
|
|
672
673
|
]),
|
|
@@ -676,9 +677,9 @@ ${B.value.join(" ")}
|
|
|
676
677
|
})
|
|
677
678
|
])
|
|
678
679
|
], 512), [
|
|
679
|
-
[F,
|
|
680
|
+
[F, d.value]
|
|
680
681
|
]),
|
|
681
|
-
s.value ? (
|
|
682
|
+
s.value ? (z(), O("div", dl, [
|
|
682
683
|
e[20] || (e[20] = l("div", { class: "loading-spinner" }, null, -1)),
|
|
683
684
|
l("p", null, R(a.value), 1)
|
|
684
685
|
])) : I("", !0),
|
|
@@ -686,7 +687,7 @@ ${B.value.join(" ")}
|
|
|
686
687
|
]);
|
|
687
688
|
};
|
|
688
689
|
}
|
|
689
|
-
}),
|
|
690
|
+
}), Tl = /* @__PURE__ */ je(cl, [["__scopeId", "data-v-d9156359"]]);
|
|
690
691
|
export {
|
|
691
|
-
|
|
692
|
+
Tl as default
|
|
692
693
|
};
|