ss-component-new 1.3.658 → 1.3.659
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/config.js +1 -1
- package/dist/index-CQG5_ZDD.js +1084 -0
- package/dist/index-C_HX7GAm.js +8849 -0
- package/dist/index-ZPct7ETq.js +180 -0
- package/dist/platform-BsULsE0-.js +16684 -0
- package/dist/ss-component.css +2 -8
- package/dist/ss-component.js +26 -67
- package/dist/ss-component2.js +15 -75
- package/dist/ss-component3.js +785 -9
- package/package.json +4 -4
- package/public/config.js +1 -1
- package/dist/MTLLoader-DI0avKtj.js +0 -657
- package/dist/URDFLoader-PUxvYFDe.js +0 -2304
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/animationData-05aVUytq.js +0 -83
- package/dist/array-ZM04o_us.js +0 -1044
- package/dist/clone-Ddn1p6-1.js +0 -8
- package/dist/eleIcon-BWVKfp5t.js +0 -29
- package/dist/iconfont-BNdGaGPn.js +0 -1018
- package/dist/icons/svg/Update.svg +0 -1
- package/dist/icons/svg/functionList.svg +0 -1
- package/dist/icons/svg/uploadCopy.svg +0 -1
- package/dist/index-9ruiIh9Q.js +0 -30
- package/dist/index-BAenzdfB.js +0 -83
- package/dist/index-BDhIWgKn.js +0 -658
- package/dist/index-BFqUz4pN.js +0 -52
- package/dist/index-BIAWyba9.js +0 -2623
- package/dist/index-BKJ5SfU0.js +0 -98
- package/dist/index-BMr09Ruf.js +0 -107
- package/dist/index-BOGJMjxF.js +0 -117
- package/dist/index-BP1mKUQP.js +0 -627
- package/dist/index-BczRQX8N.js +0 -407
- package/dist/index-BnrvtCYj.js +0 -55
- package/dist/index-Bpr501oZ.js +0 -78
- package/dist/index-Bs7vFXNW.js +0 -93
- package/dist/index-BvbZiTVB.js +0 -342
- package/dist/index-Bvvz41NY.js +0 -44
- package/dist/index-C2YKgxwc.js +0 -61990
- package/dist/index-C9DBY1gg.js +0 -103
- package/dist/index-CFFbhR3G.js +0 -996
- package/dist/index-COr2mcbl.js +0 -48
- package/dist/index-CV_jQDcg.js +0 -9
- package/dist/index-CXe4q28L.js +0 -447
- package/dist/index-ChNfRlIP.js +0 -596
- package/dist/index-CsxH-GEh.js +0 -24847
- package/dist/index-D-5v1Jx7.js +0 -93
- package/dist/index-D4LcEpQ7.js +0 -619
- package/dist/index-DGObzWyL.js +0 -8984
- package/dist/index-DJ59jXR0.js +0 -28483
- package/dist/index-DJrzqi4-.js +0 -209
- package/dist/index-D_kI6aHR.js +0 -98
- package/dist/index-Ddhx18T9.js +0 -864
- package/dist/index-Dr9Wt5nC.js +0 -84
- package/dist/index-Dwt0Wlg_.js +0 -201
- package/dist/index-EGwObkob.js +0 -468
- package/dist/index-WPJbEuld.js +0 -62
- package/dist/index-YVR3acYT.js +0 -61
- package/dist/index-dD-mKgue.js +0 -27
- package/dist/index-lHjuVdOp.js +0 -11773
- package/dist/index-uF-ibwG0.js +0 -9
- package/dist/index.vue_vue_type_script_setup_true_lang-DwbHXtUp.js +0 -55
- package/dist/index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js +0 -137728
- package/dist/isString-CoCw_sp3.js +0 -8
- package/dist/localIcon-CoJHw5ss.js +0 -76
- package/dist/main-Bs7Y7gDm.js +0 -502
- package/dist/menuIndex-Dt0NyAyE.js +0 -159
- package/dist/request-DiogHwkN.js +0 -9465
- package/dist/threeModel-C3x2TmUN.js +0 -1108
- package/dist/threePreview-BHLSA5YS.js +0 -2259
- package/dist/threeSceneView-mfAIunaw.js +0 -1289
- package/dist/threeSceneViewForCPMPIP-DrnsTNPv.js +0 -538
- package/dist/threeTrackPathView-BR8-g2Tr.js +0 -620
- package/dist/threeViewerHost-DbJCLcbz.js +0 -233
- package/dist/urdfTree-IEJgkVzs.js +0 -254
- package/dist/workpieceTreePanel-aZV2ut3W.js +0 -555
- package/public/icons/svg/Update.svg +0 -1
- package/public/icons/svg/functionList.svg +0 -1
- package/public/icons/svg/uploadCopy.svg +0 -1
- /package/dist/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/dist/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
- /package/public/icons/svg/{tableClose.svg → table-close.svg} +0 -0
- /package/public/icons/svg/{tableExpand.svg → table-expand.svg} +0 -0
|
@@ -1,233 +0,0 @@
|
|
|
1
|
-
import { defineComponent as U, defineAsyncComponent as b, computed as I, ref as R, watch as H, openBlock as T, createElementBlock as N, createElementVNode as K, renderSlot as u, unref as m, createBlock as B, withCtx as d, createCommentVNode as V } from "vue";
|
|
2
|
-
import { a0 as W, u as A, p as D, s as $ } from "./index-DGObzWyL.js";
|
|
3
|
-
import { g as j, q as M, r as L } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js";
|
|
4
|
-
import { _ as G } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
|
-
const re = {
|
|
6
|
-
SINGLE: "单机",
|
|
7
|
-
DOUBLE: "双机"
|
|
8
|
-
}, se = {
|
|
9
|
-
ROBOT: 1,
|
|
10
|
-
PIPECOMPARSION: 2
|
|
11
|
-
}, a = {
|
|
12
|
-
ROBOT_SCENE: "robot",
|
|
13
|
-
// 机器人场景
|
|
14
|
-
TRACK_PATH: "trackPath",
|
|
15
|
-
// 轨迹路径场景
|
|
16
|
-
CPMPIP_SCENE: "cpmpip",
|
|
17
|
-
// 重大专项场景
|
|
18
|
-
PREVIEW: "preview"
|
|
19
|
-
// 预览模式
|
|
20
|
-
}, q = W("threeState", {
|
|
21
|
-
state: () => ({
|
|
22
|
-
data: {
|
|
23
|
-
files: [],
|
|
24
|
-
data: {}
|
|
25
|
-
}
|
|
26
|
-
}),
|
|
27
|
-
actions: {
|
|
28
|
-
setData(E) {
|
|
29
|
-
this.data = E;
|
|
30
|
-
},
|
|
31
|
-
getData() {
|
|
32
|
-
return this.data;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
function z() {
|
|
37
|
-
const E = A(D), { platform: O } = $(E), y = q(D), i = ["uv", "cyd", "nc"], p = ["urdf"], n = ["obj", "stl"], P = [...i, ...p, ...n], f = (e) => {
|
|
38
|
-
if (!g())
|
|
39
|
-
throw new Error("不是三维系统");
|
|
40
|
-
y.setData(e);
|
|
41
|
-
}, _ = () => y.getData(), g = () => O.value === "three", c = (e) => j(e), h = (e) => {
|
|
42
|
-
if (!e)
|
|
43
|
-
return !1;
|
|
44
|
-
const r = c(e);
|
|
45
|
-
return P == null ? void 0 : P.includes(r);
|
|
46
|
-
}, S = (e) => {
|
|
47
|
-
if (!e)
|
|
48
|
-
return !1;
|
|
49
|
-
const r = c(e);
|
|
50
|
-
return n == null ? void 0 : n.includes(r);
|
|
51
|
-
}, v = (e) => {
|
|
52
|
-
if (!e)
|
|
53
|
-
return !1;
|
|
54
|
-
const r = c(e);
|
|
55
|
-
return i == null ? void 0 : i.includes(r);
|
|
56
|
-
}, l = (e) => {
|
|
57
|
-
if (!e)
|
|
58
|
-
return {
|
|
59
|
-
isCpt: !1,
|
|
60
|
-
isCyd: !1,
|
|
61
|
-
isUv: !1,
|
|
62
|
-
isNc: !1
|
|
63
|
-
};
|
|
64
|
-
const r = c(e), o = i == null ? void 0 : i.find((w) => w === r);
|
|
65
|
-
return {
|
|
66
|
-
isCpt: o === "cpt",
|
|
67
|
-
isCyd: o === "cyd",
|
|
68
|
-
isUv: o === "uv",
|
|
69
|
-
isNc: o === "nc"
|
|
70
|
-
};
|
|
71
|
-
}, C = (e) => {
|
|
72
|
-
if (!e)
|
|
73
|
-
return !1;
|
|
74
|
-
const r = c(e);
|
|
75
|
-
return p == null ? void 0 : p.includes(r);
|
|
76
|
-
}, k = (e) => g() && h(e), t = (e) => ({
|
|
77
|
-
url: e,
|
|
78
|
-
extension: c(e)
|
|
79
|
-
});
|
|
80
|
-
return {
|
|
81
|
-
getData: _,
|
|
82
|
-
setData: f,
|
|
83
|
-
isThreeSystem: g,
|
|
84
|
-
isUrdf: C,
|
|
85
|
-
isGeneralFile: S,
|
|
86
|
-
isTrackPathFile: v,
|
|
87
|
-
isThreeFile: h,
|
|
88
|
-
isUseBackdrop: k,
|
|
89
|
-
initTrackFileType: l,
|
|
90
|
-
getFileExtension: c,
|
|
91
|
-
getFileInfo: t,
|
|
92
|
-
getFilesInfo: (e) => {
|
|
93
|
-
const r = [];
|
|
94
|
-
for (let o = 0; o < e.length; o++) {
|
|
95
|
-
const F = e[o], w = t(F);
|
|
96
|
-
r.push(w);
|
|
97
|
-
}
|
|
98
|
-
return r;
|
|
99
|
-
}
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
const Y = { class: "three-platform mv-inline" }, J = { class: "top-menu" }, Q = {
|
|
103
|
-
key: 4,
|
|
104
|
-
class: "loading"
|
|
105
|
-
}, X = /* @__PURE__ */ U({
|
|
106
|
-
__name: "threeViewerHost",
|
|
107
|
-
props: {
|
|
108
|
-
files: { default: () => [] },
|
|
109
|
-
threeData: {},
|
|
110
|
-
componentType: {},
|
|
111
|
-
width: { default: "100%" },
|
|
112
|
-
height: { default: "100%" }
|
|
113
|
-
},
|
|
114
|
-
setup(E) {
|
|
115
|
-
const O = b(() => import("./threeSceneView-mfAIunaw.js")), y = b(() => import("./threePreview-BHLSA5YS.js")), i = b(() => import("./threeTrackPathView-BR8-g2Tr.js")), p = b(() => import("./threeSceneViewForCPMPIP-DrnsTNPv.js")), n = E, P = A(D), { platName: f } = $(P), { isUrdf: _, isTrackPathFile: g } = z(), c = I(() => {
|
|
116
|
-
var t;
|
|
117
|
-
return (t = n == null ? void 0 : n.files) == null ? void 0 : t.map((s) => {
|
|
118
|
-
const { url: e, name: r } = s;
|
|
119
|
-
return {
|
|
120
|
-
url: e,
|
|
121
|
-
name: r
|
|
122
|
-
};
|
|
123
|
-
});
|
|
124
|
-
}), h = I(() => {
|
|
125
|
-
var e;
|
|
126
|
-
const t = (e = n == null ? void 0 : n.files) == null ? void 0 : e[0];
|
|
127
|
-
return (t == null ? void 0 : t.extension) || "";
|
|
128
|
-
}), S = I(() => {
|
|
129
|
-
var t, s;
|
|
130
|
-
return (s = (t = n == null ? void 0 : n.threeData) == null ? void 0 : t.data) == null ? void 0 : s.trackFileType;
|
|
131
|
-
}), v = I(() => {
|
|
132
|
-
if (n.componentType)
|
|
133
|
-
switch (n.componentType) {
|
|
134
|
-
case "robot":
|
|
135
|
-
return a.ROBOT_SCENE;
|
|
136
|
-
case "track":
|
|
137
|
-
return a.TRACK_PATH;
|
|
138
|
-
case "cpmpip":
|
|
139
|
-
return a.CPMPIP_SCENE;
|
|
140
|
-
case "preview":
|
|
141
|
-
return a.PREVIEW;
|
|
142
|
-
}
|
|
143
|
-
return (f == null ? void 0 : f.value) === M.CPMPIP && _(h.value) ? a.CPMPIP_SCENE : (f == null ? void 0 : f.value) === M.ROBOT && _(h.value) ? a.ROBOT_SCENE : g(h.value) && S.value ? a.TRACK_PATH : a.PREVIEW;
|
|
144
|
-
}), l = R([]), C = R(!1);
|
|
145
|
-
async function k(t) {
|
|
146
|
-
if (!t || !t.length) {
|
|
147
|
-
l.value = [];
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
C.value = !0;
|
|
151
|
-
try {
|
|
152
|
-
const s = await Promise.all(t.map((e) => L(e == null ? void 0 : e.url, e == null ? void 0 : e.name)));
|
|
153
|
-
l.value = s;
|
|
154
|
-
} catch (s) {
|
|
155
|
-
console.error("文件下载时发生错误:", s), l.value = [];
|
|
156
|
-
} finally {
|
|
157
|
-
C.value = !1;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
return H(
|
|
161
|
-
() => c.value,
|
|
162
|
-
async (t) => {
|
|
163
|
-
await k(t || []);
|
|
164
|
-
},
|
|
165
|
-
{ immediate: !0, deep: !0 }
|
|
166
|
-
), (t, s) => (T(), N("div", Y, [
|
|
167
|
-
K("div", J, [
|
|
168
|
-
u(t.$slots, "top-menu", {}, void 0, !0)
|
|
169
|
-
]),
|
|
170
|
-
v.value === m(a).ROBOT_SCENE ? (T(), B(m(O), {
|
|
171
|
-
key: 0,
|
|
172
|
-
fileBlobs: l.value,
|
|
173
|
-
threeData: n.threeData
|
|
174
|
-
}, {
|
|
175
|
-
"button-left": d(() => [
|
|
176
|
-
u(t.$slots, "management-menu", {}, void 0, !0)
|
|
177
|
-
]),
|
|
178
|
-
"button-right": d(() => [
|
|
179
|
-
u(t.$slots, "management-page", {}, void 0, !0)
|
|
180
|
-
]),
|
|
181
|
-
_: 3
|
|
182
|
-
}, 8, ["fileBlobs", "threeData"])) : v.value === m(a).TRACK_PATH ? (T(), B(m(i), {
|
|
183
|
-
key: 1,
|
|
184
|
-
fileBlobs: l.value,
|
|
185
|
-
threeData: n.threeData,
|
|
186
|
-
trackFileType: S.value
|
|
187
|
-
}, {
|
|
188
|
-
"button-left": d(() => [
|
|
189
|
-
u(t.$slots, "management-menu", {}, void 0, !0)
|
|
190
|
-
]),
|
|
191
|
-
"button-right": d(() => [
|
|
192
|
-
u(t.$slots, "management-page", {}, void 0, !0)
|
|
193
|
-
]),
|
|
194
|
-
_: 3
|
|
195
|
-
}, 8, ["fileBlobs", "threeData", "trackFileType"])) : v.value === m(a).CPMPIP_SCENE ? (T(), B(m(p), {
|
|
196
|
-
key: 2,
|
|
197
|
-
fileBlobs: l.value,
|
|
198
|
-
threeData: n.threeData
|
|
199
|
-
}, {
|
|
200
|
-
"button-left": d(() => [
|
|
201
|
-
u(t.$slots, "management-menu", {}, void 0, !0)
|
|
202
|
-
]),
|
|
203
|
-
"button-right": d(() => [
|
|
204
|
-
u(t.$slots, "management-page", {}, void 0, !0)
|
|
205
|
-
]),
|
|
206
|
-
_: 3
|
|
207
|
-
}, 8, ["fileBlobs", "threeData"])) : v.value === m(a).PREVIEW ? (T(), B(m(y), {
|
|
208
|
-
key: 3,
|
|
209
|
-
fileBlobs: l.value
|
|
210
|
-
}, {
|
|
211
|
-
"button-left": d(() => [
|
|
212
|
-
u(t.$slots, "management-menu", {}, void 0, !0)
|
|
213
|
-
]),
|
|
214
|
-
"button-right": d(() => [
|
|
215
|
-
u(t.$slots, "management-page", {}, void 0, !0)
|
|
216
|
-
]),
|
|
217
|
-
_: 3
|
|
218
|
-
}, 8, ["fileBlobs"])) : V("", !0),
|
|
219
|
-
C.value ? (T(), N("div", Q, " 文件下载中,请稍候... ")) : V("", !0)
|
|
220
|
-
]));
|
|
221
|
-
}
|
|
222
|
-
}), Z = /* @__PURE__ */ G(X, [["__scopeId", "data-v-44d6514b"]]), oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
223
|
-
__proto__: null,
|
|
224
|
-
default: Z
|
|
225
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
226
|
-
export {
|
|
227
|
-
Z as T,
|
|
228
|
-
z as a,
|
|
229
|
-
re as r,
|
|
230
|
-
se as s,
|
|
231
|
-
oe as t,
|
|
232
|
-
q as u
|
|
233
|
-
};
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { defineComponent as I, ref as F, watch as M, onMounted as C, onUnmounted as E, openBlock as m, createElementBlock as f, Fragment as P, renderList as T, createElementVNode as d, toDisplayString as h, createCommentVNode as U, computed as L, resolveComponent as S, createVNode as A } from "vue";
|
|
2
|
-
import { h as V } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-CG9X8aa2.js";
|
|
3
|
-
import { _ as b } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
-
const D = (i, a) => {
|
|
5
|
-
if (!a)
|
|
6
|
-
return null;
|
|
7
|
-
const l = i.joints[a];
|
|
8
|
-
return l || null;
|
|
9
|
-
}, ae = (i, a) => {
|
|
10
|
-
if (!a)
|
|
11
|
-
return null;
|
|
12
|
-
const l = D(i, a);
|
|
13
|
-
if (!l)
|
|
14
|
-
return null;
|
|
15
|
-
let o = null;
|
|
16
|
-
return l.traverse((u) => {
|
|
17
|
-
u instanceof V && !o && (o = u);
|
|
18
|
-
}), o;
|
|
19
|
-
}, N = (i, a) => {
|
|
20
|
-
if (!a)
|
|
21
|
-
return null;
|
|
22
|
-
const l = i.links[a];
|
|
23
|
-
return l || null;
|
|
24
|
-
}, ie = (i, a) => {
|
|
25
|
-
if (!a)
|
|
26
|
-
return null;
|
|
27
|
-
const l = N(i, a);
|
|
28
|
-
if (!l)
|
|
29
|
-
return null;
|
|
30
|
-
let o = null;
|
|
31
|
-
return l.traverse((u) => {
|
|
32
|
-
u instanceof V && !o && (o = u);
|
|
33
|
-
}), o;
|
|
34
|
-
}, w = (i) => {
|
|
35
|
-
const a = i.joints;
|
|
36
|
-
return Object.values(a);
|
|
37
|
-
}, oe = (i) => w(i).filter((o) => o.jointType !== "fixed"), ue = (i) => {
|
|
38
|
-
const a = i.links;
|
|
39
|
-
return Object.keys(a);
|
|
40
|
-
}, R = { class: "panel-content" }, O = {
|
|
41
|
-
key: 0,
|
|
42
|
-
class: "joints-list"
|
|
43
|
-
}, K = { class: "joint-info-row" }, B = { class: "joint-left" }, q = { class: "joint-name" }, $ = { class: "joint-range" }, z = { class: "joint-type" }, G = {
|
|
44
|
-
key: 0,
|
|
45
|
-
class: "joint-control-row"
|
|
46
|
-
}, H = { class: "slider-container" }, Q = ["min", "max", "value", "onInput"], W = { class: "value-display" }, X = { class: "joint-value" }, Y = { class: "unit" }, Z = {
|
|
47
|
-
key: 1,
|
|
48
|
-
class: "empty-state"
|
|
49
|
-
}, j = /* @__PURE__ */ I({
|
|
50
|
-
__name: "urdfJointPanel",
|
|
51
|
-
props: {
|
|
52
|
-
model: {}
|
|
53
|
-
},
|
|
54
|
-
setup(i, { expose: a }) {
|
|
55
|
-
const l = i, o = F([]), u = F(null), _ = (n, e = !1) => n === "revolute" ? e ? Math.PI : -Math.PI : n === "prismatic" ? e ? 1 : -1 : 0, y = (n) => {
|
|
56
|
-
if (!n || !n.joints)
|
|
57
|
-
return console.warn("URDF模型无效或不包含关节信息"), [];
|
|
58
|
-
const e = [];
|
|
59
|
-
return w(n).forEach((r) => {
|
|
60
|
-
var c, p;
|
|
61
|
-
if (r.jointType === "fixed")
|
|
62
|
-
return;
|
|
63
|
-
let t = {
|
|
64
|
-
lower: ((c = r.limit) == null ? void 0 : c.lower) ?? _(r.jointType, !1),
|
|
65
|
-
upper: ((p = r.limit) == null ? void 0 : p.upper) ?? _(r.jointType, !0)
|
|
66
|
-
};
|
|
67
|
-
r.jointType === "continuous" && (t = {
|
|
68
|
-
lower: -10 * Math.PI,
|
|
69
|
-
upper: 10 * Math.PI
|
|
70
|
-
}), e.push({
|
|
71
|
-
name: r.name,
|
|
72
|
-
type: r.jointType || "unknown",
|
|
73
|
-
limit: t,
|
|
74
|
-
currentValue: r.angle || 0,
|
|
75
|
-
urdfJoint: r
|
|
76
|
-
});
|
|
77
|
-
}), e;
|
|
78
|
-
}, v = (n, e) => {
|
|
79
|
-
var c;
|
|
80
|
-
const s = o.value.find((p) => p.name === n);
|
|
81
|
-
if (!s) return;
|
|
82
|
-
const r = parseFloat(e), t = Math.max(s.limit.lower, Math.min(s.limit.upper, r));
|
|
83
|
-
s.currentValue = t, (c = l.model) != null && c.setJointValue ? l.model.setJointValue(n, t) : s.urdfJoint.setJointValue(t);
|
|
84
|
-
}, g = () => {
|
|
85
|
-
o.value.forEach((n) => {
|
|
86
|
-
(n.type === "revolute" || n.type === "continuous" || n.type === "prismatic") && v(n.name, 0);
|
|
87
|
-
});
|
|
88
|
-
}, J = () => {
|
|
89
|
-
l.model && o.value.forEach((n) => {
|
|
90
|
-
n.urdfJoint.angle !== void 0 && n.currentValue !== n.urdfJoint.angle && (n.currentValue = n.urdfJoint.angle);
|
|
91
|
-
});
|
|
92
|
-
}, x = () => {
|
|
93
|
-
const n = () => {
|
|
94
|
-
J(), u.value = requestAnimationFrame(n);
|
|
95
|
-
};
|
|
96
|
-
n();
|
|
97
|
-
}, k = () => {
|
|
98
|
-
u.value && (cancelAnimationFrame(u.value), u.value = null);
|
|
99
|
-
};
|
|
100
|
-
return M(
|
|
101
|
-
() => l.model,
|
|
102
|
-
(n) => {
|
|
103
|
-
n ? o.value = y(n) : o.value = [];
|
|
104
|
-
},
|
|
105
|
-
{ immediate: !0 }
|
|
106
|
-
), C(() => {
|
|
107
|
-
x();
|
|
108
|
-
}), E(() => {
|
|
109
|
-
k();
|
|
110
|
-
}), a({
|
|
111
|
-
resetAllJoints: g
|
|
112
|
-
}), (n, e) => (m(), f("div", R, [
|
|
113
|
-
o.value.length > 0 ? (m(), f("div", O, [
|
|
114
|
-
(m(!0), f(P, null, T(o.value, (s) => (m(), f("div", {
|
|
115
|
-
key: s.name,
|
|
116
|
-
class: "joint-item"
|
|
117
|
-
}, [
|
|
118
|
-
d("div", K, [
|
|
119
|
-
d("div", B, [
|
|
120
|
-
d("span", q, h(s.name), 1),
|
|
121
|
-
d("span", $, " [" + h(s.limit.lower.toFixed(2)) + ", " + h(s.limit.upper.toFixed(2)) + "] ", 1)
|
|
122
|
-
]),
|
|
123
|
-
d("span", z, h(s.type), 1)
|
|
124
|
-
]),
|
|
125
|
-
s.type === "revolute" || s.type === "prismatic" || s.type === "continuous" ? (m(), f("div", G, [
|
|
126
|
-
d("div", H, [
|
|
127
|
-
d("input", {
|
|
128
|
-
type: "range",
|
|
129
|
-
min: s.limit.lower,
|
|
130
|
-
max: s.limit.upper,
|
|
131
|
-
step: "0.001",
|
|
132
|
-
value: s.currentValue,
|
|
133
|
-
onInput: (r) => v(s.name, r.target.value),
|
|
134
|
-
class: "joint-slider"
|
|
135
|
-
}, null, 40, Q)
|
|
136
|
-
]),
|
|
137
|
-
d("div", W, [
|
|
138
|
-
d("span", X, h(s.currentValue ? Number(s.currentValue).toFixed(3) : "0.000"), 1),
|
|
139
|
-
d("span", Y, h(s.type === "prismatic" ? "m" : "rad"), 1)
|
|
140
|
-
])
|
|
141
|
-
])) : U("", !0)
|
|
142
|
-
]))), 128))
|
|
143
|
-
])) : (m(), f("div", Z, [...e[0] || (e[0] = [
|
|
144
|
-
d("p", null, "未检测到可控制的关节", -1)
|
|
145
|
-
])]))
|
|
146
|
-
]));
|
|
147
|
-
}
|
|
148
|
-
}), ce = /* @__PURE__ */ b(j, [["__scopeId", "data-v-b1467983"]]), ee = { class: "panel-content" }, te = "id", se = {
|
|
149
|
-
__name: "urdfTree",
|
|
150
|
-
props: {
|
|
151
|
-
model: Object,
|
|
152
|
-
maxExpandCount: {
|
|
153
|
-
type: Number,
|
|
154
|
-
default: 10
|
|
155
|
-
},
|
|
156
|
-
expandStrategy: {
|
|
157
|
-
type: String,
|
|
158
|
-
default: "breadth",
|
|
159
|
-
validator: (i) => ["breadth", "firstLevel"].includes(i)
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
emits: ["nodeClick"],
|
|
163
|
-
setup(i, { emit: a }) {
|
|
164
|
-
const l = i, o = a, u = F([]), _ = {
|
|
165
|
-
children: "children",
|
|
166
|
-
label: "label"
|
|
167
|
-
}, y = (e) => {
|
|
168
|
-
o("nodeClick", e);
|
|
169
|
-
}, v = (e, s = 0) => {
|
|
170
|
-
const r = [];
|
|
171
|
-
return Array.isArray(e) && (e == null ? void 0 : e.length) > 0 && e.forEach((t) => {
|
|
172
|
-
if (!(t != null && t.isMesh) && ((t == null ? void 0 : t.type) === "URDFJoint" || (t == null ? void 0 : t.type) === "URDFLink")) {
|
|
173
|
-
const c = {
|
|
174
|
-
name: t == null ? void 0 : t.name,
|
|
175
|
-
label: t == null ? void 0 : t.name,
|
|
176
|
-
show: !0,
|
|
177
|
-
level: s + 1,
|
|
178
|
-
isPenultimate: !1,
|
|
179
|
-
type: t == null ? void 0 : t.type,
|
|
180
|
-
id: t == null ? void 0 : t.id,
|
|
181
|
-
limit: (t == null ? void 0 : t.limit) ?? "",
|
|
182
|
-
children: v(t == null ? void 0 : t.children, s + 1),
|
|
183
|
-
path: t == null ? void 0 : t.name
|
|
184
|
-
};
|
|
185
|
-
r.push(c);
|
|
186
|
-
}
|
|
187
|
-
}), r;
|
|
188
|
-
}, g = (e) => e ? [{
|
|
189
|
-
name: e == null ? void 0 : e.name,
|
|
190
|
-
label: e == null ? void 0 : e.name,
|
|
191
|
-
show: !0,
|
|
192
|
-
level: 1,
|
|
193
|
-
isPenultimate: !1,
|
|
194
|
-
type: e == null ? void 0 : e.type,
|
|
195
|
-
id: e == null ? void 0 : e.id,
|
|
196
|
-
limit: (e == null ? void 0 : e.limit) ?? "",
|
|
197
|
-
children: v(e == null ? void 0 : e.children, 1) || [],
|
|
198
|
-
path: e == null ? void 0 : e.name
|
|
199
|
-
}] : [], J = (e, s) => {
|
|
200
|
-
const r = [], t = [...e];
|
|
201
|
-
for (; t.length > 0 && r.length < s; ) {
|
|
202
|
-
const c = t.shift();
|
|
203
|
-
c.children && c.children.length > 0 && (r.push(c.id), t.push(...c.children));
|
|
204
|
-
}
|
|
205
|
-
return r;
|
|
206
|
-
}, x = (e, s) => {
|
|
207
|
-
const r = [];
|
|
208
|
-
return e.forEach((t) => {
|
|
209
|
-
if (t.children && t.children.length > 0) {
|
|
210
|
-
r.push(t.id);
|
|
211
|
-
const c = t.children.filter((p) => p.children && p.children.length > 0).slice(0, s).map((p) => p.id);
|
|
212
|
-
r.push(...c);
|
|
213
|
-
}
|
|
214
|
-
}), r.slice(0, s + 1);
|
|
215
|
-
}, k = L(() => !u.value || u.value.length === 0 ? [] : l.expandStrategy === "firstLevel" ? x(u.value, l.maxExpandCount) : J(u.value, l.maxExpandCount)), n = L(() => [{
|
|
216
|
-
name: "场景",
|
|
217
|
-
label: "场景",
|
|
218
|
-
show: !0,
|
|
219
|
-
level: 1,
|
|
220
|
-
isPenultimate: !1,
|
|
221
|
-
type: "场景",
|
|
222
|
-
id: "场景",
|
|
223
|
-
children: l != null && l.model ? g(l.model) : [],
|
|
224
|
-
path: "场景"
|
|
225
|
-
}]);
|
|
226
|
-
return M(
|
|
227
|
-
n,
|
|
228
|
-
(e) => {
|
|
229
|
-
u.value = JSON.parse(JSON.stringify(e));
|
|
230
|
-
},
|
|
231
|
-
{ immediate: !0 }
|
|
232
|
-
), (e, s) => {
|
|
233
|
-
const r = S("el-tree");
|
|
234
|
-
return m(), f("div", ee, [
|
|
235
|
-
A(r, {
|
|
236
|
-
data: u.value,
|
|
237
|
-
props: _,
|
|
238
|
-
"default-expanded-keys": k.value,
|
|
239
|
-
"node-key": te,
|
|
240
|
-
onNodeClick: y
|
|
241
|
-
}, null, 8, ["data", "default-expanded-keys"])
|
|
242
|
-
]);
|
|
243
|
-
};
|
|
244
|
-
}
|
|
245
|
-
}, de = /* @__PURE__ */ b(se, [["__scopeId", "data-v-cfde50c3"]]);
|
|
246
|
-
export {
|
|
247
|
-
ce as J,
|
|
248
|
-
de as U,
|
|
249
|
-
ae as a,
|
|
250
|
-
ue as b,
|
|
251
|
-
D as c,
|
|
252
|
-
ie as d,
|
|
253
|
-
oe as g
|
|
254
|
-
};
|