ss-component-new 1.2.57 → 1.2.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animationData-CEkMmPAJ.js +111 -0
- package/dist/animationData-FLuoH13j.cjs +1 -0
- package/dist/{iconfont-Du5a0yIR.js → iconfont-Dp3iGl32.js} +318 -244
- package/dist/iconfont-ji7A-_XJ.cjs +1 -0
- package/dist/icons/svg/CopyAddMenu.svg +1 -0
- package/dist/icons/svg/DeleteMenu.svg +1 -0
- package/dist/icons/svg/FixedMenu.svg +1 -0
- package/dist/icons/svg//345/273/272/346/250/241/345/210/206/346/236/220.svg +1 -0
- package/dist/icons/svg//347/256/227/346/263/225.svg +1 -1
- package/dist/{index-BMMCYEsB.js → index--qwZeW47.js} +1 -1
- package/dist/{index-DtlFU8RR.cjs → index-B1U77nyf.cjs} +1 -1
- package/dist/index-BEfSpHE6.js +17 -0
- package/dist/{index-CEkY4nFt.js → index-BFHCLxvz.js} +1 -1
- package/dist/index-BN4opOSk.cjs +1 -0
- package/dist/{index-B55haWsS.js → index-BNES2eKm.js} +1 -1
- package/dist/{index-kXlrQUA8.js → index-BTwRUubF.js} +2 -2
- package/dist/{index-DmfzZIKw.cjs → index-BYIlecoJ.cjs} +1 -1
- package/dist/{index-D0NMKMU8.cjs → index-BgwYXT31.cjs} +1 -1
- package/dist/{index-hL7adbcf.js → index-BiUFu7a_.js} +1500 -1636
- package/dist/{index-DYopbovE.js → index-BooTgcW2.js} +1633 -1632
- package/dist/{index-CJVA_tHw.cjs → index-BxEjroD6.cjs} +1 -1
- package/dist/index-C14Eek69.js +32 -0
- package/dist/index-C8IFPtAJ.js +12233 -0
- package/dist/index-C9C84gkB.cjs +1 -0
- package/dist/{index-BO7R6DCb.cjs → index-CDW8XzWT.cjs} +1 -1
- package/dist/index-CHzlphv9.cjs +1 -0
- package/dist/{index-vrO7i-BX.cjs → index-CWG2zhJZ.cjs} +1 -1
- package/dist/{index-DURGsNBh.js → index-ChyicQIl.js} +1 -1
- package/dist/index-D57Bv8co.cjs +1 -0
- package/dist/{index-BPiXU1VF.js → index-DAJoy_Z5.js} +1 -1
- package/dist/{index-DhbAgrix.cjs → index-DIpWkFjh.cjs} +1 -1
- package/dist/index-DLU6Qv3w.cjs +15 -0
- package/dist/{index-BQWUpvXk.js → index-DN40xEbb.js} +2 -2
- package/dist/{index-HsZY-XbO.js → index-DNs7ujiq.js} +1 -1
- package/dist/{index-C8x2JQx7.cjs → index-DXGiAs1G.cjs} +1 -1
- package/dist/{index-D3cFqWf8.js → index-DZQjq0ZR.js} +1 -1
- package/dist/index-DkNldOC0.cjs +1 -0
- package/dist/{index-CgHWXZbW.cjs → index-DuamAhUi.cjs} +1 -1
- package/dist/index-DvgAOa6m.js +2858 -0
- package/dist/{index-By-PfzqJ.js → index-FUWILZwY.js} +16 -16
- package/dist/{index-C9QGZutp.cjs → index-JXXdn01K.cjs} +1 -1
- package/dist/{index-Du-GlV8c.cjs → index-LVKvj2hU.cjs} +1 -1
- package/dist/{index-D2vsFTnY.js → index-OLQpbvuS.js} +6 -6
- package/dist/{index-JGSZNtiO.js → index-YoJfAd5X.js} +1 -1
- package/dist/{index-BgLb2tvo.js → index-bcbWOGXs.js} +3 -3
- package/dist/{index-cOj9uZ5B.cjs → index-gcSJbApQ.cjs} +1 -1
- package/dist/index-lP-_9Gsb.cjs +1 -0
- package/dist/index-qDBAJZN2.cjs +1 -0
- package/dist/{index-GShz2NEi.js → index-rPWz6KHn.js} +2 -2
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Bff2sYnQ.cjs +37 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DkxmFS5P.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-D6uh0ooh.js} +10026 -10039
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-DlyCfLDJ.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_b00cbae2_lang-Dt5lXvbN.js +195 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-BEmLh6pe.js → index.vue_vue_type_style_index_1_lang-BUhvhTqt.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-Dsas9C9w.cjs → index.vue_vue_type_style_index_1_lang-DDYxgdQk.cjs} +1 -1
- package/dist/{main-B59ixZA7.js → main-ChUyYPuq.js} +2 -2
- package/dist/{main-B3gx12Xo.cjs → main-D-bdppOV.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-CxRJigCx.cjs → threeModel-CDFo3As-.cjs} +1 -1
- package/dist/{threeModel-ardn7Q2K.js → threeModel-DcuAlWjb.js} +2 -2
- package/dist/{threePreview-L8T-JdQL.js → threePreview-DhMkG1np.js} +350 -380
- package/dist/threePreview-q4R-oAs6.cjs +1 -0
- package/dist/threeSceneView-CAsVH82L.cjs +5 -0
- package/dist/threeSceneView-Dav7AGkH.js +1288 -0
- package/dist/threeSceneViewForCPMPIP-9__8NGa5.cjs +5 -0
- package/dist/threeSceneViewForCPMPIP-DxFYivgN.js +599 -0
- package/dist/threeTrackPathView-B7yrSLKq.cjs +370 -0
- package/dist/{threeTrackPathView-gTDb6Ckq.js → threeTrackPathView-DXCMl3aZ.js} +307 -376
- package/dist/{xlsx-ByPOQ6N_.js → threeViewerHost-BNnzz6WM.js} +4414 -4032
- package/dist/threeViewerHost-D70yS3z2.cjs +104 -0
- package/dist/{workpieceTreePanel-GlMrvoGI.js → workpieceTreePanel-CCbVIIlm.js} +92 -101
- package/dist/workpieceTreePanel-KdP9UaVe.cjs +1 -0
- package/package.json +1 -1
- package/public/icons/svg/CopyAddMenu.svg +1 -0
- package/public/icons/svg/DeleteMenu.svg +1 -0
- package/public/icons/svg/FixedMenu.svg +1 -0
- package/public/icons/svg//345/273/272/346/250/241/345/210/206/346/236/220.svg +1 -0
- package/public/icons/svg//347/256/227/346/263/225.svg +1 -1
- package/dist/animationData-CSjRG83z.cjs +0 -1
- package/dist/animationData-DgukZCiZ.js +0 -69
- package/dist/dataUtil-Bg8jgTaT.js +0 -52
- package/dist/dataUtil-CflXOlIl.cjs +0 -1
- package/dist/fileUtil-CVIZ039M.js +0 -99
- package/dist/fileUtil-DugRTZPB.cjs +0 -1
- package/dist/iconfont-BUDQryy4.cjs +0 -1
- package/dist/index-BAkz3vaY.js +0 -12229
- package/dist/index-BE76NHis.js +0 -2848
- package/dist/index-CXGkiovm.cjs +0 -1
- package/dist/index-CaV-J52G.cjs +0 -1
- package/dist/index-D4y4pCNq.cjs +0 -1
- package/dist/index-DKQuP1UM.cjs +0 -1
- package/dist/index-DhPNGzbc.cjs +0 -1
- package/dist/index-fw0RZg-d.cjs +0 -15
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-til9urRl.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_0_scoped_92477073_lang-5Hi_RNl1.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_92477073_lang-DIFWhOl8.js +0 -212
- package/dist/threePreview-5-O-sZIc.cjs +0 -1
- package/dist/threeSceneView-BYl4rYgi.js +0 -1369
- package/dist/threeSceneView-igg9HZ8X.cjs +0 -5
- package/dist/threeSceneViewForCPMPIP-C-o-rOZ9.js +0 -662
- package/dist/threeSceneViewForCPMPIP-DfPj5iau.cjs +0 -5
- package/dist/threeTrackPathView-CgjLFXmL.cjs +0 -370
- package/dist/threeViewerHost-DvAkN_z-.js +0 -322
- package/dist/threeViewerHost-PGblwq3d.cjs +0 -1
- package/dist/workpieceTreePanel-Cr4nTOQE.cjs +0 -1
- package/dist/xlsx-BPHygxEf.cjs +0 -104
|
@@ -1,662 +0,0 @@
|
|
|
1
|
-
import { defineComponent as we, ref as u, computed as U, watch as Z, onUnmounted as He, resolveComponent as q, createElementBlock as M, openBlock as z, createElementVNode as l, createCommentVNode as G, createVNode as i, toDisplayString as B, Fragment as Ke, 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 { b1 as Qe } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BZPnZF-N.js";
|
|
3
|
-
import { U as et, s as ke, u as tt, a as lt, W as at } from "./workpieceTreePanel-GlMrvoGI.js";
|
|
4
|
-
import { u as nt, a as ot, b as st } from "./iconfont-Du5a0yIR.js";
|
|
5
|
-
import { c as it, E as y } from "./index-DsSA-OiE.js";
|
|
6
|
-
import { _ as pe } from "./index-DlClEW8i.js";
|
|
7
|
-
import { g as ut, b as rt, U as dt, J as ct, d as vt } from "./urdfTree-3Jd59vvU.js";
|
|
8
|
-
import { _ as Ce } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
|
-
import { T as h } from "./svgIcon-D-_fXUBL.js";
|
|
10
|
-
import { i as pt } from "./animationData-DgukZCiZ.js";
|
|
11
|
-
import { O as mt } from "./MTLLoader-Bl6JMZD-.js";
|
|
12
|
-
import { L as ft, j as gt } from "./index-BAkz3vaY.js";
|
|
13
|
-
const bt = { class: "panel-content" }, ht = { class: "action-bar" }, yt = {
|
|
14
|
-
key: 0,
|
|
15
|
-
class: "animation-controls"
|
|
16
|
-
}, kt = { class: "control-row" }, Pt = { class: "control-row" }, wt = { class: "frame-info" }, Ct = { class: "control-row" }, xt = {
|
|
17
|
-
key: 1,
|
|
18
|
-
class: "empty-state"
|
|
19
|
-
}, _t = { class: "dialog-footer" }, $t = /* @__PURE__ */ we({
|
|
20
|
-
__name: "urdfAnimationPanel",
|
|
21
|
-
props: {
|
|
22
|
-
model: {},
|
|
23
|
-
scene: {},
|
|
24
|
-
xyzbcList: {}
|
|
25
|
-
},
|
|
26
|
-
setup(E, { expose: Q }) {
|
|
27
|
-
const T = E, n = u([]), V = u(!1), L = u(""), f = u("stopped"), p = u(0), x = u(0), J = u(10), D = u(null);
|
|
28
|
-
let k = 0;
|
|
29
|
-
const ee = u([]), R = U(() => T.model ? ut(T.model).map((g) => g.name) : []), j = U(() => [...R.value]), ce = U(() => j.value.length > 0 ? `请按以下格式粘贴数据 (第一行为表头,使用 Tab 分隔):
|
|
30
|
-
${j.value.join(" ")}
|
|
31
|
-
0 0 0 ...
|
|
32
|
-
1 2 3 ...` : "请先加载模型。"), X = U(() => n.value[p.value] || {});
|
|
33
|
-
Z(() => T.model, (s) => {
|
|
34
|
-
s ? (D.value = new et(s), ee.value = rt(s), p.value = 0) : (D.value = null, ee.value = []);
|
|
35
|
-
}, { immediate: !0 });
|
|
36
|
-
const H = (s) => {
|
|
37
|
-
if (s < 0 || s >= n.value.length) {
|
|
38
|
-
console.error(`帧索引 ${s} 超出范围`);
|
|
39
|
-
return;
|
|
40
|
-
}
|
|
41
|
-
const a = n.value[s];
|
|
42
|
-
if (D.value) {
|
|
43
|
-
const g = {};
|
|
44
|
-
R.value.forEach((C) => {
|
|
45
|
-
const r = parseFloat(a[C]);
|
|
46
|
-
isNaN(r) || (g[C] = r);
|
|
47
|
-
}), D.value.setJointAngles(g);
|
|
48
|
-
}
|
|
49
|
-
p.value = s, x.value = n.value.length > 1 ? s / (n.value.length - 1) * 100 : 100;
|
|
50
|
-
}, oe = async (s) => {
|
|
51
|
-
try {
|
|
52
|
-
for (let a = p.value; a < n.value.length; a++) {
|
|
53
|
-
if (s !== k) return;
|
|
54
|
-
const g = n.value[a], C = {};
|
|
55
|
-
if (D.value)
|
|
56
|
-
R.value.forEach((r) => {
|
|
57
|
-
const c = parseFloat(g[r]);
|
|
58
|
-
isNaN(c) || (C[r] = c);
|
|
59
|
-
}), await D.value.animateToState(
|
|
60
|
-
C,
|
|
61
|
-
J.value,
|
|
62
|
-
(r) => {
|
|
63
|
-
s === k && (x.value = (a + r) / n.value.length * 100);
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
else {
|
|
67
|
-
if (await new Promise((r) => setTimeout(r, J.value)), s !== k) return;
|
|
68
|
-
x.value = (a + 1) / n.value.length * 100;
|
|
69
|
-
}
|
|
70
|
-
p.value = a;
|
|
71
|
-
}
|
|
72
|
-
s === k && (y.success("动画播放完成"), f.value = "stopped", x.value = 100);
|
|
73
|
-
} catch (a) {
|
|
74
|
-
console.error("动画播放出错:", a), y.error("动画播放出错"), f.value = "stopped";
|
|
75
|
-
}
|
|
76
|
-
}, A = () => {
|
|
77
|
-
if (n.value.length === 0) {
|
|
78
|
-
y.error("无动画数据");
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
f.value === "stopped" && (p.value = 0, H(0)), f.value = "playing", k++, oe(k), y.info("动画播放中");
|
|
82
|
-
}, P = () => {
|
|
83
|
-
f.value === "playing" && (k++, f.value = "paused", y.info("动画已暂停"));
|
|
84
|
-
}, O = () => {
|
|
85
|
-
k++, f.value = "stopped", p.value = 0, x.value = 0, H(0), y.info("动画已停止并重置");
|
|
86
|
-
}, _ = () => {
|
|
87
|
-
f.value === "playing" ? P() : A();
|
|
88
|
-
}, te = (s) => {
|
|
89
|
-
k++, f.value = "paused", H(s);
|
|
90
|
-
}, le = () => {
|
|
91
|
-
if (!L.value.trim()) {
|
|
92
|
-
y.warning("导入内容不能为空");
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
const s = L.value.trim().split(`
|
|
96
|
-
`).filter((c) => c.trim() !== "");
|
|
97
|
-
if (s.length < 2) {
|
|
98
|
-
y.error("导入数据至少需要包含表头行和一行数据");
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
|
-
const a = s[0].split(" ").map((c) => c.trim()), g = {};
|
|
102
|
-
if (a.forEach((c, m) => {
|
|
103
|
-
j.value.includes(c) && (g[m] = c);
|
|
104
|
-
}), Object.keys(g).length === 0) {
|
|
105
|
-
y.error("没有找到匹配的表头,请检查表头名称是否正确");
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
const r = s.slice(1).map((c) => {
|
|
109
|
-
const m = c.split(" "), S = {};
|
|
110
|
-
return j.value.forEach((K) => {
|
|
111
|
-
S[K] = "0";
|
|
112
|
-
}), Object.entries(g).forEach(([K, I]) => {
|
|
113
|
-
const ae = m[parseInt(K)];
|
|
114
|
-
ae !== void 0 && ae.trim() !== "" && (S[I] = ae.trim());
|
|
115
|
-
}), S;
|
|
116
|
-
});
|
|
117
|
-
r.length > 0 ? (n.value = r, y.success(`成功导入 ${r.length} 行数据!`), V.value = !1, L.value = "", O()) : y.error("未能解析到有效数据,请检查格式。");
|
|
118
|
-
};
|
|
119
|
-
Z(() => T.xyzbcList, () => {
|
|
120
|
-
T.xyzbcList && (n.value = it(T.xyzbcList));
|
|
121
|
-
}, {
|
|
122
|
-
immediate: !0
|
|
123
|
-
});
|
|
124
|
-
const N = (s) => `第 ${s + 1} 帧`;
|
|
125
|
-
return Q({
|
|
126
|
-
handlePlayPause: _,
|
|
127
|
-
playAnimation: A,
|
|
128
|
-
pauseAnimation: P,
|
|
129
|
-
stopAnimation: O
|
|
130
|
-
}), He(() => {
|
|
131
|
-
k++;
|
|
132
|
-
}), (s, a) => {
|
|
133
|
-
const g = q("el-input-number"), C = q("el-slider"), r = q("el-input"), c = q("el-dialog");
|
|
134
|
-
return z(), M("div", bt, [
|
|
135
|
-
l("div", ht, [
|
|
136
|
-
i(pe, {
|
|
137
|
-
onClick: a[0] || (a[0] = (m) => V.value = !0),
|
|
138
|
-
disabled: j.value.length === 0,
|
|
139
|
-
modelValue: "导入数据"
|
|
140
|
-
}, null, 8, ["disabled"])
|
|
141
|
-
]),
|
|
142
|
-
n.value.length > 0 ? (z(), M("div", yt, [
|
|
143
|
-
l("div", kt, [
|
|
144
|
-
a[6] || (a[6] = l("label", null, "帧间隔 (ms):", -1)),
|
|
145
|
-
i(g, {
|
|
146
|
-
modelValue: J.value,
|
|
147
|
-
"onUpdate:modelValue": a[1] || (a[1] = (m) => J.value = m),
|
|
148
|
-
min: 10,
|
|
149
|
-
max: 5e3,
|
|
150
|
-
step: 100,
|
|
151
|
-
size: "small",
|
|
152
|
-
style: { width: "120px" }
|
|
153
|
-
}, null, 8, ["modelValue"])
|
|
154
|
-
]),
|
|
155
|
-
l("div", Pt, [
|
|
156
|
-
a[7] || (a[7] = l("label", null, "当前帧:", -1)),
|
|
157
|
-
l("span", wt, B(p.value + 1) + " / " + B(n.value.length), 1)
|
|
158
|
-
]),
|
|
159
|
-
l("div", Ct, [
|
|
160
|
-
a[8] || (a[8] = l("label", null, "动画进度:", -1)),
|
|
161
|
-
i(C, {
|
|
162
|
-
modelValue: p.value,
|
|
163
|
-
"onUpdate:modelValue": a[2] || (a[2] = (m) => p.value = m),
|
|
164
|
-
min: 0,
|
|
165
|
-
max: n.value.length > 0 ? n.value.length - 1 : 0,
|
|
166
|
-
step: 1,
|
|
167
|
-
"format-tooltip": N,
|
|
168
|
-
onInput: te,
|
|
169
|
-
disabled: n.value.length === 0 || f.value === "playing",
|
|
170
|
-
style: { "flex-grow": "1", margin: "0 10px" }
|
|
171
|
-
}, null, 8, ["modelValue", "max", "disabled"])
|
|
172
|
-
]),
|
|
173
|
-
l("div", null, [
|
|
174
|
-
a[9] || (a[9] = l("label", null, "当前帧数据:", -1)),
|
|
175
|
-
l("div", null, [
|
|
176
|
-
X.value ? (z(!0), M(Ke, { key: 0 }, We(X.value, (m, S) => (z(), M("div", { key: S }, B(S) + ": " + B(m), 1))), 128)) : G("", !0)
|
|
177
|
-
])
|
|
178
|
-
])
|
|
179
|
-
])) : G("", !0),
|
|
180
|
-
n.value.length === 0 ? (z(), M("div", xt, a[10] || (a[10] = [
|
|
181
|
-
l("p", null, "请先导入数据", -1)
|
|
182
|
-
]))) : G("", !0),
|
|
183
|
-
i(c, {
|
|
184
|
-
modelValue: V.value,
|
|
185
|
-
"onUpdate:modelValue": a[5] || (a[5] = (m) => V.value = m),
|
|
186
|
-
title: "导入数据",
|
|
187
|
-
width: "500px"
|
|
188
|
-
}, {
|
|
189
|
-
footer: ne(() => [
|
|
190
|
-
l("span", _t, [
|
|
191
|
-
i(pe, {
|
|
192
|
-
modelValue: "取消",
|
|
193
|
-
onClick: a[4] || (a[4] = (m) => V.value = !1)
|
|
194
|
-
}),
|
|
195
|
-
i(pe, {
|
|
196
|
-
modelValue: "确认导入",
|
|
197
|
-
onClick: le,
|
|
198
|
-
type: "primary"
|
|
199
|
-
})
|
|
200
|
-
])
|
|
201
|
-
]),
|
|
202
|
-
default: ne(() => [
|
|
203
|
-
a[11] || (a[11] = l("p", { class: "import-instructions" }, " 请从Excel或CSV中复制数据 (首行为表头, Tab分隔) ", -1)),
|
|
204
|
-
i(r, {
|
|
205
|
-
modelValue: L.value,
|
|
206
|
-
"onUpdate:modelValue": a[3] || (a[3] = (m) => L.value = m),
|
|
207
|
-
type: "textarea",
|
|
208
|
-
rows: 10,
|
|
209
|
-
placeholder: ce.value
|
|
210
|
-
}, null, 8, ["modelValue", "placeholder"])
|
|
211
|
-
]),
|
|
212
|
-
_: 1,
|
|
213
|
-
__: [11]
|
|
214
|
-
}, 8, ["modelValue"])
|
|
215
|
-
]);
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
}), 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" }, Lt = { class: "buttonGroup-topLeft" }, jt = { 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 = {
|
|
219
|
-
key: 1,
|
|
220
|
-
class: "clipping-content"
|
|
221
|
-
}, Et = { class: "radio-group" }, Jt = { class: "radio-label" }, It = { class: "radio-label" }, Gt = { class: "radio-label" }, Xt = { class: "radio-label" }, Ht = { class: "right-panel" }, Kt = { class: "panel-header" }, Wt = { class: "panel-body" }, Yt = {
|
|
222
|
-
key: 0,
|
|
223
|
-
class: "loading-overlay"
|
|
224
|
-
}, Zt = /* @__PURE__ */ we({
|
|
225
|
-
__name: "threeSceneViewForCPMPIP",
|
|
226
|
-
props: {
|
|
227
|
-
fileBlobs: { default: () => [] },
|
|
228
|
-
threeData: {}
|
|
229
|
-
},
|
|
230
|
-
emits: ["getAnimationData", "getThreeData"],
|
|
231
|
-
setup(E, { emit: Q }) {
|
|
232
|
-
const T = Q, n = E, V = he("setManagementPageTitle"), L = he("setManagementPageVisible"), f = U(() => {
|
|
233
|
-
var e, o;
|
|
234
|
-
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.machine;
|
|
235
|
-
}), p = U(() => {
|
|
236
|
-
var e, o;
|
|
237
|
-
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.workpieceInfo;
|
|
238
|
-
}), x = U(() => {
|
|
239
|
-
var e, o;
|
|
240
|
-
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.knife;
|
|
241
|
-
}), J = u([]), D = async (t) => {
|
|
242
|
-
!t || !t.isExtra || (await k(t), V == null || V(t == null ? void 0 : t.pageName), L == null || L(!0));
|
|
243
|
-
}, k = ft(async (t) => {
|
|
244
|
-
await gt();
|
|
245
|
-
const { mainKey: e, baseMenuPath: o } = t || {};
|
|
246
|
-
Qe(o, e);
|
|
247
|
-
}, 500);
|
|
248
|
-
Z(
|
|
249
|
-
() => [f.value, p.value, x.value],
|
|
250
|
-
() => {
|
|
251
|
-
var b, v, ge, be;
|
|
252
|
-
const t = [], e = {
|
|
253
|
-
pageName: "机床",
|
|
254
|
-
name: "机床",
|
|
255
|
-
label: "机床",
|
|
256
|
-
type: "机床",
|
|
257
|
-
id: "机床",
|
|
258
|
-
path: "机床",
|
|
259
|
-
baseMenuPath: "设备库/机床",
|
|
260
|
-
children: [],
|
|
261
|
-
show: !0,
|
|
262
|
-
isPenultimate: !1
|
|
263
|
-
};
|
|
264
|
-
f.value && e.children.push({
|
|
265
|
-
isExtra: !0,
|
|
266
|
-
pageName: "机床",
|
|
267
|
-
mainKey: f.value,
|
|
268
|
-
label: f.value,
|
|
269
|
-
baseMenuPath: "设备库/机床"
|
|
270
|
-
});
|
|
271
|
-
const o = {
|
|
272
|
-
pageName: "工件",
|
|
273
|
-
name: "工件",
|
|
274
|
-
label: "工件",
|
|
275
|
-
type: "工件",
|
|
276
|
-
id: "工件",
|
|
277
|
-
path: "工件",
|
|
278
|
-
baseMenuPath: "设备库/机床",
|
|
279
|
-
children: [],
|
|
280
|
-
show: !0,
|
|
281
|
-
isPenultimate: !1
|
|
282
|
-
};
|
|
283
|
-
p.value && o.children.push({
|
|
284
|
-
isExtra: !0,
|
|
285
|
-
type: (b = p.value) == null ? void 0 : b.type,
|
|
286
|
-
pageName: "工件",
|
|
287
|
-
mainKey: (v = p.value) == null ? void 0 : v.name,
|
|
288
|
-
label: (ge = p.value) == null ? void 0 : ge.name,
|
|
289
|
-
baseMenuPath: `工件库/${(be = p.value) == null ? void 0 : be.type}`
|
|
290
|
-
});
|
|
291
|
-
const ie = {
|
|
292
|
-
pageName: "刀具",
|
|
293
|
-
name: "刀具",
|
|
294
|
-
label: "刀具",
|
|
295
|
-
type: "刀具",
|
|
296
|
-
id: "刀具",
|
|
297
|
-
path: "刀具",
|
|
298
|
-
children: [],
|
|
299
|
-
show: !0,
|
|
300
|
-
isPenultimate: !1
|
|
301
|
-
};
|
|
302
|
-
x.value && ie.children.push({
|
|
303
|
-
isExtra: !0,
|
|
304
|
-
pageName: "刀具",
|
|
305
|
-
mainKey: x.value,
|
|
306
|
-
label: x.value,
|
|
307
|
-
baseMenuPath: "设备库/刀具"
|
|
308
|
-
}), t.push(e, o, ie), J.value = t;
|
|
309
|
-
},
|
|
310
|
-
{
|
|
311
|
-
immediate: !0
|
|
312
|
-
}
|
|
313
|
-
);
|
|
314
|
-
const ee = u([]), R = U(() => {
|
|
315
|
-
var e, o;
|
|
316
|
-
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.csvUrl;
|
|
317
|
-
});
|
|
318
|
-
Z(() => R.value, async () => {
|
|
319
|
-
if (console.log("three data", n == null ? void 0 : n.threeData), console.log("csvUrl", R.value), R.value) {
|
|
320
|
-
const t = await pt(R.value);
|
|
321
|
-
ee.value = t;
|
|
322
|
-
}
|
|
323
|
-
}, {
|
|
324
|
-
immediate: !0
|
|
325
|
-
});
|
|
326
|
-
const j = U(() => {
|
|
327
|
-
var e, o;
|
|
328
|
-
return (o = (e = n == null ? void 0 : n.threeData) == null ? void 0 : e.data) == null ? void 0 : o.bladeObjUrl;
|
|
329
|
-
}), ce = u(ke.ROBOT), X = u(null), H = 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), {
|
|
330
|
-
currentModels: c,
|
|
331
|
-
resetView: m,
|
|
332
|
-
initThreeJS: S,
|
|
333
|
-
handleResize: K,
|
|
334
|
-
getThreeJSObjects: I,
|
|
335
|
-
cleanup: ae,
|
|
336
|
-
setModels: me,
|
|
337
|
-
axesHelperVisible: xe,
|
|
338
|
-
toggleAxesVisibility: _e
|
|
339
|
-
} = nt(X), { loadSceneFromFile: $e } = lt(
|
|
340
|
-
I,
|
|
341
|
-
c,
|
|
342
|
-
H,
|
|
343
|
-
oe
|
|
344
|
-
), { isAnimating: fe, toggleAnimation: Ue, stopAnimation: ze } = ot(I, c), { isClipping: Te, activeClippingAxis: w, toggleClipping: Ve, updateClippingPlanes: F } = st(I, c), { initRaycaster: Le, selectedObject3D: je, setSelectedObjVisible: Ae, updatePosition: Ne, updateRotation: De, dispose: Re } = tt(X, I, c), Oe = () => {
|
|
345
|
-
_e();
|
|
346
|
-
}, Se = U(() => ce.value === ke.ROBOT), Fe = (t) => {
|
|
347
|
-
le.value = t, te.value = !0;
|
|
348
|
-
}, se = (t) => {
|
|
349
|
-
A.value = !0, P.value = t, t === "剖面视图" && !Te.value && Ve();
|
|
350
|
-
}, ve = (t) => {
|
|
351
|
-
O.value = !0, _.value = t, t === "动画仿真" && T("getAnimationData");
|
|
352
|
-
}, Me = () => {
|
|
353
|
-
var t;
|
|
354
|
-
(t = r.value) == null || t.handlePlayPause();
|
|
355
|
-
}, Be = () => {
|
|
356
|
-
var t;
|
|
357
|
-
(t = r.value) == null || t.pauseAnimation();
|
|
358
|
-
}, Ee = () => {
|
|
359
|
-
var t;
|
|
360
|
-
(t = r.value) == null || t.stopAnimation();
|
|
361
|
-
}, Je = (t, e) => vt(t, e), Ie = async (t) => {
|
|
362
|
-
const e = Je(t, s.value);
|
|
363
|
-
if (g.value = e, console.log("bladeObjUrl", j.value), e && e.parent && j.value) {
|
|
364
|
-
const o = await zt(j.value);
|
|
365
|
-
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;
|
|
366
|
-
} else
|
|
367
|
-
s.value && console.warn(`在 Blade '${s.value}' 中未找到可替换的网格或其没有父级。`);
|
|
368
|
-
};
|
|
369
|
-
Z(() => n.fileBlobs, (t) => {
|
|
370
|
-
if (t && t.length > 0) {
|
|
371
|
-
const e = t[0];
|
|
372
|
-
if (!e.name.toLowerCase().endsWith(".urdf"))
|
|
373
|
-
return;
|
|
374
|
-
$e(e).then((o) => {
|
|
375
|
-
N.value = o, o && Ie(o);
|
|
376
|
-
}).catch((o) => {
|
|
377
|
-
console.error("加载URDF文件时发生错误:", o), y.error("加载urdf模型失败"), N.value = null;
|
|
378
|
-
});
|
|
379
|
-
} else
|
|
380
|
-
N.value = null;
|
|
381
|
-
}, {
|
|
382
|
-
immediate: !0,
|
|
383
|
-
deep: !0
|
|
384
|
-
}), Z(N, (t) => {
|
|
385
|
-
me(t ? [t] : []), Le();
|
|
386
|
-
});
|
|
387
|
-
const Ge = () => {
|
|
388
|
-
S(), window.addEventListener("resize", K);
|
|
389
|
-
const t = I();
|
|
390
|
-
C.value = t.scene;
|
|
391
|
-
}, Xe = () => {
|
|
392
|
-
P.value = "", _.value = "", window.removeEventListener("resize", K), fe.value && ze(), ae(), Re();
|
|
393
|
-
};
|
|
394
|
-
return Ye(async () => {
|
|
395
|
-
await Ze();
|
|
396
|
-
try {
|
|
397
|
-
Ge();
|
|
398
|
-
} catch (t) {
|
|
399
|
-
console.error("Three.js 初始化失败:", t), y.error("渲染引擎初始化失败!");
|
|
400
|
-
}
|
|
401
|
-
}), qe(() => {
|
|
402
|
-
Xe();
|
|
403
|
-
}), (t, e) => {
|
|
404
|
-
const o = q("el-scrollbar"), ie = q("PipeAnalysisPanel");
|
|
405
|
-
return z(), M("div", Tt, [
|
|
406
|
-
$(l("div", {
|
|
407
|
-
ref_key: "threejsContainer",
|
|
408
|
-
ref: X,
|
|
409
|
-
class: "threejs-container"
|
|
410
|
-
}, null, 512), [
|
|
411
|
-
[W, Se.value]
|
|
412
|
-
]),
|
|
413
|
-
l("div", Vt, [
|
|
414
|
-
Y(t.$slots, "button-top", { switchTopPanel: Fe }, void 0, !0),
|
|
415
|
-
Y(t.$slots, "logout", {}, void 0, !0)
|
|
416
|
-
]),
|
|
417
|
-
l("div", Lt, [
|
|
418
|
-
i(h, {
|
|
419
|
-
name: "viewReset",
|
|
420
|
-
size: "24",
|
|
421
|
-
onClick: d(m),
|
|
422
|
-
title: "重置"
|
|
423
|
-
}, null, 8, ["onClick"]),
|
|
424
|
-
i(h, {
|
|
425
|
-
name: "fangda",
|
|
426
|
-
size: "24",
|
|
427
|
-
title: "放大"
|
|
428
|
-
}),
|
|
429
|
-
i(h, {
|
|
430
|
-
name: "suoxiao",
|
|
431
|
-
size: "24",
|
|
432
|
-
title: "缩小"
|
|
433
|
-
}),
|
|
434
|
-
i(h, {
|
|
435
|
-
name: "lookAround",
|
|
436
|
-
size: "24",
|
|
437
|
-
onClick: d(Ue),
|
|
438
|
-
title: d(fe) ? "停止动画" : "动画视图"
|
|
439
|
-
}, null, 8, ["onClick", "title"]),
|
|
440
|
-
i(h, {
|
|
441
|
-
name: "zuobiaoxi",
|
|
442
|
-
size: "24",
|
|
443
|
-
active: d(xe),
|
|
444
|
-
onClick: Oe,
|
|
445
|
-
title: "显隐坐标轴"
|
|
446
|
-
}, null, 8, ["active"])
|
|
447
|
-
]),
|
|
448
|
-
l("div", jt, [
|
|
449
|
-
Y(t.$slots, "button-left", { switchRightPanel: se }, void 0, !0),
|
|
450
|
-
i(h, {
|
|
451
|
-
name: "jiegoushu",
|
|
452
|
-
size: "24",
|
|
453
|
-
onClick: e[0] || (e[0] = (b) => se("场景树")),
|
|
454
|
-
active: A.value && P.value === "场景树",
|
|
455
|
-
title: "场景树"
|
|
456
|
-
}, null, 8, ["active"]),
|
|
457
|
-
i(h, {
|
|
458
|
-
name: "clipping",
|
|
459
|
-
size: "24",
|
|
460
|
-
onClick: e[1] || (e[1] = (b) => se("剖面视图")),
|
|
461
|
-
active: A.value && P.value === "剖面视图",
|
|
462
|
-
title: "剖面视图"
|
|
463
|
-
}, null, 8, ["active"]),
|
|
464
|
-
i(h, {
|
|
465
|
-
name: "donghuafangzhen",
|
|
466
|
-
size: "24",
|
|
467
|
-
onClick: e[2] || (e[2] = (b) => se("工件树")),
|
|
468
|
-
active: A.value && P.value === "工件树"
|
|
469
|
-
}, null, 8, ["active"])
|
|
470
|
-
]),
|
|
471
|
-
l("div", At, [
|
|
472
|
-
Y(t.$slots, "button-right", { switchRightPanel: ve }, void 0, !0),
|
|
473
|
-
i(h, {
|
|
474
|
-
name: "jichuangxuanze",
|
|
475
|
-
size: "24",
|
|
476
|
-
onClick: e[3] || (e[3] = (b) => ve("机床控制")),
|
|
477
|
-
active: O.value && _.value === "机床控制",
|
|
478
|
-
title: "机床控制"
|
|
479
|
-
}, null, 8, ["active"]),
|
|
480
|
-
i(h, {
|
|
481
|
-
name: "donghuafangzhen",
|
|
482
|
-
size: "24",
|
|
483
|
-
title: "动画仿真",
|
|
484
|
-
onClick: e[4] || (e[4] = (b) => ve("动画仿真")),
|
|
485
|
-
active: O.value && _.value === "动画仿真"
|
|
486
|
-
}, null, 8, ["active"])
|
|
487
|
-
]),
|
|
488
|
-
l("div", Nt, [
|
|
489
|
-
i(h, {
|
|
490
|
-
name: "bofang",
|
|
491
|
-
size: "24",
|
|
492
|
-
backgroundColor: "#ffffff",
|
|
493
|
-
title: "播放",
|
|
494
|
-
onClick: Me
|
|
495
|
-
}),
|
|
496
|
-
i(h, {
|
|
497
|
-
name: "zanting",
|
|
498
|
-
size: "24",
|
|
499
|
-
backgroundColor: "#ffffff",
|
|
500
|
-
title: "暂停",
|
|
501
|
-
onClick: Be
|
|
502
|
-
}),
|
|
503
|
-
i(h, {
|
|
504
|
-
name: "zhongzhi",
|
|
505
|
-
size: "24",
|
|
506
|
-
backgroundColor: "#ffffff",
|
|
507
|
-
title: "停止",
|
|
508
|
-
onClick: Ee
|
|
509
|
-
})
|
|
510
|
-
]),
|
|
511
|
-
$(l("div", Dt, [
|
|
512
|
-
l("div", Rt, [
|
|
513
|
-
l("span", null, B(le.value), 1),
|
|
514
|
-
l("span", {
|
|
515
|
-
class: "close",
|
|
516
|
-
onClick: e[5] || (e[5] = (b) => te.value = !1)
|
|
517
|
-
}, " X ")
|
|
518
|
-
]),
|
|
519
|
-
l("div", Ot, [
|
|
520
|
-
i(o, { height: "100%" }, {
|
|
521
|
-
default: ne(() => [
|
|
522
|
-
Y(t.$slots, "top-panel", { topPanelType: le.value }, void 0, !0)
|
|
523
|
-
]),
|
|
524
|
-
_: 3
|
|
525
|
-
})
|
|
526
|
-
])
|
|
527
|
-
], 512), [
|
|
528
|
-
[W, te.value]
|
|
529
|
-
]),
|
|
530
|
-
$(l("div", St, [
|
|
531
|
-
l("div", Ft, [
|
|
532
|
-
l("span", null, B(P.value), 1),
|
|
533
|
-
l("span", {
|
|
534
|
-
class: "close",
|
|
535
|
-
onClick: e[6] || (e[6] = (b) => A.value = !1)
|
|
536
|
-
}, " X ")
|
|
537
|
-
]),
|
|
538
|
-
l("div", Mt, [
|
|
539
|
-
i(o, { height: "100%" }, {
|
|
540
|
-
default: ne(() => {
|
|
541
|
-
var b;
|
|
542
|
-
return [
|
|
543
|
-
P.value === "场景树" ? (z(), ye(dt, {
|
|
544
|
-
key: 0,
|
|
545
|
-
model: N.value,
|
|
546
|
-
extraNodes: J.value,
|
|
547
|
-
onNodeClick: D
|
|
548
|
-
}, null, 8, ["model", "extraNodes"])) : G("", !0),
|
|
549
|
-
P.value === "剖面视图" ? (z(), M("div", Bt, [
|
|
550
|
-
l("div", Et, [
|
|
551
|
-
l("label", Jt, [
|
|
552
|
-
$(l("input", {
|
|
553
|
-
type: "radio",
|
|
554
|
-
name: "clipping-axis",
|
|
555
|
-
value: "none",
|
|
556
|
-
"onUpdate:modelValue": e[7] || (e[7] = (v) => re(w) ? w.value = v : null),
|
|
557
|
-
onChange: e[8] || (e[8] = //@ts-ignore
|
|
558
|
-
(...v) => d(F) && d(F)(...v))
|
|
559
|
-
}, null, 544), [
|
|
560
|
-
[de, d(w)]
|
|
561
|
-
]),
|
|
562
|
-
e[16] || (e[16] = l("span", { class: "radio-text" }, "无切割", -1))
|
|
563
|
-
]),
|
|
564
|
-
l("label", It, [
|
|
565
|
-
$(l("input", {
|
|
566
|
-
type: "radio",
|
|
567
|
-
name: "clipping-axis",
|
|
568
|
-
value: "x",
|
|
569
|
-
"onUpdate:modelValue": e[9] || (e[9] = (v) => re(w) ? w.value = v : null),
|
|
570
|
-
onChange: e[10] || (e[10] = //@ts-ignore
|
|
571
|
-
(...v) => d(F) && d(F)(...v))
|
|
572
|
-
}, null, 544), [
|
|
573
|
-
[de, d(w)]
|
|
574
|
-
]),
|
|
575
|
-
e[17] || (e[17] = l("span", { class: "radio-text" }, "X轴切割", -1))
|
|
576
|
-
]),
|
|
577
|
-
l("label", Gt, [
|
|
578
|
-
$(l("input", {
|
|
579
|
-
type: "radio",
|
|
580
|
-
name: "clipping-axis",
|
|
581
|
-
value: "y",
|
|
582
|
-
"onUpdate:modelValue": e[11] || (e[11] = (v) => re(w) ? w.value = v : null),
|
|
583
|
-
onChange: e[12] || (e[12] = //@ts-ignore
|
|
584
|
-
(...v) => d(F) && d(F)(...v))
|
|
585
|
-
}, null, 544), [
|
|
586
|
-
[de, d(w)]
|
|
587
|
-
]),
|
|
588
|
-
e[18] || (e[18] = l("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
589
|
-
]),
|
|
590
|
-
l("label", Xt, [
|
|
591
|
-
$(l("input", {
|
|
592
|
-
type: "radio",
|
|
593
|
-
name: "clipping-axis",
|
|
594
|
-
value: "z",
|
|
595
|
-
"onUpdate:modelValue": e[13] || (e[13] = (v) => re(w) ? w.value = v : null),
|
|
596
|
-
onChange: e[14] || (e[14] = //@ts-ignore
|
|
597
|
-
(...v) => d(F) && d(F)(...v))
|
|
598
|
-
}, null, 544), [
|
|
599
|
-
[de, d(w)]
|
|
600
|
-
]),
|
|
601
|
-
e[19] || (e[19] = l("span", { class: "radio-text" }, "Z轴切割", -1))
|
|
602
|
-
])
|
|
603
|
-
])
|
|
604
|
-
])) : G("", !0),
|
|
605
|
-
P.value === "工件树" ? (z(), ye(at, {
|
|
606
|
-
key: 2,
|
|
607
|
-
model: (b = d(je)) == null ? void 0 : b.obj,
|
|
608
|
-
onVisibleChange: d(Ae),
|
|
609
|
-
onUpdatePosition: d(Ne),
|
|
610
|
-
onUpdateRotation: d(De)
|
|
611
|
-
}, null, 8, ["model", "onVisibleChange", "onUpdatePosition", "onUpdateRotation"])) : G("", !0)
|
|
612
|
-
];
|
|
613
|
-
}),
|
|
614
|
-
_: 1
|
|
615
|
-
})
|
|
616
|
-
])
|
|
617
|
-
], 512), [
|
|
618
|
-
[W, A.value]
|
|
619
|
-
]),
|
|
620
|
-
$(l("div", Ht, [
|
|
621
|
-
l("div", Kt, [
|
|
622
|
-
l("span", null, B(_.value), 1),
|
|
623
|
-
l("span", {
|
|
624
|
-
class: "close",
|
|
625
|
-
onClick: e[15] || (e[15] = (b) => O.value = !1)
|
|
626
|
-
}, " X ")
|
|
627
|
-
]),
|
|
628
|
-
l("div", Wt, [
|
|
629
|
-
i(o, { height: "100%" }, {
|
|
630
|
-
default: ne(() => [
|
|
631
|
-
$(i(ct, { model: N.value }, null, 8, ["model"]), [
|
|
632
|
-
[W, _.value === "机床控制"]
|
|
633
|
-
]),
|
|
634
|
-
$(i(Pe, {
|
|
635
|
-
model: N.value,
|
|
636
|
-
scene: C.value,
|
|
637
|
-
xyzbcList: ee.value,
|
|
638
|
-
ref_key: "urdfAnimationPanelRef",
|
|
639
|
-
ref: r
|
|
640
|
-
}, null, 8, ["model", "scene", "xyzbcList"]), [
|
|
641
|
-
[W, _.value === "动画仿真"]
|
|
642
|
-
]),
|
|
643
|
-
Y(t.$slots, "right-panel", { rightPanelType: _.value }, void 0, !0)
|
|
644
|
-
]),
|
|
645
|
-
_: 3
|
|
646
|
-
})
|
|
647
|
-
])
|
|
648
|
-
], 512), [
|
|
649
|
-
[W, O.value]
|
|
650
|
-
]),
|
|
651
|
-
H.value ? (z(), M("div", Yt, [
|
|
652
|
-
e[20] || (e[20] = l("div", { class: "loading-spinner" }, null, -1)),
|
|
653
|
-
l("p", null, B(oe.value), 1)
|
|
654
|
-
])) : G("", !0),
|
|
655
|
-
i(ie, { ref: "pipeAnalysisPanelRef" }, null, 512)
|
|
656
|
-
]);
|
|
657
|
-
};
|
|
658
|
-
}
|
|
659
|
-
}), dl = /* @__PURE__ */ Ce(Zt, [["__scopeId", "data-v-0d251d70"]]);
|
|
660
|
-
export {
|
|
661
|
-
dl as default
|
|
662
|
-
};
|