ss-component-new 1.3.615 → 1.3.616
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/{array-CKTk7Sq_.js → array-B7zhh661.js} +2 -2
- package/dist/{iconfont-DZGSkx-_.js → iconfont-BnmSp7qc.js} +396 -247
- package/dist/{index-Cn33Gz2z.js → index-B8KEncMz.js} +21 -15
- package/dist/{index-obXIOkF7.js → index-BB-4cx6M.js} +1 -1
- package/dist/{index-DAs4L0hx.js → index-BcmwtTXG.js} +1 -1
- package/dist/{index-t9LvhXac.js → index-CZGJIvyy.js} +1 -1
- package/dist/{index-tniD_xHN.js → index-Cm8PZAB-.js} +2 -2
- package/dist/{index-BJFXtH-X.js → index-D6d2WMUQ.js} +1 -1
- package/dist/{index-DjSJhlad.js → index-DCQMsqSL.js} +3 -3
- package/dist/{index-Dd-8nw2f.js → index-DLGS4MnS.js} +2 -2
- package/dist/{index--FPbFJB2.js → index-DRpUuthr.js} +1 -1
- package/dist/{index-BmaW6Me9.js → index-SQa7vB3n.js} +1 -1
- package/dist/{index-gXFBfuoD.js → index-ai2FZBc1.js} +2 -2
- package/dist/{index-cYgzND1g.js → index-v9NjEtsA.js} +5062 -5011
- package/dist/{main-DgwLoFSd.js → main-DaQzJVV5.js} +2 -2
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-Df46gQvy.js → threeModel-DgRu_LfA.js} +1 -1
- package/dist/{threePreview-C4Ra7sjU.js → threePreview-CVO6XMIe.js} +555 -555
- package/dist/threeSceneView-DkImpdm3.js +1291 -0
- package/dist/{threeSceneViewForCPMPIP-DZ5wkTWo.js → threeSceneViewForCPMPIP-7gyDxeiN.js} +201 -201
- package/dist/{threeTrackPathView-DT80eKxv.js → threeTrackPathView-7_x3jeap.js} +20 -20
- package/dist/{threeViewerHost-t6BRTmw8.js → threeViewerHost-BBXv1FPJ.js} +1 -1
- package/dist/urdfTree-D0Iom75E.js +254 -0
- package/dist/{workpieceTreePanel-CuXFoEjJ.js → workpieceTreePanel-DEEMKY1v.js} +1 -1
- package/package.json +1 -1
- package/dist/threeSceneView-tLPMhgrS.js +0 -1291
- package/dist/urdfTree-Bu7OVUsr.js +0 -404
|
@@ -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 { c as tl } from "./index-D8UY4uNQ.js";
|
|
1
|
+
import { defineComponent as ge, ref as r, computed as k, watch as X, onUnmounted as De, resolveComponent as G, createElementBlock as x, openBlock as g, createElementVNode as n, createCommentVNode as U, createVNode as s, toDisplayString as L, Fragment as Be, renderList as Je, 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-BBXv1FPJ.js";
|
|
3
|
+
import { u as Ge, a as He, b as Ie, C as We } from "./iconfont-BnmSp7qc.js";
|
|
4
|
+
import { U as Xe, u as Ye, a as Ze, W as qe } from "./workpieceTreePanel-DEEMKY1v.js";
|
|
5
|
+
import { c as Ke } from "./index-D8UY4uNQ.js";
|
|
7
6
|
import "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js";
|
|
8
7
|
import { _ as fe } from "./index.vue_vue_type_script_setup_true_lang-DRzriV-s.js";
|
|
8
|
+
import { g as Qe, b as et, U as tt, J as lt, d as nt } from "./urdfTree-D0Iom75E.js";
|
|
9
9
|
import { E as _ } from "./request-B1c8BUkR.js";
|
|
10
10
|
import { _ as he } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
11
11
|
import { T as y } from "./svgIcon-4u4PW7Is.js";
|
|
12
|
-
import { i as
|
|
13
|
-
import { O as
|
|
14
|
-
const
|
|
12
|
+
import { i as at } from "./animationData-CJQE6_nu.js";
|
|
13
|
+
import { O as ot } from "./MTLLoader-BL2uYkTJ.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,61 +147,61 @@ ${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
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
207
|
_: 1,
|
|
@@ -210,36 +210,36 @@ ${R.value.join(" ")}
|
|
|
210
210
|
]);
|
|
211
211
|
};
|
|
212
212
|
}
|
|
213
|
-
}),
|
|
213
|
+
}), 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
214
|
key: 0,
|
|
215
215
|
class: "loading-overlay"
|
|
216
|
-
},
|
|
216
|
+
}, At = {
|
|
217
217
|
key: 1,
|
|
218
218
|
class: "brand"
|
|
219
|
-
},
|
|
219
|
+
}, Lt = {
|
|
220
220
|
key: 0,
|
|
221
221
|
class: "brand-item"
|
|
222
|
-
},
|
|
222
|
+
}, Vt = { class: "item-value" }, $t = {
|
|
223
223
|
key: 1,
|
|
224
224
|
class: "brand-item"
|
|
225
|
-
},
|
|
225
|
+
}, Tt = { class: "item-value" }, Ot = {
|
|
226
226
|
key: 2,
|
|
227
227
|
class: "brand-item"
|
|
228
|
-
},
|
|
228
|
+
}, Rt = { class: "item-value" }, St = /* @__PURE__ */ ge({
|
|
229
229
|
__name: "threeSceneViewForCPMPIP",
|
|
230
230
|
props: {
|
|
231
231
|
fileBlobs: { default: () => [] },
|
|
232
232
|
threeData: {}
|
|
233
233
|
},
|
|
234
|
-
setup(
|
|
235
|
-
const f =
|
|
234
|
+
setup(S) {
|
|
235
|
+
const f = S, j = r([]), i = k(() => {
|
|
236
236
|
var e, o;
|
|
237
237
|
return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.csvUrl;
|
|
238
238
|
});
|
|
239
239
|
X(() => i.value, async () => {
|
|
240
240
|
if (console.log("csvUrl", i.value), i.value) {
|
|
241
|
-
const
|
|
242
|
-
j.value =
|
|
241
|
+
const t = await at(i.value);
|
|
242
|
+
j.value = t;
|
|
243
243
|
}
|
|
244
244
|
}, {
|
|
245
245
|
immediate: !0
|
|
@@ -247,67 +247,67 @@ ${R.value.join(" ")}
|
|
|
247
247
|
const T = k(() => {
|
|
248
248
|
var e, o;
|
|
249
249
|
return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.bladeObjUrl;
|
|
250
|
-
}),
|
|
251
|
-
currentModels:
|
|
250
|
+
}), 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), {
|
|
251
|
+
currentModels: N,
|
|
252
252
|
resetView: Z,
|
|
253
253
|
initThreeJS: q,
|
|
254
|
-
handleResize:
|
|
255
|
-
getThreeJSObjects:
|
|
256
|
-
cleanup:
|
|
254
|
+
handleResize: ae,
|
|
255
|
+
getThreeJSObjects: D,
|
|
256
|
+
cleanup: oe,
|
|
257
257
|
setAndFitModels: K,
|
|
258
258
|
axesHelperVisible: a,
|
|
259
|
-
toggleAxesVisibility:
|
|
260
|
-
zoomIn:
|
|
261
|
-
zoomOut:
|
|
262
|
-
} =
|
|
263
|
-
B,
|
|
259
|
+
toggleAxesVisibility: l,
|
|
260
|
+
zoomIn: b,
|
|
261
|
+
zoomOut: A
|
|
262
|
+
} = Ge(c), { loadSceneFromFile: u } = Ze(
|
|
264
263
|
D,
|
|
264
|
+
N,
|
|
265
265
|
h,
|
|
266
266
|
O
|
|
267
|
-
), { isAnimating: m, toggleAnimation: p, stopAnimation:
|
|
268
|
-
|
|
269
|
-
},
|
|
270
|
-
|
|
271
|
-
},
|
|
267
|
+
), { 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 = () => {
|
|
268
|
+
l();
|
|
269
|
+
}, je = (t) => {
|
|
270
|
+
E.value = t, _e();
|
|
271
|
+
}, V = k(() => {
|
|
272
272
|
var e, o;
|
|
273
273
|
return (o = (e = f == null ? void 0 : f.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
|
|
274
274
|
}), ie = k(() => {
|
|
275
275
|
var e;
|
|
276
|
-
return (e =
|
|
276
|
+
return (e = V == null ? void 0 : V.value) == null ? void 0 : e.modelNumber;
|
|
277
277
|
}), re = k(() => {
|
|
278
278
|
var e;
|
|
279
|
-
return (e =
|
|
279
|
+
return (e = V == null ? void 0 : V.value) == null ? void 0 : e.serialNumber;
|
|
280
280
|
}), ue = k(() => {
|
|
281
281
|
var e;
|
|
282
|
-
return (e =
|
|
283
|
-
}),
|
|
284
|
-
C.value = !0, v.value =
|
|
285
|
-
}, ce = (
|
|
286
|
-
d.value = !0, P.value =
|
|
282
|
+
return (e = V == null ? void 0 : V.value) == null ? void 0 : e.manufacturer;
|
|
283
|
+
}), Ae = k(() => ie.value || re.value || ue.value), Le = k(() => F.value === pe.ROBOT), Q = (t) => {
|
|
284
|
+
C.value = !0, v.value = t, t === "剖面视图" && !se.value && ye();
|
|
285
|
+
}, ce = (t) => {
|
|
286
|
+
d.value = !0, P.value = t;
|
|
287
287
|
}, Ve = () => {
|
|
288
|
-
var
|
|
289
|
-
(
|
|
288
|
+
var t;
|
|
289
|
+
(t = M.value) == null || t.handlePlayPause();
|
|
290
290
|
}, $e = () => {
|
|
291
|
-
var
|
|
292
|
-
(
|
|
293
|
-
},
|
|
294
|
-
var
|
|
295
|
-
(
|
|
296
|
-
},
|
|
297
|
-
const e =
|
|
291
|
+
var t;
|
|
292
|
+
(t = M.value) == null || t.pauseAnimation();
|
|
293
|
+
}, Te = () => {
|
|
294
|
+
var t;
|
|
295
|
+
(t = M.value) == null || t.stopAnimation();
|
|
296
|
+
}, Oe = (t, e) => nt(t, e), Re = async (t) => {
|
|
297
|
+
const e = Oe(t, R.value);
|
|
298
298
|
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,
|
|
299
|
+
const o = await bt(T.value);
|
|
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, ne.value = o;
|
|
301
301
|
} else
|
|
302
302
|
R.value && console.warn(`在 Blade '${R.value}' 中未找到可替换的网格或其没有父级。`);
|
|
303
303
|
};
|
|
304
|
-
X(() => f.fileBlobs, (
|
|
305
|
-
if (
|
|
306
|
-
const e =
|
|
304
|
+
X(() => f.fileBlobs, (t) => {
|
|
305
|
+
if (t && t.length > 0) {
|
|
306
|
+
const e = t[0];
|
|
307
307
|
if (!e.name.toLowerCase().endsWith(".urdf"))
|
|
308
308
|
return;
|
|
309
309
|
u(e).then((o) => {
|
|
310
|
-
w.value = o, o &&
|
|
310
|
+
w.value = o, o && Re(o);
|
|
311
311
|
}).catch((o) => {
|
|
312
312
|
console.error("加载URDF文件时发生错误:", o), _.error("加载urdf模型失败"), w.value = null;
|
|
313
313
|
});
|
|
@@ -316,31 +316,31 @@ ${R.value.join(" ")}
|
|
|
316
316
|
}, {
|
|
317
317
|
immediate: !0,
|
|
318
318
|
deep: !0
|
|
319
|
-
}), X(w, (
|
|
320
|
-
K(
|
|
319
|
+
}), X(w, (t) => {
|
|
320
|
+
K(t ? [t] : []), ke();
|
|
321
321
|
});
|
|
322
|
-
const
|
|
322
|
+
const Se = () => {
|
|
323
323
|
q(), me(() => {
|
|
324
|
-
c.value && (
|
|
324
|
+
c.value && (ee = new ResizeObserver(ae), ee.observe(c.value));
|
|
325
325
|
});
|
|
326
|
-
const
|
|
327
|
-
J.value =
|
|
328
|
-
},
|
|
329
|
-
v.value = "", P.value = "",
|
|
326
|
+
const t = D();
|
|
327
|
+
J.value = t.scene;
|
|
328
|
+
}, Fe = () => {
|
|
329
|
+
v.value = "", P.value = "", ee && ee.disconnect(), m.value && H(), oe(), Ue();
|
|
330
330
|
};
|
|
331
|
-
let
|
|
332
|
-
return
|
|
331
|
+
let ee = null;
|
|
332
|
+
return Me(async () => {
|
|
333
333
|
await me();
|
|
334
334
|
try {
|
|
335
|
-
|
|
336
|
-
} catch (
|
|
337
|
-
console.error("Three.js 初始化失败:",
|
|
335
|
+
Se();
|
|
336
|
+
} catch (t) {
|
|
337
|
+
console.error("Three.js 初始化失败:", t), _.error("渲染引擎初始化失败!");
|
|
338
338
|
}
|
|
339
|
-
}),
|
|
340
|
-
|
|
341
|
-
}), (
|
|
342
|
-
const o =
|
|
343
|
-
return
|
|
339
|
+
}), Ee(() => {
|
|
340
|
+
Fe();
|
|
341
|
+
}), (t, e) => {
|
|
342
|
+
const o = G("el-scrollbar"), Ne = G("PipeAnalysisPanel");
|
|
343
|
+
return g(), x("div", gt, [
|
|
344
344
|
I(n("div", {
|
|
345
345
|
ref_key: "threejsContainer",
|
|
346
346
|
ref: c,
|
|
@@ -348,7 +348,7 @@ ${R.value.join(" ")}
|
|
|
348
348
|
}, null, 512), [
|
|
349
349
|
[W, Le.value]
|
|
350
350
|
]),
|
|
351
|
-
n("div",
|
|
351
|
+
n("div", ht, [
|
|
352
352
|
s(y, {
|
|
353
353
|
name: "viewReset",
|
|
354
354
|
size: "24",
|
|
@@ -359,13 +359,13 @@ ${R.value.join(" ")}
|
|
|
359
359
|
name: "fangda",
|
|
360
360
|
size: "24",
|
|
361
361
|
title: "放大",
|
|
362
|
-
onClick: z(
|
|
362
|
+
onClick: z(b)
|
|
363
363
|
}, null, 8, ["onClick"]),
|
|
364
364
|
s(y, {
|
|
365
365
|
name: "suoxiao",
|
|
366
366
|
size: "24",
|
|
367
367
|
title: "缩小",
|
|
368
|
-
onClick: z(
|
|
368
|
+
onClick: z(A)
|
|
369
369
|
}, null, 8, ["onClick"]),
|
|
370
370
|
s(y, {
|
|
371
371
|
name: "lookAround",
|
|
@@ -377,39 +377,39 @@ ${R.value.join(" ")}
|
|
|
377
377
|
name: "zuobiaoxi",
|
|
378
378
|
size: "24",
|
|
379
379
|
active: z(a),
|
|
380
|
-
onClick:
|
|
380
|
+
onClick: xe,
|
|
381
381
|
title: "显隐坐标轴"
|
|
382
382
|
}, null, 8, ["active"])
|
|
383
383
|
]),
|
|
384
|
-
n("div",
|
|
385
|
-
ve(
|
|
384
|
+
n("div", yt, [
|
|
385
|
+
ve(t.$slots, "button-left", { switchRightPanel: Q }, void 0, !0),
|
|
386
386
|
s(y, {
|
|
387
387
|
name: "jiegoushu",
|
|
388
388
|
size: "24",
|
|
389
|
-
onClick: e[0] || (e[0] = (
|
|
389
|
+
onClick: e[0] || (e[0] = ($) => Q("场景树")),
|
|
390
390
|
active: C.value && v.value === "场景树",
|
|
391
391
|
title: "场景树"
|
|
392
392
|
}, null, 8, ["active"]),
|
|
393
393
|
s(y, {
|
|
394
394
|
name: "clipping",
|
|
395
395
|
size: "24",
|
|
396
|
-
onClick: e[1] || (e[1] = (
|
|
396
|
+
onClick: e[1] || (e[1] = ($) => Q("剖面视图")),
|
|
397
397
|
active: C.value && v.value === "剖面视图",
|
|
398
398
|
title: "剖面视图"
|
|
399
399
|
}, null, 8, ["active"]),
|
|
400
400
|
s(y, {
|
|
401
401
|
name: "donghuafangzhen",
|
|
402
402
|
size: "24",
|
|
403
|
-
onClick: e[2] || (e[2] = (
|
|
403
|
+
onClick: e[2] || (e[2] = ($) => Q("工件树")),
|
|
404
404
|
active: C.value && v.value === "工件树"
|
|
405
405
|
}, null, 8, ["active"])
|
|
406
406
|
]),
|
|
407
|
-
n("div",
|
|
408
|
-
ve(
|
|
407
|
+
n("div", _t, [
|
|
408
|
+
ve(t.$slots, "button-right", { switchRightPanel: ce }, void 0, !0),
|
|
409
409
|
s(y, {
|
|
410
410
|
name: "jichuangxuanze",
|
|
411
411
|
size: "24",
|
|
412
|
-
onClick: e[3] || (e[3] = (
|
|
412
|
+
onClick: e[3] || (e[3] = ($) => ce("机床控制")),
|
|
413
413
|
active: d.value && P.value === "机床控制",
|
|
414
414
|
title: "机床控制"
|
|
415
415
|
}, null, 8, ["active"]),
|
|
@@ -417,11 +417,11 @@ ${R.value.join(" ")}
|
|
|
417
417
|
name: "donghuafangzhen",
|
|
418
418
|
size: "24",
|
|
419
419
|
title: "动画仿真",
|
|
420
|
-
onClick: e[4] || (e[4] = (
|
|
420
|
+
onClick: e[4] || (e[4] = ($) => ce("动画仿真")),
|
|
421
421
|
active: d.value && P.value === "动画仿真"
|
|
422
422
|
}, null, 8, ["active"])
|
|
423
423
|
]),
|
|
424
|
-
n("div",
|
|
424
|
+
n("div", kt, [
|
|
425
425
|
s(y, {
|
|
426
426
|
name: "bofang",
|
|
427
427
|
size: "24",
|
|
@@ -441,37 +441,37 @@ ${R.value.join(" ")}
|
|
|
441
441
|
size: "24",
|
|
442
442
|
backgroundColor: "#ffffff",
|
|
443
443
|
title: "停止",
|
|
444
|
-
onClick:
|
|
444
|
+
onClick: Te
|
|
445
445
|
})
|
|
446
446
|
]),
|
|
447
|
-
I(n("div",
|
|
448
|
-
n("div",
|
|
449
|
-
n("span", null,
|
|
447
|
+
I(n("div", Ct, [
|
|
448
|
+
n("div", Pt, [
|
|
449
|
+
n("span", null, L(v.value), 1),
|
|
450
450
|
n("span", {
|
|
451
451
|
class: "close",
|
|
452
|
-
onClick: e[5] || (e[5] = (
|
|
452
|
+
onClick: e[5] || (e[5] = ($) => C.value = !1)
|
|
453
453
|
}, " X ")
|
|
454
454
|
]),
|
|
455
|
-
n("div",
|
|
455
|
+
n("div", wt, [
|
|
456
456
|
s(o, { height: "100%" }, {
|
|
457
|
-
default:
|
|
458
|
-
var
|
|
457
|
+
default: le(() => {
|
|
458
|
+
var $;
|
|
459
459
|
return [
|
|
460
|
-
v.value === "场景树" ? (
|
|
460
|
+
v.value === "场景树" ? (g(), de(tt, {
|
|
461
461
|
key: 0,
|
|
462
462
|
model: w.value
|
|
463
463
|
}, null, 8, ["model"])) : U("", !0),
|
|
464
|
-
v.value === "剖面视图" ? (
|
|
464
|
+
v.value === "剖面视图" ? (g(), de(We, {
|
|
465
465
|
key: 1,
|
|
466
|
-
value: z(
|
|
467
|
-
onChange:
|
|
466
|
+
value: z(E),
|
|
467
|
+
onChange: je
|
|
468
468
|
}, null, 8, ["value"])) : U("", !0),
|
|
469
|
-
v.value === "工件树" ? (
|
|
469
|
+
v.value === "工件树" ? (g(), de(qe, {
|
|
470
470
|
key: 2,
|
|
471
|
-
model: (
|
|
472
|
-
onVisibleChange: z(
|
|
473
|
-
onUpdatePosition: z(
|
|
474
|
-
onUpdateRotation: z(
|
|
471
|
+
model: ($ = z(Ce)) == null ? void 0 : $.obj,
|
|
472
|
+
onVisibleChange: z(Pe),
|
|
473
|
+
onUpdatePosition: z(we),
|
|
474
|
+
onUpdateRotation: z(ze)
|
|
475
475
|
}, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : U("", !0)
|
|
476
476
|
];
|
|
477
477
|
}),
|
|
@@ -481,21 +481,21 @@ ${R.value.join(" ")}
|
|
|
481
481
|
], 512), [
|
|
482
482
|
[W, C.value]
|
|
483
483
|
]),
|
|
484
|
-
I(n("div",
|
|
485
|
-
n("div",
|
|
486
|
-
n("span", null,
|
|
484
|
+
I(n("div", zt, [
|
|
485
|
+
n("div", Ut, [
|
|
486
|
+
n("span", null, L(P.value), 1),
|
|
487
487
|
n("span", {
|
|
488
488
|
class: "close",
|
|
489
|
-
onClick: e[6] || (e[6] = (
|
|
489
|
+
onClick: e[6] || (e[6] = ($) => d.value = !1)
|
|
490
490
|
}, " X ")
|
|
491
491
|
]),
|
|
492
|
-
n("div",
|
|
492
|
+
n("div", xt, [
|
|
493
493
|
s(o, { height: "100%" }, {
|
|
494
|
-
default:
|
|
495
|
-
I(s(
|
|
494
|
+
default: le(() => [
|
|
495
|
+
I(s(lt, { model: w.value }, null, 8, ["model"]), [
|
|
496
496
|
[W, P.value === "机床控制"]
|
|
497
497
|
]),
|
|
498
|
-
I(s(
|
|
498
|
+
I(s(be, {
|
|
499
499
|
model: w.value,
|
|
500
500
|
scene: J.value,
|
|
501
501
|
xyzbcList: j.value,
|
|
@@ -504,7 +504,7 @@ ${R.value.join(" ")}
|
|
|
504
504
|
}, null, 8, ["model", "scene", "xyzbcList"]), [
|
|
505
505
|
[W, P.value === "动画仿真"]
|
|
506
506
|
]),
|
|
507
|
-
ve(
|
|
507
|
+
ve(t.$slots, "right-panel", { rightPanelType: P.value }, void 0, !0)
|
|
508
508
|
]),
|
|
509
509
|
_: 3
|
|
510
510
|
})
|
|
@@ -512,29 +512,29 @@ ${R.value.join(" ")}
|
|
|
512
512
|
], 512), [
|
|
513
513
|
[W, d.value]
|
|
514
514
|
]),
|
|
515
|
-
h.value ? (
|
|
515
|
+
h.value ? (g(), x("div", jt, [
|
|
516
516
|
e[7] || (e[7] = n("div", { class: "loading-spinner" }, null, -1)),
|
|
517
|
-
n("p", null,
|
|
517
|
+
n("p", null, L(O.value), 1)
|
|
518
518
|
])) : U("", !0),
|
|
519
|
-
|
|
520
|
-
ue.value ? (
|
|
519
|
+
Ae.value ? (g(), x("div", At, [
|
|
520
|
+
ue.value ? (g(), x("div", Lt, [
|
|
521
521
|
e[8] || (e[8] = n("div", { class: "item-label" }, "厂家:", -1)),
|
|
522
|
-
n("div",
|
|
522
|
+
n("div", Vt, L(ue.value), 1)
|
|
523
523
|
])) : U("", !0),
|
|
524
|
-
ie.value ? (
|
|
524
|
+
ie.value ? (g(), x("div", $t, [
|
|
525
525
|
e[9] || (e[9] = n("div", { class: "item-label" }, "型号:", -1)),
|
|
526
|
-
n("div",
|
|
526
|
+
n("div", Tt, L(ie.value), 1)
|
|
527
527
|
])) : U("", !0),
|
|
528
|
-
re.value ? (
|
|
528
|
+
re.value ? (g(), x("div", Ot, [
|
|
529
529
|
e[10] || (e[10] = n("div", { class: "item-label" }, "编号:", -1)),
|
|
530
|
-
n("div",
|
|
530
|
+
n("div", Rt, L(re.value), 1)
|
|
531
531
|
])) : U("", !0)
|
|
532
532
|
])) : U("", !0),
|
|
533
|
-
s(
|
|
533
|
+
s(Ne, { ref: "pipeAnalysisPanelRef" }, null, 512)
|
|
534
534
|
]);
|
|
535
535
|
};
|
|
536
536
|
}
|
|
537
|
-
}),
|
|
537
|
+
}), Zt = /* @__PURE__ */ he(St, [["__scopeId", "data-v-54d53d1f"]]);
|
|
538
538
|
export {
|
|
539
|
-
|
|
539
|
+
Zt as default
|
|
540
540
|
};
|