ss-component-new 1.2.23 → 1.2.25
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/MTLLoader-AqmsmIp6.cjs +6 -0
- package/dist/MTLLoader-DJNdEDx2.js +609 -0
- package/dist/OrbitControls-Bj5caXhQ.js +419 -0
- package/dist/OrbitControls-rTIa-2s-.cjs +1 -0
- package/dist/{animationData-Bwh55Xw6.cjs → animationData-Bc9LlHz0.cjs} +1 -1
- package/dist/{animationData-D0TJ-9dd.js → animationData-Ca4l4roD.js} +4 -4
- package/dist/array-Baxi4C30.cjs +11 -0
- package/dist/array-Ca6KqnNx.js +1142 -0
- package/dist/{dataUtil-i5X2xhin.cjs → dataUtil-Cg2dZbrV.cjs} +1 -1
- package/dist/{dataUtil-gEKo7CEq.js → dataUtil-DUI9Vz64.js} +2 -2
- package/dist/{fileUtil-GIRXMs25.cjs → fileUtil-CTTbs0aJ.cjs} +1 -1
- package/dist/{fileUtil-CN00xr9W.js → fileUtil-CWt--rV-.js} +1 -1
- package/dist/{iconfont-C9-pGpAJ.cjs → iconfont-BaUxcJrk.cjs} +1 -1
- package/dist/{iconfont-DTSZW2AU.js → iconfont-D886hAXy.js} +2 -2
- package/dist/icons/svg//345/215/225/345/205/203/345/272/223.svg +1 -0
- package/dist/icons/svg//346/250/241/345/236/213/347/256/241/347/220/206.svg +1 -0
- package/dist/icons/svg//346/265/201/347/250/213/345/272/223.svg +1 -0
- package/dist/icons/svg//347/225/214/351/235/242/344/277/256/346/224/271.svg +1 -0
- package/dist/{index-BOJUyAaV.cjs → index-1z9RrjZc.cjs} +1 -1
- package/dist/{index-DSlPg3dk.cjs → index-9wWF5fgR.cjs} +1 -1
- package/dist/index-B-I7BsZI.js +2570 -0
- package/dist/{index-CqYUVCh5.js → index-B-p8m73c.js} +12 -12
- package/dist/{index-CK54pscx.cjs → index-B1qlTlfX.cjs} +1 -1
- package/dist/{index-BD5yZDAq.js → index-B5iT5NR0.js} +2 -2
- package/dist/{index-BkIFY0hK.cjs → index-B8MyAHnT.cjs} +1 -1
- package/dist/{index-7oJ8Ile4.js → index-BLW6fsom.js} +1 -1
- package/dist/{index-DbCNaQ87.cjs → index-BMK703KG.cjs} +1 -1
- package/dist/{index-eH9RMVXv.cjs → index-BNYCmfv9.cjs} +1 -1
- package/dist/{index-ThNNBX7h.js → index-BQkk6yoU.js} +1 -1
- package/dist/index-BQq7Cw_K.cjs +1 -0
- package/dist/{index-pmcRbjPd.cjs → index-BZENxsjL.cjs} +1 -1
- package/dist/{index-BNYeBPmi.cjs → index-BZoOaP9C.cjs} +1 -1
- package/dist/{index-G_cKl_J4.js → index-B_jnPuBE.js} +275 -270
- package/dist/{index-XXKsLOYd.js → index-Bke5IOmW.js} +2 -2
- package/dist/{index-DrWIUUZK.cjs → index-BtfS9ULE.cjs} +1 -1
- package/dist/{index-CvC2498b.js → index-BuLPXgWU.js} +5 -5
- package/dist/index-BxXOWAHT.cjs +1 -0
- package/dist/{index-2fqHNrPg.js → index-C8OFJprL.js} +4 -4
- package/dist/{index-CtXpoEg0.cjs → index-C9OPT3q5.cjs} +1 -1
- package/dist/{index-D8Y3imz9.cjs → index-CEV2ULrI.cjs} +1 -1
- package/dist/{index-BTTpV9o2.js → index-CTRrKUtw.js} +14 -14
- package/dist/{index-CptCatmL.js → index-CYmHP5Ky.js} +48 -32
- package/dist/{index-Dfwm0xPp.cjs → index-Cb0d2cT8.cjs} +1 -1
- package/dist/{index-Cl6HMOao.js → index-CeeMzEXY.js} +1 -1
- package/dist/{index-tttYIzsn.cjs → index-CjI5pDiU.cjs} +1 -1
- package/dist/{index-DEs8s152.js → index-CmUjrEkz.js} +6 -6
- package/dist/index-CtE7IIJq.js +7297 -0
- package/dist/{index-DSchKIyh.cjs → index-CxnH4vfV.cjs} +1 -1
- package/dist/index-CyY9deE5.cjs +1 -0
- package/dist/{index-DlIkbsRf.js → index-Cyk3pWtk.js} +6 -6
- package/dist/index-D-eD7QhS.js +654 -0
- package/dist/{index-NlkdTb--.js → index-D0odjY-X.js} +4 -4
- package/dist/{index-B0dydZDW.js → index-D1cjMjid.js} +1 -1
- package/dist/index-D5gT6DCZ.cjs +1 -0
- package/dist/{index-CvrBt7bU.js → index-D7GiDyDn.js} +6 -6
- package/dist/index-D88kGgy-.cjs +1 -0
- package/dist/{index-DMbCaqEC.cjs → index-DEExEFRs.cjs} +13 -13
- package/dist/{index-DllJulGH.cjs → index-DFMKBytS.cjs} +1 -1
- package/dist/{index-Dm_WlV6R.js → index-DNe_JGg0.js} +1 -1
- package/dist/{index-Bvk4OpkL.js → index-DTCPY-4V.js} +2 -2
- package/dist/{index-BTfg83yY.cjs → index-DTuCopl-.cjs} +1 -1
- package/dist/{index-BwEfrokO.js → index-DVSVJAdn.js} +2 -2
- package/dist/{index-7Ru3e632.cjs → index-DYr8VySV.cjs} +1 -1
- package/dist/{index-BQBxzTyE.js → index-DkA_gjlb.js} +2 -2
- package/dist/{index-7gU0r1We.cjs → index-Dkoh6zZr.cjs} +1 -1
- package/dist/{index-DNs9XPOG.js → index-DpE6q48b.js} +2 -2
- package/dist/{index-BVFL7Z_0.js → index-DqAAn-WP.js} +5 -5
- package/dist/{index-DHp714Ep.cjs → index-DrgssxCP.cjs} +1 -1
- package/dist/{index-Bt2MaT2G.js → index-J98IKvqx.js} +6 -6
- package/dist/{index-C6C5VWbs.cjs → index-PNi4RMPc.cjs} +1 -1
- package/dist/index-XXEzSATd.js +158 -0
- package/dist/{index-CADH_aSQ.cjs → index-clFmHtGU.cjs} +1 -1
- package/dist/{index-Be1LJMUR.js → index-pFuDv6dx.js} +2 -2
- package/dist/{index-BuSsSHAY.js → index-sk7jYyaG.js} +2301 -2282
- package/dist/{index-DQ3y1xkr.cjs → index-vmURlfDn.cjs} +1 -1
- package/dist/{index-BXEOQo2c.cjs → index-yyc7_nsV.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BCjeeJqj.cjs +5675 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CtycIAIT.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aFJhRTyx.js} +41519 -48931
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-De0avjy5.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dv39W1q4.js} +6 -6
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DhMDLOg8.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-OXHjy9ED.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-C4gG2WxT.cjs +56 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEcxaThh.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-CEIVtyL9.js} +10702 -10654
- package/dist/index.vue_vue_type_style_index_1_lang-D0ileuYo.cjs +32 -0
- package/dist/index.vue_vue_type_style_index_1_lang-DOP0uVOd.cjs +5 -0
- package/dist/index.vue_vue_type_style_index_1_lang-DSKzPKLD.js +8262 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-DzZEPkuk.js → index.vue_vue_type_style_index_1_lang-DkkdpQbZ.js} +1368 -1456
- package/dist/{isString-CELwppr9.cjs → isString-BmAegMGI.cjs} +1 -1
- package/dist/{isString-DvY0kl3S.js → isString-CohCsKzS.js} +1 -1
- package/dist/{main-DQXqHTYg.js → main-B4gwcsBp.js} +5 -5
- package/dist/{main-yiUkyrA7.cjs → main-HIDJ5ncj.cjs} +1 -1
- 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/{threeModel-BiWZCOOI.js → threeModel-LJMbJaUb.js} +5 -5
- package/dist/{threeModel-Cva5i9Dy.cjs → threeModel-tRhkTPHD.cjs} +1 -1
- package/dist/threePreview-CeCm5KTT.cjs +1 -0
- package/dist/{threePreview-CjFKHY3_.js → threePreview-CqWnM1XW.js} +442 -541
- package/dist/{threeSceneView-DM8uof_D.cjs → threeSceneView-CTChIfwR.cjs} +1 -1
- package/dist/{threeSceneView-DPTQ_xR-.js → threeSceneView-D2mX_5N9.js} +11 -11
- package/dist/{threeSceneViewForCPMPIP-D5jl1r-h.cjs → threeSceneViewForCPMPIP-C_MBwi1O.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Bqb44i-c.js → threeSceneViewForCPMPIP-CpVcogbP.js} +10 -10
- package/dist/{threeTrackPathView-BvxoafSz.js → threeTrackPathView-DMTpRQTP.js} +172 -354
- package/dist/threeTrackPathView-Deim_dX7.cjs +371 -0
- package/dist/threeViewerHost-BMrWNnGK.cjs +1 -0
- package/dist/{threeViewerHost-CKmZPGir.js → threeViewerHost-WXqI_L3g.js} +91 -78
- package/dist/{urdfTree-BxuavyNQ.js → urdfTree-BX92weHU.js} +1 -1
- package/dist/{urdfTree-wR2vnG4s.cjs → urdfTree-CbDb_7PZ.cjs} +1 -1
- package/dist/{workpieceTreePanel-C2BXrv3k.cjs → workpieceTreePanel-CbTolK6t.cjs} +1 -1
- package/dist/{workpieceTreePanel-CSKzSdIt.js → workpieceTreePanel-Q4S9btz3.js} +18 -18
- package/package.json +1 -1
- package/public/icons/svg//345/215/225/345/205/203/345/272/223.svg +1 -0
- package/public/icons/svg//346/250/241/345/236/213/347/256/241/347/220/206.svg +1 -0
- package/public/icons/svg//346/265/201/347/250/213/345/272/223.svg +1 -0
- package/public/icons/svg//347/225/214/351/235/242/344/277/256/346/224/271.svg +1 -0
- package/dist/MTLLoader-B8MnfNfT.cjs +0 -6
- package/dist/MTLLoader-BD3cbBAW.js +0 -657
- package/dist/OrbitControls-2UHRU9Fu.cjs +0 -1
- package/dist/OrbitControls-D1pz0uFI.js +0 -458
- package/dist/array-DMPAgNcb.cjs +0 -11
- package/dist/array-DTXrs6ZK.js +0 -1207
- package/dist/index-BLwwxnzs.cjs +0 -1
- package/dist/index-BVdolwlx.js +0 -7293
- package/dist/index-Bm3FE_ss.js +0 -504
- package/dist/index-BpTrDbkf.js +0 -22
- package/dist/index-C54wX50t.cjs +0 -1
- package/dist/index-CFriKZ-T.cjs +0 -1
- package/dist/index-CsOz5vsv.cjs +0 -1
- package/dist/index-D4pN9YmB.js +0 -144
- package/dist/index-DOhvzke2.js +0 -24
- package/dist/index-DPX3w6cO.js +0 -2643
- package/dist/index-DR9beXhk.cjs +0 -1
- package/dist/index-Do8zI4DM.cjs +0 -1
- package/dist/index-dwX_BHyo.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6X3fCNs.cjs +0 -5677
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DLuOs1IZ.cjs +0 -56
- package/dist/index.vue_vue_type_style_index_1_lang-B0l6QIWy.js +0 -7806
- package/dist/index.vue_vue_type_style_index_1_lang-CC1o5rIu.cjs +0 -32
- package/dist/index.vue_vue_type_style_index_1_lang-Chzrrthw.cjs +0 -6
- package/dist/threePreview-BNvDY6xx.cjs +0 -1
- package/dist/threeTrackPathView-DgnuPrBe.cjs +0 -370
- package/dist/threeViewerHost-D80V4Cfh.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("./workpieceTreePanel-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),X=require("./workpieceTreePanel-CbTolK6t.cjs"),pe=require("./iconfont-BaUxcJrk.cjs"),$=require("./index-1z9RrjZc.cjs"),s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BCjeeJqj.cjs");require("./index.vue_vue_type_style_index_1_lang-D0ileuYo.cjs");require("./index-BpPyaNFa.cjs");const Q=require("./index-CEV2ULrI.cjs");require("./index.vue_vue_type_style_index_1_lang-DOP0uVOd.cjs");require("./index-B8MyAHnT.cjs");const Ce=require("./animationData-Bc9LlHz0.cjs"),ne=require("./urdfTree-CbDb_7PZ.cjs"),we=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ee=require("./dataUtil-Cg2dZbrV.cjs"),M=require("./svgIcon-CUM54R6L.cjs"),Z=.001,H=s.MathUtils.degToRad,Ne=new s.MeshStandardMaterial({color:13421772,metalness:.3,roughness:.6,side:s.DoubleSide});function Me(V=.005,m=64){const f=new s.CatmullRomCurve3([new s.Vector3(0,0,0),new s.Vector3(0,0,0)]),n=new s.TubeGeometry(f,m,V,16,!1),g=Ne;return new s.Mesh(n,g)}const ke=V=>V.reduce((m,f)=>{let n=0;const g=f.Y??0,h=f.C??0,c=f.R??0;return g>0&&(n+=g),h>0&&c>0&&(n+=c*H(h)),m+n},0),Te=V=>{const m=[],f=V.Y??0,n=V.B??0,g=V.C??0,h=V.R??0,c={pos:new s.Vector3(0,0,0),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};if(!f&&!g)return m;if(m.push(c.pos.clone()),n!==0){const C=new s.Matrix4().makeRotationAxis(c.localY,H(n));c.localX.applyMatrix4(C),c.localZ.applyMatrix4(C)}if(f>0&&(c.pos.add(c.localY.clone().multiplyScalar(f*Z)),m.push(c.pos.clone())),g>0&&h>0){const C=H(g),u=h*Z,_=c.pos.clone().add(c.localX.clone().multiplyScalar(-u)),r=Math.max(16,Math.ceil(g/5));for(let p=1;p<=r;p++){const a=C*p/r,d=new s.Matrix4().makeRotationAxis(c.localZ,a),b=c.localX.clone().multiplyScalar(u).applyMatrix4(d),E=_.clone().add(b);m.push(E)}}return m};function Se(V,m){const f=new s.Group;f.name="CompletePipe";const n={pos:new s.Vector3(0,0,0),localX:new s.Vector3(1,0,0),localY:new s.Vector3(0,1,0),localZ:new s.Vector3(0,0,1)};let g=0,h=1;for(let c=0;c<V.length;c++){const C=V[c],u=C.Y??0,_=C.B??0,r=C.C??0,p=C.R??0;if(_!==0){const a=new s.Matrix4().makeRotationAxis(n.localY,H(_));n.localX.applyMatrix4(a),n.localZ.applyMatrix4(a)}if(u>0){const a=n.pos.clone();n.pos.add(n.localY.clone().multiplyScalar(u*Z));const d=n.pos.clone(),i=Pe(a,d,m*Z);i.userData={segmentType:"straight",segmentIndex:g,frameIndex:c,length:u,frame:{Y:u,B:_,C:r,R:p}},i.name=`直段_${g}`,f.add(i);const b=a.clone();De(f,h,b,m*Z),g++}if(r>0&&p>0){const a=H(r),d=p*Z,i=[];i.push(n.pos.clone());const b=n.pos.clone().add(n.localX.clone().multiplyScalar(-d)),E=Math.max(16,Math.ceil(r/5));for(let P=1;P<=E;P++){const D=a*P/E,T=new s.Matrix4().makeRotationAxis(n.localZ,D),k=n.localX.clone().multiplyScalar(d).applyMatrix4(T),w=b.clone().add(k);i.push(w)}const v=Re(i,m*Z);v.userData={segmentType:"bend",segmentIndex:g,frameIndex:c,angle:r,radius:p,centerPoint:b.toArray(),frame:{Y:u,B:_,C:r,R:p}},v.name=`弯段_${g}`,f.add(v),Math.floor(i.length/2),i[0],n.pos=i[i.length-1].clone();const S=new s.Matrix4().makeRotationAxis(n.localZ,a);n.localY.applyMatrix4(S),n.localX.applyMatrix4(S),g++,h++}}return f}function De(V,m,f,n){const g=new s.Vector3(0,n*2,n*5),h=f.clone().add(g),c=[f,h],C=new s.BufferGeometry().setFromPoints(c),u=new s.LineDashedMaterial({color:16711680,dashSize:n*.5,gapSize:n*.3,linewidth:1}),_=new s.Line(C,u);_.computeLineDistances(),V.add(_);const r=document.createElement("canvas"),p=r.getContext("2d");r.width=128,r.height=128,p.clearRect(0,0,128,128),p.fillStyle="#FF0000",p.font="bold 80px Arial",p.textAlign="center",p.textBaseline="middle",p.fillText(m.toString(),64,64);const a=new s.CanvasTexture(r),d=new s.SpriteMaterial({map:a,transparent:!0,depthTest:!1,depthWrite:!1}),i=new s.Sprite(d),b=n*3;i.scale.set(b,b,1),i.position.copy(h),i.name=`Label_${m}`,i.userData={labelNumber:m},V.add(i)}function Pe(V,m,f){const n=new s.LineCurve3(V,m),g=new s.TubeGeometry(n,2,f,18,!1);return new s.Mesh(g,Ne)}function Re(V,m){const f=new s.CatmullRomCurve3(V,!1,"catmullrom",.01),n=new s.TubeGeometry(f,Math.max(16,V.length*2),m,18,!1);return new s.Mesh(n,Ne)}function _e(V,m,f,n,g,h=0){let c=m.slice(0,g+1);const C=m[g+1];if(C&&h>0){const i={...C,B:(C.B??0)*h,C:(C.C??0)*h};c.push(i)}const u=ke(c),_=Math.max(0,f-u),r=[];r.push(new s.Vector3(0,0,0));const p=new s.Vector3(0,_*Z,0);_>0&&r.push(p);let a={pos:p.clone(),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};const d=[];for(let i=c.length-1;i>=0;i--){const b=c[i],E=Te(b);if(E.length>0){const v=E.map(T=>{const R=T.clone(),k=new s.Matrix4;return k.makeBasis(a.localX,a.localY,a.localZ),R.applyMatrix4(k),R.add(a.pos)});d.push(v);const S=v[v.length-1];a.pos=S.clone();const P=b.B??0,D=b.C??0;if(P!==0){const T=new s.Matrix4().makeRotationAxis(a.localY,H(P));a.localX.applyMatrix4(T),a.localZ.applyMatrix4(T)}if(D>0){const T=H(D),R=new s.Matrix4().makeRotationAxis(a.localZ,T);a.localY.applyMatrix4(R),a.localX.applyMatrix4(R)}}}for(const i of d)i.length>1&&r.push(...i.slice(1));r.length<2&&r.push(new s.Vector3(0,.001,0));try{const i=new s.CatmullRomCurve3(r,!1,"catmullrom",.01),b=new s.TubeGeometry(i,Math.max(2,r.length*4),n*Z,18,!1);V.geometry.dispose(),V.geometry=b}catch(i){console.error("管件更新失败",i)}}function xe(V,m,f,n=0){let g=V.slice(0,f+1);const h=V[f+1];if(h&&n>0){const a={...h,B:(h.B??0)*n,C:(h.C??0)*n};g.push(a)}const c=ke(g),C=Math.max(0,m-c),u=[];u.push(new s.Vector3(0,0,0));const _=new s.Vector3(0,C*Z,0);C>0&&u.push(_);let r={pos:_.clone(),localY:new s.Vector3(0,1,0),localX:new s.Vector3(1,0,0),localZ:new s.Vector3(0,0,1)};const p=[];for(let a=g.length-1;a>=0;a--){const d=g[a],i=Te(d);if(i.length>0){const b=i.map(P=>{const D=P.clone(),T=new s.Matrix4;return T.makeBasis(r.localX,r.localY,r.localZ),D.applyMatrix4(T),D.add(r.pos)});p.push(b);const E=b[b.length-1];r.pos=E.clone();const v=d.B??0,S=d.C??0;if(v!==0){const P=new s.Matrix4().makeRotationAxis(r.localY,H(v));r.localX.applyMatrix4(P),r.localZ.applyMatrix4(P)}if(S>0){const P=H(S),D=new s.Matrix4().makeRotationAxis(r.localZ,P);r.localY.applyMatrix4(D),r.localX.applyMatrix4(D)}}}for(const a of p)a.length>1&&u.push(...a.slice(1));return u.length<2&&u.push(new s.Vector3(0,.001,0)),u}function Ee(V,m,f,n,g,h,c,C=0,u=0){const _=g-u,r=xe(n,_,c,C);let a=xe(f,u,c,C);a.forEach(i=>i.y=-i.y),a.reverse();const d=[...a,...r];try{const i=new s.CatmullRomCurve3(d,!1,"catmullrom",.01),b=new s.TubeGeometry(i,Math.max(2,d.length*4),h*Z,18,!1);m.geometry.dispose(),V.geometry.dispose(),m.parent&&m.parent.remove(m),V.geometry=b}catch(i){console.error("管件更新失败",i)}}const Be={class:"panel-content"},ze={class:"action-bar"},Ae={class:"animation-controls"},$e={class:"control-row"},Fe={class:"control-row"},Ye={class:"frame-info"},Le={class:"control-row"},Ie={class:"progress-bar"},Ue={class:"dialog-footer"},je=e.defineComponent({__name:"animationPanel",props:{model:{},threeData:{}},emits:["getThreeData"],setup(V,{expose:m,emit:f}){const n=V,g=f,h=e.ref(),c=e.ref();e.watch(()=>n.threeData,l=>{const t=l==null?void 0:l.data;c.value=t==null?void 0:t.type},{immediate:!0});const C=async()=>{if(!sessionStorage.getItem("systemKey")){g("getThreeData");return}let t={};c.value===X.robotMode.SINGLE&&(t=await Ce.fetchSingleRobotAnimationData()),c.value===X.robotMode.DOUBLE&&(t=await Ce.fetchDoubleRobotAnimationData());const{initialPipeLength:o=0,pipeRadius:y=0,clampLength:N=0,animationData:x}=t;D.value=o,T.value=y,R.value=N,h.value=x;const O=$.cloneDeep(h.value),K=ce(F.value),q=(O==null?void 0:O["输出(动画数据)"])||[];u.value=q.length?q:[K]},u=e.ref([]),_=e.ref(!1),r=e.ref(""),p=e.ref(!1),a=e.ref(0),d=e.ref(0),i=e.ref(1e3);let b=!1;const E=e.ref(null),v=e.shallowRef(null),S=e.shallowRef(null),P=e.shallowRef(null),D=e.ref(0),T=e.ref(12.5),R=e.ref(30),k=e.ref([]),w=e.ref(null),I=e.computed(()=>n.model?ne.getNonFixedJoints(n.model).map(o=>o.name):[]),G=e.ref(["Y","B","C","R"]),F=e.computed(()=>[...I.value,...G.value]),Y=e.computed(()=>F.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
2
2
|
${F.value.join(" ")}
|
|
3
3
|
0 0 0 ...
|
|
4
4
|
1 2 3 ...`:"请先加载模型。"),J=()=>u.value.map(l=>({Y:parseFloat(l.Y)||0,B:parseFloat(l.B)||0,C:parseFloat(l.C)||0,R:parseFloat(l.R)||0})),U=()=>{const l=[],t=[];return u.value.forEach(o=>{const{Y1:y,B1:N,C1:x,R1:O,Y2:K,B2:q,C2:ie,R2:A}=o;l.push({Y:parseFloat(y)||0,B:parseFloat(N)||0,C:parseFloat(x)||0,R:parseFloat(O)||0}),t.push({Y:parseFloat(K)||0,B:parseFloat(q)||0,C:parseFloat(ie)||0,R:parseFloat(A)||0})}),{posPipeYbcr:l,negPipeYbcr:t}},L=(l=0,t=0)=>{if(v.value&&S.value){const o=U();Ee(v.value,S.value,o.posPipeYbcr,o.negPipeYbcr,D.value,T.value,l,t,R.value)}else if(v.value){const o=J();_e(v.value,o,D.value,T.value,l,t)}},W=l=>{if(l<0||l>=u.value.length){console.error(`帧索引 ${l} 超出范围`);return}const t=u.value[l];if(console.log(`应用第 ${l} 帧数据 ${t}`),a.value=l,E.value){const o={};I.value.forEach(y=>{const N=parseFloat(t[y]);isNaN(N)||(o[y]=N)}),E.value.setJointAngles(o)}L(l,0)},B=async()=>{if(u.value.length===0){$.ElMessage.error("无法播放动画:无数据");return}if(!p.value){p.value=!0,b=!1,u.value.length-1===a.value&&(a.value=0);try{for(let l=a.value+1;l<u.value.length&&!b;l++){a.value=l;const t=u.value[l],o={};E.value&&I.value.forEach(y=>{const N=parseFloat(t[y]);isNaN(N)||(o[y]=N)}),E.value?await E.value.animateToState(o,i.value,y=>{d.value=(l+y)/u.value.length*100,L(l-1,y)}):(await new Promise(y=>setTimeout(y,i.value)),d.value=(l+1)/u.value.length*100)}b||$.ElMessage.success("动画播放完成")}catch(l){console.error("动画播放出错:",l),$.ElMessage.error("动画播放出错")}finally{p.value=!1,d.value=0}}},z=()=>{b=!0,p.value=!1,d.value=0,$.ElMessage.info("动画已停止")},ae=()=>{a.value=0},j=()=>{if(v.value&&S.value){const l=U();Ee(v.value,S.value,l.posPipeYbcr,l.negPipeYbcr,D.value,T.value,-1,0,R.value)}else if(v.value){const l=J();_e(v.value,l,D.value,T.value,-1,0)}},oe=()=>{E.value&&E.value.resetToZero(),j(),ae(),$.ElMessage.success("机器人和管件已重置")},me=l=>`第 ${l+1} 帧`,ve=l=>{p.value&&z(),W(l)},fe=()=>{p.value&&z(),!(a.value+1>=u.value.length)&&W(a.value+1)},ge=()=>{p.value&&z(),a.value!==0&&W(a.value-1)},se=()=>{P.value&&(P.value.visible=!0),v.value&&v.value.parent&&v.value.parent.remove(v.value),P.value=null,v.value=null,S.value=null},ce=l=>l==null?void 0:l.reduce((t,o)=>(t[o]="0",t),{});e.watch(F,(l,t)=>{if(JSON.stringify(l)!==JSON.stringify(t))if(l.length>0){const o=ce(l);u.value=[o]}else u.value=[]},{immediate:!0});const re=e.ref(0),he=l=>{re.value=l},ue=(l,t)=>{if(!l||!t)return;const o=ne.getTargetJoint(l,t),y=Me();y.visible=!1,o==null||o.add(y)},te=l=>{E.value=new X.URDFRobotController(l),k.value=ne.getAllLinkName(l),w.value="Pipe_Joint"},le=()=>{E.value=null,k.value=[],w.value=null},Ve=l=>{te(l),ue(l,w.value),he(re.value+1),oe()};e.watch(()=>n.model,l=>{if(se(),l){Ve(l);return}le()},{immediate:!0});const de=l=>{var o,y;const t=new s.Mesh(l.geometry.clone(),l.material);return t.name="managed_pipe_clone",(y=(o=l==null?void 0:l.parent)==null?void 0:o.add)==null||y.call(o,t),t.position.copy(l.position),t.rotation.copy(l.rotation),t.scale.copy(l.scale),t};e.watch([w,R,D,re],([l,t])=>{if(se(),n.model&&l){const o=ne.getMeshFromJoint(n.model,l);if(console.log(o,"meshToReplace"),o&&o.parent){P.value=o,o.visible=!1;const y=de(o);if(c.value===X.robotMode.SINGLE&&(y.position.y-=t*.001),v.value=y,c.value===X.robotMode.DOUBLE){const N=de(o);S.value=N}L(0,0)}else l&&console.warn(`在 link '${l}' 中未找到可替换的网格或其没有父级。`)}});const be=async()=>{if(F.value.length===0){$.ElMessage.warning("没有可导出的表头");return}const l=F.value.join(" ");try{await navigator.clipboard.writeText(l),$.ElMessage.success("表头已成功复制到剪贴板!")}catch(t){console.error("复制失败:",t),$.ElMessage.error("复制失败,请检查浏览器权限或手动复制。")}},ye=()=>{if(!r.value.trim()){$.ElMessage.warning("导入内容不能为空");return}const l=r.value.trim().split(`
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { defineComponent as Oe, ref as h, watch as se, shallowRef as ve, computed as we, onUnmounted as Qe, resolveComponent as O, createElementBlock as _e, openBlock as te, createElementVNode as n, createVNode as o, withCtx as T, createBlock as Ce, createCommentVNode as ye, unref as V, toDisplayString as me, onMounted as Ie, onBeforeUnmount as We, Fragment as et, renderList as tt, nextTick as lt, withDirectives as q, vShow as re, renderSlot as de, isRef as Te, vModelRadio as Re } from "vue";
|
|
2
|
-
import { r as Me, U as ot, s as je, u as nt, a as at, W as st } from "./workpieceTreePanel-
|
|
3
|
-
import { u as Ke, a as it, b as rt } from "./iconfont-
|
|
4
|
-
import { a9 as ut, c as ct, E as X, aM as pt, ao as dt } from "./index-
|
|
5
|
-
import { t as Ve, T as ke, V as F, r as Q, s as mt, u as vt, k as Se, v as ft, L as gt, w as ht, x as bt, y as yt, z as wt, F as _t, I as Ct, p as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
6
|
-
import "./index.vue_vue_type_style_index_1_lang-
|
|
2
|
+
import { r as Me, U as ot, s as je, u as nt, a as at, W as st } from "./workpieceTreePanel-Q4S9btz3.js";
|
|
3
|
+
import { u as Ke, a as it, b as rt } from "./iconfont-D886hAXy.js";
|
|
4
|
+
import { a9 as ut, c as ct, E as X, aM as pt, ao as dt } from "./index-DNe_JGg0.js";
|
|
5
|
+
import { t as Ve, T as ke, V as F, r as Q, s as mt, u as vt, k as Se, v as ft, L as gt, w as ht, x as bt, y as yt, z as wt, F as _t, I as Ct, p as kt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aFJhRTyx.js";
|
|
6
|
+
import "./index.vue_vue_type_style_index_1_lang-DSKzPKLD.js";
|
|
7
7
|
import "./index-BHtNKL1L.js";
|
|
8
|
-
import { _ as ue, s as Pt } from "./index-
|
|
9
|
-
import "./index.vue_vue_type_style_index_1_lang-
|
|
10
|
-
import "./index-
|
|
11
|
-
import { f as xt, a as Dt } from "./animationData-
|
|
12
|
-
import { g as Tt, a as Rt, b as Mt, c as Vt, U as St, J as At } from "./urdfTree-
|
|
8
|
+
import { _ as ue, s as Pt } from "./index-D1cjMjid.js";
|
|
9
|
+
import "./index.vue_vue_type_style_index_1_lang-DkkdpQbZ.js";
|
|
10
|
+
import "./index-BuLPXgWU.js";
|
|
11
|
+
import { f as xt, a as Dt } from "./animationData-Ca4l4roD.js";
|
|
12
|
+
import { g as Tt, a as Rt, b as Mt, c as Vt, U as St, J as At } from "./urdfTree-BX92weHU.js";
|
|
13
13
|
import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
14
|
-
import { g as zt, a as Ee, d as $t, c as Ft, e as Yt, b as Lt } from "./dataUtil-
|
|
14
|
+
import { g as zt, a as Ee, d as $t, c as Ft, e as Yt, b as Lt } from "./dataUtil-DUI9Vz64.js";
|
|
15
15
|
import { T as A } from "./svgIcon-D-_fXUBL.js";
|
|
16
16
|
const H = 1e-3, ae = mt.degToRad, Ge = new ft({
|
|
17
17
|
// 灰色
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Te=require("./index.vue_vue_type_style_index_1_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Te=require("./index.vue_vue_type_style_index_1_lang-D0ileuYo.cjs"),A=require("./workpieceTreePanel-CbTolK6t.cjs"),Z=require("./iconfont-BaUxcJrk.cjs"),p=require("./index-1z9RrjZc.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BCjeeJqj.cjs");const Q=require("./index-CEV2ULrI.cjs"),G=require("./urdfTree-CbDb_7PZ.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CUM54R6L.cjs"),De=require("./animationData-Bc9LlHz0.cjs"),Me=require("./MTLLoader-AqmsmIp6.cjs"),oe=require("./index-D88kGgy-.cjs"),$e={class:"panel-content"},Be={class:"action-bar"},ze={key:0,class:"animation-controls"},Le={class:"control-row"},Re={class:"control-row"},Ue={class:"frame-info"},je={class:"control-row"},Ae={key:1,class:"empty-state"},Ie={class:"dialog-footer"},Oe=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(B,{expose:I}){const k=B,o=e.ref([]),w=e.ref(!1),C=e.ref(""),v=e.ref("stopped"),c=e.ref(0),y=e.ref(0),z=e.ref(10),S=e.ref(null);let h=0;const O=e.ref([]),T=e.computed(()=>k.model?G.getNonFixedJoints(k.model).map(m=>m.name):[]),P=e.computed(()=>[...T.value]),W=e.computed(()=>P.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
2
2
|
${P.value.join(" ")}
|
|
3
3
|
0 0 0 ...
|
|
4
4
|
1 2 3 ...`:"请先加载模型。"),R=e.computed(()=>o.value[c.value]||{});e.watch(()=>k.model,s=>{s?(S.value=new A.URDFRobotController(s),O.value=G.getAllLinkName(s),c.value=0):(S.value=null,O.value=[])},{immediate:!0});const U=s=>{if(s<0||s>=o.value.length){console.error(`帧索引 ${s} 超出范围`);return}const n=o.value[s];if(S.value){const m={};T.value.forEach(N=>{const i=parseFloat(n[N]);isNaN(i)||(m[N]=i)}),S.value.setJointAngles(m)}c.value=s,y.value=o.value.length>1?s/(o.value.length-1)*100:100},H=async s=>{try{for(let n=c.value;n<o.value.length;n++){if(s!==h)return;const m=o.value[n],N={};if(S.value)T.value.forEach(i=>{const r=parseFloat(m[i]);isNaN(r)||(N[i]=r)}),await S.value.animateToState(N,z.value,i=>{s===h&&(y.value=(n+i)/o.value.length*100)});else{if(await new Promise(i=>setTimeout(i,z.value)),s!==h)return;y.value=(n+1)/o.value.length*100}c.value=n}s===h&&(p.ElMessage.success("动画播放完成"),v.value="stopped",y.value=100)}catch(n){console.error("动画播放出错:",n),p.ElMessage.error("动画播放出错"),v.value="stopped"}},_=()=>{if(o.value.length===0){p.ElMessage.error("无动画数据");return}v.value==="stopped"&&(c.value=0,U(0)),v.value="playing",h++,H(h),p.ElMessage.info("动画播放中")},V=()=>{v.value==="playing"&&(h++,v.value="paused",p.ElMessage.info("动画已暂停"))},D=()=>{h++,v.value="stopped",c.value=0,y.value=0,U(0),p.ElMessage.info("动画已停止并重置")},E=()=>{v.value==="playing"?V():_()},F=s=>{h++,v.value="paused",U(s)},q=()=>{if(!C.value.trim()){p.ElMessage.warning("导入内容不能为空");return}const s=C.value.trim().split(`
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { defineComponent as we, ref as u, computed as U, watch as Z, onUnmounted as He, resolveComponent as q, createElementBlock as M, openBlock as z, createElementVNode as l, createCommentVNode as G, createVNode as i, toDisplayString as B, Fragment as Ke, renderList as We, withCtx as ne, inject as he, shallowRef as ue, onMounted as Ye, nextTick as Ze, onBeforeUnmount as qe, withDirectives as $, vShow as W, renderSlot as Y, unref as d, createBlock as ye, isRef as re, vModelRadio as de } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { U as et, s as ke, u as tt, a as lt, W as at } from "./workpieceTreePanel-
|
|
4
|
-
import { u as nt, a as ot, b as st } from "./iconfont-
|
|
5
|
-
import { c as it, E as y } from "./index-
|
|
6
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
7
|
-
import { _ as pe } from "./index-
|
|
8
|
-
import { g as ut, b as rt, U as dt, J as ct, d as vt } from "./urdfTree-
|
|
2
|
+
import { aG as Qe } from "./index.vue_vue_type_style_index_1_lang-DSKzPKLD.js";
|
|
3
|
+
import { U as et, s as ke, u as tt, a as lt, W as at } from "./workpieceTreePanel-Q4S9btz3.js";
|
|
4
|
+
import { u as nt, a as ot, b as st } from "./iconfont-D886hAXy.js";
|
|
5
|
+
import { c as it, E as y } from "./index-DNe_JGg0.js";
|
|
6
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-aFJhRTyx.js";
|
|
7
|
+
import { _ as pe } from "./index-D1cjMjid.js";
|
|
8
|
+
import { g as ut, b as rt, U as dt, J as ct, d as vt } from "./urdfTree-BX92weHU.js";
|
|
9
9
|
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
import { T as h } from "./svgIcon-D-_fXUBL.js";
|
|
11
|
-
import { i as pt } from "./animationData-
|
|
12
|
-
import { O as mt } from "./MTLLoader-
|
|
13
|
-
import { t as ft, h as gt } from "./index-
|
|
11
|
+
import { i as pt } from "./animationData-Ca4l4roD.js";
|
|
12
|
+
import { O as mt } from "./MTLLoader-DJNdEDx2.js";
|
|
13
|
+
import { t as ft, h as gt } from "./index-CtE7IIJq.js";
|
|
14
14
|
const bt = { class: "panel-content" }, ht = { class: "action-bar" }, yt = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "animation-controls"
|