ss-component-new 1.2.37 → 1.2.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{MTLLoader-gxq5Kvds.js → MTLLoader-B4lJr_ku.js} +1 -1
- package/dist/{MTLLoader-Dihj5ymj.cjs → MTLLoader-CkNQ5SUP.cjs} +1 -1
- package/dist/{OrbitControls-Ba8QWDQU.cjs → OrbitControls-CpTJa--7.cjs} +1 -1
- package/dist/{OrbitControls-BonUITsH.js → OrbitControls-CwAfnF56.js} +1 -1
- package/dist/{animationData-AAFCWE58.cjs → animationData-CF6-_eBc.cjs} +1 -1
- package/dist/{animationData-DOlVDTlo.js → animationData-ETdtTXwF.js} +4 -4
- package/dist/{array-D7EDjc7l.js → array-BUiCaQsR.js} +35 -35
- package/dist/{array-Bvce3EAi.cjs → array-CbzJvO5y.cjs} +1 -1
- package/dist/{dataUtil-B98txAs6.cjs → dataUtil-DFkONpps.cjs} +1 -1
- package/dist/{dataUtil-VNsK7cTO.js → dataUtil-oabcbdyY.js} +2 -2
- package/dist/{fileUtil-BeIaOSMH.cjs → fileUtil-BezA0XEu.cjs} +1 -1
- package/dist/{fileUtil-D7S_1Tde.js → fileUtil-xUu_aleM.js} +1 -1
- package/dist/{iconfont-wtkqkYlV.cjs → iconfont-Bc_5-mGm.cjs} +1 -1
- package/dist/{iconfont-Dnc_kFzN.js → iconfont-Cj5twyUW.js} +2 -2
- package/dist/{index-B8bUR1Ri.cjs → index-7jCqww1w.cjs} +1 -1
- package/dist/{index-BCLRJLSj.js → index-B35gkDgD.js} +1 -1
- package/dist/{index-Cv9MOPos.cjs → index-B3_Z46NG.cjs} +1 -1
- package/dist/{index-BbzUzdxF.cjs → index-B5KCSN4c.cjs} +1 -1
- package/dist/{index-DWR446SX.js → index-BA_mOmgl.js} +40 -40
- package/dist/{index-ClnJ1K8q.cjs → index-BHkXSoxP.cjs} +1 -1
- package/dist/{index-XPbPRVHs.cjs → index-BOfa3R-1.cjs} +1 -1
- package/dist/{index-dz7-iyTs.js → index-BWDmAGYH.js} +8 -8
- package/dist/{index-DBpviAty.cjs → index-BahsZur-.cjs} +1 -1
- package/dist/{index-DfdAKUNR.cjs → index-Bha2dAuG.cjs} +1 -1
- package/dist/{index-BwoXi1LQ.js → index-BjLowWoy.js} +2 -2
- package/dist/{index-BeawnQ97.js → index-BnNI_rxz.js} +3 -3
- package/dist/{index-D2FUUF0p.js → index-BopRIRaa.js} +3300 -3311
- package/dist/{index-BrvAeT7w.js → index-Bp59pdeu.js} +10 -10
- package/dist/{index-CCAXN_VF.cjs → index-BsQpRUkg.cjs} +1 -1
- package/dist/{index-CeJI9fRM.cjs → index-Bsj_M3tu.cjs} +1 -1
- package/dist/{index-dg2e5vzL.js → index-BwL33eO2.js} +2 -2
- package/dist/{index-B-xelo5W.js → index-C-4KKbC7.js} +3 -3
- package/dist/{index-Z3NUprRN.cjs → index-C8YYklCT.cjs} +1 -1
- package/dist/{index-K4IHDJhC.js → index-CTIVfb14.js} +3 -3
- package/dist/{index-ChfpFIIo.js → index-CUeHiWp_.js} +52 -52
- package/dist/{index-DATWIRSp.cjs → index-CV-9wRXp.cjs} +1 -1
- package/dist/{index-nvemkzcE.js → index-CWQAImyg.js} +2 -2
- package/dist/{index-diSrIKAW.js → index-CX9ZToOe.js} +303 -303
- package/dist/{index-BiNILQi8.js → index-C_FC7JhD.js} +6 -6
- package/dist/{index-DdWJf1s4.js → index-CcKVjgvm.js} +2 -2
- package/dist/{index-BJoRCnr3.cjs → index-CfKLvZ17.cjs} +1 -1
- package/dist/{index-DeakNivq.cjs → index-Ci05kJVO.cjs} +1 -1
- package/dist/{index-DKnofcM3.cjs → index-CizvuDrT.cjs} +1 -1
- package/dist/{index-B3sDwg_c.js → index-CkTqgfCV.js} +1 -1
- package/dist/{index-BU5DWXf0.cjs → index-CnW0XyMI.cjs} +1 -1
- package/dist/{index-DXY5_0gS.cjs → index-CnasZ7DR.cjs} +1 -1
- package/dist/{index-d2eZUUOL.js → index-CowSp0mU.js} +4 -4
- package/dist/{index-A2nYF-1f.cjs → index-Cs1m0QHY.cjs} +1 -1
- package/dist/{index-DHUPGceO.js → index-CvI-Xndo.js} +1 -1
- package/dist/{index-BiPzhKBB.cjs → index-CvrlW6Kj.cjs} +1 -1
- package/dist/{index-DcSxvtLy.cjs → index-D4X5ZbsB.cjs} +1 -1
- package/dist/{index-CExeGHij.js → index-DBDeHECn.js} +5111 -5410
- package/dist/index-DEBf-IBT.cjs +21 -0
- package/dist/{index-De7WEvrP.js → index-DHOgfCKk.js} +6 -6
- package/dist/{index-BPzUmT8-.js → index-DK1sT-Gv.js} +12 -12
- package/dist/{index-BLTsYYci.js → index-DKQfWQa7.js} +1 -1
- package/dist/{index-XWSpT0ba.js → index-DalL4U6b.js} +8 -8
- package/dist/{index-Ct6AnOh0.cjs → index-DbW_sD5N.cjs} +1 -1
- package/dist/{index-CagsR3TK.cjs → index-Dp6ZBesB.cjs} +1 -1
- package/dist/{index-Idro_h24.cjs → index-DynEv7dZ.cjs} +1 -1
- package/dist/{index-a9MrfjsX.cjs → index-ExjSK4s1.cjs} +1 -1
- package/dist/{index-Cjn-Nipt.js → index-GOk9tc6o.js} +2 -2
- package/dist/{index-B8HWTwDz.cjs → index-LcSS6r-3.cjs} +1 -1
- package/dist/{index-DBiP81co.cjs → index-RfA-XD5A.cjs} +1 -1
- package/dist/{index-BMaVaPUc.js → index-bFFymrtu.js} +2 -2
- package/dist/{index-D62RCkPJ.js → index-bhZxftEb.js} +6 -6
- package/dist/{index-CqzA5JZV.js → index-d6sIj10Q.js} +68 -68
- package/dist/{index-osFjwxXn.cjs → index-h5XWazmL.cjs} +1 -1
- package/dist/{index-CBpSEFvE.js → index-ixEWAWI8.js} +4 -4
- package/dist/{index-rGGHn9oX.js → index-peUgec1X.js} +1267 -1268
- package/dist/{index-CQNvplpY.cjs → index-vDXPLbzt.cjs} +13 -13
- package/dist/{index-DpzDQdE3.cjs → index-w9_VhKWc.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-B8Lpp-LG.js +38138 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-yBjOSB4T.cjs +56 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CTRnGkVw.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js} +1644 -1649
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DupRlL-E.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs} +124 -124
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang--woCJ_em.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-DTRpzofW.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-COe_Ck32.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-DaxZVXAO.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-jt5oqPmv.js → index.vue_vue_type_style_index_1_lang-BX_Iweoa.js} +5 -5
- package/dist/{index.vue_vue_type_style_index_1_lang-CKpfQuiD.cjs → index.vue_vue_type_style_index_1_lang-BgqA98cE.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_1_lang-CWCaf0OP.js +8415 -0
- package/dist/index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs +32 -0
- package/dist/{isString--eJE54G5.cjs → isString-D6Z6SOrb.cjs} +1 -1
- package/dist/{isString-By6KKNvg.js → isString-DBnuELeA.js} +1 -1
- package/dist/{main-Brifss3R.cjs → main-BnGiV5RB.cjs} +1 -1
- package/dist/{main-DENbrJLK.js → main-DHZFoZje.js} +5 -5
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-DxxkXyt5.cjs → threeModel-BHsadPD8.cjs} +1 -1
- package/dist/{threeModel-CpklGUZ5.js → threeModel-BkNMl4gC.js} +5 -5
- package/dist/{threePreview-BsPiIokT.js → threePreview-BhHpGgi8.js} +4 -4
- package/dist/{threePreview-Sh0ABsnX.cjs → threePreview-q2XmhoL-.cjs} +1 -1
- package/dist/{threeSceneView-Dm3k49Mh.js → threeSceneView-CDFoPU6x.js} +87 -87
- package/dist/{threeSceneView-DfiXbOBr.cjs → threeSceneView-D_2JHUdz.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-Czp3KJaA.js → threeSceneViewForCPMPIP-BBelwG21.js} +57 -57
- package/dist/{threeSceneViewForCPMPIP-XTc0zag-.cjs → threeSceneViewForCPMPIP-DSIkOvjL.cjs} +1 -1
- package/dist/{threeTrackPathView-Dmp5NZVO.cjs → threeTrackPathView-CClVyd1p.cjs} +1 -1
- package/dist/{threeTrackPathView-DaEDYBsf.js → threeTrackPathView-CeCre9ru.js} +6 -6
- package/dist/{threeViewerHost-C07FM01K.cjs → threeViewerHost-B2ROtL1I.cjs} +1 -1
- package/dist/{threeViewerHost-tA5hwts8.js → threeViewerHost-DLd9bynL.js} +14 -14
- package/dist/{urdfTree-CNAusPWp.cjs → urdfTree-B2NsYdY-.cjs} +1 -1
- package/dist/{urdfTree-C5eDsIZV.js → urdfTree-vu4m_HnH.js} +1 -1
- package/dist/{workpieceTreePanel-BE_ayLjw.js → workpieceTreePanel-CXVtdZfX.js} +5 -5
- package/dist/{workpieceTreePanel-DMnR0vK-.cjs → workpieceTreePanel-Dif_gJAG.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-C8qRkCgn.cjs +0 -21
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BV1JZ-3O.js +0 -38949
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DNHgx7h4.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_1_lang-6KO-EDQa.js +0 -8293
- package/dist/index.vue_vue_type_style_index_1_lang-Cb4_k0AS.cjs +0 -32
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { defineComponent as we, ref as u, computed as U, watch as Z, onUnmounted as
|
|
2
|
-
import {
|
|
3
|
-
import { U as et, s as ke, u as tt, a as lt, W as at } from "./workpieceTreePanel-
|
|
4
|
-
import { u as nt, a as ot, b as st } from "./iconfont-
|
|
5
|
-
import { c as it, E as y } from "./index-
|
|
6
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
7
|
-
import { _ as pe } from "./index-
|
|
8
|
-
import { g as ut, b as rt, U as dt, J as ct, d as vt } from "./urdfTree-
|
|
1
|
+
import { defineComponent as we, ref as u, computed as U, watch as Z, onUnmounted as Ke, resolveComponent as q, createElementBlock as M, openBlock as z, createElementVNode as l, createCommentVNode as G, createVNode as i, toDisplayString as B, Fragment as Xe, renderList as We, withCtx as ne, inject as he, shallowRef as ue, onMounted as Ye, nextTick as Ze, onBeforeUnmount as qe, withDirectives as $, vShow as W, renderSlot as Y, unref as d, createBlock as ye, isRef as re, vModelRadio as de } from "vue";
|
|
2
|
+
import { aH as Qe } from "./index.vue_vue_type_style_index_1_lang-CWCaf0OP.js";
|
|
3
|
+
import { U as et, s as ke, u as tt, a as lt, W as at } from "./workpieceTreePanel-CXVtdZfX.js";
|
|
4
|
+
import { u as nt, a as ot, b as st } from "./iconfont-Cj5twyUW.js";
|
|
5
|
+
import { c as it, E as y } from "./index-DBDeHECn.js";
|
|
6
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js";
|
|
7
|
+
import { _ as pe } from "./index-B35gkDgD.js";
|
|
8
|
+
import { g as ut, b as rt, U as dt, J as ct, d as vt } from "./urdfTree-vu4m_HnH.js";
|
|
9
9
|
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
import { T as h } from "./svgIcon-D-_fXUBL.js";
|
|
11
|
-
import { i as pt } from "./animationData-
|
|
12
|
-
import { O as mt } from "./MTLLoader-
|
|
13
|
-
import {
|
|
11
|
+
import { i as pt } from "./animationData-ETdtTXwF.js";
|
|
12
|
+
import { O as mt } from "./MTLLoader-B4lJr_ku.js";
|
|
13
|
+
import { K as ft, j as gt } from "./index-peUgec1X.js";
|
|
14
14
|
const bt = { class: "panel-content" }, ht = { class: "action-bar" }, yt = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "animation-controls"
|
|
@@ -25,16 +25,16 @@ const bt = { class: "panel-content" }, ht = { class: "action-bar" }, yt = {
|
|
|
25
25
|
xyzbcList: {}
|
|
26
26
|
},
|
|
27
27
|
setup(E, { expose: Q }) {
|
|
28
|
-
const T = E, n = u([]), V = u(!1),
|
|
28
|
+
const T = E, n = u([]), V = u(!1), j = u(""), f = u("stopped"), p = u(0), x = u(0), J = u(10), D = u(null);
|
|
29
29
|
let k = 0;
|
|
30
|
-
const ee = u([]), R = U(() => T.model ? ut(T.model).map((g) => g.name) : []),
|
|
31
|
-
${
|
|
30
|
+
const ee = u([]), R = U(() => T.model ? ut(T.model).map((g) => g.name) : []), L = U(() => [...R.value]), ce = U(() => L.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
31
|
+
${L.value.join(" ")}
|
|
32
32
|
0 0 0 ...
|
|
33
|
-
1 2 3 ...` : "请先加载模型。"),
|
|
33
|
+
1 2 3 ...` : "请先加载模型。"), H = U(() => n.value[p.value] || {});
|
|
34
34
|
Z(() => T.model, (s) => {
|
|
35
35
|
s ? (D.value = new et(s), ee.value = rt(s), p.value = 0) : (D.value = null, ee.value = []);
|
|
36
36
|
}, { immediate: !0 });
|
|
37
|
-
const
|
|
37
|
+
const K = (s) => {
|
|
38
38
|
if (s < 0 || s >= n.value.length) {
|
|
39
39
|
console.error(`帧索引 ${s} 超出范围`);
|
|
40
40
|
return;
|
|
@@ -79,21 +79,21 @@ ${j.value.join(" ")}
|
|
|
79
79
|
y.error("无动画数据");
|
|
80
80
|
return;
|
|
81
81
|
}
|
|
82
|
-
f.value === "stopped" && (p.value = 0,
|
|
82
|
+
f.value === "stopped" && (p.value = 0, K(0)), f.value = "playing", k++, oe(k), y.info("动画播放中");
|
|
83
83
|
}, P = () => {
|
|
84
84
|
f.value === "playing" && (k++, f.value = "paused", y.info("动画已暂停"));
|
|
85
85
|
}, O = () => {
|
|
86
|
-
k++, f.value = "stopped", p.value = 0, x.value = 0,
|
|
86
|
+
k++, f.value = "stopped", p.value = 0, x.value = 0, K(0), y.info("动画已停止并重置");
|
|
87
87
|
}, _ = () => {
|
|
88
88
|
f.value === "playing" ? P() : A();
|
|
89
89
|
}, te = (s) => {
|
|
90
|
-
k++, f.value = "paused",
|
|
90
|
+
k++, f.value = "paused", K(s);
|
|
91
91
|
}, le = () => {
|
|
92
|
-
if (!
|
|
92
|
+
if (!j.value.trim()) {
|
|
93
93
|
y.warning("导入内容不能为空");
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
const s =
|
|
96
|
+
const s = j.value.trim().split(`
|
|
97
97
|
`).filter((c) => c.trim() !== "");
|
|
98
98
|
if (s.length < 2) {
|
|
99
99
|
y.error("导入数据至少需要包含表头行和一行数据");
|
|
@@ -101,21 +101,21 @@ ${j.value.join(" ")}
|
|
|
101
101
|
}
|
|
102
102
|
const a = s[0].split(" ").map((c) => c.trim()), g = {};
|
|
103
103
|
if (a.forEach((c, m) => {
|
|
104
|
-
|
|
104
|
+
L.value.includes(c) && (g[m] = c);
|
|
105
105
|
}), Object.keys(g).length === 0) {
|
|
106
106
|
y.error("没有找到匹配的表头,请检查表头名称是否正确");
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
const r = s.slice(1).map((c) => {
|
|
110
110
|
const m = c.split(" "), S = {};
|
|
111
|
-
return
|
|
112
|
-
S[
|
|
113
|
-
}), Object.entries(g).forEach(([
|
|
114
|
-
const ae = m[parseInt(
|
|
111
|
+
return L.value.forEach((X) => {
|
|
112
|
+
S[X] = "0";
|
|
113
|
+
}), Object.entries(g).forEach(([X, I]) => {
|
|
114
|
+
const ae = m[parseInt(X)];
|
|
115
115
|
ae !== void 0 && ae.trim() !== "" && (S[I] = ae.trim());
|
|
116
116
|
}), S;
|
|
117
117
|
});
|
|
118
|
-
r.length > 0 ? (n.value = r, y.success(`成功导入 ${r.length} 行数据!`), V.value = !1,
|
|
118
|
+
r.length > 0 ? (n.value = r, y.success(`成功导入 ${r.length} 行数据!`), V.value = !1, j.value = "", O()) : y.error("未能解析到有效数据,请检查格式。");
|
|
119
119
|
};
|
|
120
120
|
Z(() => T.xyzbcList, () => {
|
|
121
121
|
T.xyzbcList && (n.value = it(T.xyzbcList));
|
|
@@ -128,7 +128,7 @@ ${j.value.join(" ")}
|
|
|
128
128
|
playAnimation: A,
|
|
129
129
|
pauseAnimation: P,
|
|
130
130
|
stopAnimation: O
|
|
131
|
-
}),
|
|
131
|
+
}), Ke(() => {
|
|
132
132
|
k++;
|
|
133
133
|
}), (s, a) => {
|
|
134
134
|
const g = q("el-input-number"), C = q("el-slider"), r = q("el-input"), c = q("el-dialog");
|
|
@@ -136,7 +136,7 @@ ${j.value.join(" ")}
|
|
|
136
136
|
l("div", ht, [
|
|
137
137
|
i(pe, {
|
|
138
138
|
onClick: a[0] || (a[0] = (m) => V.value = !0),
|
|
139
|
-
disabled:
|
|
139
|
+
disabled: L.value.length === 0,
|
|
140
140
|
modelValue: "导入数据"
|
|
141
141
|
}, null, 8, ["disabled"])
|
|
142
142
|
]),
|
|
@@ -174,7 +174,7 @@ ${j.value.join(" ")}
|
|
|
174
174
|
l("div", null, [
|
|
175
175
|
a[9] || (a[9] = l("label", null, "当前帧数据:", -1)),
|
|
176
176
|
l("div", null, [
|
|
177
|
-
|
|
177
|
+
H.value ? (z(!0), M(Xe, { key: 0 }, We(H.value, (m, S) => (z(), M("div", { key: S }, B(S) + ": " + B(m), 1))), 128)) : G("", !0)
|
|
178
178
|
])
|
|
179
179
|
])
|
|
180
180
|
])) : G("", !0),
|
|
@@ -203,8 +203,8 @@ ${j.value.join(" ")}
|
|
|
203
203
|
default: ne(() => [
|
|
204
204
|
a[11] || (a[11] = l("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
|
|
205
205
|
i(r, {
|
|
206
|
-
modelValue:
|
|
207
|
-
"onUpdate:modelValue": a[3] || (a[3] = (m) =>
|
|
206
|
+
modelValue: j.value,
|
|
207
|
+
"onUpdate:modelValue": a[3] || (a[3] = (m) => j.value = m),
|
|
208
208
|
type: "textarea",
|
|
209
209
|
rows: 10,
|
|
210
210
|
placeholder: ce.value
|
|
@@ -216,10 +216,10 @@ ${j.value.join(" ")}
|
|
|
216
216
|
]);
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
}), Pe = /* @__PURE__ */ Ce($t, [["__scopeId", "data-v-06bc34b3"]]), Ut = async (E) => await new mt().loadAsync(E), zt = async (E) => await Ut(E), Tt = { class: "obj-viewer-container" }, Vt = { class: "buttonGroup-top" },
|
|
219
|
+
}), Pe = /* @__PURE__ */ Ce($t, [["__scopeId", "data-v-06bc34b3"]]), Ut = async (E) => await new mt().loadAsync(E), zt = async (E) => await Ut(E), Tt = { class: "obj-viewer-container" }, Vt = { class: "buttonGroup-top" }, jt = { class: "buttonGroup-topLeft" }, Lt = { class: "buttonGroup-left" }, At = { class: "buttonGroup-right" }, Nt = { class: "buttonGroup-bottom" }, Dt = { class: "top-panel" }, Rt = { class: "panel-header" }, Ot = { class: "panel-body" }, St = { class: "left-panel" }, Ft = { class: "panel-header" }, Mt = { class: "panel-body" }, Bt = {
|
|
220
220
|
key: 1,
|
|
221
221
|
class: "clipping-content"
|
|
222
|
-
}, Et = { class: "radio-group" }, Jt = { class: "radio-label" }, It = { class: "radio-label" }, Gt = { class: "radio-label" },
|
|
222
|
+
}, Et = { class: "radio-group" }, Jt = { class: "radio-label" }, It = { class: "radio-label" }, Gt = { class: "radio-label" }, Ht = { class: "radio-label" }, Kt = { class: "right-panel" }, Xt = { class: "panel-header" }, Wt = { class: "panel-body" }, Yt = {
|
|
223
223
|
key: 0,
|
|
224
224
|
class: "loading-overlay"
|
|
225
225
|
}, Zt = /* @__PURE__ */ we({
|
|
@@ -230,7 +230,7 @@ ${j.value.join(" ")}
|
|
|
230
230
|
},
|
|
231
231
|
emits: ["getAnimationData", "getThreeData"],
|
|
232
232
|
setup(E, { emit: Q }) {
|
|
233
|
-
const T = Q, n = E, V = he("setManagementPageTitle"),
|
|
233
|
+
const T = Q, n = E, V = he("setManagementPageTitle"), j = he("setManagementPageVisible"), f = U(() => {
|
|
234
234
|
var e, o;
|
|
235
235
|
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
|
|
236
236
|
}), p = U(() => {
|
|
@@ -240,7 +240,7 @@ ${j.value.join(" ")}
|
|
|
240
240
|
var e, o;
|
|
241
241
|
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.knife;
|
|
242
242
|
}), J = u([]), D = async (t) => {
|
|
243
|
-
!t || !t.isExtra || (await k(t), V == null || V(t == null ? void 0 : t.pageName),
|
|
243
|
+
!t || !t.isExtra || (await k(t), V == null || V(t == null ? void 0 : t.pageName), j == null || j(!0));
|
|
244
244
|
}, k = ft(async (t) => {
|
|
245
245
|
await gt();
|
|
246
246
|
const { mainKey: e, baseMenuPath: o } = t || {};
|
|
@@ -324,25 +324,25 @@ ${j.value.join(" ")}
|
|
|
324
324
|
}, {
|
|
325
325
|
immediate: !0
|
|
326
326
|
});
|
|
327
|
-
const
|
|
327
|
+
const L = U(() => {
|
|
328
328
|
var e, o;
|
|
329
329
|
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.bladeObjUrl;
|
|
330
|
-
}), ce = u(ke.ROBOT),
|
|
330
|
+
}), ce = u(ke.ROBOT), H = u(null), K = u(!1), oe = u(""), A = u(!1), P = u(""), O = u(!1), _ = u(""), te = u(!1), le = u(""), N = ue(null), s = u("叶片模型"), a = ue(null), g = ue(null), C = ue(null), r = u(Pe), {
|
|
331
331
|
currentModels: c,
|
|
332
332
|
resetView: m,
|
|
333
333
|
initThreeJS: S,
|
|
334
|
-
handleResize:
|
|
334
|
+
handleResize: X,
|
|
335
335
|
getThreeJSObjects: I,
|
|
336
336
|
cleanup: ae,
|
|
337
337
|
setModels: me,
|
|
338
338
|
axesHelperVisible: xe,
|
|
339
339
|
toggleAxesVisibility: _e
|
|
340
|
-
} = nt(
|
|
340
|
+
} = nt(H), { loadSceneFromFile: $e } = lt(
|
|
341
341
|
I,
|
|
342
342
|
c,
|
|
343
|
-
|
|
343
|
+
K,
|
|
344
344
|
oe
|
|
345
|
-
), { isAnimating: fe, toggleAnimation: Ue, stopAnimation: ze } = ot(I, c), { isClipping: Te, activeClippingAxis: w, toggleClipping: Ve, updateClippingPlanes: F } = st(I, c), { initRaycaster:
|
|
345
|
+
), { isAnimating: fe, toggleAnimation: Ue, stopAnimation: ze } = ot(I, c), { isClipping: Te, activeClippingAxis: w, toggleClipping: Ve, updateClippingPlanes: F } = st(I, c), { initRaycaster: je, selectedObject3D: Le, setSelectedObjVisible: Ae, updatePosition: Ne, updateRotation: De, dispose: Re } = tt(H, I, c), Oe = () => {
|
|
346
346
|
_e();
|
|
347
347
|
}, Se = U(() => ce.value === ke.ROBOT), Fe = (t) => {
|
|
348
348
|
le.value = t, te.value = !0;
|
|
@@ -361,8 +361,8 @@ ${j.value.join(" ")}
|
|
|
361
361
|
(t = r.value) == null || t.stopAnimation();
|
|
362
362
|
}, Je = (t, e) => vt(t, e), Ie = async (t) => {
|
|
363
363
|
const e = Je(t, s.value);
|
|
364
|
-
if (g.value = e, console.log("bladeObjUrl",
|
|
365
|
-
const o = await zt(
|
|
364
|
+
if (g.value = e, console.log("bladeObjUrl", L.value), e && e.parent && L.value) {
|
|
365
|
+
const o = await zt(L.value);
|
|
366
366
|
o.name = "blade_clone", e.parent.add(o), o.position.copy(e.position), o.rotation.copy(e.rotation), o.scale.copy(e.scale), e.visible = !1, a.value = o;
|
|
367
367
|
} else
|
|
368
368
|
s.value && console.warn(`在 Blade '${s.value}' 中未找到可替换的网格或其没有父级。`);
|
|
@@ -383,14 +383,14 @@ ${j.value.join(" ")}
|
|
|
383
383
|
immediate: !0,
|
|
384
384
|
deep: !0
|
|
385
385
|
}), Z(N, (t) => {
|
|
386
|
-
me(t ? [t] : []),
|
|
386
|
+
me(t ? [t] : []), je();
|
|
387
387
|
});
|
|
388
388
|
const Ge = () => {
|
|
389
|
-
S(), window.addEventListener("resize",
|
|
389
|
+
S(), window.addEventListener("resize", X);
|
|
390
390
|
const t = I();
|
|
391
391
|
C.value = t.scene;
|
|
392
|
-
},
|
|
393
|
-
P.value = "", _.value = "", window.removeEventListener("resize",
|
|
392
|
+
}, He = () => {
|
|
393
|
+
P.value = "", _.value = "", window.removeEventListener("resize", X), fe.value && ze(), ae(), Re();
|
|
394
394
|
};
|
|
395
395
|
return Ye(async () => {
|
|
396
396
|
await Ze();
|
|
@@ -400,13 +400,13 @@ ${j.value.join(" ")}
|
|
|
400
400
|
console.error("Three.js 初始化失败:", t), y.error("渲染引擎初始化失败!");
|
|
401
401
|
}
|
|
402
402
|
}), qe(() => {
|
|
403
|
-
|
|
403
|
+
He();
|
|
404
404
|
}), (t, e) => {
|
|
405
405
|
const o = q("el-scrollbar"), ie = q("PipeAnalysisPanel");
|
|
406
406
|
return z(), M("div", Tt, [
|
|
407
407
|
$(l("div", {
|
|
408
408
|
ref_key: "threejsContainer",
|
|
409
|
-
ref:
|
|
409
|
+
ref: H,
|
|
410
410
|
class: "threejs-container"
|
|
411
411
|
}, null, 512), [
|
|
412
412
|
[W, Se.value]
|
|
@@ -415,7 +415,7 @@ ${j.value.join(" ")}
|
|
|
415
415
|
Y(t.$slots, "button-top", { switchTopPanel: Fe }, void 0, !0),
|
|
416
416
|
Y(t.$slots, "logout", {}, void 0, !0)
|
|
417
417
|
]),
|
|
418
|
-
l("div",
|
|
418
|
+
l("div", jt, [
|
|
419
419
|
i(h, {
|
|
420
420
|
name: "viewReset",
|
|
421
421
|
size: "24",
|
|
@@ -446,7 +446,7 @@ ${j.value.join(" ")}
|
|
|
446
446
|
title: "显隐坐标轴"
|
|
447
447
|
}, null, 8, ["active"])
|
|
448
448
|
]),
|
|
449
|
-
l("div",
|
|
449
|
+
l("div", Lt, [
|
|
450
450
|
Y(t.$slots, "button-left", { switchRightPanel: se }, void 0, !0),
|
|
451
451
|
i(h, {
|
|
452
452
|
name: "jiegoushu",
|
|
@@ -588,7 +588,7 @@ ${j.value.join(" ")}
|
|
|
588
588
|
]),
|
|
589
589
|
e[18] || (e[18] = l("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
590
590
|
]),
|
|
591
|
-
l("label",
|
|
591
|
+
l("label", Ht, [
|
|
592
592
|
$(l("input", {
|
|
593
593
|
type: "radio",
|
|
594
594
|
name: "clipping-axis",
|
|
@@ -605,7 +605,7 @@ ${j.value.join(" ")}
|
|
|
605
605
|
])) : G("", !0),
|
|
606
606
|
P.value === "工件树" ? (z(), ye(at, {
|
|
607
607
|
key: 2,
|
|
608
|
-
model: (b = d(
|
|
608
|
+
model: (b = d(Le)) == null ? void 0 : b.obj,
|
|
609
609
|
onVisibleChange: d(Ae),
|
|
610
610
|
onUpdatePosition: d(Ne),
|
|
611
611
|
onUpdateRotation: d(De)
|
|
@@ -618,8 +618,8 @@ ${j.value.join(" ")}
|
|
|
618
618
|
], 512), [
|
|
619
619
|
[W, A.value]
|
|
620
620
|
]),
|
|
621
|
-
$(l("div",
|
|
622
|
-
l("div",
|
|
621
|
+
$(l("div", Kt, [
|
|
622
|
+
l("div", Xt, [
|
|
623
623
|
l("span", null, B(_.value), 1),
|
|
624
624
|
l("span", {
|
|
625
625
|
class: "close",
|
|
@@ -649,7 +649,7 @@ ${j.value.join(" ")}
|
|
|
649
649
|
], 512), [
|
|
650
650
|
[W, O.value]
|
|
651
651
|
]),
|
|
652
|
-
|
|
652
|
+
K.value ? (z(), M("div", Yt, [
|
|
653
653
|
e[20] || (e[20] = l("div", { class: "loading-spinner" }, null, -1)),
|
|
654
654
|
l("p", null, B(oe.value), 1)
|
|
655
655
|
])) : G("", !0),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Te=require("./index.vue_vue_type_style_index_1_lang-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Te=require("./index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs"),A=require("./workpieceTreePanel-Dif_gJAG.cjs"),Z=require("./iconfont-Bc_5-mGm.cjs"),p=require("./index-DEBf-IBT.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs");const Q=require("./index-Ci05kJVO.cjs"),G=require("./urdfTree-B2NsYdY-.cjs"),se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),g=require("./svgIcon-CUM54R6L.cjs"),De=require("./animationData-CF6-_eBc.cjs"),Me=require("./MTLLoader-CkNQ5SUP.cjs"),oe=require("./index-RfA-XD5A.cjs"),$e={class:"panel-content"},Be={class:"action-bar"},ze={key:0,class:"animation-controls"},Le={class:"control-row"},Re={class:"control-row"},Ue={class:"frame-info"},je={class:"control-row"},Ae={key:1,class:"empty-state"},Ie={class:"dialog-footer"},Oe=e.defineComponent({__name:"urdfAnimationPanel",props:{model:{},scene:{},xyzbcList:{}},setup(B,{expose:I}){const k=B,o=e.ref([]),w=e.ref(!1),C=e.ref(""),v=e.ref("stopped"),c=e.ref(0),y=e.ref(0),z=e.ref(10),S=e.ref(null);let h=0;const O=e.ref([]),T=e.computed(()=>k.model?G.getNonFixedJoints(k.model).map(m=>m.name):[]),P=e.computed(()=>[...T.value]),W=e.computed(()=>P.value.length>0?`请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
2
2
|
${P.value.join(" ")}
|
|
3
3
|
0 0 0 ...
|
|
4
4
|
1 2 3 ...`:"请先加载模型。"),R=e.computed(()=>o.value[c.value]||{});e.watch(()=>k.model,s=>{s?(S.value=new A.URDFRobotController(s),O.value=G.getAllLinkName(s),c.value=0):(S.value=null,O.value=[])},{immediate:!0});const U=s=>{if(s<0||s>=o.value.length){console.error(`帧索引 ${s} 超出范围`);return}const n=o.value[s];if(S.value){const m={};T.value.forEach(N=>{const i=parseFloat(n[N]);isNaN(i)||(m[N]=i)}),S.value.setJointAngles(m)}c.value=s,y.value=o.value.length>1?s/(o.value.length-1)*100:100},H=async s=>{try{for(let n=c.value;n<o.value.length;n++){if(s!==h)return;const m=o.value[n],N={};if(S.value)T.value.forEach(i=>{const r=parseFloat(m[i]);isNaN(r)||(N[i]=r)}),await S.value.animateToState(N,z.value,i=>{s===h&&(y.value=(n+i)/o.value.length*100)});else{if(await new Promise(i=>setTimeout(i,z.value)),s!==h)return;y.value=(n+1)/o.value.length*100}c.value=n}s===h&&(p.ElMessage.success("动画播放完成"),v.value="stopped",y.value=100)}catch(n){console.error("动画播放出错:",n),p.ElMessage.error("动画播放出错"),v.value="stopped"}},_=()=>{if(o.value.length===0){p.ElMessage.error("无动画数据");return}v.value==="stopped"&&(c.value=0,U(0)),v.value="playing",h++,H(h),p.ElMessage.info("动画播放中")},V=()=>{v.value==="playing"&&(h++,v.value="paused",p.ElMessage.info("动画已暂停"))},D=()=>{h++,v.value="stopped",c.value=0,y.value=0,U(0),p.ElMessage.info("动画已停止并重置")},E=()=>{v.value==="playing"?V():_()},F=s=>{h++,v.value="paused",U(s)},q=()=>{if(!C.value.trim()){p.ElMessage.warning("导入内容不能为空");return}const s=C.value.trim().split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),D=require("./iconfont-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),D=require("./iconfont-Bc_5-mGm.cjs"),s=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs"),ye=require("./fileUtil-BezA0XEu.cjs"),we=require("./index-DEBf-IBT.cjs"),J=require("./urdfTree-B2NsYdY-.cjs"),v=require("./svgIcon-CUM54R6L.cjs"),Se=require("./isString-D6Z6SOrb.cjs"),xe=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),K=new s.Box3,R=new s.Vector3;class oe extends s.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],i=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],o=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(o),this.setAttribute("position",new s.Float32BufferAttribute(e,3)),this.setAttribute("uv",new s.Float32BufferAttribute(i,2))}applyMatrix4(e){const i=this.attributes.instanceStart,o=this.attributes.instanceEnd;return i!==void 0&&(i.applyMatrix4(e),o.applyMatrix4(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new s.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceStart",new s.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceEnd",new s.InterleavedBufferAttribute(o,3,3)),this.instanceCount=this.attributes.instanceStart.count,this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let i;e instanceof Float32Array?i=e:Array.isArray(e)&&(i=new Float32Array(e));const o=new s.InstancedInterleavedBuffer(i,6,1);return this.setAttribute("instanceColorStart",new s.InterleavedBufferAttribute(o,3,0)),this.setAttribute("instanceColorEnd",new s.InterleavedBufferAttribute(o,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new s.WireframeGeometry(e.geometry)),this}fromLineSegments(e){const i=e.geometry;return this.setPositions(i.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new s.Box3);const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;e!==void 0&&i!==void 0&&(this.boundingBox.setFromBufferAttribute(e),K.setFromBufferAttribute(i),this.boundingBox.union(K))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new s.Sphere),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,i=this.attributes.instanceEnd;if(e!==void 0&&i!==void 0){const o=this.boundingSphere.center;this.boundingBox.getCenter(o);let n=0;for(let c=0,d=e.count;c<d;c++)R.fromBufferAttribute(e,c),n=Math.max(n,o.distanceToSquared(R)),R.fromBufferAttribute(i,c),n=Math.max(n,o.distanceToSquared(R));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}}s.UniformsLib.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new s.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};s.ShaderLib.line={uniforms:s.UniformsUtils.merge([s.UniformsLib.common,s.UniformsLib.fog,s.UniformsLib.line]),vertexShader:`
|
|
2
2
|
#include <common>
|
|
3
3
|
#include <color_pars_vertex>
|
|
4
4
|
#include <fog_pars_vertex>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { defineComponent as We, ref as B, shallowRef as he, computed as $, watch as Ve, onMounted as He, onBeforeUnmount as Ne, resolveComponent as $e, createElementBlock as te, openBlock as X, createElementVNode as d, withDirectives as k, createCommentVNode as ne, createVNode as p, unref as b, renderSlot as ve, toDisplayString as ie, withCtx as ge, createBlock as Xe, isRef as Y, vModelRadio as q, vShow as se } from "vue";
|
|
2
|
-
import { u as Ye, a as qe, b as Je, f as Ze, d as Ke } from "./iconfont-
|
|
3
|
-
import { aE as Qe, aF as le, aG as de, av as R, aH as et, B as ce, aD as Ce, V as P, aI as tt, aJ as Q, aK as _e, Y as Ue, aL as ee, k as nt, aM as V, aN as it, r as st, s as Ee, t as ot, w as at, ag as rt, ao as lt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
4
|
-
import { r as dt } from "./fileUtil-
|
|
5
|
-
import { E as ct } from "./index-
|
|
6
|
-
import { U as ut, J as ft } from "./urdfTree-
|
|
2
|
+
import { u as Ye, a as qe, b as Je, f as Ze, d as Ke } from "./iconfont-Cj5twyUW.js";
|
|
3
|
+
import { aE as Qe, aF as le, aG as de, av as R, aH as et, B as ce, aD as Ce, V as P, aI as tt, aJ as Q, aK as _e, Y as Ue, aL as ee, k as nt, aM as V, aN as it, r as st, s as Ee, t as ot, w as at, ag as rt, ao as lt } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js";
|
|
4
|
+
import { r as dt } from "./fileUtil-xUu_aleM.js";
|
|
5
|
+
import { E as ct } from "./index-DBDeHECn.js";
|
|
6
|
+
import { U as ut, J as ft } from "./urdfTree-vu4m_HnH.js";
|
|
7
7
|
import { T as v } from "./svgIcon-D-_fXUBL.js";
|
|
8
|
-
import { i as pt } from "./isString-
|
|
8
|
+
import { i as pt } from "./isString-DBnuELeA.js";
|
|
9
9
|
import { _ as mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
10
|
const ye = new ce(), J = new P();
|
|
11
11
|
class Ae extends Qe {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),f=require("./index-
|
|
1
|
+
"use strict";const e=require("vue"),f=require("./index-DEBf-IBT.cjs"),A=require("./index.vue_vue_type_style_index_1_lang-Dhkn6DXN.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs");const H=require("./_plugin-vue_export-helper-BHFhmbuH.cjs");function O(c){const m=sessionStorage.getItem("loginToken")??"123456";return f.service({url:"/api/sysFile/uploadFile",method:"post",data:c,headers:{Authorization:m,"Content-Type":"multipart/form-data"}})}function B(c){const m=sessionStorage.getItem("loginToken")??"123456";return f.service({url:"/api/sysFile/downloadFile",method:"post",data:c,headers:{Authorization:m,Accept:"application/octet-stream"},responseType:"blob"})}function q(c){const m=sessionStorage.getItem("loginToken")??"123456";return f.service({url:"/api/sysFile/uploadFiles",method:"post",data:c,headers:{Authorization:m,"Content-Type":"multipart/form-data"}})}const I=f.defineStore("threeState",{state:()=>({data:{extension:"",url:[],data:{},isThreeScene:!0}}),actions:{setData(c){this.data=c},getData(){return this.data}}});function R(){const c=A.useMenuState(f.pinia),{platform:m}=f.storeToRefs(c),T=I(f.pinia),b=e.computed(()=>{var n;return(n=T==null?void 0:T.data)==null?void 0:n.extension}),p=["uv","cpt","cyd"],y=["urdf"],s=["obj","stl"],o=[...p,...y,...s],F=n=>{if(!C())throw new Error("不是三维系统");T.setData(n)},h=()=>T.getData(),C=()=>m.value==="three",u=n=>{const i=n==null?void 0:n.toLowerCase(),l=i==null?void 0:i.lastIndexOf(".");let v=i;return l>=0&&(v=v==null?void 0:v.slice(l+1)),v},S=n=>{if(!n)return!1;const i=u(n);return o==null?void 0:o.includes(i)};return{getData:h,setData:F,isThreeSystem:C,isUrdf:n=>{if(!n)return!1;const i=u(n);return y==null?void 0:y.includes(i)},isGeneralFile:n=>{if(!n)return!1;const i=u(n);return s==null?void 0:s.includes(i)},isTrackPathFile:n=>{if(!n)return!1;const i=u(n);return p==null?void 0:p.includes(i)},isThreeFile:S,isUseBackdrop:n=>C()&&S(n),initTrackFileType:n=>{if(!n)return{isCpt:!1,isCyd:!1,isUv:!1};const i=u(n),l=p==null?void 0:p.find(k=>k===i);return{isCpt:l==="cpt",isCyd:l==="cyd",isUv:l==="uv"}},getFileExtension:u,extraExtension:b}}const L={class:"top-menu"},x={key:4,class:"loading"},z=e.defineComponent({__name:"threeViewerHost",props:{fileUrls:{default:()=>[]},host:{default:"inline"},extension:{},animationData:{default:()=>({})},width:{default:"100%"},height:{default:"100%"},threeData:{},componentType:{}},emits:["getThreeData"],setup(c,{emit:m}){const T=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneView-D_2JHUdz.cjs"))),b=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threePreview-q2XmhoL-.cjs"))),p=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeTrackPathView-CClVyd1p.cjs"))),y=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeSceneViewForCPMPIP-DSIkOvjL.cjs"))),s={ROBOT_SCENE:"robot",LATHE_SCENE:"latheScene",CPMPIP_SCENE:"cpmpip",PREVIEW:"preview"},o=c,F=A.useMenuState(f.pinia),{platName:h}=f.storeToRefs(F),{isGeneralFile:C,isUrdf:u,isTrackPathFile:S,extraExtension:_}=R(),w=e.computed(()=>(o==null?void 0:o.extension)||_.value),P=e.computed(()=>{var t,r;return(r=(t=o==null?void 0:o.threeData)==null?void 0:t.data)==null?void 0:r.trackFileType}),E=e.computed(()=>{var r;if(o.componentType)switch(o.componentType){case"robot":return s.ROBOT_SCENE;case"latheScene":return s.LATHE_SCENE;case"cpmpip":return s.CPMPIP_SCENE;case"preview":return s.PREVIEW}const t=(r=o==null?void 0:o.fileUrls)==null?void 0:r[0];return C(t)?s.PREVIEW:(h==null?void 0:h.value)==="CPMPIP"&&(u(t)||u(w.value))?s.CPMPIP_SCENE:(h==null?void 0:h.value)==="SFRTubeBend"&&(u(t)||u(w.value))?s.ROBOT_SCENE:S(w.value)&&P.value?s.LATHE_SCENE:s.PREVIEW}),D=m,n=e.ref([]),i=e.ref(!1);function l(t){try{const r=new URL(t).pathname,d=r.substring(r.lastIndexOf("/")+1);return decodeURIComponent(d)}catch(r){return console.error("无法解析URL以提取文件名:",t,r),"未知文件名"}}async function v(t){let r,d;if(/^https?:\/\//.test(t))try{const a=await fetch(t);if(!a.ok)throw new Error(`下载文件失败: ${a.statusText} (URL: ${t})`);r=await a.blob(),d=l(t)}catch(a){throw console.error("使用 fetch 下载文件时出错:",a),a}else try{const a=await B({url:t});if(a.status!==200)throw new Error(`下载失败: ${a.status}`);const g=a.headers["content-disposition"];d=k(g)||"无文件名",r=a.data}catch(a){throw console.error("通过 API 下载文件时出错:",a),a}return new File([r],d,{type:r.type})}function k(t){if(!t)return;const r=t.match(/filename\*\s*=\s*([^;]+)/i);if(r){let a=r[1].trim();a=a.replace(/^"(.*)"$/,"$1");const g=a.split("''");if(g.length===2){const M=g[0].toUpperCase(),U=g[1];try{if(M==="UTF-8")return decodeURIComponent(U)}catch{}return U}try{return decodeURIComponent(a)}catch{return a}}const d=t.match(/filename\s*=\s*("?)([^";]+)\1/i);if(d)return d[2].trim()}async function N(t){if(!t||!t.length){n.value=[];return}i.value=!0;try{const r=await Promise.all(t.map(d=>v(d)));n.value=r}catch(r){console.error("文件下载时发生错误:",r),n.value=[]}finally{i.value=!1}}const $=()=>{D("getThreeData")};return e.watch(()=>o.fileUrls,async t=>{await N(t??[])},{immediate:!0,deep:!0}),(t,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass([o.host==="electron"?"mv-electron":"mv-inline","three-platform"])},[e.createElementVNode("div",L,[e.renderSlot(t.$slots,"top-menu",{},void 0,!0)]),E.value===s.ROBOT_SCENE?(e.openBlock(),e.createBlock(e.unref(T),{key:0,"file-blobs":n.value,"animation-data":t.animationData,onGetThreeData:$,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data","threeData"])):E.value===s.LATHE_SCENE?(e.openBlock(),e.createBlock(e.unref(p),{key:1,fileUrls:t.fileUrls,threeData:o.threeData,trackFileType:P.value},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["fileUrls","threeData","trackFileType"])):E.value===s.CPMPIP_SCENE?(e.openBlock(),e.createBlock(e.unref(y),{key:2,"file-blobs":n.value,threeData:o.threeData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","threeData"])):E.value===s.PREVIEW?(e.openBlock(),e.createBlock(e.unref(b),{key:3,"file-blobs":n.value,"animation-data":t.animationData},{"button-left":e.withCtx(()=>[e.renderSlot(t.$slots,"management-menu",{},void 0,!0)]),"button-right":e.withCtx(()=>[e.renderSlot(t.$slots,"management-page",{},void 0,!0)]),_:3},8,["file-blobs","animation-data"])):e.createCommentVNode("",!0),i.value?(e.openBlock(),e.createElementBlock("div",x," 文件下载中,请稍候... ")):e.createCommentVNode("",!0)],2))}}),V=H._export_sfc(z,[["__scopeId","data-v-a4f0efb1"]]),W=Object.freeze(Object.defineProperty({__proto__:null,default:V},Symbol.toStringTag,{value:"Module"}));exports.ThreeViewerHost=V;exports.downloadAvatarApi=B;exports.threeViewerHost=W;exports.uploadAmountApi=q;exports.uploadFile=O;exports.useThreeState=I;exports.useThreeSystem=R;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { computed as _, defineComponent as Y, defineAsyncComponent as S, ref as B, watch as q, createElementBlock as O, openBlock as y, normalizeClass as J, createElementVNode as K, createBlock as P, createCommentVNode as L, renderSlot as p, unref as D, withCtx as T } from "vue";
|
|
2
|
-
import { a as A,
|
|
3
|
-
import { u as z } from "./index.vue_vue_type_style_index_1_lang-
|
|
4
|
-
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
2
|
+
import { a as A, c0 as Q, p as N, s as H } from "./index-DBDeHECn.js";
|
|
3
|
+
import { u as z } from "./index.vue_vue_type_style_index_1_lang-CWCaf0OP.js";
|
|
4
|
+
import "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js";
|
|
5
5
|
import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
function ue(l) {
|
|
7
7
|
const m = sessionStorage.getItem("loginToken") ?? "123456";
|
|
@@ -137,7 +137,7 @@ const te = { class: "top-menu" }, ne = {
|
|
|
137
137
|
},
|
|
138
138
|
emits: ["getThreeData"],
|
|
139
139
|
setup(l, { emit: m }) {
|
|
140
|
-
const v = S(() => import("./threeSceneView-
|
|
140
|
+
const v = S(() => import("./threeSceneView-CDFoPU6x.js")), k = S(() => import("./threePreview-BhHpGgi8.js")), f = S(() => import("./threeTrackPathView-CeCre9ru.js")), E = S(() => import("./threeSceneViewForCPMPIP-BBelwG21.js")), o = {
|
|
141
141
|
ROBOT_SCENE: "robot",
|
|
142
142
|
// 机器人场景
|
|
143
143
|
LATHE_SCENE: "latheScene",
|
|
@@ -149,7 +149,7 @@ const te = { class: "top-menu" }, ne = {
|
|
|
149
149
|
}, r = l, U = z(N), { platName: d } = H(U), { isGeneralFile: g, isUrdf: c, isTrackPathFile: F, extraExtension: $ } = ee(), w = _(() => (r == null ? void 0 : r.extension) || $.value), I = _(() => {
|
|
150
150
|
var e, n;
|
|
151
151
|
return (n = (e = r == null ? void 0 : r.threeData) == null ? void 0 : e.data) == null ? void 0 : n.trackFileType;
|
|
152
|
-
}),
|
|
152
|
+
}), C = _(() => {
|
|
153
153
|
var n;
|
|
154
154
|
if (r.componentType)
|
|
155
155
|
switch (r.componentType) {
|
|
@@ -189,8 +189,8 @@ const te = { class: "top-menu" }, ne = {
|
|
|
189
189
|
const a = await Z({ url: e });
|
|
190
190
|
if (a.status !== 200)
|
|
191
191
|
throw new Error(`下载失败: ${a.status}`);
|
|
192
|
-
const
|
|
193
|
-
u = R(
|
|
192
|
+
const b = a.headers["content-disposition"];
|
|
193
|
+
u = R(b) || "无文件名", n = a.data;
|
|
194
194
|
} catch (a) {
|
|
195
195
|
throw console.error("通过 API 下载文件时出错:", a), a;
|
|
196
196
|
}
|
|
@@ -202,9 +202,9 @@ const te = { class: "top-menu" }, ne = {
|
|
|
202
202
|
if (n) {
|
|
203
203
|
let a = n[1].trim();
|
|
204
204
|
a = a.replace(/^"(.*)"$/, "$1");
|
|
205
|
-
const
|
|
206
|
-
if (
|
|
207
|
-
const j =
|
|
205
|
+
const b = a.split("''");
|
|
206
|
+
if (b.length === 2) {
|
|
207
|
+
const j = b[0].toUpperCase(), M = b[1];
|
|
208
208
|
try {
|
|
209
209
|
if (j === "UTF-8")
|
|
210
210
|
return decodeURIComponent(M);
|
|
@@ -252,7 +252,7 @@ const te = { class: "top-menu" }, ne = {
|
|
|
252
252
|
K("div", te, [
|
|
253
253
|
p(e.$slots, "top-menu", {}, void 0, !0)
|
|
254
254
|
]),
|
|
255
|
-
|
|
255
|
+
C.value === o.ROBOT_SCENE ? (y(), P(D(v), {
|
|
256
256
|
key: 0,
|
|
257
257
|
"file-blobs": t.value,
|
|
258
258
|
"animation-data": e.animationData,
|
|
@@ -266,7 +266,7 @@ const te = { class: "top-menu" }, ne = {
|
|
|
266
266
|
p(e.$slots, "management-page", {}, void 0, !0)
|
|
267
267
|
]),
|
|
268
268
|
_: 3
|
|
269
|
-
}, 8, ["file-blobs", "animation-data", "threeData"])) :
|
|
269
|
+
}, 8, ["file-blobs", "animation-data", "threeData"])) : C.value === o.LATHE_SCENE ? (y(), P(D(f), {
|
|
270
270
|
key: 1,
|
|
271
271
|
fileUrls: e.fileUrls,
|
|
272
272
|
threeData: r.threeData,
|
|
@@ -279,7 +279,7 @@ const te = { class: "top-menu" }, ne = {
|
|
|
279
279
|
p(e.$slots, "management-page", {}, void 0, !0)
|
|
280
280
|
]),
|
|
281
281
|
_: 3
|
|
282
|
-
}, 8, ["fileUrls", "threeData", "trackFileType"])) :
|
|
282
|
+
}, 8, ["fileUrls", "threeData", "trackFileType"])) : C.value === o.CPMPIP_SCENE ? (y(), P(D(E), {
|
|
283
283
|
key: 2,
|
|
284
284
|
"file-blobs": t.value,
|
|
285
285
|
threeData: r.threeData
|
|
@@ -291,7 +291,7 @@ const te = { class: "top-menu" }, ne = {
|
|
|
291
291
|
p(e.$slots, "management-page", {}, void 0, !0)
|
|
292
292
|
]),
|
|
293
293
|
_: 3
|
|
294
|
-
}, 8, ["file-blobs", "threeData"])) :
|
|
294
|
+
}, 8, ["file-blobs", "threeData"])) : C.value === o.PREVIEW ? (y(), P(D(k), {
|
|
295
295
|
key: 3,
|
|
296
296
|
"file-blobs": t.value,
|
|
297
297
|
"animation-data": e.animationData
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("vue"),x=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
1
|
+
"use strict";const t=require("vue"),x=require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DNsyaAD5.cjs"),J=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),E=(o,i)=>{if(!i)return null;const l=o.joints[i];return l||null},F=(o,i)=>{if(!i)return null;const l=E(o,i);if(!l)return null;let u=null;return l.traverse(c=>{c instanceof x.Mesh&&!u&&(u=c)}),u},N=(o,i)=>{if(!i)return null;const l=o.links[i];return l||null},L=(o,i)=>{if(!i)return null;const l=N(o,i);if(!l)return null;let u=null;return l.traverse(c=>{c instanceof x.Mesh&&!u&&(u=c)}),u},V=o=>{const i=o.joints;return Object.values(i)},M=o=>V(o).filter(u=>u.jointType!=="fixed"),w=o=>{const i=o.links;return Object.keys(i)},B={class:"panel-content"},b={key:0,class:"joints-list"},I={class:"joint-info-row"},S={class:"joint-left"},C={class:"joint-name"},D={class:"joint-range"},P={class:"joint-type"},T={key:0,class:"joint-control-row"},A={class:"slider-container"},U=["min","max","value","onInput"],R={class:"value-display"},q={class:"joint-value"},O={class:"unit"},K={key:1,class:"empty-state"},$=t.defineComponent({__name:"urdfJointPanel",props:{model:{}},setup(o,{expose:i}){const l=o,u=t.ref([]),c=t.ref(null),f=(s,p=!1)=>s==="revolute"?p?Math.PI:-Math.PI:s==="prismatic"?p?1:-1:0,_=s=>{if(!s||!s.joints)return console.warn("URDF模型无效或不包含关节信息"),[];const p=[];return V(s).forEach(r=>{var n,d;if(r.jointType==="fixed")return;let a={lower:((n=r.limit)==null?void 0:n.lower)??f(r.jointType,!1),upper:((d=r.limit)==null?void 0:d.upper)??f(r.jointType,!0)};r.jointType==="continuous"&&(a={lower:-10*Math.PI,upper:10*Math.PI}),p.push({name:r.name,type:r.jointType||"unknown",limit:a,currentValue:r.angle||0,urdfJoint:r})}),p},m=(s,p)=>{var n;const e=u.value.find(d=>d.name===s);if(!e)return;const r=parseFloat(p),a=Math.max(e.limit.lower,Math.min(e.limit.upper,r));e.currentValue=a,(n=l.model)!=null&&n.setJointValue?l.model.setJointValue(s,a):e.urdfJoint.setJointValue(a)},v=()=>{u.value.forEach(s=>{(s.type==="revolute"||s.type==="continuous"||s.type==="prismatic")&&m(s.name,0)})},y=()=>{l.model&&u.value.forEach(s=>{s.urdfJoint.angle!==void 0&&s.currentValue!==s.urdfJoint.angle&&(s.currentValue=s.urdfJoint.angle)})},g=()=>{const s=()=>{y(),c.value=requestAnimationFrame(s)};s()},k=()=>{c.value&&(cancelAnimationFrame(c.value),c.value=null)};return t.watch(()=>l.model,s=>{s?u.value=_(s):u.value=[]},{immediate:!0}),t.onMounted(()=>{g()}),t.onUnmounted(()=>{k()}),i({resetAllJoints:v}),(s,p)=>(t.openBlock(),t.createElementBlock("div",B,[u.value.length>0?(t.openBlock(),t.createElementBlock("div",b,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.value,e=>(t.openBlock(),t.createElementBlock("div",{key:e.name,class:"joint-item"},[t.createElementVNode("div",I,[t.createElementVNode("div",S,[t.createElementVNode("span",C,t.toDisplayString(e.name),1),t.createElementVNode("span",D," ["+t.toDisplayString(e.limit.lower.toFixed(2))+", "+t.toDisplayString(e.limit.upper.toFixed(2))+"] ",1)]),t.createElementVNode("span",P,t.toDisplayString(e.type),1)]),e.type==="revolute"||e.type==="prismatic"||e.type==="continuous"?(t.openBlock(),t.createElementBlock("div",T,[t.createElementVNode("div",A,[t.createElementVNode("input",{type:"range",min:e.limit.lower,max:e.limit.upper,step:"0.001",value:e.currentValue,onInput:r=>m(e.name,r.target.value),class:"joint-slider"},null,40,U)]),t.createElementVNode("div",R,[t.createElementVNode("span",q,t.toDisplayString(e.currentValue?Number(e.currentValue).toFixed(3):"0.000"),1),t.createElementVNode("span",O,t.toDisplayString(e.type==="prismatic"?"m":"rad"),1)])])):t.createCommentVNode("",!0)]))),128))])):(t.openBlock(),t.createElementBlock("div",K,p[0]||(p[0]=[t.createElementVNode("p",null,"未检测到可控制的关节",-1)])))]))}}),H=J._export_sfc($,[["__scopeId","data-v-750b831d"]]),z={class:"panel-content"},G="id",Q={__name:"urdfTree",props:{model:Object,maxExpandCount:{type:Number,default:10},expandStrategy:{type:String,default:"breadth",validator:o=>["breadth","firstLevel"].includes(o)},extraNodes:{type:Array,default:[]}},emits:["nodeClick"],setup(o,{emit:i}){const l=o,u=i,c=t.ref([]),f={children:"children",label:"label"},_=e=>{u("nodeClick",e)},m=(e,r=0)=>{const a=[];return Array.isArray(e)&&(e==null?void 0:e.length)>0&&e.forEach(n=>{if(!(n!=null&&n.isMesh)&&((n==null?void 0:n.type)==="URDFJoint"||(n==null?void 0:n.type)==="URDFLink")){const d={name:n==null?void 0:n.name,label:n==null?void 0:n.name,show:!0,level:r+1,isPenultimate:!1,type:n==null?void 0:n.type,id:n==null?void 0:n.id,limit:(n==null?void 0:n.limit)??"",children:m(n==null?void 0:n.children,r+1),path:n==null?void 0:n.name};a.push(d)}}),a},v=e=>e?[{name:e==null?void 0:e.name,label:e==null?void 0:e.name,show:!0,level:1,isPenultimate:!1,type:e==null?void 0:e.type,id:e==null?void 0:e.id,limit:(e==null?void 0:e.limit)??"",children:m(e==null?void 0:e.children,1)||[],path:e==null?void 0:e.name}]:[],y=(e,r)=>{const a=[],n=[...e];for(;n.length>0&&a.length<r;){const d=n.shift();d.children&&d.children.length>0&&(a.push(d.id),n.push(...d.children))}return a},g=(e,r)=>{const a=[];return e.forEach(n=>{if(n.children&&n.children.length>0){a.push(n.id);const d=n.children.filter(h=>h.children&&h.children.length>0).slice(0,r).map(h=>h.id);a.push(...d)}}),a.slice(0,r+1)},k=t.computed(()=>!c.value||c.value.length===0?[]:l.expandStrategy==="firstLevel"?g(c.value,l.maxExpandCount):y(c.value,l.maxExpandCount)),s=t.computed(()=>[{name:"场景",label:"场景",show:!0,level:1,isPenultimate:!1,type:"场景",id:"场景",children:l!=null&&l.model?v(l.model):[],path:"场景"}]),p=()=>{const e=l.extraNodes||[],r=e==null?void 0:e.map(a=>({...a,level:0}));c.value.push(...r)};return t.watch(s,e=>{c.value=JSON.parse(JSON.stringify(e)),p()},{immediate:!0}),(e,r)=>{const a=t.resolveComponent("el-tree");return t.openBlock(),t.createElementBlock("div",z,[t.createVNode(a,{data:c.value,props:f,"default-expanded-keys":k.value,"node-key":G,onNodeClick:_},null,8,["data","default-expanded-keys"])])}}},W=J._export_sfc(Q,[["__scopeId","data-v-7f54bf51"]]);exports.JointPanel=H;exports.UrdfTree=W;exports.getAllLinkName=w;exports.getMeshFromJoint=F;exports.getMeshFromLink=L;exports.getNonFixedJoints=M;exports.getTargetJoint=E;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as I, ref as L, watch as b, onMounted as C, onUnmounted as P, createElementBlock as m, openBlock as f, Fragment as T, renderList as N, createElementVNode as p, createCommentVNode as U, toDisplayString as h, computed as M, resolveComponent as A, createVNode as S } from "vue";
|
|
2
|
-
import { k as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
2
|
+
import { k as V } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js";
|
|
3
3
|
import { _ as w } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
4
|
const D = (i, l) => {
|
|
5
5
|
if (!l)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
var ce = Object.defineProperty;
|
|
2
2
|
var de = (b, l, o) => l in b ? ce(b, l, { enumerable: !0, configurable: !0, writable: !0, value: o }) : b[l] = o;
|
|
3
3
|
var E = (b, l, o) => de(b, typeof l != "symbol" ? l + "" : l, o);
|
|
4
|
-
import { U as me } from "./index.vue_vue_type_style_index_1_lang-
|
|
5
|
-
import { S as ve, M as pe, O as fe } from "./MTLLoader-
|
|
6
|
-
import { g as re, f as F } from "./fileUtil-
|
|
7
|
-
import { aZ as be, u as J, o as we, k as he, B as _e, a_ as ge, Y as ye, V as Le } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-
|
|
4
|
+
import { U as me } from "./index.vue_vue_type_style_index_1_lang-BX_Iweoa.js";
|
|
5
|
+
import { S as ve, M as pe, O as fe } from "./MTLLoader-B4lJr_ku.js";
|
|
6
|
+
import { g as re, f as F } from "./fileUtil-xUu_aleM.js";
|
|
7
|
+
import { aZ as be, u as J, o as we, k as he, B as _e, a_ as ge, Y as ye, V as Le } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CinJxfAX.js";
|
|
8
8
|
import { ref as T, defineComponent as je, computed as O, watch as ue, resolveComponent as x, createElementBlock as k, openBlock as P, createVNode as S, createElementVNode as c, withCtx as $, createTextVNode as D, toDisplayString as C } from "vue";
|
|
9
|
-
import { c as Re, e as Se, g as Ue } from "./iconfont-
|
|
9
|
+
import { c as Re, e as Se, g as Ue } from "./iconfont-Cj5twyUW.js";
|
|
10
10
|
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
const Me = "http://222.92.178.198:60000/chfs/shared/Insofrobot/urdf";
|
|
12
12
|
function Oe(b) {
|