ss-component-new 1.2.29 → 1.2.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/{MTLLoader-Btl6jtTT.cjs → MTLLoader-CGJ_BoN_.cjs} +1 -1
  2. package/dist/{MTLLoader-DaS4oK2-.js → MTLLoader-DKu2hJu8.js} +1 -1
  3. package/dist/{OrbitControls-DgQjdt42.js → OrbitControls-BqqUzhiB.js} +1 -1
  4. package/dist/{OrbitControls-CcAsTKCV.cjs → OrbitControls-CcSIJs8U.cjs} +1 -1
  5. package/dist/{animationData-DU7c8LKS.js → animationData-C9-csPUd.js} +4 -4
  6. package/dist/{animationData-CLz_pFa4.cjs → animationData-CqnPk9Xj.cjs} +1 -1
  7. package/dist/array-CNff52dF.cjs +11 -0
  8. package/dist/array-GAxUIYkk.js +626 -0
  9. package/dist/{dataUtil-DTrXZ9vY.cjs → dataUtil-B8GQMfU9.cjs} +1 -1
  10. package/dist/{dataUtil-DHVz_Gv0.js → dataUtil-CUqnwA-C.js} +2 -2
  11. package/dist/{fileUtil-CpaC-lNY.js → fileUtil-2jbB0UOW.js} +1 -1
  12. package/dist/{fileUtil-DxupWpPS.cjs → fileUtil-DmlOwzdA.cjs} +1 -1
  13. package/dist/{iconfont-CE4P8Jsp.cjs → iconfont-BRjtaT1w.cjs} +1 -1
  14. package/dist/{iconfont-Du0xZzV7.js → iconfont-Clbumxhq.js} +2 -2
  15. package/dist/icons/svg/LowCodeEvent.svg +1 -1
  16. package/dist/icons/svg/LowCodeExtend.svg +1 -1
  17. package/dist/icons/svg/LowCodeSetting.svg +1 -1
  18. package/dist/icons/svg/LowCodeStyle.svg +1 -1
  19. package/dist/{index-Bqi3sJC7.cjs → index-4vFpZiro.cjs} +1 -1
  20. package/dist/{index-D9JzfDXH.js → index-B1K65cVA.js} +4 -4
  21. package/dist/{index-BRRZuuEl.js → index-B1TG4KX4.js} +2 -2
  22. package/dist/{index-BfHU9Svo.cjs → index-B4kwMjRZ.cjs} +1 -1
  23. package/dist/{index-Dw2Y4uH_.js → index-B524ZAt_.js} +52 -52
  24. package/dist/{index-CMIGSPjz.cjs → index-B5KCSN4c.cjs} +1 -1
  25. package/dist/index-B6nEh_Jv.js +2865 -0
  26. package/dist/{index-CkGrtePb.cjs → index-BDHmuN0R.cjs} +1 -1
  27. package/dist/{index-BAxaq2y7.js → index-BH-dztWs.js} +2 -2
  28. package/dist/{index-B5FSXqHm.cjs → index-BKH5yrms.cjs} +1 -1
  29. package/dist/index-BQ4Ui0xZ.cjs +1 -0
  30. package/dist/{index-BzBkXwTh.js → index-BR2gy9VY.js} +12 -12
  31. package/dist/{index-CU1BmVAB.cjs → index-BUqXSmZN.cjs} +1 -1
  32. package/dist/index-BVaHwt5f.cjs +1 -0
  33. package/dist/{index-B-tlh5kE.js → index-BVx8ubcY.js} +3 -3
  34. package/dist/{index-CqOtFvZa.js → index-Bf_EwhXB.js} +40 -40
  35. package/dist/{index-D58EyLez.cjs → index-Bg67M1I0.cjs} +1 -1
  36. package/dist/index-Bnlo1Vn9.cjs +1 -0
  37. package/dist/{index-DztWBQml.js → index-BuPMGirQ.js} +3123 -3043
  38. package/dist/{index-BcQ40Tes.cjs → index-C4sVFEb2.cjs} +1 -1
  39. package/dist/{index-Cb4pfE6J.cjs → index-C5bKf4Rc.cjs} +1 -1
  40. package/dist/{index-DY5-ctYG.cjs → index-C8YYklCT.cjs} +1 -1
  41. package/dist/index-CBzeyNqc.cjs +1 -0
  42. package/dist/{index-B-ldbKny.js → index-CF3_9CuM.js} +2 -2
  43. package/dist/index-CGrK7vLD.cjs +15 -0
  44. package/dist/index-CJz9KUlK.js +2761 -0
  45. package/dist/index-CLYAJN6W.js +12157 -0
  46. package/dist/index-CPUuPtdW.cjs +1 -0
  47. package/dist/index-CQGU-KUl.cjs +1 -0
  48. package/dist/{index-j_GTy39J.js → index-CSkbFCKk.js} +8 -8
  49. package/dist/{index-CY01t_AB.js → index-CVduLh5F.js} +4 -4
  50. package/dist/{index-B3DrN_P-.cjs → index-CVfE7lev.cjs} +1 -1
  51. package/dist/{index-DhP_8QY1.js → index-CWvU6SMj.js} +87 -87
  52. package/dist/{index-CZu3TggJ.js → index-CkTqgfCV.js} +1 -1
  53. package/dist/{index-Dr8RTHlQ.cjs → index-Ct1BlKod.cjs} +1 -1
  54. package/dist/{index-CpbXQJ69.js → index-Cx-hhVVM.js} +6 -6
  55. package/dist/{index-GnTS2V_K.cjs → index-D-vSuC_W.cjs} +1 -1
  56. package/dist/{index-HduGypr9.js → index-DBDeHECn.js} +7888 -8186
  57. package/dist/{index-N4TPHpp3.cjs → index-DC41esc7.cjs} +1 -1
  58. package/dist/index-DEBf-IBT.cjs +21 -0
  59. package/dist/{index-BwLaQntz.js → index-DKQfWQa7.js} +1 -1
  60. package/dist/index-DLNYVMBT.js +718 -0
  61. package/dist/{index-CQT5dUkY.js → index-DNmodmj5.js} +3 -3
  62. package/dist/{index-B-50SHak.js → index-DOqV1gv2.js} +10 -10
  63. package/dist/{index-C7HhZZ5E.cjs → index-DPJaR6_y.cjs} +1 -1
  64. package/dist/{index-LWBnZlM7.js → index-DQEoNTv9.js} +1 -1
  65. package/dist/{index-BY0odixw.js → index-D_vF-xur.js} +8 -8
  66. package/dist/{index-FTDiaeLm.cjs → index-Dc_H7_4Q.cjs} +1 -1
  67. package/dist/{index-C1mFijwB.js → index-DnxJ5v5h.js} +2 -2
  68. package/dist/{index-BDOGaTwD.js → index-DpHuDey-.js} +6 -6
  69. package/dist/{index-BOP__94H.cjs → index-Dyk6Ept4.cjs} +1 -1
  70. package/dist/{index-BekLYZRQ.js → index-LjM9Nk8B.js} +17 -17
  71. package/dist/{index-CJHddCMi.cjs → index-M0XPuhvZ.cjs} +1 -1
  72. package/dist/index-NsYVgt6J.cjs +1 -0
  73. package/dist/{index-DcqJF5CQ.cjs → index-T8lPGzLV.cjs} +1 -1
  74. package/dist/{index-Cjg3XFfr.js → index-ZxdNFChm.js} +2 -2
  75. package/dist/{index-CLxjU9d5.cjs → index-eU4qzdNW.cjs} +1 -1
  76. package/dist/{index-Crxd7-b7.js → index-h2jxROLW.js} +2 -2
  77. package/dist/index-rlStojTL.js +52 -0
  78. package/dist/{index-DG3THGbR.cjs → index-zfSd0dDx.cjs} +1 -1
  79. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BAJOxaYG.js +38119 -0
  80. package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bz5a6KNq.cjs +56 -0
  81. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CXCyffCH.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-1Mv6nQqI.cjs} +105 -105
  82. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CknYXUAG.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-jN5HQ4-h.js} +2 -2
  83. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BjSHFmlk.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-B5pFO8Nu.js} +13 -13
  84. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DP9-elEo.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-CfeHVTqR.cjs} +1 -1
  85. package/dist/{index.vue_vue_type_style_index_1_lang-7YyaG-ux.js → index.vue_vue_type_style_index_1_lang-C_-spRZf.js} +5 -5
  86. package/dist/index.vue_vue_type_style_index_1_lang-C_c9xkIT.js +8381 -0
  87. package/dist/index.vue_vue_type_style_index_1_lang-Dk9u-CTP.cjs +32 -0
  88. package/dist/{index.vue_vue_type_style_index_1_lang-DR2WbpbS.cjs → index.vue_vue_type_style_index_1_lang-Dn15anMU.cjs} +1 -1
  89. package/dist/{isString-Cqq3-gAK.cjs → isString-D6Z6SOrb.cjs} +1 -1
  90. package/dist/{isString-BuBBWjRr.js → isString-DBnuELeA.js} +1 -1
  91. package/dist/{main-BihXvzMI.cjs → main-Cqs48dh5.cjs} +1 -1
  92. package/dist/{main-DNSqqdPD.js → main-D13CgkQa.js} +5 -5
  93. package/dist/ss-component.cjs +1 -1
  94. package/dist/ss-component.css +2 -2
  95. package/dist/ss-component.js +12 -12
  96. package/dist/ss-component2.cjs +1 -1
  97. package/dist/ss-component2.js +12 -12
  98. package/dist/{threeModel-CtBBRBOK.cjs → threeModel-B1Q-W8uT.cjs} +1 -1
  99. package/dist/{threeModel-BqOQ47Za.js → threeModel-CdhAh8Bx.js} +5 -5
  100. package/dist/{threePreview-BHE13BvL.cjs → threePreview-DFaqe_Df.cjs} +1 -1
  101. package/dist/{threePreview-Bd_hs3b5.js → threePreview-qK1L0B-6.js} +4 -4
  102. package/dist/{threeSceneView-CcIM0Moj.js → threeSceneView-D7A2EUjB.js} +87 -87
  103. package/dist/{threeSceneView-CpUZIDu0.cjs → threeSceneView-MV6u29zj.cjs} +1 -1
  104. package/dist/{threeSceneViewForCPMPIP-CSLxU6SD.js → threeSceneViewForCPMPIP-CFMeh1a1.js} +59 -59
  105. package/dist/{threeSceneViewForCPMPIP-CdwlvwVM.cjs → threeSceneViewForCPMPIP-DWIRSSMI.cjs} +1 -1
  106. package/dist/{threeTrackPathView-CFubNJOL.cjs → threeTrackPathView-jcnhqw1L.cjs} +1 -1
  107. package/dist/{threeTrackPathView-BWG_40eX.js → threeTrackPathView-zpNY2aoY.js} +6 -6
  108. package/dist/{threeViewerHost-BuBE7hoc.cjs → threeViewerHost-Bmk1dyAX.cjs} +1 -1
  109. package/dist/{threeViewerHost-vCZc8klC.js → threeViewerHost-SnFuinLz.js} +14 -14
  110. package/dist/{urdfTree-BiiSGsZg.cjs → urdfTree-BhIdc1in.cjs} +1 -1
  111. package/dist/{urdfTree-C57hYJRP.js → urdfTree-BqMKYhyU.js} +1 -1
  112. package/dist/{workpieceTreePanel-D8qBDVhq.js → workpieceTreePanel-CrJBeLgr.js} +5 -5
  113. package/dist/{workpieceTreePanel-CWhD21xq.cjs → workpieceTreePanel-ugZl4wP-.cjs} +1 -1
  114. package/package.json +2 -2
  115. package/public/icons/svg/LowCodeEvent.svg +1 -1
  116. package/public/icons/svg/LowCodeExtend.svg +1 -1
  117. package/public/icons/svg/LowCodeSetting.svg +1 -1
  118. package/public/icons/svg/LowCodeStyle.svg +1 -1
  119. package/dist/array-DflozZ1A.js +0 -1142
  120. package/dist/array-XlxGBHUo.cjs +0 -11
  121. package/dist/index-6n-ju54O.cjs +0 -1
  122. package/dist/index-BwdapKZb.js +0 -2466
  123. package/dist/index-C7HVXP10.cjs +0 -15
  124. package/dist/index-CFCa1xzq.cjs +0 -1
  125. package/dist/index-Cg506ve2.cjs +0 -1
  126. package/dist/index-Cu8QKH00.js +0 -3621
  127. package/dist/index-D0_uI-0k.js +0 -7298
  128. package/dist/index-D6iyHpio.cjs +0 -1
  129. package/dist/index-DEEZPcpU.cjs +0 -1
  130. package/dist/index-DEGcvzNY.cjs +0 -1
  131. package/dist/index-DKeA3do3.js +0 -2570
  132. package/dist/index-DiRBJiMW.js +0 -43
  133. package/dist/index-DmZZFY-Z.cjs +0 -1
  134. package/dist/index-Dv1G67_Q.cjs +0 -21
  135. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BW70gvjA.js +0 -38930
  136. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DsBgefdP.cjs +0 -37
  137. package/dist/index.vue_vue_type_style_index_1_lang-7jdZW6T6.js +0 -8254
  138. package/dist/index.vue_vue_type_style_index_1_lang-CEg9OCRk.cjs +0 -32
@@ -1 +1 @@
1
- "use strict";var te=Object.defineProperty;var oe=(b,n,o)=>n in b?te(b,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):b[n]=o;var j=(b,n,o)=>oe(b,typeof n!="symbol"?n+"":n,o);const se=require("./index.vue_vue_type_style_index_1_lang-DR2WbpbS.cjs"),U=require("./MTLLoader-Btl6jtTT.cjs"),C=require("./fileUtil-DxupWpPS.cjs"),R=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CXCyffCH.cjs"),e=require("vue"),D=require("./iconfont-CE4P8Jsp.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function ne(b){const{mtlUrl:n,manager:o,resourcePath:l,onLoad:m,onProgress:i,onError:w}=b,p=new U.MTLLoader(o);return l&&p.setResourcePath(l),p.load(n,m,i,w),p}function re(b){const{objUrl:n,manager:o,materials:l,onLoad:m,onProgress:i,onError:w}=b,p=new U.OBJLoader(o);return l&&p.setMaterials(l),p.load(n,m,i,w),p}function ae(b){const{manager:n,baseFolderUrl:o,onFileProgress:l}=b,m=new se.URDFLoader(n);return m.packages=i=>`${o.endsWith("/")?o:o+"/"}${i}/`,m.loadMeshCb=(i,w,p)=>{const g=(()=>{const E=i.split("?")[0].split("#")[0],c=E.lastIndexOf(".");return c>=0?E.slice(c+1).toLowerCase():void 0})();switch(g){case"obj":{const E=(()=>{try{return new URL(".",i).toString()}catch{const a=i.lastIndexOf("/");return a>=0?i.slice(0,a+1):i}})(),c=(()=>{var d;return(((d=i.split("/").pop())==null?void 0:d.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),f=`${E}${c}.mtl`,h=a=>{re({objUrl:i,manager:w,materials:a,onLoad:d=>p(d),onProgress:d=>l==null?void 0:l(i,d==null?void 0:d.loaded,d==null?void 0:d.total),onError:d=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 OBJ 模型: ${i}`,d),p(new R.Group)}})};ne({mtlUrl:f,manager:w,resourcePath:E,onLoad:a=>{try{a.preload()}catch{}h(a)},onProgress:a=>l==null?void 0:l(f,a==null?void 0:a.loaded,a==null?void 0:a.total),onError:a=>{console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${f}。将尝试无材质加载。`),h(void 0)}});break}case"stl":{new U.STLLoader(w).load(i,c=>{const f=new R.MeshPhongMaterial({color:12303291,shininess:30}),h=new R.Mesh(c,f);h.castShadow=!0,h.receiveShadow=!0,p(h)},c=>l==null?void 0:l(i,c==null?void 0:c.loaded,c==null?void 0:c.total),c=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 STL 模型: ${i}`,c),p(new R.Group)});break}default:console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${g} (路径: ${i})`),p(new R.Group)}},m}function ce(b,n,o,l){return{loadSceneFromFile:i=>new Promise((w,p)=>{o.value=!0,l.value="正在初始化 URDF 加载器...";let g=0,E=0,c=null;const f=new R.LoadingManager;f.onStart=(a,d,V)=>{g=V||0,E=d||0,l.value=g>0?`开始下载资源: 0 / ${g}`:"开始下载资源...",o.value=!0},f.onProgress=(a,d,V)=>{E=d,g=V;const L=`正在加载 ${d} / ${V} 个文件: ${C.getFilenameFromUrl(a)}`;l.value=L,d===V&&(l.value="资源加载完成,正在处理模型...",setTimeout(()=>{if(c){c.updateMatrixWorld(!0);const v=new R.Box3().setFromObject(c);v.isEmpty()&&console.warn("模型加载完成,但所有可视化网格均加载失败,模型将不可见。"),c.userData.boundingBox=v,c.traverse(u=>{u.isMesh&&(u.castShadow=!0,u.receiveShadow=!0)}),w(c)}else p(new Error("URDF 文件本身加载失败。"));l.value="模型加载完成",setTimeout(()=>{l.value==="模型加载完成"&&(o.value=!1,l.value="")},500)},100))},f.onError=a=>{console.warn(`LoadingManager 报告一个资源加载失败: ${a}。加载流程将继续。`)};const h=(a,d,V)=>{const L=C.getFilenameFromUrl(a);let v;V&&V>0?v=`${L}(${C.formatBytes(d)} / ${C.formatBytes(V)})`:d&&d>0?v=`${L}(已下载 ${C.formatBytes(d)})`:v=`${L}`,l.value=`正在下载第 ${E+1} / ${g} 个文件: ${v}`};try{const a=URL.createObjectURL(i);ae({manager:f,baseFolderUrl:ie,onFileProgress:h}).load(a,V=>{c=V},void 0,V=>{console.error(`加载 URDF 文件 (${i.name}) 时发生致命错误:`,V),l.value="URDF 文件解析失败",o.value=!1,p(new Error(`加载 URDF 文件失败: ${i.name}`))})}catch(a){console.error("初始化 URDF 加载时发生致命错误:",a),l.value="模型加载失败",o.value=!1,p(a)}})}}function de(b,n,o,l=["URDFVisual"]){let m=null;const i=e.ref(null),w=new R.Raycaster,p=new R.Vector2,g=new Map;function E(){o.value.forEach(v=>{v.traverse(u=>{l!=null&&l.includes(u.type)&&g.set(u.id,{obj:u,axis:u.axis||new R.Vector3(1,0,0),limits:u.limits})})})}function c(v){i.value&&i.value.obj.traverse(u=>{var t;u.material&&((t=u.material.emissive)==null||t.set(0))}),i.value=v,v.obj.traverse(u=>{var t;u.material&&((t=u.material.emissive)==null||t.set(65280))})}function f(v){const u=b.value.getBoundingClientRect();p.x=(v.clientX-u.left)/u.width*2-1,p.y=-((v.clientY-u.top)/u.height)*2+1,w.setFromCamera(p,m);const t=w.intersectObjects(o.value,!0);if(t.length===0)return;let s=t[0].object,_=null;for(;s;){if(g.has(s.id)){_=g.get(s.id);break}s=s.parent}_&&c(_)}function h(){b.value&&b.value.removeEventListener("click",f,!1)}function a(){const{scene:v,camera:u}=n();m=u,E(),b.value&&b.value.addEventListener("click",f,!1)}function d(v){i.value&&(i.value.obj.visible=v)}function V(v){var s;const{axis:u,value:t}=v;D.updateObjectPosition((s=i.value)==null?void 0:s.obj,u,t)}function L(v){var s;const{axis:u,value:t}=v;D.updateObjectRotation((s=i.value)==null?void 0:s.obj,u,t)}return{initRaycaster:a,dispose:h,selectedObject3D:i,setSelectedObjVisible:d,updatePosition:V,updateRotation:L}}const ue={SINGLE:"单机",DOUBLE:"双机"},me={ROBOT:1,PIPECOMPARSION:2};class pe{constructor(n){j(this,"robot");j(this,"movableJoints");this.robot=n,this.movableJoints=this.getMovableJoints()}getMovableJoints(){return Object.values(this.robot.joints).filter(n=>n.jointType!=="fixed")}getMovableJointNames(){return this.movableJoints.map(n=>n.name)}setJointAngle(n,o){const l=this.robot.joints[n];if(!l||l.jointType==="fixed")return console.warn(`关节 ${n} 不存在或不可动`),!1;if(l.limit){const m=Math.max(l.limit.lower,Math.min(l.limit.upper,o));m!==o&&console.warn(`关节 ${n} 角度被限制在 [${l.limit.lower}, ${l.limit.upper}]`),l.setJointValue(m)}else l.setJointValue(o);return!0}setJointAngles(n){Object.entries(n).forEach(([o,l])=>{typeof l=="number"&&!isNaN(l)&&this.setJointAngle(o,l)})}getCurrentJointStates(){const n={};return this.movableJoints.forEach(o=>{n[o.name]=o.angle||0}),n}resetToZero(){this.movableJoints.forEach(n=>{n.setJointValue(0)})}getJointLimits(n){const o=this.robot.joints[n];return!o||!o.limit?null:{lower:o.limit.lower,upper:o.limit.upper}}async animateToState(n,o=1e3,l){const m=this.getCurrentJointStates(),i=Date.now();return new Promise(w=>{const p=()=>{const g=Date.now()-i,E=Math.min(g/o,1),c=this.easeInOutCubic(E),f={};Object.keys(n).forEach(h=>{const a=m[h]||0,d=n[h];f[h]=a+(d-a)*c}),this.setJointAngles(f),l&&l(E),E<1?requestAnimationFrame(p):w()};p()})}easeInOutCubic(n){return n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2}async playSequence(n,o=1e3,l){for(let m=0;m<n.length;m++)await this.animateToState(n[m],o,i=>{l&&l(m,i)})}}const ve={class:"panel-content"},fe={class:"obj"},be={key:0,class:"obj-base"},_e=["title"],we=["title"],Ee={key:1},he={class:"obj-position"},Ve={class:"coord-item"},ge={class:"coord-item"},ye={class:"coord-item"},Ne={class:"obj-rotation"},Le={class:"coord-item"},Re={class:"coord-item"},Se={class:"coord-item"},Ce={class:"world"},je={class:"coord-line"},De={class:"coord-text"},Ue={class:"world-position-item"},Me={class:"world-position-item"},Fe={class:"world-position-item"},$e={class:"coord-line"},Oe={class:"coord-text"},xe={class:"world-rotation-item"},Je={class:"world-rotation-item"},Te={class:"world-rotation-item"},ke=e.defineComponent({__name:"workpieceTreePanel",props:{model:{},maxExpandCount:{default:10},expandStrategy:{default:"breadth"}},emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(b,{emit:n}){const o=b,l=n,m=e.ref([]),i=e.ref({}),w=(t,s=0)=>{const _=[];return Array.isArray(t)&&(t==null?void 0:t.length)>0&&t.forEach(r=>{if(!(r!=null&&r.isMesh)){const y={name:r==null?void 0:r.name,label:(r==null?void 0:r.name)||(r==null?void 0:r.type),show:!0,level:s+1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:w(r==null?void 0:r.children,s+1),path:r==null?void 0:r.name};_.push(y)}}),_},p=t=>t?[{name:t==null?void 0:t.name,label:(t==null?void 0:t.name)||(t==null?void 0:t.type),show:!0,level:1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:w(t==null?void 0:t.children,1),path:t==null?void 0:t.name}]:[],g=(t,s)=>{const _=[],r=[...t];for(;r.length>0&&_.length<s;){const y=r.shift();y.children&&y.children.length>0&&(_.push(y.id),r.push(...y.children))}return _},E=(t,s)=>{const _=[];return t.forEach(r=>{if(r.children&&r.children.length>0){_.push(r.id);const y=r.children.filter(S=>S.children&&S.children.length>0).slice(0,s).map(S=>S.id);_.push(...y)}}),_.slice(0,s+1)};e.computed(()=>!m.value||m.value.length===0?[]:o.expandStrategy==="firstLevel"?E(m.value,o.maxExpandCount):g(m.value,o.maxExpandCount));const c=t=>t?parseFloat(t.toFixed(3)):0,f=t=>t?parseFloat(t.toFixed(1)):0,h=(t,s)=>{l("updatePosition",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},a=(t,s)=>{l("updateRotation",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},d=t=>{l("visibleChange",t)},V=e.computed(()=>o!=null&&o.model?p(o.model):[]),L=e.computed(()=>{var t,s;return((t=o==null?void 0:o.model)==null?void 0:t.name)||((s=o==null?void 0:o.model)==null?void 0:s.type)}),v=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.type}),u=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.visible});return e.watch(()=>o.model,()=>{o.model&&(i.value=D.getObject3DData(o.model))},{deep:!0,immediate:!0}),e.watch(V,t=>{m.value=JSON.parse(JSON.stringify(t))},{immediate:!0}),(t,s)=>{var S,M,F,$,O,x,J,T,k,P,B,z,I,A,q,W,G,X,Y,Z,K,H,Q,ee;const _=e.resolveComponent("el-divider"),r=e.resolveComponent("el-switch"),y=e.resolveComponent("el-input-number");return e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(_,null,{default:e.withCtx(()=>s[6]||(s[6]=[e.createTextVNode("对象")])),_:1,__:[6]}),e.createElementVNode("div",fe,[o.model?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",{class:"obj-name",title:L.value},e.toDisplayString(L.value),9,_e),e.createElementVNode("div",{class:"obj-type",title:v.value},"["+e.toDisplayString(v.value)+"]",9,we)])):(e.openBlock(),e.createElementBlock("div",Ee,"空")),e.createVNode(r,{"model-value":u.value,onChange:d},null,8,["model-value"])]),e.createVNode(_,null,{default:e.withCtx(()=>s[7]||(s[7]=[e.createTextVNode("相对位置")])),_:1,__:[7]}),e.createElementVNode("div",he,[e.createElementVNode("div",Ve,[s[8]||(s[8]=e.createElementVNode("span",{class:"axis-label"},"X",-1)),e.createVNode(y,{"model-value":c((M=(S=i.value)==null?void 0:S.position)==null?void 0:M.x),onChange:s[0]||(s[0]=N=>h(N,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",ge,[s[9]||(s[9]=e.createElementVNode("span",{class:"axis-label"},"Y",-1)),e.createVNode(y,{"model-value":c(($=(F=i.value)==null?void 0:F.position)==null?void 0:$.y),onChange:s[1]||(s[1]=N=>h(N,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",ye,[s[10]||(s[10]=e.createElementVNode("span",{class:"axis-label"},"Z",-1)),e.createVNode(y,{"model-value":c((x=(O=i.value)==null?void 0:O.position)==null?void 0:x.z),onChange:s[2]||(s[2]=N=>h(N,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(_,null,{default:e.withCtx(()=>s[11]||(s[11]=[e.createTextVNode("相对旋转")])),_:1,__:[11]}),e.createElementVNode("div",Ne,[e.createElementVNode("div",Le,[s[12]||(s[12]=e.createElementVNode("span",{class:"axis-label"},"X°",-1)),e.createVNode(y,{"model-value":f((T=(J=i.value)==null?void 0:J.rotation)==null?void 0:T.x),onChange:s[3]||(s[3]=N=>a(N,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Re,[s[13]||(s[13]=e.createElementVNode("span",{class:"axis-label"},"Y°",-1)),e.createVNode(y,{"model-value":f((P=(k=i.value)==null?void 0:k.rotation)==null?void 0:P.y),onChange:s[4]||(s[4]=N=>a(N,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Se,[s[14]||(s[14]=e.createElementVNode("span",{class:"axis-label"},"Z°",-1)),e.createVNode(y,{"model-value":f((z=(B=i.value)==null?void 0:B.rotation)==null?void 0:z.z),onChange:s[5]||(s[5]=N=>a(N,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(_,null,{default:e.withCtx(()=>s[15]||(s[15]=[e.createTextVNode("世界信息")])),_:1,__:[15]}),e.createElementVNode("div",Ce,[e.createElementVNode("div",je,[s[16]||(s[16]=e.createElementVNode("span",{class:"coord-label"},"世界位置:",-1)),e.createElementVNode("span",De,[e.createElementVNode("div",Ue,e.toDisplayString(c((A=(I=i.value)==null?void 0:I.worldPosition)==null?void 0:A.x))+", ",1),e.createElementVNode("div",Me,e.toDisplayString(c((W=(q=i.value)==null?void 0:q.worldPosition)==null?void 0:W.y))+", ",1),e.createElementVNode("div",Fe,e.toDisplayString(c((X=(G=i.value)==null?void 0:G.worldPosition)==null?void 0:X.z)),1)])]),e.createElementVNode("div",$e,[s[17]||(s[17]=e.createElementVNode("span",{class:"coord-label"},"世界旋转:",-1)),e.createElementVNode("span",Oe,[e.createElementVNode("div",xe,e.toDisplayString(f((Z=(Y=i.value)==null?void 0:Y.worldRotation)==null?void 0:Z.x))+"°, ",1),e.createElementVNode("div",Je,e.toDisplayString(f((H=(K=i.value)==null?void 0:K.worldRotation)==null?void 0:H.y))+"°, ",1),e.createElementVNode("div",Te,e.toDisplayString(f((ee=(Q=i.value)==null?void 0:Q.worldRotation)==null?void 0:ee.z))+"° ",1)])])])])}}}),Pe=le._export_sfc(ke,[["__scopeId","data-v-00d48931"]]);exports.URDFRobotController=pe;exports.WorkpieceTreePanel=Pe;exports.robotMode=ue;exports.sceneType=me;exports.useRaycaster=de;exports.useUrdfLoader=ce;
1
+ "use strict";var te=Object.defineProperty;var oe=(b,n,o)=>n in b?te(b,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):b[n]=o;var j=(b,n,o)=>oe(b,typeof n!="symbol"?n+"":n,o);const se=require("./index.vue_vue_type_style_index_1_lang-Dn15anMU.cjs"),U=require("./MTLLoader-CGJ_BoN_.cjs"),C=require("./fileUtil-DmlOwzdA.cjs"),R=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-1Mv6nQqI.cjs"),e=require("vue"),D=require("./iconfont-BRjtaT1w.cjs"),le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ie="http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";function ne(b){const{mtlUrl:n,manager:o,resourcePath:l,onLoad:m,onProgress:i,onError:w}=b,p=new U.MTLLoader(o);return l&&p.setResourcePath(l),p.load(n,m,i,w),p}function re(b){const{objUrl:n,manager:o,materials:l,onLoad:m,onProgress:i,onError:w}=b,p=new U.OBJLoader(o);return l&&p.setMaterials(l),p.load(n,m,i,w),p}function ae(b){const{manager:n,baseFolderUrl:o,onFileProgress:l}=b,m=new se.URDFLoader(n);return m.packages=i=>`${o.endsWith("/")?o:o+"/"}${i}/`,m.loadMeshCb=(i,w,p)=>{const g=(()=>{const E=i.split("?")[0].split("#")[0],c=E.lastIndexOf(".");return c>=0?E.slice(c+1).toLowerCase():void 0})();switch(g){case"obj":{const E=(()=>{try{return new URL(".",i).toString()}catch{const a=i.lastIndexOf("/");return a>=0?i.slice(0,a+1):i}})(),c=(()=>{var d;return(((d=i.split("/").pop())==null?void 0:d.split("?")[0].split("#")[0])??"").replace(/\.[^/.?#]+$/,"")})(),f=`${E}${c}.mtl`,h=a=>{re({objUrl:i,manager:w,materials:a,onLoad:d=>p(d),onProgress:d=>l==null?void 0:l(i,d==null?void 0:d.loaded,d==null?void 0:d.total),onError:d=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 OBJ 模型: ${i}`,d),p(new R.Group)}})};ne({mtlUrl:f,manager:w,resourcePath:E,onLoad:a=>{try{a.preload()}catch{}h(a)},onProgress:a=>l==null?void 0:l(f,a==null?void 0:a.loaded,a==null?void 0:a.total),onError:a=>{console.warn(`[URDF 资源警告] 未找到或加载材质失败: ${f}。将尝试无材质加载。`),h(void 0)}});break}case"stl":{new U.STLLoader(w).load(i,c=>{const f=new R.MeshPhongMaterial({color:12303291,shininess:30}),h=new R.Mesh(c,f);h.castShadow=!0,h.receiveShadow=!0,p(h)},c=>l==null?void 0:l(i,c==null?void 0:c.loaded,c==null?void 0:c.total),c=>{console.error(`[URDF 资源加载失败,已跳过] 无法加载 STL 模型: ${i}`,c),p(new R.Group)});break}default:console.error(`[URDF 资源加载失败,已跳过] 不支持的网格格式: .${g} (路径: ${i})`),p(new R.Group)}},m}function ce(b,n,o,l){return{loadSceneFromFile:i=>new Promise((w,p)=>{o.value=!0,l.value="正在初始化 URDF 加载器...";let g=0,E=0,c=null;const f=new R.LoadingManager;f.onStart=(a,d,V)=>{g=V||0,E=d||0,l.value=g>0?`开始下载资源: 0 / ${g}`:"开始下载资源...",o.value=!0},f.onProgress=(a,d,V)=>{E=d,g=V;const L=`正在加载 ${d} / ${V} 个文件: ${C.getFilenameFromUrl(a)}`;l.value=L,d===V&&(l.value="资源加载完成,正在处理模型...",setTimeout(()=>{if(c){c.updateMatrixWorld(!0);const v=new R.Box3().setFromObject(c);v.isEmpty()&&console.warn("模型加载完成,但所有可视化网格均加载失败,模型将不可见。"),c.userData.boundingBox=v,c.traverse(u=>{u.isMesh&&(u.castShadow=!0,u.receiveShadow=!0)}),w(c)}else p(new Error("URDF 文件本身加载失败。"));l.value="模型加载完成",setTimeout(()=>{l.value==="模型加载完成"&&(o.value=!1,l.value="")},500)},100))},f.onError=a=>{console.warn(`LoadingManager 报告一个资源加载失败: ${a}。加载流程将继续。`)};const h=(a,d,V)=>{const L=C.getFilenameFromUrl(a);let v;V&&V>0?v=`${L}(${C.formatBytes(d)} / ${C.formatBytes(V)})`:d&&d>0?v=`${L}(已下载 ${C.formatBytes(d)})`:v=`${L}`,l.value=`正在下载第 ${E+1} / ${g} 个文件: ${v}`};try{const a=URL.createObjectURL(i);ae({manager:f,baseFolderUrl:ie,onFileProgress:h}).load(a,V=>{c=V},void 0,V=>{console.error(`加载 URDF 文件 (${i.name}) 时发生致命错误:`,V),l.value="URDF 文件解析失败",o.value=!1,p(new Error(`加载 URDF 文件失败: ${i.name}`))})}catch(a){console.error("初始化 URDF 加载时发生致命错误:",a),l.value="模型加载失败",o.value=!1,p(a)}})}}function de(b,n,o,l=["URDFVisual"]){let m=null;const i=e.ref(null),w=new R.Raycaster,p=new R.Vector2,g=new Map;function E(){o.value.forEach(v=>{v.traverse(u=>{l!=null&&l.includes(u.type)&&g.set(u.id,{obj:u,axis:u.axis||new R.Vector3(1,0,0),limits:u.limits})})})}function c(v){i.value&&i.value.obj.traverse(u=>{var t;u.material&&((t=u.material.emissive)==null||t.set(0))}),i.value=v,v.obj.traverse(u=>{var t;u.material&&((t=u.material.emissive)==null||t.set(65280))})}function f(v){const u=b.value.getBoundingClientRect();p.x=(v.clientX-u.left)/u.width*2-1,p.y=-((v.clientY-u.top)/u.height)*2+1,w.setFromCamera(p,m);const t=w.intersectObjects(o.value,!0);if(t.length===0)return;let s=t[0].object,_=null;for(;s;){if(g.has(s.id)){_=g.get(s.id);break}s=s.parent}_&&c(_)}function h(){b.value&&b.value.removeEventListener("click",f,!1)}function a(){const{scene:v,camera:u}=n();m=u,E(),b.value&&b.value.addEventListener("click",f,!1)}function d(v){i.value&&(i.value.obj.visible=v)}function V(v){var s;const{axis:u,value:t}=v;D.updateObjectPosition((s=i.value)==null?void 0:s.obj,u,t)}function L(v){var s;const{axis:u,value:t}=v;D.updateObjectRotation((s=i.value)==null?void 0:s.obj,u,t)}return{initRaycaster:a,dispose:h,selectedObject3D:i,setSelectedObjVisible:d,updatePosition:V,updateRotation:L}}const ue={SINGLE:"单机",DOUBLE:"双机"},me={ROBOT:1,PIPECOMPARSION:2};class pe{constructor(n){j(this,"robot");j(this,"movableJoints");this.robot=n,this.movableJoints=this.getMovableJoints()}getMovableJoints(){return Object.values(this.robot.joints).filter(n=>n.jointType!=="fixed")}getMovableJointNames(){return this.movableJoints.map(n=>n.name)}setJointAngle(n,o){const l=this.robot.joints[n];if(!l||l.jointType==="fixed")return console.warn(`关节 ${n} 不存在或不可动`),!1;if(l.limit){const m=Math.max(l.limit.lower,Math.min(l.limit.upper,o));m!==o&&console.warn(`关节 ${n} 角度被限制在 [${l.limit.lower}, ${l.limit.upper}]`),l.setJointValue(m)}else l.setJointValue(o);return!0}setJointAngles(n){Object.entries(n).forEach(([o,l])=>{typeof l=="number"&&!isNaN(l)&&this.setJointAngle(o,l)})}getCurrentJointStates(){const n={};return this.movableJoints.forEach(o=>{n[o.name]=o.angle||0}),n}resetToZero(){this.movableJoints.forEach(n=>{n.setJointValue(0)})}getJointLimits(n){const o=this.robot.joints[n];return!o||!o.limit?null:{lower:o.limit.lower,upper:o.limit.upper}}async animateToState(n,o=1e3,l){const m=this.getCurrentJointStates(),i=Date.now();return new Promise(w=>{const p=()=>{const g=Date.now()-i,E=Math.min(g/o,1),c=this.easeInOutCubic(E),f={};Object.keys(n).forEach(h=>{const a=m[h]||0,d=n[h];f[h]=a+(d-a)*c}),this.setJointAngles(f),l&&l(E),E<1?requestAnimationFrame(p):w()};p()})}easeInOutCubic(n){return n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2}async playSequence(n,o=1e3,l){for(let m=0;m<n.length;m++)await this.animateToState(n[m],o,i=>{l&&l(m,i)})}}const ve={class:"panel-content"},fe={class:"obj"},be={key:0,class:"obj-base"},_e=["title"],we=["title"],Ee={key:1},he={class:"obj-position"},Ve={class:"coord-item"},ge={class:"coord-item"},ye={class:"coord-item"},Ne={class:"obj-rotation"},Le={class:"coord-item"},Re={class:"coord-item"},Se={class:"coord-item"},Ce={class:"world"},je={class:"coord-line"},De={class:"coord-text"},Ue={class:"world-position-item"},Me={class:"world-position-item"},Fe={class:"world-position-item"},$e={class:"coord-line"},Oe={class:"coord-text"},xe={class:"world-rotation-item"},Je={class:"world-rotation-item"},Te={class:"world-rotation-item"},ke=e.defineComponent({__name:"workpieceTreePanel",props:{model:{},maxExpandCount:{default:10},expandStrategy:{default:"breadth"}},emits:["nodeClick","visibleChange","updatePosition","updateRotation"],setup(b,{emit:n}){const o=b,l=n,m=e.ref([]),i=e.ref({}),w=(t,s=0)=>{const _=[];return Array.isArray(t)&&(t==null?void 0:t.length)>0&&t.forEach(r=>{if(!(r!=null&&r.isMesh)){const y={name:r==null?void 0:r.name,label:(r==null?void 0:r.name)||(r==null?void 0:r.type),show:!0,level:s+1,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:w(r==null?void 0:r.children,s+1),path:r==null?void 0:r.name};_.push(y)}}),_},p=t=>t?[{name:t==null?void 0:t.name,label:(t==null?void 0:t.name)||(t==null?void 0:t.type),show:!0,level:1,isPenultimate:!1,type:t==null?void 0:t.type,id:t==null?void 0:t.id,limit:(t==null?void 0:t.limit)??"",children:w(t==null?void 0:t.children,1),path:t==null?void 0:t.name}]:[],g=(t,s)=>{const _=[],r=[...t];for(;r.length>0&&_.length<s;){const y=r.shift();y.children&&y.children.length>0&&(_.push(y.id),r.push(...y.children))}return _},E=(t,s)=>{const _=[];return t.forEach(r=>{if(r.children&&r.children.length>0){_.push(r.id);const y=r.children.filter(S=>S.children&&S.children.length>0).slice(0,s).map(S=>S.id);_.push(...y)}}),_.slice(0,s+1)};e.computed(()=>!m.value||m.value.length===0?[]:o.expandStrategy==="firstLevel"?E(m.value,o.maxExpandCount):g(m.value,o.maxExpandCount));const c=t=>t?parseFloat(t.toFixed(3)):0,f=t=>t?parseFloat(t.toFixed(1)):0,h=(t,s)=>{l("updatePosition",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},a=(t,s)=>{l("updateRotation",{obj:o.model,axis:s,value:(t==null?void 0:t.toString())||"0"})},d=t=>{l("visibleChange",t)},V=e.computed(()=>o!=null&&o.model?p(o.model):[]),L=e.computed(()=>{var t,s;return((t=o==null?void 0:o.model)==null?void 0:t.name)||((s=o==null?void 0:o.model)==null?void 0:s.type)}),v=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.type}),u=e.computed(()=>{var t;return(t=o==null?void 0:o.model)==null?void 0:t.visible});return e.watch(()=>o.model,()=>{o.model&&(i.value=D.getObject3DData(o.model))},{deep:!0,immediate:!0}),e.watch(V,t=>{m.value=JSON.parse(JSON.stringify(t))},{immediate:!0}),(t,s)=>{var S,M,F,$,O,x,J,T,k,P,B,z,I,A,q,W,G,X,Y,Z,K,H,Q,ee;const _=e.resolveComponent("el-divider"),r=e.resolveComponent("el-switch"),y=e.resolveComponent("el-input-number");return e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(_,null,{default:e.withCtx(()=>s[6]||(s[6]=[e.createTextVNode("对象")])),_:1,__:[6]}),e.createElementVNode("div",fe,[o.model?(e.openBlock(),e.createElementBlock("div",be,[e.createElementVNode("div",{class:"obj-name",title:L.value},e.toDisplayString(L.value),9,_e),e.createElementVNode("div",{class:"obj-type",title:v.value},"["+e.toDisplayString(v.value)+"]",9,we)])):(e.openBlock(),e.createElementBlock("div",Ee,"空")),e.createVNode(r,{"model-value":u.value,onChange:d},null,8,["model-value"])]),e.createVNode(_,null,{default:e.withCtx(()=>s[7]||(s[7]=[e.createTextVNode("相对位置")])),_:1,__:[7]}),e.createElementVNode("div",he,[e.createElementVNode("div",Ve,[s[8]||(s[8]=e.createElementVNode("span",{class:"axis-label"},"X",-1)),e.createVNode(y,{"model-value":c((M=(S=i.value)==null?void 0:S.position)==null?void 0:M.x),onChange:s[0]||(s[0]=N=>h(N,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",ge,[s[9]||(s[9]=e.createElementVNode("span",{class:"axis-label"},"Y",-1)),e.createVNode(y,{"model-value":c(($=(F=i.value)==null?void 0:F.position)==null?void 0:$.y),onChange:s[1]||(s[1]=N=>h(N,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",ye,[s[10]||(s[10]=e.createElementVNode("span",{class:"axis-label"},"Z",-1)),e.createVNode(y,{"model-value":c((x=(O=i.value)==null?void 0:O.position)==null?void 0:x.z),onChange:s[2]||(s[2]=N=>h(N,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(_,null,{default:e.withCtx(()=>s[11]||(s[11]=[e.createTextVNode("相对旋转")])),_:1,__:[11]}),e.createElementVNode("div",Ne,[e.createElementVNode("div",Le,[s[12]||(s[12]=e.createElementVNode("span",{class:"axis-label"},"X°",-1)),e.createVNode(y,{"model-value":f((T=(J=i.value)==null?void 0:J.rotation)==null?void 0:T.x),onChange:s[3]||(s[3]=N=>a(N,"x")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Re,[s[13]||(s[13]=e.createElementVNode("span",{class:"axis-label"},"Y°",-1)),e.createVNode(y,{"model-value":f((P=(k=i.value)==null?void 0:k.rotation)==null?void 0:P.y),onChange:s[4]||(s[4]=N=>a(N,"y")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])]),e.createElementVNode("div",Se,[s[14]||(s[14]=e.createElementVNode("span",{class:"axis-label"},"Z°",-1)),e.createVNode(y,{"model-value":f((z=(B=i.value)==null?void 0:B.rotation)==null?void 0:z.z),onChange:s[5]||(s[5]=N=>a(N,"z")),size:"small",class:"coord-input-compact",precision:3,step:.1,controls:!0,"controls-position":"right"},null,8,["model-value"])])]),e.createVNode(_,null,{default:e.withCtx(()=>s[15]||(s[15]=[e.createTextVNode("世界信息")])),_:1,__:[15]}),e.createElementVNode("div",Ce,[e.createElementVNode("div",je,[s[16]||(s[16]=e.createElementVNode("span",{class:"coord-label"},"世界位置:",-1)),e.createElementVNode("span",De,[e.createElementVNode("div",Ue,e.toDisplayString(c((A=(I=i.value)==null?void 0:I.worldPosition)==null?void 0:A.x))+", ",1),e.createElementVNode("div",Me,e.toDisplayString(c((W=(q=i.value)==null?void 0:q.worldPosition)==null?void 0:W.y))+", ",1),e.createElementVNode("div",Fe,e.toDisplayString(c((X=(G=i.value)==null?void 0:G.worldPosition)==null?void 0:X.z)),1)])]),e.createElementVNode("div",$e,[s[17]||(s[17]=e.createElementVNode("span",{class:"coord-label"},"世界旋转:",-1)),e.createElementVNode("span",Oe,[e.createElementVNode("div",xe,e.toDisplayString(f((Z=(Y=i.value)==null?void 0:Y.worldRotation)==null?void 0:Z.x))+"°, ",1),e.createElementVNode("div",Je,e.toDisplayString(f((H=(K=i.value)==null?void 0:K.worldRotation)==null?void 0:H.y))+"°, ",1),e.createElementVNode("div",Te,e.toDisplayString(f((ee=(Q=i.value)==null?void 0:Q.worldRotation)==null?void 0:ee.z))+"° ",1)])])])])}}}),Pe=le._export_sfc(ke,[["__scopeId","data-v-00d48931"]]);exports.URDFRobotController=pe;exports.WorkpieceTreePanel=Pe;exports.robotMode=ue;exports.sceneType=me;exports.useRaycaster=de;exports.useUrdfLoader=ce;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ss-component-new",
3
3
  "private": false,
4
- "version": "1.2.29",
4
+ "version": "1.2.30",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",
@@ -29,7 +29,7 @@
29
29
  "dayjs": "^1.11.13",
30
30
  "docx-preview": "^0.3.6",
31
31
  "echarts": "^5.6.0",
32
- "element-plus": "^2.10.2",
32
+ "element-plus": "^2.10.0",
33
33
  "fast-deep-equal": "^3.1.3",
34
34
  "file-saver": "^2.0.5",
35
35
  "grid-layout-plus": "^1.1.1",
@@ -1 +1 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423979184" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6868" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" p-id="6869" fill="#8a8a8a"></path><path d="M108.544 116.736 108.544 116.736l804.864 0c18.432 0 32.768 14.336 32.768 34.816l0 0 0 704.512c0 18.432-14.336 32.768-32.768 32.768l0 0L108.544 888.832c-18.432 0-32.768-14.336-32.768-32.768l0 0 0-186.368 0 0c0-10.24 8.192-20.48 20.48-20.48l159.744 0 0 0c10.24 0 20.48 8.192 20.48 20.48l0 47.104 122.88-122.88-122.88-122.88 0 47.104 0 0c0 10.24-8.192 20.48-20.48 20.48L96.256 538.624c-12.288 0-20.48-8.192-20.48-20.48l0 0L75.776 149.504C75.776 131.072 90.112 116.736 108.544 116.736L108.544 116.736zM141.312 686.08 141.312 686.08l0 133.12L880.64 819.2 880.64 362.496 141.312 362.496l0 133.12 92.16 0 0-75.776c0-10.24 8.192-20.48 20.48-20.48 6.144 0 10.24 2.048 14.336 6.144l0 0 172.032 172.032c8.192 8.192 8.192 20.48 0 28.672L270.336 778.24c-8.192 8.192-20.48 8.192-28.672 0-4.096-4.096-6.144-10.24-6.144-14.336l0-75.776L141.312 688.128 141.312 686.08zM806.912 438.272 806.912 438.272c10.24 0 20.48 8.192 20.48 20.48 0 12.288-8.192 20.48-20.48 20.48L522.24 479.232c-12.288 0-20.48-8.192-20.48-20.48 0-10.24 8.192-20.48 20.48-20.48L806.912 438.272 806.912 438.272zM724.992 704.512 724.992 704.512c10.24 0 20.48 8.192 20.48 20.48 0 10.24-10.24 20.48-20.48 20.48l-204.8 0c-12.288 0-20.48-8.192-20.48-20.48 0-10.24 8.192-20.48 20.48-20.48L724.992 704.512 724.992 704.512zM806.912 526.336 806.912 526.336c10.24 0 20.48 8.192 20.48 20.48 0 10.24-8.192 20.48-20.48 20.48L522.24 567.296c-12.288 0-20.48-8.192-20.48-20.48 0-12.288 8.192-20.48 20.48-20.48L806.912 526.336 806.912 526.336zM806.912 616.448 806.912 616.448c10.24 0 20.48 8.192 20.48 20.48s-8.192 20.48-20.48 20.48L522.24 657.408c-12.288 0-20.48-8.192-20.48-20.48s8.192-20.48 20.48-20.48L806.912 616.448 806.912 616.448zM827.392 219.136 827.392 219.136c18.432 0 32.768 14.336 32.768 32.768 0 18.432-14.336 34.816-32.768 34.816-18.432 0-32.768-16.384-32.768-34.816C794.624 233.472 808.96 219.136 827.392 219.136L827.392 219.136zM745.472 219.136 745.472 219.136c18.432 0 32.768 14.336 32.768 32.768 0 18.432-14.336 34.816-32.768 34.816-18.432 0-34.816-16.384-34.816-34.816C712.704 233.472 727.04 219.136 745.472 219.136L745.472 219.136zM663.552 219.136 663.552 219.136c18.432 0 32.768 14.336 32.768 32.768 0 18.432-14.336 34.816-32.768 34.816-18.432 0-32.768-16.384-32.768-34.816C630.784 233.472 645.12 219.136 663.552 219.136L663.552 219.136zM141.312 321.536 141.312 321.536 880.64 321.536 880.64 182.272 141.312 182.272 141.312 321.536 141.312 321.536z" p-id="6870" fill="#8a8a8a"></path></svg>
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423979184" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6868" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M212.992 526.336 212.992 526.336 212.992 526.336 215.04 526.336 212.992 526.336Z" p-id="6869"></path><path d="M108.544 116.736 108.544 116.736l804.864 0c18.432 0 32.768 14.336 32.768 34.816l0 0 0 704.512c0 18.432-14.336 32.768-32.768 32.768l0 0L108.544 888.832c-18.432 0-32.768-14.336-32.768-32.768l0 0 0-186.368 0 0c0-10.24 8.192-20.48 20.48-20.48l159.744 0 0 0c10.24 0 20.48 8.192 20.48 20.48l0 47.104 122.88-122.88-122.88-122.88 0 47.104 0 0c0 10.24-8.192 20.48-20.48 20.48L96.256 538.624c-12.288 0-20.48-8.192-20.48-20.48l0 0L75.776 149.504C75.776 131.072 90.112 116.736 108.544 116.736L108.544 116.736zM141.312 686.08 141.312 686.08l0 133.12L880.64 819.2 880.64 362.496 141.312 362.496l0 133.12 92.16 0 0-75.776c0-10.24 8.192-20.48 20.48-20.48 6.144 0 10.24 2.048 14.336 6.144l0 0 172.032 172.032c8.192 8.192 8.192 20.48 0 28.672L270.336 778.24c-8.192 8.192-20.48 8.192-28.672 0-4.096-4.096-6.144-10.24-6.144-14.336l0-75.776L141.312 688.128 141.312 686.08zM806.912 438.272 806.912 438.272c10.24 0 20.48 8.192 20.48 20.48 0 12.288-8.192 20.48-20.48 20.48L522.24 479.232c-12.288 0-20.48-8.192-20.48-20.48 0-10.24 8.192-20.48 20.48-20.48L806.912 438.272 806.912 438.272zM724.992 704.512 724.992 704.512c10.24 0 20.48 8.192 20.48 20.48 0 10.24-10.24 20.48-20.48 20.48l-204.8 0c-12.288 0-20.48-8.192-20.48-20.48 0-10.24 8.192-20.48 20.48-20.48L724.992 704.512 724.992 704.512zM806.912 526.336 806.912 526.336c10.24 0 20.48 8.192 20.48 20.48 0 10.24-8.192 20.48-20.48 20.48L522.24 567.296c-12.288 0-20.48-8.192-20.48-20.48 0-12.288 8.192-20.48 20.48-20.48L806.912 526.336 806.912 526.336zM806.912 616.448 806.912 616.448c10.24 0 20.48 8.192 20.48 20.48s-8.192 20.48-20.48 20.48L522.24 657.408c-12.288 0-20.48-8.192-20.48-20.48s8.192-20.48 20.48-20.48L806.912 616.448 806.912 616.448zM827.392 219.136 827.392 219.136c18.432 0 32.768 14.336 32.768 32.768 0 18.432-14.336 34.816-32.768 34.816-18.432 0-32.768-16.384-32.768-34.816C794.624 233.472 808.96 219.136 827.392 219.136L827.392 219.136zM745.472 219.136 745.472 219.136c18.432 0 32.768 14.336 32.768 32.768 0 18.432-14.336 34.816-32.768 34.816-18.432 0-34.816-16.384-34.816-34.816C712.704 233.472 727.04 219.136 745.472 219.136L745.472 219.136zM663.552 219.136 663.552 219.136c18.432 0 32.768 14.336 32.768 32.768 0 18.432-14.336 34.816-32.768 34.816-18.432 0-32.768-16.384-32.768-34.816C630.784 233.472 645.12 219.136 663.552 219.136L663.552 219.136zM141.312 321.536 141.312 321.536 880.64 321.536 880.64 182.272 141.312 182.272 141.312 321.536 141.312 321.536z" p-id="6870"></path></svg>
@@ -1 +1 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423994927" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8046" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M417.322667 629.333333l85.333333 85.333334H672v213.333333h-213.333333v-166.826667l-67.861334-67.861333L128 693.333333v-64h289.322667z m190.677333 149.333334h-85.333333v85.333333h85.333333v-85.333333z m341.333333-362.666667v213.333333h-213.333333V554.666667H128v-64h608v-74.666667h213.333333z m-64 64h-85.333333v85.333333h85.333333v-85.333333z m-213.333333-362.666667v213.333334h-172.8l-81.877333 81.92H128v-64l262.805333-0.021334 67.861334-67.861333V117.333333h213.333333z m-64 64h-85.333333v85.333334h85.333333v-85.333334z" fill="#8a8a8a" p-id="8047"></path></svg>
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423994927" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8046" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M417.322667 629.333333l85.333333 85.333334H672v213.333333h-213.333333v-166.826667l-67.861334-67.861333L128 693.333333v-64h289.322667z m190.677333 149.333334h-85.333333v85.333333h85.333333v-85.333333z m341.333333-362.666667v213.333333h-213.333333V554.666667H128v-64h608v-74.666667h213.333333z m-64 64h-85.333333v85.333333h85.333333v-85.333333z m-213.333333-362.666667v213.333334h-172.8l-81.877333 81.92H128v-64l262.805333-0.021334 67.861334-67.861333V117.333333h213.333333z m-64 64h-85.333333v85.333334h85.333333v-85.333334z" p-id="8047"></path></svg>
@@ -1 +1 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423938196" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4576" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M919.6 405.6l-57.2-8c-12.7-1.8-23-10.4-28-22.1-11.3-26.7-25.7-51.7-42.9-74.5-7.7-10.2-10-23.5-5.2-35.3l21.7-53.5c6.7-16.4 0.2-35.3-15.2-44.1L669.1 96.6c-15.4-8.9-34.9-5.1-45.8 8.9l-35.4 45.3c-7.9 10.2-20.7 14.9-33.5 13.3-14-1.8-28.3-2.8-42.8-2.8-14.5 0-28.8 1-42.8 2.8-12.8 1.6-25.6-3.1-33.5-13.3l-35.4-45.3c-10.9-14-30.4-17.8-45.8-8.9L230.4 168c-15.4 8.9-21.8 27.7-15.2 44.1l21.7 53.5c4.8 11.9 2.5 25.1-5.2 35.3-17.2 22.8-31.7 47.8-42.9 74.5-5 11.8-15.3 20.4-28 22.1l-57.2 8C86 408 72.9 423 72.9 440.8v142.9c0 17.7 13.1 32.7 30.6 35.2l57.2 8c12.7 1.8 23 10.4 28 22.1 11.3 26.7 25.7 51.7 42.9 74.5 7.7 10.2 10 23.5 5.2 35.3l-21.7 53.5c-6.7 16.4-0.2 35.3 15.2 44.1L354 927.8c15.4 8.9 34.9 5.1 45.8-8.9l35.4-45.3c7.9-10.2 20.7-14.9 33.5-13.3 14 1.8 28.3 2.8 42.8 2.8 14.5 0 28.8-1 42.8-2.8 12.8-1.6 25.6 3.1 33.5 13.3l35.4 45.3c10.9 14 30.4 17.8 45.8 8.9l123.7-71.4c15.4-8.9 21.8-27.7 15.2-44.1l-21.7-53.5c-4.8-11.8-2.5-25.1 5.2-35.3 17.2-22.8 31.7-47.8 42.9-74.5 5-11.8 15.3-20.4 28-22.1l57.2-8c17.6-2.5 30.6-17.5 30.6-35.2V440.8c0.2-17.8-12.9-32.8-30.5-35.2z m-408 245.5c-76.7 0-138.9-62.2-138.9-138.9s62.2-138.9 138.9-138.9 138.9 62.2 138.9 138.9-62.2 138.9-138.9 138.9z" fill="#8a8a8a" p-id="4577"></path></svg>
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423938196" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4576" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><path d="M919.6 405.6l-57.2-8c-12.7-1.8-23-10.4-28-22.1-11.3-26.7-25.7-51.7-42.9-74.5-7.7-10.2-10-23.5-5.2-35.3l21.7-53.5c6.7-16.4 0.2-35.3-15.2-44.1L669.1 96.6c-15.4-8.9-34.9-5.1-45.8 8.9l-35.4 45.3c-7.9 10.2-20.7 14.9-33.5 13.3-14-1.8-28.3-2.8-42.8-2.8-14.5 0-28.8 1-42.8 2.8-12.8 1.6-25.6-3.1-33.5-13.3l-35.4-45.3c-10.9-14-30.4-17.8-45.8-8.9L230.4 168c-15.4 8.9-21.8 27.7-15.2 44.1l21.7 53.5c4.8 11.9 2.5 25.1-5.2 35.3-17.2 22.8-31.7 47.8-42.9 74.5-5 11.8-15.3 20.4-28 22.1l-57.2 8C86 408 72.9 423 72.9 440.8v142.9c0 17.7 13.1 32.7 30.6 35.2l57.2 8c12.7 1.8 23 10.4 28 22.1 11.3 26.7 25.7 51.7 42.9 74.5 7.7 10.2 10 23.5 5.2 35.3l-21.7 53.5c-6.7 16.4-0.2 35.3 15.2 44.1L354 927.8c15.4 8.9 34.9 5.1 45.8-8.9l35.4-45.3c7.9-10.2 20.7-14.9 33.5-13.3 14 1.8 28.3 2.8 42.8 2.8 14.5 0 28.8-1 42.8-2.8 12.8-1.6 25.6 3.1 33.5 13.3l35.4 45.3c10.9 14 30.4 17.8 45.8 8.9l123.7-71.4c15.4-8.9 21.8-27.7 15.2-44.1l-21.7-53.5c-4.8-11.8-2.5-25.1 5.2-35.3 17.2-22.8 31.7-47.8 42.9-74.5 5-11.8 15.3-20.4 28-22.1l57.2-8c17.6-2.5 30.6-17.5 30.6-35.2V440.8c0.2-17.8-12.9-32.8-30.5-35.2z m-408 245.5c-76.7 0-138.9-62.2-138.9-138.9s62.2-138.9 138.9-138.9 138.9 62.2 138.9 138.9-62.2 138.9-138.9 138.9z" p-id="4577"></path></svg>
@@ -1 +1 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423958773" class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5704" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.0625" height="32"><path d="M944.4 311.8c-32.7-2.3-63.4 3.5-101.5 54.3s-152.3 20.7-137.5-41c6.6-17.8 7.7-36.4 70.3-66.8 62.6-30.4 36.1-100.4 9.6-115 0 0-241.9-138.7-580.3 60.9-93 54-265.5 251.1-183.5 459.2C73.1 787.7 162.8 858.8 308.3 905c145.5 46.2 314.7 14.7 400.4-29.3 85.7-44 227.8-109.4 294.4-284.2 66.5-174.8-26-277.5-58.7-279.7z m-850 179.6c-3.8-26.8 24.3-53 62.9-58.5 38.5-5.5 72.9 11.8 76.7 38.6 3.8 26.8-24.3 53-62.9 58.5s-72.9-11.8-76.7-38.6z m121 203.6c-40.5 5.8-76.7-12.4-80.7-40.6-4-28.2 25.6-55.7 66.1-61.5 40.5-5.8 76.6 12.4 80.7 40.6 4.1 28.2-25.5 55.7-66.1 61.5z m18.4-325.2c-38.9 5.5-73.5-11.9-77.4-39-3.8-27.1 24.5-53.5 63.4-59s73.5 11.9 77.4 39-24.6 53.4-63.4 59z m172.9 468.8c-44.2 9.3-85.2-8.1-91.7-38.9-6.4-30.7 24.1-63.2 68.3-72.4 44.2-9.3 85.2 8.1 91.7 38.9 6.4 30.7-24.2 63.1-68.3 72.4z m28.9-582c-37 5.3-70-11.3-73.6-37.1-3.7-25.7 23.4-50.9 60.4-56.1 37-5.3 70 11.3 73.6 37.1 3.6 25.7-23.4 50.8-60.4 56.1z" p-id="5705" fill="#8a8a8a"></path></svg>
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760423958773" class="icon" viewBox="0 0 1026 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5704" xmlns:xlink="http://www.w3.org/1999/xlink" width="32.0625" height="32"><path d="M944.4 311.8c-32.7-2.3-63.4 3.5-101.5 54.3s-152.3 20.7-137.5-41c6.6-17.8 7.7-36.4 70.3-66.8 62.6-30.4 36.1-100.4 9.6-115 0 0-241.9-138.7-580.3 60.9-93 54-265.5 251.1-183.5 459.2C73.1 787.7 162.8 858.8 308.3 905c145.5 46.2 314.7 14.7 400.4-29.3 85.7-44 227.8-109.4 294.4-284.2 66.5-174.8-26-277.5-58.7-279.7z m-850 179.6c-3.8-26.8 24.3-53 62.9-58.5 38.5-5.5 72.9 11.8 76.7 38.6 3.8 26.8-24.3 53-62.9 58.5s-72.9-11.8-76.7-38.6z m121 203.6c-40.5 5.8-76.7-12.4-80.7-40.6-4-28.2 25.6-55.7 66.1-61.5 40.5-5.8 76.6 12.4 80.7 40.6 4.1 28.2-25.5 55.7-66.1 61.5z m18.4-325.2c-38.9 5.5-73.5-11.9-77.4-39-3.8-27.1 24.5-53.5 63.4-59s73.5 11.9 77.4 39-24.6 53.4-63.4 59z m172.9 468.8c-44.2 9.3-85.2-8.1-91.7-38.9-6.4-30.7 24.1-63.2 68.3-72.4 44.2-9.3 85.2 8.1 91.7 38.9 6.4 30.7-24.2 63.1-68.3 72.4z m28.9-582c-37 5.3-70-11.3-73.6-37.1-3.7-25.7 23.4-50.9 60.4-56.1 37-5.3 70 11.3 73.6 37.1 3.6 25.7-23.4 50.8-60.4 56.1z" p-id="5705"></path></svg>