ss-component-new 1.2.9 → 1.2.11
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/{animationData-1jRSDcwE.js → animationData-C_gV7XAN.js} +16 -16
- package/dist/animationData-CyP8-u7i.cjs +1 -0
- package/dist/array-A59WrroX.js +1207 -0
- package/dist/array-BtZq8qON.cjs +11 -0
- package/dist/index-2nEz-J89.js +24 -0
- package/dist/{index-CQAvn30B.cjs → index-7eyGTvr0.cjs} +1 -1
- package/dist/{index-DNm5s2Lm.cjs → index-Adqs5vHH.cjs} +1 -1
- package/dist/{index-fMxLuU_H.js → index-B7g38Yte.js} +2 -2
- package/dist/{index-Cyk0Tzhx.cjs → index-B9OZcnHm.cjs} +13 -13
- package/dist/index-BAOnUk_J.cjs +1 -0
- package/dist/{index-B1NmIRwn.js → index-BDaeo6qO.js} +2 -2
- package/dist/{index-L3WHrdzB.cjs → index-BJBNtx2b.cjs} +1 -1
- package/dist/{index-cA_EynOM.js → index-BMYtLkw8.js} +4 -4
- package/dist/{index-Dfhvay-Y.js → index-BQ4Rjf8F.js} +6 -6
- package/dist/{index-BQdJqnJf.cjs → index-BUUEqGRN.cjs} +1 -1
- package/dist/{index-CgtkRkQ3.js → index-B_ZGJtId.js} +1 -1
- package/dist/{index-C2aGGJxk.cjs → index-B_mFQujY.cjs} +1 -1
- package/dist/{index-lyUWApVE.js → index-BbI9_JbX.js} +32 -48
- package/dist/index-BeYNgEHV.js +144 -0
- package/dist/{index-CKHNyMzP.js → index-BwjuTBrR.js} +1 -1
- package/dist/{index-Ci_C9h8v.js → index-C-c1pt-2.js} +1 -1
- package/dist/{index-DbisH6iI.cjs → index-C40ofXP7.cjs} +1 -1
- package/dist/{index-CvrTrN91.js → index-C461j30b.js} +1 -1
- package/dist/{index-1vs_3Pz3.cjs → index-C5gPrwPs.cjs} +1 -1
- package/dist/{index-Duqrg0DV.cjs → index-C68Hri2v.cjs} +1 -1
- package/dist/{index-Djagy2ww.cjs → index-CAewC69j.cjs} +1 -1
- package/dist/index-CApZYDIm.cjs +1 -0
- package/dist/{index-BWECkG4C.js → index-CKLBlQoK.js} +2122 -2129
- package/dist/{index-BaOQV1JK.cjs → index-CKt6cj9f.cjs} +1 -1
- package/dist/index-CN29uy_G.js +7293 -0
- package/dist/{index-B--6DX0M.js → index-CRiovRyR.js} +2 -2
- package/dist/index-CTRmgnKQ.js +2643 -0
- package/dist/{index-DWfuOOVD.js → index-CVDv-Zz-.js} +1012 -1009
- package/dist/index-CVadHkfS.cjs +1 -0
- package/dist/{index-DbzvXPKu.js → index-CYp77kPp.js} +175 -175
- package/dist/{index-DGE2awa5.js → index-CjB5ZP_P.js} +2 -2
- package/dist/{index-D9wa1LMS.js → index-CkA2IZJB.js} +5 -5
- package/dist/{index-fzCcjoGJ.js → index-CoVAbxHN.js} +1 -1
- package/dist/index-CwhX2vaq.cjs +1 -0
- package/dist/{index-BkrJ0cBf.js → index-D4CVC2Sk.js} +4 -4
- package/dist/{index-BzOBvH4x.cjs → index-D55zzS4D.cjs} +1 -1
- package/dist/{index-C_MIoNOd.cjs → index-D5ShC3zu.cjs} +1 -1
- package/dist/{index-BxftyAcm.cjs → index-D9l1Z4TO.cjs} +1 -1
- package/dist/index-DDhAMgrO.js +22 -0
- package/dist/{index-CXbvmuYZ.cjs → index-DGBDGLOK.cjs} +1 -1
- package/dist/{index-D732VV-0.js → index-DHQH1rlQ.js} +2 -2
- package/dist/{index-LjRfbvxs.js → index-DJMHw-xb.js} +11 -11
- package/dist/index-DP7rcz4I.cjs +1 -0
- package/dist/{index-y1YK6w8c.js → index-DQZ_oAyj.js} +6 -6
- package/dist/{index-CVfC3cyK.js → index-DTkAIcvV.js} +13 -13
- package/dist/{index-pkxiNiXI.js → index-DfKkN76b.js} +3 -3
- package/dist/{index-BFl4mw2K.cjs → index-DkG4A3iE.cjs} +1 -1
- package/dist/{index-pleSKUL2.cjs → index-DnU2slQv.cjs} +1 -1
- package/dist/{index-sS7-HQlI.cjs → index-DsQ-qtQ9.cjs} +1 -1
- package/dist/index-Dwr4RHei.cjs +1 -0
- package/dist/{index-BDVOKqI5.js → index-ESNVepXU.js} +6 -6
- package/dist/{index-CxbH4zmS.js → index-H_3u1NA_.js} +24 -24
- package/dist/{index-wpD5_HUA.cjs → index-QkDZ18PI.cjs} +1 -1
- package/dist/index-RVDLy1iy.cjs +1 -0
- package/dist/{index-Dcd9HZXq.js → index-ecVCII_e.js} +5 -5
- package/dist/{index-BsPQl6nI.cjs → index-i50hp6po.cjs} +1 -1
- package/dist/{index-BlZXanJX.js → index-qu3KI1yZ.js} +5 -5
- package/dist/{index-BxL4p0ej.cjs → index-t6--MDLB.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DkSoLqEi.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BRxOMo6y.js} +8749 -8765
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-hGi9c2Ju.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Dwdjsitu.cjs} +108 -108
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-B5nxyyO7.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DfqsvuRy.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BfcynI3w.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-e_PTrAf6.js} +6 -6
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-7HSISF9c.cjs +56 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BqmMCEyN.js +37436 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-Bmq_QiXo.js → index.vue_vue_type_style_index_1_lang-CsY5rIO4.js} +3 -3
- package/dist/{index.vue_vue_type_style_index_1_lang-B_ESWhzz.cjs → index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs +32 -0
- package/dist/index.vue_vue_type_style_index_1_lang-Ds1cd7yg.js +7806 -0
- package/dist/{isString-CZMLuMzD.js → isString-BNK38WbE.js} +1 -1
- package/dist/{main-YbBj49yf.cjs → main-CVaemyhm.cjs} +1 -1
- package/dist/{main-CSTH0D6W.js → main-DIbH2rlN.js} +5 -5
- 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/{threeLatheView-BmVBnC8n.js → threeLatheView-Bp0kjo_V.js} +2 -2
- package/dist/{threeModel-Xb9BSJ_k.js → threeModel-27sl0tTS.js} +3 -3
- package/dist/{threeModel-nbfSsMNt.cjs → threeModel-C0Jdw2O3.cjs} +1 -1
- package/dist/{threePreview-CYX5wKoL.js → threePreview-DFFjm93P.js} +1 -1
- package/dist/threeSceneView-CEpBvJSV.cjs +5 -0
- package/dist/threeSceneView-ZDXqO8ZA.js +1413 -0
- package/dist/{threeSceneViewForCPMPIP-CT63Js8f.cjs → threeSceneViewForCPMPIP-B0VPmBWd.cjs} +3 -3
- package/dist/{threeSceneViewForCPMPIP-skA3ZWC-.js → threeSceneViewForCPMPIP-BPPWM68P.js} +83 -84
- package/dist/{threeViewerHost-Enxz60zh.js → threeViewerHost-CKE2a4PV.js} +65 -78
- package/dist/threeViewerHost-yHvsk7TK.cjs +1 -0
- package/dist/useRayCaster-1DNcSYPR.cjs +1 -0
- package/dist/{useRayCaster-CQ61IQT5.js → useRayCaster-BM9XKGKx.js} +3 -3
- package/package.json +1 -1
- package/dist/animationData-BQdcO65E.cjs +0 -1
- package/dist/array-BI6c3lN7.cjs +0 -11
- package/dist/array-BivICFct.js +0 -1142
- package/dist/index-BBVbSXk-.cjs +0 -1
- package/dist/index-BM6YLczV.js +0 -2567
- package/dist/index-BSa3xW1H.js +0 -158
- package/dist/index-C9gh-jny.js +0 -7211
- package/dist/index-CA-edgmV.js +0 -3370
- package/dist/index-CIv0zRrQ.cjs +0 -1
- package/dist/index-DW7I4GY6.cjs +0 -1
- package/dist/index-DdFUblTC.cjs +0 -1
- package/dist/index-Dy3FE211.cjs +0 -1
- package/dist/index-YMD55UlA.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-86_u8ovk.js +0 -34129
- package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-dAkBFPF0.cjs +0 -56
- package/dist/index.vue_vue_type_style_index_1_lang-Bl5IzVKi.js +0 -8126
- package/dist/index.vue_vue_type_style_index_1_lang-Cb3WPLY1.cjs +0 -32
- package/dist/isUndefined-ClRzgwTy.cjs +0 -1
- package/dist/isUndefined-chfCDxUU.js +0 -84
- package/dist/threeSceneView-BLWTfaec.js +0 -1472
- package/dist/threeSceneView-JPxH8xcz.cjs +0 -5
- package/dist/threeViewerHost-UHWY3q2v.cjs +0 -1
- package/dist/useRayCaster-CvOiIyjA.cjs +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-1z9RrjZc.cjs"),Q=require("./index.vue_vue_type_style_index_1_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-1z9RrjZc.cjs"),Q=require("./index.vue_vue_type_style_index_1_lang-DQUFi_Vi.cjs"),R=require("./useRayCaster-1DNcSYPR.cjs"),m=require("./iconfont-t5epssvu.cjs"),ne=require("./index-D55zzS4D.cjs");require("./index.vue_vue_type_style_index_1_lang-DOjFqzi3.cjs");const de=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),re=require("./urdfTree-CCktg0FK.cjs"),Le=require("./animationData-CyP8-u7i.cjs"),Ue=require("./STLLoader-RU7KqloS.cjs"),ue=require("./index-CVadHkfS.cjs"),Ae=require("./three-viewport-gizmo-BV37JzRa.cjs"),Oe={class:"panel-content"},Ie={class:"action-bar"},qe={key:0,class:"animation-controls"},Fe={class:"control-row"},Ge={class:"control-row"},Je={class:"frame-info"},He={class:"control-row"},Xe={key:1,class:"empty-state"},Ke={class:"dialog-footer"},We=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(L,{expose:J}){const w=L,a=e.ref([]),D=e.ref(!1),$=e.ref(""),h=e.ref("stopped"),b=e.ref(0),T=e.ref(0),U=e.ref(10),N=e.ref(null);let f=0;const k=e.ref([]),M=e.computed(()=>w.model?Object.values(w.model.joints).filter(s=>s.jointType!=="fixed").map(s=>s.name):[]),j=e.computed(()=>[...M.value]),z=e.computed(()=>j.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
2
2
|
${j.value.join(" ")}
|
|
3
3
|
0 0 0 ...
|
|
4
|
-
1 2 3 ...`:"请先加载模型。"),C=e.computed(()=>a.value[b.value]||{});e.watch(()=>w.model,s=>{s?(N.value=new R.URDFRobotController(s),k.value=Object.keys(s.links),b.value=0):(N.value=null,k.value=[])},{immediate:!0});const S=s=>{if(s<0||s>=a.value.length){console.error(`帧索引 ${s} 超出范围`);return}const l=a.value[s];if(N.value){const p={};M.value.forEach(d=>{const r=parseFloat(l[d]);isNaN(r)||(p[d]=r)}),N.value.setJointAngles(p)}b.value=s,T.value=a.value.length>1?s/(a.value.length-1)*100:100},H=async s=>{try{for(let l=b.value;l<a.value.length;l++){if(s!==f)return;const p=a.value[l],d={};if(N.value)M.value.forEach(r=>{const i=parseFloat(p[r]);isNaN(i)||(d[r]=i)}),await N.value.animateToState(d,
|
|
5
|
-
`).filter(i=>i.trim()!=="");if(s.length<2){u.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const l=s[0].split(" ").map(i=>i.trim()),p={};if(l.forEach((i,c)=>{j.value.includes(i)&&(p[c]=i)}),Object.keys(p).length===0){u.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const r=s.slice(1).map(i=>{const c=i.split(" "),E={};return j.value.forEach(y=>{E[y]="0"}),Object.entries(p).forEach(([y,q])=>{const F=c[parseInt(y)];F!==void 0&&F.trim()!==""&&(E[q]=F.trim())}),E});r.length>0?(a.value=r,u.ElMessage.success(`成功导入 ${r.length} 行数据!`),D.value=!1,$.value="",A()):u.ElMessage.error("未能解析到有效数据,请检查格式。")};e.watch(()=>w.xyzbcList,()=>{w.xyzbcList&&(a.value=u.cloneDeep(w.xyzbcList))},{immediate:!0});const I=s=>`第 ${s+1} 帧`;return J({handlePlayPause:B,playAnimation:X,pauseAnimation:K,stopAnimation:A}),e.onUnmounted(()=>{f++}),(s,l)=>{const p=e.resolveComponent("el-input-number"),d=e.resolveComponent("el-slider"),r=e.resolveComponent("el-input"),i=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",Ie,[e.createElementVNode("div",qe,[e.createVNode(ne._sfc_main,{onClick:l[0]||(l[0]=c=>D.value=!0),disabled:j.value.length===0,modelValue:"导入数据"},null,8,["disabled"])]),a.value.length>0?(e.openBlock(),e.createElementBlock("div",Fe,[e.createElementVNode("div",Ge,[l[6]||(l[6]=e.createElementVNode("label",null,"帧间隔 (ms):",-1)),e.createVNode(p,{modelValue:L.value,"onUpdate:modelValue":l[1]||(l[1]=c=>L.value=c),min:10,max:5e3,step:100,size:"small",style:{width:"120px"}},null,8,["modelValue"])]),e.createElementVNode("div",Je,[l[7]||(l[7]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",He,e.toDisplayString(b.value+1)+" / "+e.toDisplayString(a.value.length),1)]),e.createElementVNode("div",Xe,[l[8]||(l[8]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(d,{modelValue:b.value,"onUpdate:modelValue":l[2]||(l[2]=c=>b.value=c),min:0,max:a.value.length>0?a.value.length-1:0,step:1,"format-tooltip":I,onInput:O,disabled:a.value.length===0||h.value==="playing",style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",null,[l[9]||(l[9]=e.createElementVNode("label",null,"当前帧数据:",-1)),e.createElementVNode("div",null,[C.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(C.value,(c,E)=>(e.openBlock(),e.createElementBlock("div",{key:E},e.toDisplayString(E)+": "+e.toDisplayString(c),1))),128)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),a.value.length===0?(e.openBlock(),e.createElementBlock("div",Ke,l[10]||(l[10]=[e.createElementVNode("p",null,"请先导入数据",-1)]))):e.createCommentVNode("",!0),e.createVNode(i,{modelValue:D.value,"onUpdate:modelValue":l[5]||(l[5]=c=>D.value=c),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",We,[e.createVNode(ne._sfc_main,{modelValue:"取消",onClick:l[4]||(l[4]=c=>D.value=!1)}),e.createVNode(ne._sfc_main,{modelValue:"确认导入",onClick:W,type:"primary"})])]),default:e.withCtx(()=>[l[11]||(l[11]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(r,{modelValue:$.value,"onUpdate:modelValue":l[3]||(l[3]=c=>$.value=c),type:"textarea",rows:10,placeholder:z.value},null,8,["modelValue","placeholder"])]),_:1,__:[11]},8,["modelValue"])])}}}),ue=ce._export_sfc(Ye,[["__scopeId","data-v-0833d9bc"]]),Ze=async U=>await new Ue.OBJLoader().loadAsync(U),Qe={class:"obj-viewer-container"},et={class:"pipe-comparison"},tt={ref:"pipe1",class:"pipe-container"},nt={ref:"pipe2",class:"pipe-container"},lt={class:"buttonGroup-top"},ot={class:"buttonGroup-topLeft"},at={class:"buttonGroup-left"},st={class:"buttonGroup-right"},it={class:"buttonGroup-bottom"},rt={class:"top-panel"},ut={class:"panel-header"},ct={class:"panel-body"},dt={class:"left-panel"},vt={class:"panel-header"},pt={class:"panel-body"},mt={key:1,class:"clipping-content"},ft={class:"radio-group"},gt={class:"radio-label"},ht={class:"radio-label"},Vt={class:"radio-label"},bt={class:"radio-label"},Nt={class:"right-panel"},yt={class:"panel-header"},Et={class:"panel-body"},wt={key:0,class:"loading-overlay"},kt=e.defineComponent({__name:"threeSceneViewForCPMPIP",props:{fileBlobs:{default:()=>[]},animationData:{default:()=>({})},threeData:{},isSelfWindow:{type:Boolean}},emits:["getAnimationData","getThreeData"],setup(U,{emit:J}){const w=J,a=U,D=Q.useOriginalState(u.pinia),{originalPath:$}=u.storeToRefs(D);Q.useModelComp(u.pinia);const h=Q.useMenuState(),{activeMenuPath:b}=u.storeToRefs(h),T=u.useLoginState(u.pinia),{loginUserInfo:L}=u.storeToRefs(T),N=e.inject("managementPageVisible"),f=e.inject("setManagementPageTitle"),k=e.inject("setManagementPageVisible"),M=e.inject("setPositionType"),j=()=>{k==null||k(!(N!=null&&N.value))},z=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.machine}),C=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.workpieceInfo}),S=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.knife}),H=e.ref([]),X=async n=>{!n||!n.isExtra||(await K(n),M==null||M("right"),f==null||f(n==null?void 0:n.pageName),k==null||k(!0))},K=Ae.debounce(async n=>{await Le.onPageBack();const{mainKey:t,baseMenuPath:o}=n||{};Q.copyAdd(o,t)},500);e.watch(()=>[z.value,C.value,S.value],()=>{var x,g,v,ie;const n=[],t={pageName:"机床",name:"机床",label:"机床",type:"机床",id:"机床",path:"机床",baseMenuPath:"设备库/机床",children:[],show:!0,isPenultimate:!1};z.value&&t.children.push({isExtra:!0,pageName:"机床",mainKey:z.value,label:z.value,baseMenuPath:"设备库/机床"});const o={pageName:"工件",name:"工件",label:"工件",type:"工件",id:"工件",path:"工件",baseMenuPath:"设备库/机床",children:[],show:!0,isPenultimate:!1};C.value&&o.children.push({isExtra:!0,type:(x=C.value)==null?void 0:x.type,pageName:"工件",mainKey:(g=C.value)==null?void 0:g.name,label:(v=C.value)==null?void 0:v.name,baseMenuPath:`工件库/${(ie=C.value)==null?void 0:ie.type}`});const P={pageName:"刀具",name:"刀具",label:"刀具",type:"刀具",id:"刀具",path:"刀具",children:[],show:!0,isPenultimate:!1};S.value&&P.children.push({isExtra:!0,pageName:"刀具",mainKey:S.value,label:S.value,baseMenuPath:"设备库/刀具"}),n.push(t,o,P),H.value=n},{immediate:!0});const A=e.ref([]),B=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.csvUrl});e.watch(()=>B.value,async()=>{if(console.log("three data",a==null?void 0:a.threeData),console.log("csvUrl",B.value),B.value){const n=await Be.initXYZBCList(B.value);A.value=n}},{immediate:!0});const O=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.bladeObjUrl}),W=e.ref(R.sceneType.ROBOT),I=e.ref(null),s=e.ref(!1),l=e.ref(""),p=e.ref(!1),d=e.ref(""),r=e.ref(!1),i=e.ref(""),c=e.ref(!1),E=e.ref(""),y=e.shallowRef(null),q=e.ref("叶片模型"),F=e.shallowRef(null),de=e.shallowRef(null),le=e.shallowRef(null),Y=e.ref(ue),{currentModels:Z,resetView:ve,initThreeJS:pe,handleResize:oe,getThreeJSObjects:G,cleanup:me,setModels:ae,axesHelperVisible:fe,toggleAxesVisibility:ge}=m.useThreeJS(I),{loadSceneFromFile:he}=R.useUrdfLoader(G,Z,s,l),{isAnimating:se,toggleAnimation:Ve,stopAnimation:be}=m.useAnimation(G,Z),{isClipping:Ne,activeClippingAxis:V,toggleClipping:ye,updateClippingPlanes:_}=m.useClipping(G,Z),{initRaycaster:Ee,selectedObject3D:we,setSelectedObjVisible:ke,updatePosition:Ce,updateRotation:Pe,dispose:Se}=R.useRaycaster(I,G,Z),_e=()=>{ge()},xe=e.computed(()=>W.value===R.sceneType.ROBOT),De=e.computed(()=>W.value===R.sceneType.PIPECOMPARSION),Te=n=>{E.value=n,c.value=!0},ee=n=>{p.value=!0,d.value=n,n==="剖面视图"&&!Ne.value&&ye()},te=n=>{r.value=!0,i.value=n,n==="动画仿真"&&w("getAnimationData")},Me=()=>{var n;(n=Y.value)==null||n.handlePlayPause()},je=()=>{var n;(n=Y.value)==null||n.pauseAnimation()},Re=()=>{var n;(n=Y.value)==null||n.stopAnimation()},$e=(n,t)=>{if(!t)return null;const o=n.links[t];if(!o)return console.warn(`在模型中未找到名为 '${t}' 的 link`),console.log("可用的链接:",Object.keys(n.links)),null;let P=null;return o.traverse(x=>{x instanceof Oe.Mesh&&!P&&(P=x)}),P||console.warn(`在 link '${t}' 中未找到可用的 Mesh 对象`),P},ze=async n=>{const t=$e(n,q.value);if(de.value=t,console.log("bladeObjUrl",O.value),t&&t.parent&&O.value){const o=await Ze(O.value);o.name="blade_clone",t.parent.add(o),o.position.copy(t.position),o.rotation.copy(t.rotation),o.scale.copy(t.scale),t.visible=!1,F.value=o}else q.value&&console.warn(`在 Blade '${q.value}' 中未找到可替换的网格或其没有父级。`)};return e.watch(()=>a.fileBlobs,n=>{if(n&&n.length>0){const t=n[0];if(!t.name.toLowerCase().endsWith(".urdf"))return;he(t).then(o=>{y.value=o,o&&ze(o)}).catch(o=>{console.error("加载URDF文件时发生错误:",o),u.ElMessage.error("加载urdf模型失败"),y.value=null})}else y.value=null},{immediate:!0,deep:!0}),e.watch(y,n=>{ae(n?[n]:[]),Ee()}),e.onMounted(async()=>{await e.nextTick();try{pe(),window.addEventListener("resize",oe);const n=G();le.value=n.scene}catch(n){console.error("Three.js 初始化失败:",n),u.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{d.value="",i.value="",window.removeEventListener("resize",oe),se.value&&be(),me(),Se()}),(n,t)=>{var x;const o=e.resolveComponent("el-scrollbar"),P=e.resolveComponent("PipeAnalysisPanel");return e.openBlock(),e.createElementBlock("div",Qe,[e.withDirectives(e.createElementVNode("div",{ref_key:"threejsContainer",ref:I,class:"threejs-container"},null,512),[[e.vShow,xe.value]]),e.withDirectives(e.createElementVNode("div",et,[e.createElementVNode("div",tt,null,512),e.createElementVNode("div",nt,null,512)],512),[[e.vShow,De.value]]),e.createElementVNode("div",lt,[e.renderSlot(n.$slots,"button-top",{switchTopPanel:Te},void 0,!0),e.renderSlot(n.$slots,"logout",{},void 0,!0)]),e.createElementVNode("div",ot,[e.createVNode(m.SvgIcon,{name:"viewReset",size:"24",onClick:e.unref(ve),title:"重置"},null,8,["onClick"]),e.createVNode(m.SvgIcon,{name:"fangda",size:"24",title:"放大"}),e.createVNode(m.SvgIcon,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(m.SvgIcon,{name:"lookAround",size:"24",onClick:e.unref(Ve),title:e.unref(se)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode(m.SvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref(fe),onClick:_e,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",at,[e.createVNode(m.SvgIcon,{name:"jiegoushu",size:"24",onClick:t[0]||(t[0]=g=>ee("场景树")),active:p.value&&d.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"clipping",size:"24",onClick:t[1]||(t[1]=g=>ee("剖面视图")),active:p.value&&d.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"donghuafangzhen",size:"24",onClick:t[2]||(t[2]=g=>ee("工件树")),active:p.value&&d.value==="工件树"},null,8,["active"])]),e.createElementVNode("div",st,[e.renderSlot(n.$slots,"button-right",{switchRightPanel:te},void 0,!0),e.createVNode(m.SvgIcon,{name:"yemian",size:"24",onClick:j,active:(x=e.unref(N))==null?void 0:x.value,title:"数据管理"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"jichuangxuanze",size:"24",onClick:t[3]||(t[3]=g=>te("机床控制")),active:r.value&&i.value==="机床控制",title:"机床控制"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:t[4]||(t[4]=g=>te("动画仿真")),active:r.value&&i.value==="动画仿真"},null,8,["active"])]),e.createElementVNode("div",it,[e.createVNode(m.SvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:Me}),e.createVNode(m.SvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:je}),e.createVNode(m.SvgIcon,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:Re})]),e.withDirectives(e.createElementVNode("div",rt,[e.createElementVNode("div",ut,[e.createElementVNode("span",null,e.toDisplayString(E.value),1),e.createElementVNode("span",{class:"close",onClick:t[5]||(t[5]=g=>c.value=!1)}," X ")]),e.createElementVNode("div",ct,[e.createVNode(o,{height:"100%"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top-panel",{topPanelType:E.value},void 0,!0)]),_:3})])],512),[[e.vShow,c.value]]),e.withDirectives(e.createElementVNode("div",dt,[e.createElementVNode("div",vt,[e.createElementVNode("span",null,e.toDisplayString(d.value),1),e.createElementVNode("span",{class:"close",onClick:t[6]||(t[6]=g=>p.value=!1)}," X ")]),e.createElementVNode("div",pt,[e.createVNode(o,{height:"100%"},{default:e.withCtx(()=>{var g;return[d.value==="场景树"?(e.openBlock(),e.createBlock(re.UrdfTree,{key:0,model:y.value,extraNodes:H.value,onNodeClick:X},null,8,["model","extraNodes"])):e.createCommentVNode("",!0),d.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",mt,[e.createElementVNode("div",ft,[e.createElementVNode("label",gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":t[7]||(t[7]=v=>e.isRef(V)?V.value=v:null),onChange:t[8]||(t[8]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[16]||(t[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",ht,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":t[9]||(t[9]=v=>e.isRef(V)?V.value=v:null),onChange:t[10]||(t[10]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[17]||(t[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Vt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":t[11]||(t[11]=v=>e.isRef(V)?V.value=v:null),onChange:t[12]||(t[12]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[18]||(t[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",bt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":t[13]||(t[13]=v=>e.isRef(V)?V.value=v:null),onChange:t[14]||(t[14]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[19]||(t[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0),d.value==="工件树"?(e.openBlock(),e.createBlock(R.WorkpieceTreePanel,{key:2,model:(g=e.unref(we))==null?void 0:g.obj,onVisibleChange:e.unref(ke),onUpdatePosition:e.unref(Ce),onUpdateRotation:e.unref(Pe)},null,8,["model","onVisibleChange","onUpdatePosition","onUpdateRotation"])):e.createCommentVNode("",!0)]}),_:1})])],512),[[e.vShow,p.value]]),e.withDirectives(e.createElementVNode("div",Nt,[e.createElementVNode("div",yt,[e.createElementVNode("span",null,e.toDisplayString(i.value),1),e.createElementVNode("span",{class:"close",onClick:t[15]||(t[15]=g=>r.value=!1)}," X ")]),e.createElementVNode("div",Et,[e.createVNode(o,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(re.JointPanel,{model:y.value},null,8,["model"]),[[e.vShow,i.value==="机床控制"]]),e.withDirectives(e.createVNode(ue,{model:y.value,scene:le.value,xyzbcList:A.value,ref_key:"urdfAnimationPanelRef",ref:Y},null,8,["model","scene","xyzbcList"]),[[e.vShow,i.value==="动画仿真"]]),e.renderSlot(n.$slots,"right-panel",{rightPanelType:i.value},void 0,!0)]),_:3})])],512),[[e.vShow,r.value]]),s.value?(e.openBlock(),e.createElementBlock("div",wt,[t[20]||(t[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(l.value),1)])):e.createCommentVNode("",!0),e.createVNode(P,{ref:"pipeAnalysisPanelRef"},null,512)])}}}),Ct=ce._export_sfc(kt,[["__scopeId","data-v-d9156359"]]);exports.default=Ct;
|
|
4
|
+
1 2 3 ...`:"请先加载模型。"),C=e.computed(()=>a.value[b.value]||{});e.watch(()=>w.model,s=>{s?(N.value=new R.URDFRobotController(s),k.value=Object.keys(s.links),b.value=0):(N.value=null,k.value=[])},{immediate:!0});const S=s=>{if(s<0||s>=a.value.length){console.error(`帧索引 ${s} 超出范围`);return}const l=a.value[s];if(N.value){const p={};M.value.forEach(d=>{const r=parseFloat(l[d]);isNaN(r)||(p[d]=r)}),N.value.setJointAngles(p)}b.value=s,T.value=a.value.length>1?s/(a.value.length-1)*100:100},H=async s=>{try{for(let l=b.value;l<a.value.length;l++){if(s!==f)return;const p=a.value[l],d={};if(N.value)M.value.forEach(r=>{const i=parseFloat(p[r]);isNaN(i)||(d[r]=i)}),await N.value.animateToState(d,U.value,r=>{s===f&&(T.value=(l+r)/a.value.length*100)});else{if(await new Promise(r=>setTimeout(r,U.value)),s!==f)return;T.value=(l+1)/a.value.length*100}b.value=l}s===f&&(u.ElMessage.success("动画播放完成"),h.value="stopped",T.value=100)}catch(l){console.error("动画播放出错:",l),u.ElMessage.error("动画播放出错"),h.value="stopped"}},X=()=>{if(a.value.length===0){u.ElMessage.error("无动画数据");return}h.value==="stopped"&&(b.value=0,S(0)),h.value="playing",f++,H(f),u.ElMessage.info("动画播放中")},K=()=>{h.value==="playing"&&(f++,h.value="paused",u.ElMessage.info("动画已暂停"))},A=()=>{f++,h.value="stopped",b.value=0,T.value=0,S(0),u.ElMessage.info("动画已停止并重置")},B=()=>{h.value==="playing"?K():X()},O=s=>{f++,h.value="paused",S(s)},W=()=>{if(!$.value.trim()){u.ElMessage.warning("导入内容不能为空");return}const s=$.value.trim().split(`
|
|
5
|
+
`).filter(i=>i.trim()!=="");if(s.length<2){u.ElMessage.error("导入数据至少需要包含表头行和一行数据");return}const l=s[0].split(" ").map(i=>i.trim()),p={};if(l.forEach((i,c)=>{j.value.includes(i)&&(p[c]=i)}),Object.keys(p).length===0){u.ElMessage.error("没有找到匹配的表头,请检查表头名称是否正确");return}const r=s.slice(1).map(i=>{const c=i.split(" "),E={};return j.value.forEach(y=>{E[y]="0"}),Object.entries(p).forEach(([y,q])=>{const F=c[parseInt(y)];F!==void 0&&F.trim()!==""&&(E[q]=F.trim())}),E});r.length>0?(a.value=r,u.ElMessage.success(`成功导入 ${r.length} 行数据!`),D.value=!1,$.value="",A()):u.ElMessage.error("未能解析到有效数据,请检查格式。")};e.watch(()=>w.xyzbcList,()=>{w.xyzbcList&&(a.value=u.cloneDeep(w.xyzbcList))},{immediate:!0});const I=s=>`第 ${s+1} 帧`;return J({handlePlayPause:B,playAnimation:X,pauseAnimation:K,stopAnimation:A}),e.onUnmounted(()=>{f++}),(s,l)=>{const p=e.resolveComponent("el-input-number"),d=e.resolveComponent("el-slider"),r=e.resolveComponent("el-input"),i=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",Oe,[e.createElementVNode("div",Ie,[e.createVNode(ne._sfc_main,{onClick:l[0]||(l[0]=c=>D.value=!0),disabled:j.value.length===0,modelValue:"导入数据"},null,8,["disabled"])]),a.value.length>0?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Fe,[l[6]||(l[6]=e.createElementVNode("label",null,"帧间隔 (ms):",-1)),e.createVNode(p,{modelValue:U.value,"onUpdate:modelValue":l[1]||(l[1]=c=>U.value=c),min:10,max:5e3,step:100,size:"small",style:{width:"120px"}},null,8,["modelValue"])]),e.createElementVNode("div",Ge,[l[7]||(l[7]=e.createElementVNode("label",null,"当前帧:",-1)),e.createElementVNode("span",Je,e.toDisplayString(b.value+1)+" / "+e.toDisplayString(a.value.length),1)]),e.createElementVNode("div",He,[l[8]||(l[8]=e.createElementVNode("label",null,"动画进度:",-1)),e.createVNode(d,{modelValue:b.value,"onUpdate:modelValue":l[2]||(l[2]=c=>b.value=c),min:0,max:a.value.length>0?a.value.length-1:0,step:1,"format-tooltip":I,onInput:O,disabled:a.value.length===0||h.value==="playing",style:{"flex-grow":"1",margin:"0 10px"}},null,8,["modelValue","max","disabled"])]),e.createElementVNode("div",null,[l[9]||(l[9]=e.createElementVNode("label",null,"当前帧数据:",-1)),e.createElementVNode("div",null,[C.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(C.value,(c,E)=>(e.openBlock(),e.createElementBlock("div",{key:E},e.toDisplayString(E)+": "+e.toDisplayString(c),1))),128)):e.createCommentVNode("",!0)])])])):e.createCommentVNode("",!0),a.value.length===0?(e.openBlock(),e.createElementBlock("div",Xe,l[10]||(l[10]=[e.createElementVNode("p",null,"请先导入数据",-1)]))):e.createCommentVNode("",!0),e.createVNode(i,{modelValue:D.value,"onUpdate:modelValue":l[5]||(l[5]=c=>D.value=c),title:"导入数据",width:"500px"},{footer:e.withCtx(()=>[e.createElementVNode("span",Ke,[e.createVNode(ne._sfc_main,{modelValue:"取消",onClick:l[4]||(l[4]=c=>D.value=!1)}),e.createVNode(ne._sfc_main,{modelValue:"确认导入",onClick:W,type:"primary"})])]),default:e.withCtx(()=>[l[11]||(l[11]=e.createElementVNode("p",{class:"import-instructions"}," 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ",-1)),e.createVNode(r,{modelValue:$.value,"onUpdate:modelValue":l[3]||(l[3]=c=>$.value=c),type:"textarea",rows:10,placeholder:z.value},null,8,["modelValue","placeholder"])]),_:1,__:[11]},8,["modelValue"])])}}}),ce=de._export_sfc(We,[["__scopeId","data-v-0833d9bc"]]),Ye=async L=>await new Ue.OBJLoader().loadAsync(L),Ze={class:"obj-viewer-container"},Qe={class:"pipe-comparison"},et={ref:"pipe1",class:"pipe-container"},tt={ref:"pipe2",class:"pipe-container"},nt={class:"buttonGroup-top"},lt={class:"buttonGroup-topLeft"},ot={class:"buttonGroup-left"},at={class:"buttonGroup-right"},st={class:"buttonGroup-bottom"},it={class:"top-panel"},rt={class:"panel-header"},ut={class:"panel-body"},ct={class:"left-panel"},dt={class:"panel-header"},vt={class:"panel-body"},pt={key:1,class:"clipping-content"},mt={class:"radio-group"},ft={class:"radio-label"},gt={class:"radio-label"},ht={class:"radio-label"},Vt={class:"radio-label"},bt={class:"right-panel"},Nt={class:"panel-header"},yt={class:"panel-body"},Et={key:0,class:"loading-overlay"},wt=e.defineComponent({__name:"threeSceneViewForCPMPIP",props:{fileBlobs:{default:()=>[]},animationData:{default:()=>({})},threeData:{},isSelfWindow:{type:Boolean}},emits:["getAnimationData","getThreeData"],setup(L,{emit:J}){const w=J,a=L,D=Q.useOriginalState(u.pinia),{originalPath:$}=u.storeToRefs(D);Q.useModelComp(u.pinia);const h=Q.useMenuState(),{activeMenuPath:b}=u.storeToRefs(h),T=u.useLoginState(u.pinia),{loginUserInfo:U}=u.storeToRefs(T),N=e.inject("managementPageVisible"),f=e.inject("setManagementPageTitle"),k=e.inject("setManagementPageVisible"),M=e.inject("setPositionType"),j=()=>{k==null||k(!(N!=null&&N.value))},z=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.machine}),C=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.workpieceInfo}),S=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.knife}),H=e.ref([]),X=async n=>{!n||!n.isExtra||(await K(n),M==null||M("right"),f==null||f(n==null?void 0:n.pageName),k==null||k(!0))},K=ue.debounce(async n=>{await ue.onPageBack();const{mainKey:t,baseMenuPath:o}=n||{};Q.copyAdd(o,t)},500);e.watch(()=>[z.value,C.value,S.value],()=>{var x,g,v,ie;const n=[],t={pageName:"机床",name:"机床",label:"机床",type:"机床",id:"机床",path:"机床",baseMenuPath:"设备库/机床",children:[],show:!0,isPenultimate:!1};z.value&&t.children.push({isExtra:!0,pageName:"机床",mainKey:z.value,label:z.value,baseMenuPath:"设备库/机床"});const o={pageName:"工件",name:"工件",label:"工件",type:"工件",id:"工件",path:"工件",baseMenuPath:"设备库/机床",children:[],show:!0,isPenultimate:!1};C.value&&o.children.push({isExtra:!0,type:(x=C.value)==null?void 0:x.type,pageName:"工件",mainKey:(g=C.value)==null?void 0:g.name,label:(v=C.value)==null?void 0:v.name,baseMenuPath:`工件库/${(ie=C.value)==null?void 0:ie.type}`});const P={pageName:"刀具",name:"刀具",label:"刀具",type:"刀具",id:"刀具",path:"刀具",children:[],show:!0,isPenultimate:!1};S.value&&P.children.push({isExtra:!0,pageName:"刀具",mainKey:S.value,label:S.value,baseMenuPath:"设备库/刀具"}),n.push(t,o,P),H.value=n},{immediate:!0});const A=e.ref([]),B=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.csvUrl});e.watch(()=>B.value,async()=>{if(console.log("three data",a==null?void 0:a.threeData),console.log("csvUrl",B.value),B.value){const n=await Le.initXYZBCList(B.value);A.value=n}},{immediate:!0});const O=e.computed(()=>{var t,o;return(o=(t=a==null?void 0:a.threeData)==null?void 0:t.data)==null?void 0:o.bladeObjUrl}),W=e.ref(R.sceneType.ROBOT),I=e.ref(null),s=e.ref(!1),l=e.ref(""),p=e.ref(!1),d=e.ref(""),r=e.ref(!1),i=e.ref(""),c=e.ref(!1),E=e.ref(""),y=e.shallowRef(null),q=e.ref("叶片模型"),F=e.shallowRef(null),ve=e.shallowRef(null),le=e.shallowRef(null),Y=e.ref(ce),{currentModels:Z,resetView:pe,initThreeJS:me,handleResize:oe,getThreeJSObjects:G,cleanup:fe,setModels:ae,axesHelperVisible:ge,toggleAxesVisibility:he}=m.useThreeJS(I),{loadSceneFromFile:Ve}=R.useUrdfLoader(G,Z,s,l),{isAnimating:se,toggleAnimation:be,stopAnimation:Ne}=m.useAnimation(G,Z),{isClipping:ye,activeClippingAxis:V,toggleClipping:Ee,updateClippingPlanes:_}=m.useClipping(G,Z),{initRaycaster:we,selectedObject3D:ke,setSelectedObjVisible:Ce,updatePosition:Pe,updateRotation:Se,dispose:_e}=R.useRaycaster(I,G,Z),xe=()=>{he()},De=e.computed(()=>W.value===R.sceneType.ROBOT),Te=e.computed(()=>W.value===R.sceneType.PIPECOMPARSION),Me=n=>{E.value=n,c.value=!0},ee=n=>{p.value=!0,d.value=n,n==="剖面视图"&&!ye.value&&Ee()},te=n=>{r.value=!0,i.value=n,n==="动画仿真"&&w("getAnimationData")},je=()=>{var n;(n=Y.value)==null||n.handlePlayPause()},Re=()=>{var n;(n=Y.value)==null||n.pauseAnimation()},$e=()=>{var n;(n=Y.value)==null||n.stopAnimation()},ze=(n,t)=>{if(!t)return null;const o=n.links[t];if(!o)return console.warn(`在模型中未找到名为 '${t}' 的 link`),console.log("可用的链接:",Object.keys(n.links)),null;let P=null;return o.traverse(x=>{x instanceof Ae.Mesh&&!P&&(P=x)}),P||console.warn(`在 link '${t}' 中未找到可用的 Mesh 对象`),P},Be=async n=>{const t=ze(n,q.value);if(ve.value=t,console.log("bladeObjUrl",O.value),t&&t.parent&&O.value){const o=await Ye(O.value);o.name="blade_clone",t.parent.add(o),o.position.copy(t.position),o.rotation.copy(t.rotation),o.scale.copy(t.scale),t.visible=!1,F.value=o}else q.value&&console.warn(`在 Blade '${q.value}' 中未找到可替换的网格或其没有父级。`)};return e.watch(()=>a.fileBlobs,n=>{if(n&&n.length>0){const t=n[0];if(!t.name.toLowerCase().endsWith(".urdf"))return;Ve(t).then(o=>{y.value=o,o&&Be(o)}).catch(o=>{console.error("加载URDF文件时发生错误:",o),u.ElMessage.error("加载urdf模型失败"),y.value=null})}else y.value=null},{immediate:!0,deep:!0}),e.watch(y,n=>{ae(n?[n]:[]),we()}),e.onMounted(async()=>{await e.nextTick();try{me(),window.addEventListener("resize",oe);const n=G();le.value=n.scene}catch(n){console.error("Three.js 初始化失败:",n),u.ElMessage.error("渲染引擎初始化失败!")}}),e.onBeforeUnmount(()=>{d.value="",i.value="",window.removeEventListener("resize",oe),se.value&&Ne(),fe(),_e()}),(n,t)=>{var x;const o=e.resolveComponent("el-scrollbar"),P=e.resolveComponent("PipeAnalysisPanel");return e.openBlock(),e.createElementBlock("div",Ze,[e.withDirectives(e.createElementVNode("div",{ref_key:"threejsContainer",ref:I,class:"threejs-container"},null,512),[[e.vShow,De.value]]),e.withDirectives(e.createElementVNode("div",Qe,[e.createElementVNode("div",et,null,512),e.createElementVNode("div",tt,null,512)],512),[[e.vShow,Te.value]]),e.createElementVNode("div",nt,[e.renderSlot(n.$slots,"button-top",{switchTopPanel:Me},void 0,!0),e.renderSlot(n.$slots,"logout",{},void 0,!0)]),e.createElementVNode("div",lt,[e.createVNode(m.SvgIcon,{name:"viewReset",size:"24",onClick:e.unref(pe),title:"重置"},null,8,["onClick"]),e.createVNode(m.SvgIcon,{name:"fangda",size:"24",title:"放大"}),e.createVNode(m.SvgIcon,{name:"suoxiao",size:"24",title:"缩小"}),e.createVNode(m.SvgIcon,{name:"lookAround",size:"24",onClick:e.unref(be),title:e.unref(se)?"停止动画":"动画视图"},null,8,["onClick","title"]),e.createVNode(m.SvgIcon,{name:"zuobiaoxi",size:"24",active:e.unref(ge),onClick:xe,title:"显隐坐标轴"},null,8,["active"])]),e.createElementVNode("div",ot,[e.createVNode(m.SvgIcon,{name:"jiegoushu",size:"24",onClick:t[0]||(t[0]=g=>ee("场景树")),active:p.value&&d.value==="场景树",title:"场景树"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"clipping",size:"24",onClick:t[1]||(t[1]=g=>ee("剖面视图")),active:p.value&&d.value==="剖面视图",title:"剖面视图"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"donghuafangzhen",size:"24",onClick:t[2]||(t[2]=g=>ee("工件树")),active:p.value&&d.value==="工件树"},null,8,["active"])]),e.createElementVNode("div",at,[e.renderSlot(n.$slots,"button-right",{switchRightPanel:te},void 0,!0),e.createVNode(m.SvgIcon,{name:"yemian",size:"24",onClick:j,active:(x=e.unref(N))==null?void 0:x.value,title:"数据管理"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"jichuangxuanze",size:"24",onClick:t[3]||(t[3]=g=>te("机床控制")),active:r.value&&i.value==="机床控制",title:"机床控制"},null,8,["active"]),e.createVNode(m.SvgIcon,{name:"donghuafangzhen",size:"24",title:"动画仿真",onClick:t[4]||(t[4]=g=>te("动画仿真")),active:r.value&&i.value==="动画仿真"},null,8,["active"])]),e.createElementVNode("div",st,[e.createVNode(m.SvgIcon,{name:"bofang",size:"24",backgroundColor:"#ffffff",title:"播放",onClick:je}),e.createVNode(m.SvgIcon,{name:"zanting",size:"24",backgroundColor:"#ffffff",title:"暂停",onClick:Re}),e.createVNode(m.SvgIcon,{name:"zhongzhi",size:"24",backgroundColor:"#ffffff",title:"停止",onClick:$e})]),e.withDirectives(e.createElementVNode("div",it,[e.createElementVNode("div",rt,[e.createElementVNode("span",null,e.toDisplayString(E.value),1),e.createElementVNode("span",{class:"close",onClick:t[5]||(t[5]=g=>c.value=!1)}," X ")]),e.createElementVNode("div",ut,[e.createVNode(o,{height:"100%"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top-panel",{topPanelType:E.value},void 0,!0)]),_:3})])],512),[[e.vShow,c.value]]),e.withDirectives(e.createElementVNode("div",ct,[e.createElementVNode("div",dt,[e.createElementVNode("span",null,e.toDisplayString(d.value),1),e.createElementVNode("span",{class:"close",onClick:t[6]||(t[6]=g=>p.value=!1)}," X ")]),e.createElementVNode("div",vt,[e.createVNode(o,{height:"100%"},{default:e.withCtx(()=>{var g;return[d.value==="场景树"?(e.openBlock(),e.createBlock(re.UrdfTree,{key:0,model:y.value,extraNodes:H.value,onNodeClick:X},null,8,["model","extraNodes"])):e.createCommentVNode("",!0),d.value==="剖面视图"?(e.openBlock(),e.createElementBlock("div",pt,[e.createElementVNode("div",mt,[e.createElementVNode("label",ft,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":t[7]||(t[7]=v=>e.isRef(V)?V.value=v:null),onChange:t[8]||(t[8]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[16]||(t[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":t[9]||(t[9]=v=>e.isRef(V)?V.value=v:null),onChange:t[10]||(t[10]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[17]||(t[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",ht,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":t[11]||(t[11]=v=>e.isRef(V)?V.value=v:null),onChange:t[12]||(t[12]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[18]||(t[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Vt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":t[13]||(t[13]=v=>e.isRef(V)?V.value=v:null),onChange:t[14]||(t[14]=(...v)=>e.unref(_)&&e.unref(_)(...v))},null,544),[[e.vModelRadio,e.unref(V)]]),t[19]||(t[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])):e.createCommentVNode("",!0),d.value==="工件树"?(e.openBlock(),e.createBlock(R.WorkpieceTreePanel,{key:2,model:(g=e.unref(ke))==null?void 0:g.obj,onVisibleChange:e.unref(Ce),onUpdatePosition:e.unref(Pe),onUpdateRotation:e.unref(Se)},null,8,["model","onVisibleChange","onUpdatePosition","onUpdateRotation"])):e.createCommentVNode("",!0)]}),_:1})])],512),[[e.vShow,p.value]]),e.withDirectives(e.createElementVNode("div",bt,[e.createElementVNode("div",Nt,[e.createElementVNode("span",null,e.toDisplayString(i.value),1),e.createElementVNode("span",{class:"close",onClick:t[15]||(t[15]=g=>r.value=!1)}," X ")]),e.createElementVNode("div",yt,[e.createVNode(o,{height:"100%"},{default:e.withCtx(()=>[e.withDirectives(e.createVNode(re.JointPanel,{model:y.value},null,8,["model"]),[[e.vShow,i.value==="机床控制"]]),e.withDirectives(e.createVNode(ce,{model:y.value,scene:le.value,xyzbcList:A.value,ref_key:"urdfAnimationPanelRef",ref:Y},null,8,["model","scene","xyzbcList"]),[[e.vShow,i.value==="动画仿真"]]),e.renderSlot(n.$slots,"right-panel",{rightPanelType:i.value},void 0,!0)]),_:3})])],512),[[e.vShow,r.value]]),s.value?(e.openBlock(),e.createElementBlock("div",Et,[t[20]||(t[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(l.value),1)])):e.createCommentVNode("",!0),e.createVNode(P,{ref:"pipeAnalysisPanelRef"},null,512)])}}}),kt=de._export_sfc(wt,[["__scopeId","data-v-d9156359"]]);exports.default=kt;
|
|
@@ -1,24 +1,23 @@
|
|
|
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-
|
|
1
|
+
import { defineComponent as ze, ref as u, computed as T, watch as H, onUnmounted as at, resolveComponent as K, createElementBlock as O, openBlock as j, createElementVNode as l, createCommentVNode as I, createVNode as i, toDisplayString as R, Fragment as nt, renderList as ot, withCtx as ne, inject as ve, shallowRef as pe, onMounted as st, nextTick as it, onBeforeUnmount as ut, withDirectives as x, vShow as F, renderSlot as ae, unref as d, createBlock as $e, isRef as me, vModelRadio as fe } from "vue";
|
|
2
|
+
import { c as rt, E as y, p as be, s as ye, u as ct } from "./index-CYp77kPp.js";
|
|
3
|
+
import { j as dt, a as vt, u as pt, aD as mt } from "./index.vue_vue_type_style_index_1_lang-Ds1cd7yg.js";
|
|
4
|
+
import { U as ft, s as ke, u as gt, a as ht, W as bt } from "./useRayCaster-BM9XKGKx.js";
|
|
5
5
|
import { u as yt, a as kt, b as Pt, S as h } from "./iconfont-pt17sMx3.js";
|
|
6
|
-
import { _ as Pe } from "./index-
|
|
7
|
-
import "./index.vue_vue_type_style_index_1_lang-
|
|
8
|
-
import { _ as
|
|
6
|
+
import { _ as Pe } from "./index-C-c1pt-2.js";
|
|
7
|
+
import "./index.vue_vue_type_style_index_1_lang-CsY5rIO4.js";
|
|
8
|
+
import { _ as Ue } 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-
|
|
10
|
+
import { i as _t } from "./animationData-C_gV7XAN.js";
|
|
11
11
|
import { O as xt } from "./STLLoader-CiUjaQtA.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
const Ut = { class: "panel-content" }, jt = { class: "action-bar" }, Vt = {
|
|
12
|
+
import { t as Tt, h as $t } from "./index-CN29uy_G.js";
|
|
13
|
+
import { e as jt } from "./three-viewport-gizmo-CkQ98n-T.js";
|
|
14
|
+
const zt = { class: "panel-content" }, Ut = { class: "action-bar" }, Vt = {
|
|
16
15
|
key: 0,
|
|
17
16
|
class: "animation-controls"
|
|
18
17
|
}, Lt = { class: "control-row" }, St = { class: "control-row" }, At = { class: "frame-info" }, Dt = { class: "control-row" }, Ot = {
|
|
19
18
|
key: 1,
|
|
20
19
|
class: "empty-state"
|
|
21
|
-
}, Rt = { class: "dialog-footer" }, Mt = /* @__PURE__ */
|
|
20
|
+
}, Rt = { class: "dialog-footer" }, Mt = /* @__PURE__ */ ze({
|
|
22
21
|
__name: "urdfAnimationPanel",
|
|
23
22
|
props: {
|
|
24
23
|
model: {},
|
|
@@ -26,14 +25,14 @@ const Ut = { class: "panel-content" }, jt = { class: "action-bar" }, Vt = {
|
|
|
26
25
|
xyzbcList: {}
|
|
27
26
|
},
|
|
28
27
|
setup(W, { expose: oe }) {
|
|
29
|
-
const
|
|
28
|
+
const z = W, o = u([]), M = u(!1), J = u(""), k = u("stopped"), C = u(0), N = u(0), Y = u(10), w = u(null);
|
|
30
29
|
let g = 0;
|
|
31
|
-
const
|
|
30
|
+
const U = u([]), E = T(() => z.model ? Object.values(z.model.joints).filter((s) => s.jointType !== "fixed").map((s) => s.name) : []), B = T(() => [...E.value]), G = T(() => B.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
32
31
|
${B.value.join(" ")}
|
|
33
32
|
0 0 0 ...
|
|
34
33
|
1 2 3 ...` : "请先加载模型。"), V = T(() => o.value[C.value] || {});
|
|
35
|
-
H(() =>
|
|
36
|
-
s ? (w.value = new ft(s),
|
|
34
|
+
H(() => z.model, (s) => {
|
|
35
|
+
s ? (w.value = new ft(s), U.value = Object.keys(s.links), C.value = 0) : (w.value = null, U.value = []);
|
|
37
36
|
}, { immediate: !0 });
|
|
38
37
|
const S = (s) => {
|
|
39
38
|
if (s < 0 || s >= o.value.length) {
|
|
@@ -44,8 +43,8 @@ ${B.value.join(" ")}
|
|
|
44
43
|
if (w.value) {
|
|
45
44
|
const f = {};
|
|
46
45
|
E.value.forEach((p) => {
|
|
47
|
-
const
|
|
48
|
-
isNaN(
|
|
46
|
+
const c = parseFloat(a[p]);
|
|
47
|
+
isNaN(c) || (f[p] = c);
|
|
49
48
|
}), w.value.setJointAngles(f);
|
|
50
49
|
}
|
|
51
50
|
C.value = s, N.value = o.value.length > 1 ? s / (o.value.length - 1) * 100 : 100;
|
|
@@ -55,18 +54,18 @@ ${B.value.join(" ")}
|
|
|
55
54
|
if (s !== g) return;
|
|
56
55
|
const f = o.value[a], p = {};
|
|
57
56
|
if (w.value)
|
|
58
|
-
E.value.forEach((
|
|
59
|
-
const r = parseFloat(f[
|
|
60
|
-
isNaN(r) || (p[
|
|
57
|
+
E.value.forEach((c) => {
|
|
58
|
+
const r = parseFloat(f[c]);
|
|
59
|
+
isNaN(r) || (p[c] = r);
|
|
61
60
|
}), await w.value.animateToState(
|
|
62
61
|
p,
|
|
63
62
|
Y.value,
|
|
64
|
-
(
|
|
65
|
-
s === g && (N.value = (a +
|
|
63
|
+
(c) => {
|
|
64
|
+
s === g && (N.value = (a + c) / o.value.length * 100);
|
|
66
65
|
}
|
|
67
66
|
);
|
|
68
67
|
else {
|
|
69
|
-
if (await new Promise((
|
|
68
|
+
if (await new Promise((c) => setTimeout(c, Y.value)), s !== g) return;
|
|
70
69
|
N.value = (a + 1) / o.value.length * 100;
|
|
71
70
|
}
|
|
72
71
|
C.value = a;
|
|
@@ -107,7 +106,7 @@ ${B.value.join(" ")}
|
|
|
107
106
|
y.error("没有找到匹配的表头,请检查表头名称是否正确");
|
|
108
107
|
return;
|
|
109
108
|
}
|
|
110
|
-
const
|
|
109
|
+
const c = s.slice(1).map((r) => {
|
|
111
110
|
const v = r.split(" "), $ = {};
|
|
112
111
|
return B.value.forEach((_) => {
|
|
113
112
|
$[_] = "0";
|
|
@@ -116,10 +115,10 @@ ${B.value.join(" ")}
|
|
|
116
115
|
te !== void 0 && te.trim() !== "" && ($[ee] = te.trim());
|
|
117
116
|
}), $;
|
|
118
117
|
});
|
|
119
|
-
|
|
118
|
+
c.length > 0 ? (o.value = c, y.success(`成功导入 ${c.length} 行数据!`), M.value = !1, J.value = "", Z()) : y.error("未能解析到有效数据,请检查格式。");
|
|
120
119
|
};
|
|
121
|
-
H(() =>
|
|
122
|
-
|
|
120
|
+
H(() => z.xyzbcList, () => {
|
|
121
|
+
z.xyzbcList && (o.value = rt(z.xyzbcList));
|
|
123
122
|
}, {
|
|
124
123
|
immediate: !0
|
|
125
124
|
});
|
|
@@ -132,16 +131,16 @@ ${B.value.join(" ")}
|
|
|
132
131
|
}), at(() => {
|
|
133
132
|
g++;
|
|
134
133
|
}), (s, a) => {
|
|
135
|
-
const f = K("el-input-number"), p = K("el-slider"),
|
|
136
|
-
return
|
|
137
|
-
l("div",
|
|
134
|
+
const f = K("el-input-number"), p = K("el-slider"), c = K("el-input"), r = K("el-dialog");
|
|
135
|
+
return j(), O("div", zt, [
|
|
136
|
+
l("div", Ut, [
|
|
138
137
|
i(Pe, {
|
|
139
138
|
onClick: a[0] || (a[0] = (v) => M.value = !0),
|
|
140
139
|
disabled: B.value.length === 0,
|
|
141
140
|
modelValue: "导入数据"
|
|
142
141
|
}, null, 8, ["disabled"])
|
|
143
142
|
]),
|
|
144
|
-
o.value.length > 0 ? (
|
|
143
|
+
o.value.length > 0 ? (j(), O("div", Vt, [
|
|
145
144
|
l("div", Lt, [
|
|
146
145
|
a[6] || (a[6] = l("label", null, "帧间隔 (ms):", -1)),
|
|
147
146
|
i(f, {
|
|
@@ -175,11 +174,11 @@ ${B.value.join(" ")}
|
|
|
175
174
|
l("div", null, [
|
|
176
175
|
a[9] || (a[9] = l("label", null, "当前帧数据:", -1)),
|
|
177
176
|
l("div", null, [
|
|
178
|
-
V.value ? (
|
|
177
|
+
V.value ? (j(!0), O(nt, { key: 0 }, ot(V.value, (v, $) => (j(), O("div", { key: $ }, R($) + ": " + R(v), 1))), 128)) : I("", !0)
|
|
179
178
|
])
|
|
180
179
|
])
|
|
181
180
|
])) : I("", !0),
|
|
182
|
-
o.value.length === 0 ? (
|
|
181
|
+
o.value.length === 0 ? (j(), O("div", Ot, a[10] || (a[10] = [
|
|
183
182
|
l("p", null, "请先导入数据", -1)
|
|
184
183
|
]))) : I("", !0),
|
|
185
184
|
i(r, {
|
|
@@ -203,7 +202,7 @@ ${B.value.join(" ")}
|
|
|
203
202
|
]),
|
|
204
203
|
default: ne(() => [
|
|
205
204
|
a[11] || (a[11] = l("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
|
|
206
|
-
i(
|
|
205
|
+
i(c, {
|
|
207
206
|
modelValue: J.value,
|
|
208
207
|
"onUpdate:modelValue": a[3] || (a[3] = (v) => J.value = v),
|
|
209
208
|
type: "textarea",
|
|
@@ -217,7 +216,7 @@ ${B.value.join(" ")}
|
|
|
217
216
|
]);
|
|
218
217
|
};
|
|
219
218
|
}
|
|
220
|
-
}),
|
|
219
|
+
}), je = /* @__PURE__ */ Ue(Mt, [["__scopeId", "data-v-0833d9bc"]]), Nt = async (W) => await new xt().loadAsync(W), Et = { class: "obj-viewer-container" }, Bt = { class: "pipe-comparison" }, Ft = {
|
|
221
220
|
ref: "pipe1",
|
|
222
221
|
class: "pipe-container"
|
|
223
222
|
}, It = {
|
|
@@ -226,10 +225,10 @@ ${B.value.join(" ")}
|
|
|
226
225
|
}, Jt = { class: "buttonGroup-top" }, Gt = { class: "buttonGroup-topLeft" }, Xt = { class: "buttonGroup-left" }, Ht = { class: "buttonGroup-right" }, Kt = { class: "buttonGroup-bottom" }, Wt = { class: "top-panel" }, Yt = { class: "panel-header" }, Zt = { class: "panel-body" }, qt = { class: "left-panel" }, Qt = { class: "panel-header" }, el = { class: "panel-body" }, tl = {
|
|
227
226
|
key: 1,
|
|
228
227
|
class: "clipping-content"
|
|
229
|
-
}, ll = { class: "radio-group" }, al = { class: "radio-label" }, nl = { class: "radio-label" }, ol = { class: "radio-label" }, sl = { class: "radio-label" }, il = { class: "right-panel" }, ul = { class: "panel-header" }, rl = { class: "panel-body" },
|
|
228
|
+
}, ll = { class: "radio-group" }, al = { class: "radio-label" }, nl = { class: "radio-label" }, ol = { class: "radio-label" }, sl = { class: "radio-label" }, il = { class: "right-panel" }, ul = { class: "panel-header" }, rl = { class: "panel-body" }, cl = {
|
|
230
229
|
key: 0,
|
|
231
230
|
class: "loading-overlay"
|
|
232
|
-
},
|
|
231
|
+
}, dl = /* @__PURE__ */ ze({
|
|
233
232
|
__name: "threeSceneViewForCPMPIP",
|
|
234
233
|
props: {
|
|
235
234
|
fileBlobs: { default: () => [] },
|
|
@@ -239,10 +238,10 @@ ${B.value.join(" ")}
|
|
|
239
238
|
},
|
|
240
239
|
emits: ["getAnimationData", "getThreeData"],
|
|
241
240
|
setup(W, { emit: oe }) {
|
|
242
|
-
const
|
|
241
|
+
const z = oe, o = W, M = dt(be), { originalPath: J } = ye(M);
|
|
243
242
|
vt(be);
|
|
244
|
-
const k = pt(), { activeMenuPath: C } = ye(k), N =
|
|
245
|
-
|
|
243
|
+
const k = pt(), { activeMenuPath: C } = ye(k), N = ct(be), { loginUserInfo: Y } = ye(N), w = ve("managementPageVisible"), g = ve("setManagementPageTitle"), U = ve("setManagementPageVisible"), E = ve("setPositionType"), B = () => {
|
|
244
|
+
U == null || U(!(w != null && w.value));
|
|
246
245
|
}, G = T(() => {
|
|
247
246
|
var e, n;
|
|
248
247
|
return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.machine;
|
|
@@ -253,9 +252,9 @@ ${B.value.join(" ")}
|
|
|
253
252
|
var e, n;
|
|
254
253
|
return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.knife;
|
|
255
254
|
}), se = u([]), ie = async (t) => {
|
|
256
|
-
!t || !t.isExtra || (await ue(t), E == null || E("right"), g == null || g(t == null ? void 0 : t.pageName),
|
|
257
|
-
}, ue =
|
|
258
|
-
await
|
|
255
|
+
!t || !t.isExtra || (await ue(t), E == null || E("right"), g == null || g(t == null ? void 0 : t.pageName), U == null || U(!0));
|
|
256
|
+
}, ue = Tt(async (t) => {
|
|
257
|
+
await $t();
|
|
259
258
|
const { mainKey: e, baseMenuPath: n } = t || {};
|
|
260
259
|
mt(n, e);
|
|
261
260
|
}, 500);
|
|
@@ -340,8 +339,8 @@ ${B.value.join(" ")}
|
|
|
340
339
|
const q = T(() => {
|
|
341
340
|
var e, n;
|
|
342
341
|
return (n = (e = o == null ? void 0 : o.threeData) == null ? void 0 : e.data) == null ? void 0 : n.bladeObjUrl;
|
|
343
|
-
}), re = u(ke.ROBOT), Q = u(null), s = u(!1), a = u(""), f = u(!1), p = u(""),
|
|
344
|
-
currentModels:
|
|
342
|
+
}), re = u(ke.ROBOT), Q = u(null), s = u(!1), a = u(""), f = u(!1), p = u(""), c = u(!1), r = u(""), v = u(!1), $ = u(""), _ = pe(null), ee = u("叶片模型"), te = pe(null), Ve = pe(null), Ce = pe(null), ce = u(je), {
|
|
343
|
+
currentModels: de,
|
|
345
344
|
resetView: Le,
|
|
346
345
|
initThreeJS: Se,
|
|
347
346
|
handleResize: we,
|
|
@@ -352,26 +351,26 @@ ${B.value.join(" ")}
|
|
|
352
351
|
toggleAxesVisibility: Oe
|
|
353
352
|
} = yt(Q), { loadSceneFromFile: Re } = ht(
|
|
354
353
|
le,
|
|
355
|
-
|
|
354
|
+
de,
|
|
356
355
|
s,
|
|
357
356
|
a
|
|
358
|
-
), { isAnimating: xe, toggleAnimation: Me, stopAnimation: Ne } = kt(le,
|
|
357
|
+
), { isAnimating: xe, toggleAnimation: Me, stopAnimation: Ne } = kt(le, de), { isClipping: Ee, activeClippingAxis: P, toggleClipping: Be, updateClippingPlanes: A } = Pt(le, de), { initRaycaster: Fe, selectedObject3D: Ie, setSelectedObjVisible: Je, updatePosition: Ge, updateRotation: Xe, dispose: He } = gt(Q, le, de), Ke = () => {
|
|
359
358
|
Oe();
|
|
360
359
|
}, We = T(() => re.value === ke.ROBOT), Ye = T(() => re.value === ke.PIPECOMPARSION), Ze = (t) => {
|
|
361
360
|
$.value = t, v.value = !0;
|
|
362
361
|
}, ge = (t) => {
|
|
363
362
|
f.value = !0, p.value = t, t === "剖面视图" && !Ee.value && Be();
|
|
364
363
|
}, he = (t) => {
|
|
365
|
-
|
|
364
|
+
c.value = !0, r.value = t, t === "动画仿真" && z("getAnimationData");
|
|
366
365
|
}, qe = () => {
|
|
367
366
|
var t;
|
|
368
|
-
(t =
|
|
367
|
+
(t = ce.value) == null || t.handlePlayPause();
|
|
369
368
|
}, Qe = () => {
|
|
370
369
|
var t;
|
|
371
|
-
(t =
|
|
370
|
+
(t = ce.value) == null || t.pauseAnimation();
|
|
372
371
|
}, et = () => {
|
|
373
372
|
var t;
|
|
374
|
-
(t =
|
|
373
|
+
(t = ce.value) == null || t.stopAnimation();
|
|
375
374
|
}, tt = (t, e) => {
|
|
376
375
|
if (!e)
|
|
377
376
|
return null;
|
|
@@ -380,7 +379,7 @@ ${B.value.join(" ")}
|
|
|
380
379
|
return console.warn(`在模型中未找到名为 '${e}' 的 link`), console.log("可用的链接:", Object.keys(t.links)), null;
|
|
381
380
|
let L = null;
|
|
382
381
|
return n.traverse((D) => {
|
|
383
|
-
D instanceof
|
|
382
|
+
D instanceof jt && !L && (L = D);
|
|
384
383
|
}), L || console.warn(`在 link '${e}' 中未找到可用的 Mesh 对象`), L;
|
|
385
384
|
}, lt = async (t) => {
|
|
386
385
|
const e = tt(t, ee.value);
|
|
@@ -421,7 +420,7 @@ ${B.value.join(" ")}
|
|
|
421
420
|
}), (t, e) => {
|
|
422
421
|
var D;
|
|
423
422
|
const n = K("el-scrollbar"), L = K("PipeAnalysisPanel");
|
|
424
|
-
return
|
|
423
|
+
return j(), O("div", Et, [
|
|
425
424
|
x(l("div", {
|
|
426
425
|
ref_key: "threejsContainer",
|
|
427
426
|
ref: Q,
|
|
@@ -443,7 +442,7 @@ ${B.value.join(" ")}
|
|
|
443
442
|
i(h, {
|
|
444
443
|
name: "viewReset",
|
|
445
444
|
size: "24",
|
|
446
|
-
onClick:
|
|
445
|
+
onClick: d(Le),
|
|
447
446
|
title: "重置"
|
|
448
447
|
}, null, 8, ["onClick"]),
|
|
449
448
|
i(h, {
|
|
@@ -459,13 +458,13 @@ ${B.value.join(" ")}
|
|
|
459
458
|
i(h, {
|
|
460
459
|
name: "lookAround",
|
|
461
460
|
size: "24",
|
|
462
|
-
onClick:
|
|
463
|
-
title:
|
|
461
|
+
onClick: d(Me),
|
|
462
|
+
title: d(xe) ? "停止动画" : "动画视图"
|
|
464
463
|
}, null, 8, ["onClick", "title"]),
|
|
465
464
|
i(h, {
|
|
466
465
|
name: "zuobiaoxi",
|
|
467
466
|
size: "24",
|
|
468
|
-
active:
|
|
467
|
+
active: d(De),
|
|
469
468
|
onClick: Ke,
|
|
470
469
|
title: "显隐坐标轴"
|
|
471
470
|
}, null, 8, ["active"])
|
|
@@ -498,14 +497,14 @@ ${B.value.join(" ")}
|
|
|
498
497
|
name: "yemian",
|
|
499
498
|
size: "24",
|
|
500
499
|
onClick: B,
|
|
501
|
-
active: (D =
|
|
500
|
+
active: (D = d(w)) == null ? void 0 : D.value,
|
|
502
501
|
title: "数据管理"
|
|
503
502
|
}, null, 8, ["active"]),
|
|
504
503
|
i(h, {
|
|
505
504
|
name: "jichuangxuanze",
|
|
506
505
|
size: "24",
|
|
507
506
|
onClick: e[3] || (e[3] = (b) => he("机床控制")),
|
|
508
|
-
active:
|
|
507
|
+
active: c.value && r.value === "机床控制",
|
|
509
508
|
title: "机床控制"
|
|
510
509
|
}, null, 8, ["active"]),
|
|
511
510
|
i(h, {
|
|
@@ -513,7 +512,7 @@ ${B.value.join(" ")}
|
|
|
513
512
|
size: "24",
|
|
514
513
|
title: "动画仿真",
|
|
515
514
|
onClick: e[4] || (e[4] = (b) => he("动画仿真")),
|
|
516
|
-
active:
|
|
515
|
+
active: c.value && r.value === "动画仿真"
|
|
517
516
|
}, null, 8, ["active"])
|
|
518
517
|
]),
|
|
519
518
|
l("div", Kt, [
|
|
@@ -571,13 +570,13 @@ ${B.value.join(" ")}
|
|
|
571
570
|
default: ne(() => {
|
|
572
571
|
var b;
|
|
573
572
|
return [
|
|
574
|
-
p.value === "场景树" ? (
|
|
573
|
+
p.value === "场景树" ? (j(), $e(Ct, {
|
|
575
574
|
key: 0,
|
|
576
575
|
model: _.value,
|
|
577
576
|
extraNodes: se.value,
|
|
578
577
|
onNodeClick: ie
|
|
579
578
|
}, null, 8, ["model", "extraNodes"])) : I("", !0),
|
|
580
|
-
p.value === "剖面视图" ? (
|
|
579
|
+
p.value === "剖面视图" ? (j(), O("div", tl, [
|
|
581
580
|
l("div", ll, [
|
|
582
581
|
l("label", al, [
|
|
583
582
|
x(l("input", {
|
|
@@ -586,9 +585,9 @@ ${B.value.join(" ")}
|
|
|
586
585
|
value: "none",
|
|
587
586
|
"onUpdate:modelValue": e[7] || (e[7] = (m) => me(P) ? P.value = m : null),
|
|
588
587
|
onChange: e[8] || (e[8] = //@ts-ignore
|
|
589
|
-
(...m) =>
|
|
588
|
+
(...m) => d(A) && d(A)(...m))
|
|
590
589
|
}, null, 544), [
|
|
591
|
-
[fe,
|
|
590
|
+
[fe, d(P)]
|
|
592
591
|
]),
|
|
593
592
|
e[16] || (e[16] = l("span", { class: "radio-text" }, "无切割", -1))
|
|
594
593
|
]),
|
|
@@ -599,9 +598,9 @@ ${B.value.join(" ")}
|
|
|
599
598
|
value: "x",
|
|
600
599
|
"onUpdate:modelValue": e[9] || (e[9] = (m) => me(P) ? P.value = m : null),
|
|
601
600
|
onChange: e[10] || (e[10] = //@ts-ignore
|
|
602
|
-
(...m) =>
|
|
601
|
+
(...m) => d(A) && d(A)(...m))
|
|
603
602
|
}, null, 544), [
|
|
604
|
-
[fe,
|
|
603
|
+
[fe, d(P)]
|
|
605
604
|
]),
|
|
606
605
|
e[17] || (e[17] = l("span", { class: "radio-text" }, "X轴切割", -1))
|
|
607
606
|
]),
|
|
@@ -612,9 +611,9 @@ ${B.value.join(" ")}
|
|
|
612
611
|
value: "y",
|
|
613
612
|
"onUpdate:modelValue": e[11] || (e[11] = (m) => me(P) ? P.value = m : null),
|
|
614
613
|
onChange: e[12] || (e[12] = //@ts-ignore
|
|
615
|
-
(...m) =>
|
|
614
|
+
(...m) => d(A) && d(A)(...m))
|
|
616
615
|
}, null, 544), [
|
|
617
|
-
[fe,
|
|
616
|
+
[fe, d(P)]
|
|
618
617
|
]),
|
|
619
618
|
e[18] || (e[18] = l("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
620
619
|
]),
|
|
@@ -625,20 +624,20 @@ ${B.value.join(" ")}
|
|
|
625
624
|
value: "z",
|
|
626
625
|
"onUpdate:modelValue": e[13] || (e[13] = (m) => me(P) ? P.value = m : null),
|
|
627
626
|
onChange: e[14] || (e[14] = //@ts-ignore
|
|
628
|
-
(...m) =>
|
|
627
|
+
(...m) => d(A) && d(A)(...m))
|
|
629
628
|
}, null, 544), [
|
|
630
|
-
[fe,
|
|
629
|
+
[fe, d(P)]
|
|
631
630
|
]),
|
|
632
631
|
e[19] || (e[19] = l("span", { class: "radio-text" }, "Z轴切割", -1))
|
|
633
632
|
])
|
|
634
633
|
])
|
|
635
634
|
])) : I("", !0),
|
|
636
|
-
p.value === "工件树" ? (
|
|
635
|
+
p.value === "工件树" ? (j(), $e(bt, {
|
|
637
636
|
key: 2,
|
|
638
|
-
model: (b =
|
|
639
|
-
onVisibleChange:
|
|
640
|
-
onUpdatePosition:
|
|
641
|
-
onUpdateRotation:
|
|
637
|
+
model: (b = d(Ie)) == null ? void 0 : b.obj,
|
|
638
|
+
onVisibleChange: d(Je),
|
|
639
|
+
onUpdatePosition: d(Ge),
|
|
640
|
+
onUpdateRotation: d(Xe)
|
|
642
641
|
}, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : I("", !0)
|
|
643
642
|
];
|
|
644
643
|
}),
|
|
@@ -653,7 +652,7 @@ ${B.value.join(" ")}
|
|
|
653
652
|
l("span", null, R(r.value), 1),
|
|
654
653
|
l("span", {
|
|
655
654
|
class: "close",
|
|
656
|
-
onClick: e[15] || (e[15] = (b) =>
|
|
655
|
+
onClick: e[15] || (e[15] = (b) => c.value = !1)
|
|
657
656
|
}, " X ")
|
|
658
657
|
]),
|
|
659
658
|
l("div", rl, [
|
|
@@ -662,12 +661,12 @@ ${B.value.join(" ")}
|
|
|
662
661
|
x(i(wt, { model: _.value }, null, 8, ["model"]), [
|
|
663
662
|
[F, r.value === "机床控制"]
|
|
664
663
|
]),
|
|
665
|
-
x(i(
|
|
664
|
+
x(i(je, {
|
|
666
665
|
model: _.value,
|
|
667
666
|
scene: Ce.value,
|
|
668
667
|
xyzbcList: Z.value,
|
|
669
668
|
ref_key: "urdfAnimationPanelRef",
|
|
670
|
-
ref:
|
|
669
|
+
ref: ce
|
|
671
670
|
}, null, 8, ["model", "scene", "xyzbcList"]), [
|
|
672
671
|
[F, r.value === "动画仿真"]
|
|
673
672
|
]),
|
|
@@ -677,9 +676,9 @@ ${B.value.join(" ")}
|
|
|
677
676
|
})
|
|
678
677
|
])
|
|
679
678
|
], 512), [
|
|
680
|
-
[F,
|
|
679
|
+
[F, c.value]
|
|
681
680
|
]),
|
|
682
|
-
s.value ? (
|
|
681
|
+
s.value ? (j(), O("div", cl, [
|
|
683
682
|
e[20] || (e[20] = l("div", { class: "loading-spinner" }, null, -1)),
|
|
684
683
|
l("p", null, R(a.value), 1)
|
|
685
684
|
])) : I("", !0),
|
|
@@ -687,7 +686,7 @@ ${B.value.join(" ")}
|
|
|
687
686
|
]);
|
|
688
687
|
};
|
|
689
688
|
}
|
|
690
|
-
}),
|
|
689
|
+
}), xl = /* @__PURE__ */ Ue(dl, [["__scopeId", "data-v-d9156359"]]);
|
|
691
690
|
export {
|
|
692
|
-
|
|
691
|
+
xl as default
|
|
693
692
|
};
|