ss-component-new 1.3.615 → 1.3.617
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-BL2uYkTJ.js → MTLLoader-B6ottYFV.js} +2 -2
- package/dist/{OrbitControls-Zyj23qrC.js → OrbitControls-BFVKU7s-.js} +1 -1
- package/dist/{URDFLoader-CRx5L75v.js → URDFLoader-CH-7Pzmq.js} +589 -584
- package/dist/{animationData-CJQE6_nu.js → animationData-F0z3GN7j.js} +3 -3
- package/dist/{array-CKTk7Sq_.js → array-CQiszLQE.js} +13 -14
- package/dist/{clone-ESeDvnJv.js → clone-MyfSNInd.js} +1 -1
- package/dist/{eleIcon-C7Pz9jha.js → eleIcon-BoKZ_PzU.js} +2 -2
- package/dist/{iconfont-DZGSkx-_.js → iconfont-BJYdStg5.js} +396 -247
- package/dist/{index-gXFBfuoD.js → index-0zQirLAy.js} +8 -8
- package/dist/{index-BvkIoiVW.js → index-6qXeMn6b.js} +3 -3
- package/dist/{index-obXIOkF7.js → index-8OmAlKII.js} +4 -4
- package/dist/{index-BXh02EAd.js → index-B2LYEScO.js} +4 -4
- package/dist/{index-YvUJL9Us.js → index-B4NcYIuS.js} +1 -1
- package/dist/{index-D8UY4uNQ.js → index-B8NQAdR4.js} +966 -967
- package/dist/{index-rlStojTL.js → index-BFqUz4pN.js} +1 -1
- package/dist/{index-t9LvhXac.js → index-BHtLrI43.js} +5 -5
- package/dist/{index--FPbFJB2.js → index-BODochNh.js} +6 -6
- package/dist/{index-CPW7tdrA.js → index-BkkvdZXm.js} +17 -20
- package/dist/{index-B0M1YCUY.js → index-BvtOLltL.js} +7 -7
- package/dist/{index-DsdWSuDi.js → index-BvyM6d06.js} +482 -483
- package/dist/{index-CX8Apbo7.js → index-BybrpYzx.js} +1 -1
- package/dist/{index-BJFXtH-X.js → index-CAMjP0It.js} +3 -3
- package/dist/{index-tMqKF2l6.js → index-CM6aWexA.js} +2 -2
- package/dist/{index-BBBCr4Oo.js → index-CT1LWsrT.js} +2 -2
- package/dist/{index-CTicGWoS.js → index-CXqqIuf-.js} +3 -3
- package/dist/{index-D9xMYIes.js → index-CYjsE5Gs.js} +3 -3
- package/dist/{index-B_fRppeJ.js → index-CkO7j_i1.js} +8 -8
- package/dist/{index-cYgzND1g.js → index-CnCBS4CT.js} +16268 -16240
- package/dist/{index-DlQXFCw8.js → index-CvZcm-Tt.js} +7 -8
- package/dist/{index-tniD_xHN.js → index-D2BpwRDj.js} +148 -157
- package/dist/{index-DAs4L0hx.js → index-D43kQTBs.js} +6973 -6531
- package/dist/{index-DjSJhlad.js → index-D56uKIwO.js} +60 -62
- package/dist/{index-XvX6TMzr.js → index-DCY5J8nu.js} +1 -1
- package/dist/{index-C3pboX9W.js → index-DIVct0z6.js} +5 -5
- package/dist/{index-Dd-8nw2f.js → index-DIzunSUT.js} +18 -20
- package/dist/{index-11kpzK0A.js → index-DJrzqi4-.js} +17 -17
- package/dist/{index-Cn33Gz2z.js → index-DSrPdLF-.js} +587 -616
- package/dist/{index-BUqviBFi.js → index-DcPtyCDm.js} +29 -35
- package/dist/{index-D1E8EPxn.js → index-DmILGKv9.js} +57 -61
- package/dist/{index-BA1kJZth.js → index-aTEfnfYn.js} +36 -40
- package/dist/{index-BHtNKL1L.js → index-dD-mKgue.js} +2 -2
- package/dist/{index-DkumSU1-.js → index-hg0CdgKe.js} +4 -4
- package/dist/index-mjGbAjJz.js +2623 -0
- package/dist/{index.vue_vue_type_script_setup_true_lang-DRzriV-s.js → index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js → index.vue_vue_type_style_index_0_scoped_39e1db95_lang-Dp7tIi0S.js} +27760 -27735
- package/dist/isString-Dxm3W5iX.js +8 -0
- package/dist/{localIcon-D5UoFBU5.js → localIcon-CoJHw5ss.js} +1 -1
- package/dist/{main-DgwLoFSd.js → main-BDvWHXas.js} +9 -9
- package/dist/{menuIndex-DAW9B-9g.js → menuIndex-BiUB7t5q.js} +1 -1
- package/dist/{request-B1c8BUkR.js → request-BfrhYBTM.js} +3480 -3062
- package/dist/ss-component.css +3 -3
- package/dist/ss-component.js +14 -14
- package/dist/ss-component2.js +13 -13
- package/dist/ss-component3.js +1 -1
- package/dist/svgIcon-4m2zaZkj.js +42 -0
- package/dist/{threeModel-Df46gQvy.js → threeModel-B7guecMM.js} +174 -174
- package/dist/{threePreview-C4Ra7sjU.js → threePreview-CpcrqmFS.js} +554 -554
- package/dist/threeSceneView-CWTmvCY4.js +1290 -0
- package/dist/{threeSceneViewForCPMPIP-DZ5wkTWo.js → threeSceneViewForCPMPIP-VzWmr9CP.js} +207 -208
- package/dist/{threeTrackPathView-DT80eKxv.js → threeTrackPathView-Bw6e-quT.js} +25 -25
- package/dist/{threeViewerHost-t6BRTmw8.js → threeViewerHost-DIiGjw_8.js} +4 -4
- package/dist/urdfTree-DU02c_91.js +254 -0
- package/dist/{workpieceTreePanel-CuXFoEjJ.js → workpieceTreePanel-XH9mYAT2.js} +56 -60
- package/package.json +1 -1
- package/dist/JSEncrypt-B36c1iN5.js +0 -1983
- package/dist/index-BmaW6Me9.js +0 -572
- package/dist/isString-BlNsHiyU.js +0 -8
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/dist/svgIcon-4u4PW7Is.js +0 -42
- package/dist/threeSceneView-tLPMhgrS.js +0 -1291
- package/dist/urdfTree-Bu7OVUsr.js +0 -404
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { s as pe } from "./threeViewerHost-
|
|
3
|
-
import { u as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import "./index.
|
|
8
|
-
import {
|
|
9
|
-
import { E as _ } from "./request-
|
|
1
|
+
import { defineComponent as ge, ref as r, computed as k, watch as X, onUnmounted as De, resolveComponent as G, openBlock as g, createElementBlock as x, createElementVNode as n, createVNode as s, toDisplayString as L, Fragment as Be, renderList as Je, createCommentVNode as U, withCtx as le, shallowRef as te, onMounted as Me, nextTick as me, onBeforeUnmount as Ee, withDirectives as I, vShow as W, unref as z, renderSlot as ve, createBlock as de } from "vue";
|
|
2
|
+
import { s as pe } from "./threeViewerHost-DIiGjw_8.js";
|
|
3
|
+
import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-BJYdStg5.js";
|
|
4
|
+
import { U as Xe, u as Ye, W as Ze, a as qe } from "./workpieceTreePanel-XH9mYAT2.js";
|
|
5
|
+
import { c as Ke } from "./index-B8NQAdR4.js";
|
|
6
|
+
import "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-Dp7tIi0S.js";
|
|
7
|
+
import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js";
|
|
8
|
+
import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-DU02c_91.js";
|
|
9
|
+
import { E as _ } from "./request-BfrhYBTM.js";
|
|
10
10
|
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
|
-
import { T as y } from "./svgIcon-
|
|
12
|
-
import { i as
|
|
13
|
-
import { O as
|
|
14
|
-
const
|
|
11
|
+
import { T as y } from "./svgIcon-4m2zaZkj.js";
|
|
12
|
+
import { i as at } from "./animationData-F0z3GN7j.js";
|
|
13
|
+
import { O as ot } from "./MTLLoader-B6ottYFV.js";
|
|
14
|
+
const st = { class: "panel-content" }, it = {
|
|
15
15
|
key: 0,
|
|
16
16
|
class: "animation-controls"
|
|
17
|
-
},
|
|
17
|
+
}, rt = { class: "control-row" }, ut = { class: "control-row" }, ct = { class: "frame-info" }, vt = { class: "control-row" }, dt = {
|
|
18
18
|
key: 1,
|
|
19
19
|
class: "empty-state"
|
|
20
|
-
},
|
|
20
|
+
}, mt = { class: "dialog-footer" }, pt = /* @__PURE__ */ ge({
|
|
21
21
|
__name: "urdfAnimationPanel",
|
|
22
22
|
props: {
|
|
23
23
|
model: {},
|
|
24
24
|
scene: {},
|
|
25
25
|
xyzbcList: {}
|
|
26
26
|
},
|
|
27
|
-
setup(
|
|
28
|
-
const j =
|
|
27
|
+
setup(S, { expose: f }) {
|
|
28
|
+
const j = S, i = r([]), T = r(!1), F = r(""), c = r("stopped"), h = r(0), O = r(0), C = r(10), v = r(null);
|
|
29
29
|
let d = 0;
|
|
30
|
-
const P = r([]), w = k(() => j.model ?
|
|
30
|
+
const P = r([]), w = k(() => j.model ? Qe(j.model).map((b) => b.name) : []), R = k(() => [...w.value]), ne = k(() => R.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
31
31
|
${R.value.join(" ")}
|
|
32
32
|
0 0 0 ...
|
|
33
33
|
1 2 3 ...` : "请先加载模型。"), Y = k(() => i.value[h.value] || {});
|
|
34
34
|
X(() => j.model, (a) => {
|
|
35
|
-
a ? (v.value = new
|
|
35
|
+
a ? (v.value = new Xe(a), P.value = et(a), h.value = 0) : (v.value = null, P.value = []);
|
|
36
36
|
}, { immediate: !0 });
|
|
37
37
|
const J = (a) => {
|
|
38
38
|
if (a < 0 || a >= i.value.length) {
|
|
39
39
|
console.error(`帧索引 ${a} 超出范围`);
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const l = i.value[a];
|
|
43
43
|
if (v.value) {
|
|
44
|
-
const
|
|
45
|
-
w.value.forEach((
|
|
46
|
-
const u = parseFloat(
|
|
47
|
-
isNaN(u) || (
|
|
48
|
-
}), v.value.setJointAngles(
|
|
44
|
+
const b = {};
|
|
45
|
+
w.value.forEach((A) => {
|
|
46
|
+
const u = parseFloat(l[A]);
|
|
47
|
+
isNaN(u) || (b[A] = u);
|
|
48
|
+
}), v.value.setJointAngles(b);
|
|
49
49
|
}
|
|
50
50
|
h.value = a, O.value = i.value.length > 1 ? a / (i.value.length - 1) * 100 : 100;
|
|
51
51
|
}, M = async (a) => {
|
|
52
52
|
try {
|
|
53
|
-
for (let
|
|
53
|
+
for (let l = h.value; l < i.value.length; l++) {
|
|
54
54
|
if (a !== d) return;
|
|
55
|
-
const
|
|
55
|
+
const b = i.value[l], A = {};
|
|
56
56
|
if (v.value)
|
|
57
57
|
w.value.forEach((u) => {
|
|
58
|
-
const m = parseFloat(
|
|
59
|
-
isNaN(m) || (
|
|
58
|
+
const m = parseFloat(b[u]);
|
|
59
|
+
isNaN(m) || (A[u] = m);
|
|
60
60
|
}), await v.value.animateToState(
|
|
61
|
-
|
|
61
|
+
A,
|
|
62
62
|
C.value,
|
|
63
63
|
(u) => {
|
|
64
|
-
a === d && (O.value = (
|
|
64
|
+
a === d && (O.value = (l + u) / i.value.length * 100);
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
67
|
else {
|
|
68
68
|
if (await new Promise((u) => setTimeout(u, C.value)), a !== d) return;
|
|
69
|
-
O.value = (
|
|
69
|
+
O.value = (l + 1) / i.value.length * 100;
|
|
70
70
|
}
|
|
71
|
-
h.value =
|
|
71
|
+
h.value = l;
|
|
72
72
|
}
|
|
73
73
|
a === d && (_.success("动画播放完成"), c.value = "stopped", O.value = 100);
|
|
74
|
-
} catch (
|
|
75
|
-
console.error("动画播放出错:",
|
|
74
|
+
} catch (l) {
|
|
75
|
+
console.error("动画播放出错:", l), _.error("动画播放出错"), c.value = "stopped";
|
|
76
76
|
}
|
|
77
|
-
},
|
|
77
|
+
}, N = () => {
|
|
78
78
|
if (i.value.length === 0) {
|
|
79
79
|
_.error("无动画数据");
|
|
80
80
|
return;
|
|
@@ -84,62 +84,62 @@ ${R.value.join(" ")}
|
|
|
84
84
|
c.value === "playing" && (d++, c.value = "paused", _.info("动画已暂停"));
|
|
85
85
|
}, q = () => {
|
|
86
86
|
d++, c.value = "stopped", h.value = 0, O.value = 0, J(0), _.info("动画已停止并重置");
|
|
87
|
-
},
|
|
88
|
-
c.value === "playing" ? Z() :
|
|
89
|
-
},
|
|
87
|
+
}, ae = () => {
|
|
88
|
+
c.value === "playing" ? Z() : N();
|
|
89
|
+
}, D = (a) => {
|
|
90
90
|
d++, c.value = "paused", J(a);
|
|
91
|
-
},
|
|
92
|
-
if (!
|
|
91
|
+
}, oe = () => {
|
|
92
|
+
if (!F.value.trim()) {
|
|
93
93
|
_.warning("导入内容不能为空");
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
const a =
|
|
96
|
+
const a = F.value.trim().split(`
|
|
97
97
|
`).filter((m) => m.trim() !== "");
|
|
98
98
|
if (a.length < 2) {
|
|
99
99
|
_.error("导入数据至少需要包含表头行和一行数据");
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
|
-
const
|
|
103
|
-
if (
|
|
104
|
-
R.value.includes(m) && (
|
|
105
|
-
}), Object.keys(
|
|
102
|
+
const l = a[0].split(" ").map((m) => m.trim()), b = {};
|
|
103
|
+
if (l.forEach((m, p) => {
|
|
104
|
+
R.value.includes(m) && (b[p] = m);
|
|
105
|
+
}), Object.keys(b).length === 0) {
|
|
106
106
|
_.error("没有找到匹配的表头,请检查表头名称是否正确");
|
|
107
107
|
return;
|
|
108
108
|
}
|
|
109
109
|
const u = a.slice(1).map((m) => {
|
|
110
|
-
const p = m.split(" "),
|
|
111
|
-
return R.value.forEach((
|
|
112
|
-
|
|
113
|
-
}), Object.entries(
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
-
}),
|
|
110
|
+
const p = m.split(" "), B = {};
|
|
111
|
+
return R.value.forEach((H) => {
|
|
112
|
+
B[H] = "0";
|
|
113
|
+
}), Object.entries(b).forEach(([H, se]) => {
|
|
114
|
+
const E = p[parseInt(H)];
|
|
115
|
+
E !== void 0 && E.trim() !== "" && (B[se] = E.trim());
|
|
116
|
+
}), B;
|
|
117
117
|
});
|
|
118
|
-
u.length > 0 ? (i.value = u, _.success(`成功导入 ${u.length} 行数据!`), T.value = !1,
|
|
118
|
+
u.length > 0 ? (i.value = u, _.success(`成功导入 ${u.length} 行数据!`), T.value = !1, F.value = "", q()) : _.error("未能解析到有效数据,请检查格式。");
|
|
119
119
|
};
|
|
120
120
|
X(() => j.xyzbcList, () => {
|
|
121
|
-
j.xyzbcList && (i.value =
|
|
121
|
+
j.xyzbcList && (i.value = Ke(j.xyzbcList));
|
|
122
122
|
}, {
|
|
123
123
|
immediate: !0
|
|
124
124
|
});
|
|
125
125
|
const K = (a) => `第 ${a + 1} 帧`;
|
|
126
126
|
return f({
|
|
127
|
-
handlePlayPause:
|
|
128
|
-
playAnimation:
|
|
127
|
+
handlePlayPause: ae,
|
|
128
|
+
playAnimation: N,
|
|
129
129
|
pauseAnimation: Z,
|
|
130
130
|
stopAnimation: q
|
|
131
|
-
}),
|
|
131
|
+
}), De(() => {
|
|
132
132
|
d++;
|
|
133
|
-
}), (a,
|
|
134
|
-
const
|
|
135
|
-
return
|
|
136
|
-
|
|
137
|
-
i.value.length > 0 ? (
|
|
138
|
-
n("div",
|
|
139
|
-
|
|
140
|
-
s(
|
|
133
|
+
}), (a, l) => {
|
|
134
|
+
const b = G("el-input-number"), A = G("el-slider"), u = G("el-input"), m = G("el-dialog");
|
|
135
|
+
return g(), x("div", st, [
|
|
136
|
+
l[11] || (l[11] = n("div", { class: "action-bar" }, null, -1)),
|
|
137
|
+
i.value.length > 0 ? (g(), x("div", it, [
|
|
138
|
+
n("div", rt, [
|
|
139
|
+
l[5] || (l[5] = n("label", null, "帧间隔 (ms):", -1)),
|
|
140
|
+
s(b, {
|
|
141
141
|
modelValue: C.value,
|
|
142
|
-
"onUpdate:modelValue":
|
|
142
|
+
"onUpdate:modelValue": l[0] || (l[0] = (p) => C.value = p),
|
|
143
143
|
min: 10,
|
|
144
144
|
max: 5e3,
|
|
145
145
|
step: 100,
|
|
@@ -147,99 +147,98 @@ ${R.value.join(" ")}
|
|
|
147
147
|
style: { width: "120px" }
|
|
148
148
|
}, null, 8, ["modelValue"])
|
|
149
149
|
]),
|
|
150
|
-
n("div",
|
|
151
|
-
|
|
152
|
-
n("span",
|
|
150
|
+
n("div", ut, [
|
|
151
|
+
l[6] || (l[6] = n("label", null, "当前帧:", -1)),
|
|
152
|
+
n("span", ct, L(h.value + 1) + " / " + L(i.value.length), 1)
|
|
153
153
|
]),
|
|
154
|
-
n("div",
|
|
155
|
-
|
|
156
|
-
s(
|
|
154
|
+
n("div", vt, [
|
|
155
|
+
l[7] || (l[7] = n("label", null, "动画进度:", -1)),
|
|
156
|
+
s(A, {
|
|
157
157
|
modelValue: h.value,
|
|
158
|
-
"onUpdate:modelValue":
|
|
158
|
+
"onUpdate:modelValue": l[1] || (l[1] = (p) => h.value = p),
|
|
159
159
|
min: 0,
|
|
160
160
|
max: i.value.length > 0 ? i.value.length - 1 : 0,
|
|
161
161
|
step: 1,
|
|
162
162
|
"format-tooltip": K,
|
|
163
|
-
onInput:
|
|
163
|
+
onInput: D,
|
|
164
164
|
disabled: i.value.length === 0 || c.value === "playing",
|
|
165
165
|
style: { "flex-grow": "1", margin: "0 10px" }
|
|
166
166
|
}, null, 8, ["modelValue", "max", "disabled"])
|
|
167
167
|
]),
|
|
168
168
|
n("div", null, [
|
|
169
|
-
|
|
169
|
+
l[8] || (l[8] = n("label", null, "当前帧数据:", -1)),
|
|
170
170
|
n("div", null, [
|
|
171
|
-
Y.value ? (
|
|
171
|
+
Y.value ? (g(!0), x(Be, { key: 0 }, Je(Y.value, (p, B) => (g(), x("div", { key: B }, L(B) + ": " + L(p), 1))), 128)) : U("", !0)
|
|
172
172
|
])
|
|
173
173
|
])
|
|
174
174
|
])) : U("", !0),
|
|
175
|
-
i.value.length === 0 ? (
|
|
175
|
+
i.value.length === 0 ? (g(), x("div", dt, [...l[9] || (l[9] = [
|
|
176
176
|
n("p", null, "请先创建数据", -1)
|
|
177
|
-
]))) : U("", !0),
|
|
177
|
+
])])) : U("", !0),
|
|
178
178
|
s(m, {
|
|
179
179
|
modelValue: T.value,
|
|
180
|
-
"onUpdate:modelValue":
|
|
180
|
+
"onUpdate:modelValue": l[4] || (l[4] = (p) => T.value = p),
|
|
181
181
|
title: "导入数据",
|
|
182
182
|
width: "500px"
|
|
183
183
|
}, {
|
|
184
|
-
footer:
|
|
185
|
-
n("span",
|
|
184
|
+
footer: le(() => [
|
|
185
|
+
n("span", mt, [
|
|
186
186
|
s(fe, {
|
|
187
187
|
modelValue: "取消",
|
|
188
|
-
onClick:
|
|
188
|
+
onClick: l[3] || (l[3] = (p) => T.value = !1)
|
|
189
189
|
}),
|
|
190
190
|
s(fe, {
|
|
191
191
|
modelValue: "确认导入",
|
|
192
|
-
onClick:
|
|
192
|
+
onClick: oe,
|
|
193
193
|
type: "primary"
|
|
194
194
|
})
|
|
195
195
|
])
|
|
196
196
|
]),
|
|
197
|
-
default:
|
|
198
|
-
|
|
197
|
+
default: le(() => [
|
|
198
|
+
l[10] || (l[10] = n("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
|
|
199
199
|
s(u, {
|
|
200
|
-
modelValue:
|
|
201
|
-
"onUpdate:modelValue":
|
|
200
|
+
modelValue: F.value,
|
|
201
|
+
"onUpdate:modelValue": l[2] || (l[2] = (p) => F.value = p),
|
|
202
202
|
type: "textarea",
|
|
203
203
|
rows: 10,
|
|
204
|
-
placeholder:
|
|
204
|
+
placeholder: ne.value
|
|
205
205
|
}, null, 8, ["modelValue", "placeholder"])
|
|
206
206
|
]),
|
|
207
|
-
_: 1
|
|
208
|
-
__: [10]
|
|
207
|
+
_: 1
|
|
209
208
|
}, 8, ["modelValue"])
|
|
210
209
|
]);
|
|
211
210
|
};
|
|
212
211
|
}
|
|
213
|
-
}),
|
|
212
|
+
}), be = /* @__PURE__ */ he(pt, [["__scopeId", "data-v-00d63f4b"]]), ft = async (S) => await new ot().loadAsync(S), bt = async (S) => await ft(S), gt = { class: "obj-viewer-container" }, ht = { class: "buttonGroup-topLeft" }, yt = { class: "buttonGroup-left" }, _t = { class: "buttonGroup-right" }, kt = { class: "buttonGroup-bottom" }, Ct = { class: "left-panel" }, Pt = { class: "panel-header" }, wt = { class: "panel-body" }, zt = { class: "right-panel" }, Ut = { class: "panel-header" }, xt = { class: "panel-body" }, jt = {
|
|
214
213
|
key: 0,
|
|
215
214
|
class: "loading-overlay"
|
|
216
|
-
},
|
|
215
|
+
}, At = {
|
|
217
216
|
key: 1,
|
|
218
217
|
class: "brand"
|
|
219
|
-
},
|
|
218
|
+
}, Lt = {
|
|
220
219
|
key: 0,
|
|
221
220
|
class: "brand-item"
|
|
222
|
-
},
|
|
221
|
+
}, Vt = { class: "item-value" }, $t = {
|
|
223
222
|
key: 1,
|
|
224
223
|
class: "brand-item"
|
|
225
|
-
},
|
|
224
|
+
}, Tt = { class: "item-value" }, Ot = {
|
|
226
225
|
key: 2,
|
|
227
226
|
class: "brand-item"
|
|
228
|
-
},
|
|
227
|
+
}, Rt = { class: "item-value" }, St = /* @__PURE__ */ ge({
|
|
229
228
|
__name: "threeSceneViewForCPMPIP",
|
|
230
229
|
props: {
|
|
231
230
|
fileBlobs: { default: () => [] },
|
|
232
231
|
threeData: {}
|
|
233
232
|
},
|
|
234
|
-
setup(
|
|
235
|
-
const f =
|
|
233
|
+
setup(S) {
|
|
234
|
+
const f = S, j = r([]), i = k(() => {
|
|
236
235
|
var e, o;
|
|
237
236
|
return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.csvUrl;
|
|
238
237
|
});
|
|
239
238
|
X(() => i.value, async () => {
|
|
240
239
|
if (console.log("csvUrl", i.value), i.value) {
|
|
241
|
-
const
|
|
242
|
-
j.value =
|
|
240
|
+
const t = await at(i.value);
|
|
241
|
+
j.value = t;
|
|
243
242
|
}
|
|
244
243
|
}, {
|
|
245
244
|
immediate: !0
|
|
@@ -247,67 +246,67 @@ ${R.value.join(" ")}
|
|
|
247
246
|
const T = k(() => {
|
|
248
247
|
var e, o;
|
|
249
248
|
return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.bladeObjUrl;
|
|
250
|
-
}),
|
|
251
|
-
currentModels:
|
|
249
|
+
}), F = r(pe.ROBOT), c = r(null), h = r(!1), O = r(""), C = r(!1), v = r(""), d = r(!1), P = r(""), w = te(null), R = r("叶片模型"), ne = te(null), Y = te(null), J = te(null), M = r(be), {
|
|
250
|
+
currentModels: N,
|
|
252
251
|
resetView: Z,
|
|
253
252
|
initThreeJS: q,
|
|
254
|
-
handleResize:
|
|
255
|
-
getThreeJSObjects:
|
|
256
|
-
cleanup:
|
|
253
|
+
handleResize: ae,
|
|
254
|
+
getThreeJSObjects: D,
|
|
255
|
+
cleanup: oe,
|
|
257
256
|
setAndFitModels: K,
|
|
258
257
|
axesHelperVisible: a,
|
|
259
|
-
toggleAxesVisibility:
|
|
260
|
-
zoomIn:
|
|
261
|
-
zoomOut:
|
|
262
|
-
} =
|
|
263
|
-
B,
|
|
258
|
+
toggleAxesVisibility: l,
|
|
259
|
+
zoomIn: b,
|
|
260
|
+
zoomOut: A
|
|
261
|
+
} = Ge(c), { loadSceneFromFile: u } = qe(
|
|
264
262
|
D,
|
|
263
|
+
N,
|
|
265
264
|
h,
|
|
266
265
|
O
|
|
267
|
-
), { isAnimating: m, toggleAnimation: p, stopAnimation:
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
},
|
|
266
|
+
), { isAnimating: m, toggleAnimation: p, startAnimation: B, stopAnimation: H } = He(D, N), { isClipping: se, activeClippingAxis: E, toggleClipping: ye, updateClippingPlanes: _e } = Ie(D, N), { initRaycaster: ke, selectedObject3D: Ce, setSelectedObjVisible: Pe, updatePosition: we, updateRotation: ze, dispose: Ue } = Ye(c, D, N), xe = () => {
|
|
267
|
+
l();
|
|
268
|
+
}, je = (t) => {
|
|
269
|
+
E.value = t, _e();
|
|
270
|
+
}, V = k(() => {
|
|
272
271
|
var e, o;
|
|
273
272
|
return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
|
|
274
273
|
}), ie = k(() => {
|
|
275
274
|
var e;
|
|
276
|
-
return (e =
|
|
275
|
+
return (e = V == null ? void 0 : V.value) == null ? void 0 : e.modelNumber;
|
|
277
276
|
}), re = k(() => {
|
|
278
277
|
var e;
|
|
279
|
-
return (e =
|
|
278
|
+
return (e = V == null ? void 0 : V.value) == null ? void 0 : e.serialNumber;
|
|
280
279
|
}), ue = k(() => {
|
|
281
280
|
var e;
|
|
282
|
-
return (e =
|
|
283
|
-
}),
|
|
284
|
-
C.value = !0, v.value =
|
|
285
|
-
}, ce = (
|
|
286
|
-
d.value = !0, P.value =
|
|
281
|
+
return (e = V == null ? void 0 : V.value) == null ? void 0 : e.manufacturer;
|
|
282
|
+
}), Ae = k(() => ie.value || re.value || ue.value), Le = k(() => F.value === pe.ROBOT), Q = (t) => {
|
|
283
|
+
C.value = !0, v.value = t, t === "剖面视图" && !se.value && ye();
|
|
284
|
+
}, ce = (t) => {
|
|
285
|
+
d.value = !0, P.value = t;
|
|
287
286
|
}, Ve = () => {
|
|
288
|
-
var
|
|
289
|
-
(
|
|
287
|
+
var t;
|
|
288
|
+
(t = M.value) == null || t.handlePlayPause();
|
|
290
289
|
}, $e = () => {
|
|
291
|
-
var
|
|
292
|
-
(
|
|
293
|
-
},
|
|
294
|
-
var
|
|
295
|
-
(
|
|
296
|
-
},
|
|
297
|
-
const e =
|
|
290
|
+
var t;
|
|
291
|
+
(t = M.value) == null || t.pauseAnimation();
|
|
292
|
+
}, Te = () => {
|
|
293
|
+
var t;
|
|
294
|
+
(t = M.value) == null || t.stopAnimation();
|
|
295
|
+
}, Oe = (t, e) => nt(t, e), Re = async (t) => {
|
|
296
|
+
const e = Oe(t, R.value);
|
|
298
297
|
if (Y.value = e, console.log("bladeObjUrl", T.value), e && e.parent && T.value) {
|
|
299
|
-
const o = await
|
|
300
|
-
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,
|
|
298
|
+
const o = await bt(T.value);
|
|
299
|
+
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, ne.value = o;
|
|
301
300
|
} else
|
|
302
301
|
R.value && console.warn(`在 Blade '${R.value}' 中未找到可替换的网格或其没有父级。`);
|
|
303
302
|
};
|
|
304
|
-
X(() => f.fileBlobs, (
|
|
305
|
-
if (
|
|
306
|
-
const e =
|
|
303
|
+
X(() => f.fileBlobs, (t) => {
|
|
304
|
+
if (t && t.length > 0) {
|
|
305
|
+
const e = t[0];
|
|
307
306
|
if (!e.name.toLowerCase().endsWith(".urdf"))
|
|
308
307
|
return;
|
|
309
308
|
u(e).then((o) => {
|
|
310
|
-
w.value = o, o &&
|
|
309
|
+
w.value = o, o && Re(o);
|
|
311
310
|
}).catch((o) => {
|
|
312
311
|
console.error("加载URDF文件时发生错误:", o), _.error("加载urdf模型失败"), w.value = null;
|
|
313
312
|
});
|
|
@@ -316,31 +315,31 @@ ${R.value.join(" ")}
|
|
|
316
315
|
}, {
|
|
317
316
|
immediate: !0,
|
|
318
317
|
deep: !0
|
|
319
|
-
}), X(w, (
|
|
320
|
-
K(
|
|
318
|
+
}), X(w, (t) => {
|
|
319
|
+
K(t ? [t] : []), ke();
|
|
321
320
|
});
|
|
322
|
-
const
|
|
321
|
+
const Se = () => {
|
|
323
322
|
q(), me(() => {
|
|
324
|
-
c.value && (
|
|
323
|
+
c.value && (ee = new ResizeObserver(ae), ee.observe(c.value));
|
|
325
324
|
});
|
|
326
|
-
const
|
|
327
|
-
J.value =
|
|
328
|
-
},
|
|
329
|
-
v.value = "", P.value = "",
|
|
325
|
+
const t = D();
|
|
326
|
+
J.value = t.scene;
|
|
327
|
+
}, Fe = () => {
|
|
328
|
+
v.value = "", P.value = "", ee && ee.disconnect(), m.value && H(), oe(), Ue();
|
|
330
329
|
};
|
|
331
|
-
let
|
|
332
|
-
return
|
|
330
|
+
let ee = null;
|
|
331
|
+
return Me(async () => {
|
|
333
332
|
await me();
|
|
334
333
|
try {
|
|
335
|
-
|
|
336
|
-
} catch (
|
|
337
|
-
console.error("Three.js 初始化失败:",
|
|
334
|
+
Se();
|
|
335
|
+
} catch (t) {
|
|
336
|
+
console.error("Three.js 初始化失败:", t), _.error("渲染引擎初始化失败!");
|
|
338
337
|
}
|
|
339
|
-
}),
|
|
340
|
-
|
|
341
|
-
}), (
|
|
342
|
-
const o =
|
|
343
|
-
return
|
|
338
|
+
}), Ee(() => {
|
|
339
|
+
Fe();
|
|
340
|
+
}), (t, e) => {
|
|
341
|
+
const o = G("el-scrollbar"), Ne = G("PipeAnalysisPanel");
|
|
342
|
+
return g(), x("div", gt, [
|
|
344
343
|
I(n("div", {
|
|
345
344
|
ref_key: "threejsContainer",
|
|
346
345
|
ref: c,
|
|
@@ -348,7 +347,7 @@ ${R.value.join(" ")}
|
|
|
348
347
|
}, null, 512), [
|
|
349
348
|
[W, Le.value]
|
|
350
349
|
]),
|
|
351
|
-
n("div",
|
|
350
|
+
n("div", ht, [
|
|
352
351
|
s(y, {
|
|
353
352
|
name: "viewReset",
|
|
354
353
|
size: "24",
|
|
@@ -359,13 +358,13 @@ ${R.value.join(" ")}
|
|
|
359
358
|
name: "fangda",
|
|
360
359
|
size: "24",
|
|
361
360
|
title: "放大",
|
|
362
|
-
onClick: z(
|
|
361
|
+
onClick: z(b)
|
|
363
362
|
}, null, 8, ["onClick"]),
|
|
364
363
|
s(y, {
|
|
365
364
|
name: "suoxiao",
|
|
366
365
|
size: "24",
|
|
367
366
|
title: "缩小",
|
|
368
|
-
onClick: z(
|
|
367
|
+
onClick: z(A)
|
|
369
368
|
}, null, 8, ["onClick"]),
|
|
370
369
|
s(y, {
|
|
371
370
|
name: "lookAround",
|
|
@@ -377,39 +376,39 @@ ${R.value.join(" ")}
|
|
|
377
376
|
name: "zuobiaoxi",
|
|
378
377
|
size: "24",
|
|
379
378
|
active: z(a),
|
|
380
|
-
onClick:
|
|
379
|
+
onClick: xe,
|
|
381
380
|
title: "显隐坐标轴"
|
|
382
381
|
}, null, 8, ["active"])
|
|
383
382
|
]),
|
|
384
|
-
n("div",
|
|
385
|
-
ve(
|
|
383
|
+
n("div", yt, [
|
|
384
|
+
ve(t.$slots, "button-left", { switchRightPanel: Q }, void 0, !0),
|
|
386
385
|
s(y, {
|
|
387
386
|
name: "jiegoushu",
|
|
388
387
|
size: "24",
|
|
389
|
-
onClick: e[0] || (e[0] = (
|
|
388
|
+
onClick: e[0] || (e[0] = ($) => Q("场景树")),
|
|
390
389
|
active: C.value && v.value === "场景树",
|
|
391
390
|
title: "场景树"
|
|
392
391
|
}, null, 8, ["active"]),
|
|
393
392
|
s(y, {
|
|
394
393
|
name: "clipping",
|
|
395
394
|
size: "24",
|
|
396
|
-
onClick: e[1] || (e[1] = (
|
|
395
|
+
onClick: e[1] || (e[1] = ($) => Q("剖面视图")),
|
|
397
396
|
active: C.value && v.value === "剖面视图",
|
|
398
397
|
title: "剖面视图"
|
|
399
398
|
}, null, 8, ["active"]),
|
|
400
399
|
s(y, {
|
|
401
400
|
name: "donghuafangzhen",
|
|
402
401
|
size: "24",
|
|
403
|
-
onClick: e[2] || (e[2] = (
|
|
402
|
+
onClick: e[2] || (e[2] = ($) => Q("工件树")),
|
|
404
403
|
active: C.value && v.value === "工件树"
|
|
405
404
|
}, null, 8, ["active"])
|
|
406
405
|
]),
|
|
407
|
-
n("div",
|
|
408
|
-
ve(
|
|
406
|
+
n("div", _t, [
|
|
407
|
+
ve(t.$slots, "button-right", { switchRightPanel: ce }, void 0, !0),
|
|
409
408
|
s(y, {
|
|
410
409
|
name: "jichuangxuanze",
|
|
411
410
|
size: "24",
|
|
412
|
-
onClick: e[3] || (e[3] = (
|
|
411
|
+
onClick: e[3] || (e[3] = ($) => ce("机床控制")),
|
|
413
412
|
active: d.value && P.value === "机床控制",
|
|
414
413
|
title: "机床控制"
|
|
415
414
|
}, null, 8, ["active"]),
|
|
@@ -417,11 +416,11 @@ ${R.value.join(" ")}
|
|
|
417
416
|
name: "donghuafangzhen",
|
|
418
417
|
size: "24",
|
|
419
418
|
title: "动画仿真",
|
|
420
|
-
onClick: e[4] || (e[4] = (
|
|
419
|
+
onClick: e[4] || (e[4] = ($) => ce("动画仿真")),
|
|
421
420
|
active: d.value && P.value === "动画仿真"
|
|
422
421
|
}, null, 8, ["active"])
|
|
423
422
|
]),
|
|
424
|
-
n("div",
|
|
423
|
+
n("div", kt, [
|
|
425
424
|
s(y, {
|
|
426
425
|
name: "bofang",
|
|
427
426
|
size: "24",
|
|
@@ -441,37 +440,37 @@ ${R.value.join(" ")}
|
|
|
441
440
|
size: "24",
|
|
442
441
|
backgroundColor: "#ffffff",
|
|
443
442
|
title: "停止",
|
|
444
|
-
onClick:
|
|
443
|
+
onClick: Te
|
|
445
444
|
})
|
|
446
445
|
]),
|
|
447
|
-
I(n("div",
|
|
448
|
-
n("div",
|
|
449
|
-
n("span", null,
|
|
446
|
+
I(n("div", Ct, [
|
|
447
|
+
n("div", Pt, [
|
|
448
|
+
n("span", null, L(v.value), 1),
|
|
450
449
|
n("span", {
|
|
451
450
|
class: "close",
|
|
452
|
-
onClick: e[5] || (e[5] = (
|
|
451
|
+
onClick: e[5] || (e[5] = ($) => C.value = !1)
|
|
453
452
|
}, " X ")
|
|
454
453
|
]),
|
|
455
|
-
n("div",
|
|
454
|
+
n("div", wt, [
|
|
456
455
|
s(o, { height: "100%" }, {
|
|
457
|
-
default:
|
|
458
|
-
var
|
|
456
|
+
default: le(() => {
|
|
457
|
+
var $;
|
|
459
458
|
return [
|
|
460
|
-
v.value === "场景树" ? (
|
|
459
|
+
v.value === "场景树" ? (g(), de(tt, {
|
|
461
460
|
key: 0,
|
|
462
461
|
model: w.value
|
|
463
462
|
}, null, 8, ["model"])) : U("", !0),
|
|
464
|
-
v.value === "剖面视图" ? (
|
|
463
|
+
v.value === "剖面视图" ? (g(), de(We, {
|
|
465
464
|
key: 1,
|
|
466
|
-
value: z(
|
|
467
|
-
onChange:
|
|
465
|
+
value: z(E),
|
|
466
|
+
onChange: je
|
|
468
467
|
}, null, 8, ["value"])) : U("", !0),
|
|
469
|
-
v.value === "工件树" ? (
|
|
468
|
+
v.value === "工件树" ? (g(), de(Ze, {
|
|
470
469
|
key: 2,
|
|
471
|
-
model: (
|
|
472
|
-
onVisibleChange: z(
|
|
473
|
-
onUpdatePosition: z(
|
|
474
|
-
onUpdateRotation: z(
|
|
470
|
+
model: ($ = z(Ce)) == null ? void 0 : $.obj,
|
|
471
|
+
onVisibleChange: z(Pe),
|
|
472
|
+
onUpdatePosition: z(we),
|
|
473
|
+
onUpdateRotation: z(ze)
|
|
475
474
|
}, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : U("", !0)
|
|
476
475
|
];
|
|
477
476
|
}),
|
|
@@ -481,21 +480,21 @@ ${R.value.join(" ")}
|
|
|
481
480
|
], 512), [
|
|
482
481
|
[W, C.value]
|
|
483
482
|
]),
|
|
484
|
-
I(n("div",
|
|
485
|
-
n("div",
|
|
486
|
-
n("span", null,
|
|
483
|
+
I(n("div", zt, [
|
|
484
|
+
n("div", Ut, [
|
|
485
|
+
n("span", null, L(P.value), 1),
|
|
487
486
|
n("span", {
|
|
488
487
|
class: "close",
|
|
489
|
-
onClick: e[6] || (e[6] = (
|
|
488
|
+
onClick: e[6] || (e[6] = ($) => d.value = !1)
|
|
490
489
|
}, " X ")
|
|
491
490
|
]),
|
|
492
|
-
n("div",
|
|
491
|
+
n("div", xt, [
|
|
493
492
|
s(o, { height: "100%" }, {
|
|
494
|
-
default:
|
|
495
|
-
I(s(
|
|
493
|
+
default: le(() => [
|
|
494
|
+
I(s(lt, { model: w.value }, null, 8, ["model"]), [
|
|
496
495
|
[W, P.value === "机床控制"]
|
|
497
496
|
]),
|
|
498
|
-
I(s(
|
|
497
|
+
I(s(be, {
|
|
499
498
|
model: w.value,
|
|
500
499
|
scene: J.value,
|
|
501
500
|
xyzbcList: j.value,
|
|
@@ -504,7 +503,7 @@ ${R.value.join(" ")}
|
|
|
504
503
|
}, null, 8, ["model", "scene", "xyzbcList"]), [
|
|
505
504
|
[W, P.value === "动画仿真"]
|
|
506
505
|
]),
|
|
507
|
-
ve(
|
|
506
|
+
ve(t.$slots, "right-panel", { rightPanelType: P.value }, void 0, !0)
|
|
508
507
|
]),
|
|
509
508
|
_: 3
|
|
510
509
|
})
|
|
@@ -512,29 +511,29 @@ ${R.value.join(" ")}
|
|
|
512
511
|
], 512), [
|
|
513
512
|
[W, d.value]
|
|
514
513
|
]),
|
|
515
|
-
h.value ? (
|
|
514
|
+
h.value ? (g(), x("div", jt, [
|
|
516
515
|
e[7] || (e[7] = n("div", { class: "loading-spinner" }, null, -1)),
|
|
517
|
-
n("p", null,
|
|
516
|
+
n("p", null, L(O.value), 1)
|
|
518
517
|
])) : U("", !0),
|
|
519
|
-
|
|
520
|
-
ue.value ? (
|
|
518
|
+
Ae.value ? (g(), x("div", At, [
|
|
519
|
+
ue.value ? (g(), x("div", Lt, [
|
|
521
520
|
e[8] || (e[8] = n("div", { class: "item-label" }, "厂家:", -1)),
|
|
522
|
-
n("div",
|
|
521
|
+
n("div", Vt, L(ue.value), 1)
|
|
523
522
|
])) : U("", !0),
|
|
524
|
-
ie.value ? (
|
|
523
|
+
ie.value ? (g(), x("div", $t, [
|
|
525
524
|
e[9] || (e[9] = n("div", { class: "item-label" }, "型号:", -1)),
|
|
526
|
-
n("div",
|
|
525
|
+
n("div", Tt, L(ie.value), 1)
|
|
527
526
|
])) : U("", !0),
|
|
528
|
-
re.value ? (
|
|
527
|
+
re.value ? (g(), x("div", Ot, [
|
|
529
528
|
e[10] || (e[10] = n("div", { class: "item-label" }, "编号:", -1)),
|
|
530
|
-
n("div",
|
|
529
|
+
n("div", Rt, L(re.value), 1)
|
|
531
530
|
])) : U("", !0)
|
|
532
531
|
])) : U("", !0),
|
|
533
|
-
s(
|
|
532
|
+
s(Ne, { ref: "pipeAnalysisPanelRef" }, null, 512)
|
|
534
533
|
]);
|
|
535
534
|
};
|
|
536
535
|
}
|
|
537
|
-
}),
|
|
536
|
+
}), Zt = /* @__PURE__ */ he(St, [["__scopeId", "data-v-54d53d1f"]]);
|
|
538
537
|
export {
|
|
539
|
-
|
|
538
|
+
Zt as default
|
|
540
539
|
};
|