ss-component-new 1.3.612 → 1.3.613
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-BCiBB31-.js → array-CC4KuhFz.js} +2 -2
- package/dist/clippingPanel-BUeEipUo.js +314 -0
- package/dist/{iconfont-BnmSp7qc.js → iconfont-Bygik0O8.js} +263 -323
- package/dist/{index-DlWQfnOb.js → index-C4TOOvy2.js} +1 -1
- package/dist/{index-fx-3sa2P.js → index-C9lIZwAN.js} +3 -3
- package/dist/{index-D2zy1CDJ.js → index-CHjxnJuK.js} +2 -2
- package/dist/{index-caWZLbTf.js → index-COiyZiEW.js} +3 -3
- package/dist/{index-CEblvV0g.js → index-CdLzfdZp.js} +1 -1
- package/dist/{index-Cd5w5Pbp.js → index-CgXbtUp_.js} +2 -2
- package/dist/{index-B5upDcF2.js → index-Crb3Cdsh.js} +1 -1
- package/dist/{index-DlOyHVTl.js → index-CwF9jAms.js} +1 -1
- package/dist/{index-CWhc9_30.js → index-DO06UkLd.js} +1 -1
- package/dist/{index-BvoA36jD.js → index-Dt1ZJ5Mg.js} +7 -7
- package/dist/{index-CsOv-HaS.js → index-WG13qdQh.js} +1 -1
- package/dist/{index-BIHTe_RU.js → index-zBPJvBj0.js} +2 -2
- package/dist/{main-Cv51dcPu.js → main-BEGTCcMs.js} +2 -2
- package/dist/ss-component.css +2 -2
- package/dist/ss-component.js +5 -5
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-CfEG2GId.js → threeModel-fR_1WE9y.js} +1 -1
- package/dist/{threePreview-CVO6XMIe.js → threePreview-Dlp87vc7.js} +336 -362
- package/dist/{threeSceneView-cvcvfWuz.js → threeSceneView-COdldt0-.js} +36 -36
- package/dist/{threeSceneViewForCPMPIP-B9jGs8ag.js → threeSceneViewForCPMPIP-CUdFuAYv.js} +13 -13
- package/dist/{threeTrackPathView-7_x3jeap.js → threeTrackPathView-Bqf0fqLa.js} +16 -16
- package/dist/threeViewerHost-CXDIJ1dq.js +233 -0
- package/dist/{workpieceTreePanel-DEEMKY1v.js → workpieceTreePanel-BTiGG-1u.js} +1 -1
- package/package.json +1 -1
- package/dist/threeViewerHost-3N0Fp3J6.js +0 -198
- package/dist/urdfTree-D0Iom75E.js +0 -254
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ref as k, computed as ae, resolveComponent as te, createElementBlock as H, openBlock as p, Fragment as ue, renderList as ce, createElementVNode as w, toDisplayString as re, createVNode as R, reactive as la, watch as be, createBlock as j, resolveDynamicComponent as le, unref as _, withCtx as L, isRef as Ye, createTextVNode as de, createCommentVNode as q, normalizeStyle as ta, withModifiers as ve, normalizeClass as qe, nextTick as na } from "vue";
|
|
2
|
-
import { V as Ie, g as aa, E as oa, G as sa, H as Je, c as ra } from "./index-
|
|
2
|
+
import { V as Ie, g as aa, E as oa, G as sa, H as Je, c as ra } from "./index-C9lIZwAN.js";
|
|
3
3
|
import { a as Ce, p as he, s as ie, c as K, u as ke, E as ua } from "./index-D8UY4uNQ.js";
|
|
4
4
|
import { _ as we } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
5
5
|
import ca from "./index-rlStojTL.js";
|
|
6
|
-
import { d as ia, c as da } from "./index-
|
|
6
|
+
import { d as ia, c as da } from "./index-CdLzfdZp.js";
|
|
7
7
|
import { s as va } from "./index-11kpzK0A.js";
|
|
8
8
|
import { E as pa } from "./request-B1c8BUkR.js";
|
|
9
9
|
const fa = { class: "type-select" }, ha = { class: "group-label" }, ga = { class: "group-items" }, ma = ["onDragstart"], ba = {
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
import { defineComponent as M, ref as C, watch as V, onMounted as I, onUnmounted as P, createElementBlock as f, openBlock as _, Fragment as E, renderList as N, createElementVNode as i, createCommentVNode as T, toDisplayString as x, computed as k, resolveComponent as U, createVNode as S } from "vue";
|
|
2
|
+
import { h as w } from "./index.vue_vue_type_style_index_0_scoped_39e1db95_lang-X_k372gl.js";
|
|
3
|
+
import { _ as L } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
|
+
import { h as F } from "./iconfont-Bygik0O8.js";
|
|
5
|
+
const A = (o, r) => {
|
|
6
|
+
if (!r)
|
|
7
|
+
return null;
|
|
8
|
+
const n = o.joints[r];
|
|
9
|
+
return n || null;
|
|
10
|
+
}, xe = (o, r) => {
|
|
11
|
+
if (!r)
|
|
12
|
+
return null;
|
|
13
|
+
const n = A(o, r);
|
|
14
|
+
if (!n)
|
|
15
|
+
return null;
|
|
16
|
+
let u = null;
|
|
17
|
+
return n.traverse((c) => {
|
|
18
|
+
c instanceof w && !u && (u = c);
|
|
19
|
+
}), u;
|
|
20
|
+
}, D = (o, r) => {
|
|
21
|
+
if (!r)
|
|
22
|
+
return null;
|
|
23
|
+
const n = o.links[r];
|
|
24
|
+
return n || null;
|
|
25
|
+
}, ke = (o, r) => {
|
|
26
|
+
if (!r)
|
|
27
|
+
return null;
|
|
28
|
+
const n = D(o, r);
|
|
29
|
+
if (!n)
|
|
30
|
+
return null;
|
|
31
|
+
let u = null;
|
|
32
|
+
return n.traverse((c) => {
|
|
33
|
+
c instanceof w && !u && (u = c);
|
|
34
|
+
}), u;
|
|
35
|
+
}, $ = (o) => {
|
|
36
|
+
const r = o.joints;
|
|
37
|
+
return Object.values(r);
|
|
38
|
+
}, Je = (o) => $(o).filter((u) => u.jointType !== "fixed"), be = (o) => {
|
|
39
|
+
const r = o.links;
|
|
40
|
+
return Object.keys(r);
|
|
41
|
+
}, O = { class: "panel-content" }, R = {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "joints-list"
|
|
44
|
+
}, K = { class: "joint-info-row" }, B = { class: "joint-left" }, X = { class: "joint-name" }, Y = { class: "joint-range" }, Z = { class: "joint-type" }, q = {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "joint-control-row"
|
|
47
|
+
}, z = { class: "slider-container" }, G = ["min", "max", "value", "onInput"], H = { class: "value-display" }, Q = { class: "joint-value" }, W = { class: "unit" }, j = {
|
|
48
|
+
key: 1,
|
|
49
|
+
class: "empty-state"
|
|
50
|
+
}, ee = /* @__PURE__ */ M({
|
|
51
|
+
__name: "urdfJointPanel",
|
|
52
|
+
props: {
|
|
53
|
+
model: {}
|
|
54
|
+
},
|
|
55
|
+
setup(o, { expose: r }) {
|
|
56
|
+
const n = o, u = C([]), c = C(null), g = (a, e = !1) => a === "revolute" ? e ? Math.PI : -Math.PI : a === "prismatic" ? e ? 1 : -1 : 0, J = (a) => {
|
|
57
|
+
if (!a || !a.joints)
|
|
58
|
+
return console.warn("URDF模型无效或不包含关节信息"), [];
|
|
59
|
+
const e = [];
|
|
60
|
+
return $(a).forEach((l) => {
|
|
61
|
+
var d, m;
|
|
62
|
+
if (l.jointType === "fixed")
|
|
63
|
+
return;
|
|
64
|
+
let s = {
|
|
65
|
+
lower: ((d = l.limit) == null ? void 0 : d.lower) ?? g(l.jointType, !1),
|
|
66
|
+
upper: ((m = l.limit) == null ? void 0 : m.upper) ?? g(l.jointType, !0)
|
|
67
|
+
};
|
|
68
|
+
l.jointType === "continuous" && (s = {
|
|
69
|
+
lower: -10 * Math.PI,
|
|
70
|
+
upper: 10 * Math.PI
|
|
71
|
+
}), e.push({
|
|
72
|
+
name: l.name,
|
|
73
|
+
type: l.jointType || "unknown",
|
|
74
|
+
limit: s,
|
|
75
|
+
currentValue: l.angle || 0,
|
|
76
|
+
urdfJoint: l
|
|
77
|
+
});
|
|
78
|
+
}), e;
|
|
79
|
+
}, v = (a, e) => {
|
|
80
|
+
var d;
|
|
81
|
+
const t = u.value.find((m) => m.name === a);
|
|
82
|
+
if (!t) return;
|
|
83
|
+
const l = parseFloat(e), s = Math.max(t.limit.lower, Math.min(t.limit.upper, l));
|
|
84
|
+
t.currentValue = s, (d = n.model) != null && d.setJointValue ? n.model.setJointValue(a, s) : t.urdfJoint.setJointValue(s);
|
|
85
|
+
}, h = () => {
|
|
86
|
+
u.value.forEach((a) => {
|
|
87
|
+
(a.type === "revolute" || a.type === "continuous" || a.type === "prismatic") && v(a.name, 0);
|
|
88
|
+
});
|
|
89
|
+
}, y = () => {
|
|
90
|
+
n.model && u.value.forEach((a) => {
|
|
91
|
+
a.urdfJoint.angle !== void 0 && a.currentValue !== a.urdfJoint.angle && (a.currentValue = a.urdfJoint.angle);
|
|
92
|
+
});
|
|
93
|
+
}, p = () => {
|
|
94
|
+
const a = () => {
|
|
95
|
+
y(), c.value = requestAnimationFrame(a);
|
|
96
|
+
};
|
|
97
|
+
a();
|
|
98
|
+
}, b = () => {
|
|
99
|
+
c.value && (cancelAnimationFrame(c.value), c.value = null);
|
|
100
|
+
};
|
|
101
|
+
return V(
|
|
102
|
+
() => n.model,
|
|
103
|
+
(a) => {
|
|
104
|
+
a ? u.value = J(a) : u.value = [];
|
|
105
|
+
},
|
|
106
|
+
{ immediate: !0 }
|
|
107
|
+
), I(() => {
|
|
108
|
+
p();
|
|
109
|
+
}), P(() => {
|
|
110
|
+
b();
|
|
111
|
+
}), r({
|
|
112
|
+
resetAllJoints: h
|
|
113
|
+
}), (a, e) => (_(), f("div", O, [
|
|
114
|
+
u.value.length > 0 ? (_(), f("div", R, [
|
|
115
|
+
(_(!0), f(E, null, N(u.value, (t) => (_(), f("div", {
|
|
116
|
+
key: t.name,
|
|
117
|
+
class: "joint-item"
|
|
118
|
+
}, [
|
|
119
|
+
i("div", K, [
|
|
120
|
+
i("div", B, [
|
|
121
|
+
i("span", X, x(t.name), 1),
|
|
122
|
+
i("span", Y, " [" + x(t.limit.lower.toFixed(2)) + ", " + x(t.limit.upper.toFixed(2)) + "] ", 1)
|
|
123
|
+
]),
|
|
124
|
+
i("span", Z, x(t.type), 1)
|
|
125
|
+
]),
|
|
126
|
+
t.type === "revolute" || t.type === "prismatic" || t.type === "continuous" ? (_(), f("div", q, [
|
|
127
|
+
i("div", z, [
|
|
128
|
+
i("input", {
|
|
129
|
+
type: "range",
|
|
130
|
+
min: t.limit.lower,
|
|
131
|
+
max: t.limit.upper,
|
|
132
|
+
step: "0.001",
|
|
133
|
+
value: t.currentValue,
|
|
134
|
+
onInput: (l) => v(t.name, l.target.value),
|
|
135
|
+
class: "joint-slider"
|
|
136
|
+
}, null, 40, G)
|
|
137
|
+
]),
|
|
138
|
+
i("div", H, [
|
|
139
|
+
i("span", Q, x(t.currentValue ? Number(t.currentValue).toFixed(3) : "0.000"), 1),
|
|
140
|
+
i("span", W, x(t.type === "prismatic" ? "m" : "rad"), 1)
|
|
141
|
+
])
|
|
142
|
+
])) : T("", !0)
|
|
143
|
+
]))), 128))
|
|
144
|
+
])) : (_(), f("div", j, e[0] || (e[0] = [
|
|
145
|
+
i("p", null, "未检测到可控制的关节", -1)
|
|
146
|
+
])))
|
|
147
|
+
]));
|
|
148
|
+
}
|
|
149
|
+
}), Fe = /* @__PURE__ */ L(ee, [["__scopeId", "data-v-b1467983"]]), se = { class: "panel-content" }, te = "id", ne = {
|
|
150
|
+
__name: "urdfTree",
|
|
151
|
+
props: {
|
|
152
|
+
model: Object,
|
|
153
|
+
maxExpandCount: {
|
|
154
|
+
type: Number,
|
|
155
|
+
default: 10
|
|
156
|
+
},
|
|
157
|
+
expandStrategy: {
|
|
158
|
+
type: String,
|
|
159
|
+
default: "breadth",
|
|
160
|
+
validator: (o) => ["breadth", "firstLevel"].includes(o)
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
emits: ["nodeClick"],
|
|
164
|
+
setup(o, { emit: r }) {
|
|
165
|
+
const n = o, u = r, c = C([]), g = {
|
|
166
|
+
children: "children",
|
|
167
|
+
label: "label"
|
|
168
|
+
}, J = (e) => {
|
|
169
|
+
u("nodeClick", e);
|
|
170
|
+
}, v = (e, t = 0) => {
|
|
171
|
+
const l = [];
|
|
172
|
+
return Array.isArray(e) && (e == null ? void 0 : e.length) > 0 && e.forEach((s) => {
|
|
173
|
+
if (!(s != null && s.isMesh) && ((s == null ? void 0 : s.type) === "URDFJoint" || (s == null ? void 0 : s.type) === "URDFLink")) {
|
|
174
|
+
const d = {
|
|
175
|
+
name: s == null ? void 0 : s.name,
|
|
176
|
+
label: s == null ? void 0 : s.name,
|
|
177
|
+
show: !0,
|
|
178
|
+
level: t + 1,
|
|
179
|
+
isPenultimate: !1,
|
|
180
|
+
type: s == null ? void 0 : s.type,
|
|
181
|
+
id: s == null ? void 0 : s.id,
|
|
182
|
+
limit: (s == null ? void 0 : s.limit) ?? "",
|
|
183
|
+
children: v(s == null ? void 0 : s.children, t + 1),
|
|
184
|
+
path: s == null ? void 0 : s.name
|
|
185
|
+
};
|
|
186
|
+
l.push(d);
|
|
187
|
+
}
|
|
188
|
+
}), l;
|
|
189
|
+
}, h = (e) => e ? [{
|
|
190
|
+
name: e == null ? void 0 : e.name,
|
|
191
|
+
label: e == null ? void 0 : e.name,
|
|
192
|
+
show: !0,
|
|
193
|
+
level: 1,
|
|
194
|
+
isPenultimate: !1,
|
|
195
|
+
type: e == null ? void 0 : e.type,
|
|
196
|
+
id: e == null ? void 0 : e.id,
|
|
197
|
+
limit: (e == null ? void 0 : e.limit) ?? "",
|
|
198
|
+
children: v(e == null ? void 0 : e.children, 1) || [],
|
|
199
|
+
path: e == null ? void 0 : e.name
|
|
200
|
+
}] : [], y = (e, t) => {
|
|
201
|
+
const l = [], s = [...e];
|
|
202
|
+
for (; s.length > 0 && l.length < t; ) {
|
|
203
|
+
const d = s.shift();
|
|
204
|
+
d.children && d.children.length > 0 && (l.push(d.id), s.push(...d.children));
|
|
205
|
+
}
|
|
206
|
+
return l;
|
|
207
|
+
}, p = (e, t) => {
|
|
208
|
+
const l = [];
|
|
209
|
+
return e.forEach((s) => {
|
|
210
|
+
if (s.children && s.children.length > 0) {
|
|
211
|
+
l.push(s.id);
|
|
212
|
+
const d = s.children.filter((m) => m.children && m.children.length > 0).slice(0, t).map((m) => m.id);
|
|
213
|
+
l.push(...d);
|
|
214
|
+
}
|
|
215
|
+
}), l.slice(0, t + 1);
|
|
216
|
+
}, b = k(() => !c.value || c.value.length === 0 ? [] : n.expandStrategy === "firstLevel" ? p(c.value, n.maxExpandCount) : y(c.value, n.maxExpandCount)), a = k(() => [{
|
|
217
|
+
name: "场景",
|
|
218
|
+
label: "场景",
|
|
219
|
+
show: !0,
|
|
220
|
+
level: 1,
|
|
221
|
+
isPenultimate: !1,
|
|
222
|
+
type: "场景",
|
|
223
|
+
id: "场景",
|
|
224
|
+
children: n != null && n.model ? h(n.model) : [],
|
|
225
|
+
path: "场景"
|
|
226
|
+
}]);
|
|
227
|
+
return V(
|
|
228
|
+
a,
|
|
229
|
+
(e) => {
|
|
230
|
+
c.value = JSON.parse(JSON.stringify(e));
|
|
231
|
+
},
|
|
232
|
+
{ immediate: !0 }
|
|
233
|
+
), (e, t) => {
|
|
234
|
+
const l = U("el-tree");
|
|
235
|
+
return _(), f("div", se, [
|
|
236
|
+
S(l, {
|
|
237
|
+
data: c.value,
|
|
238
|
+
props: g,
|
|
239
|
+
"default-expanded-keys": b.value,
|
|
240
|
+
"node-key": te,
|
|
241
|
+
onNodeClick: J
|
|
242
|
+
}, null, 8, ["data", "default-expanded-keys"])
|
|
243
|
+
]);
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
}, Ce = /* @__PURE__ */ L(ne, [["__scopeId", "data-v-cfde50c3"]]), ae = { class: "panel-content" }, le = { class: "clipping-content" }, ie = { class: "radio-group" }, re = { class: "radio-label" }, oe = ["checked"], ue = { class: "radio-label" }, ce = ["checked"], de = { class: "radio-label" }, pe = ["checked"], me = { class: "radio-label" }, he = ["checked"], fe = /* @__PURE__ */ M({
|
|
247
|
+
__name: "clippingPanel",
|
|
248
|
+
props: {
|
|
249
|
+
value: {}
|
|
250
|
+
},
|
|
251
|
+
emits: ["change"],
|
|
252
|
+
setup(o, { emit: r }) {
|
|
253
|
+
const n = o, u = r, c = k(() => n.value === F.NONE), g = k(() => n.value === F.X), J = k(() => n.value === F.Y), v = k(() => n.value === F.Z), h = (y) => {
|
|
254
|
+
const b = y.target.value;
|
|
255
|
+
u("change", b);
|
|
256
|
+
};
|
|
257
|
+
return (y, p) => (_(), f("div", ae, [
|
|
258
|
+
i("div", le, [
|
|
259
|
+
i("div", ie, [
|
|
260
|
+
i("label", re, [
|
|
261
|
+
i("input", {
|
|
262
|
+
type: "radio",
|
|
263
|
+
name: "clipping-axis",
|
|
264
|
+
value: "none",
|
|
265
|
+
checked: c.value,
|
|
266
|
+
onChange: h
|
|
267
|
+
}, null, 40, oe),
|
|
268
|
+
p[0] || (p[0] = i("span", { class: "radio-text" }, "无切割", -1))
|
|
269
|
+
]),
|
|
270
|
+
i("label", ue, [
|
|
271
|
+
i("input", {
|
|
272
|
+
type: "radio",
|
|
273
|
+
name: "clipping-axis",
|
|
274
|
+
value: "x",
|
|
275
|
+
checked: g.value,
|
|
276
|
+
onChange: h
|
|
277
|
+
}, null, 40, ce),
|
|
278
|
+
p[1] || (p[1] = i("span", { class: "radio-text" }, "X轴切割", -1))
|
|
279
|
+
]),
|
|
280
|
+
i("label", de, [
|
|
281
|
+
i("input", {
|
|
282
|
+
type: "radio",
|
|
283
|
+
name: "clipping-axis",
|
|
284
|
+
value: "y",
|
|
285
|
+
checked: J.value,
|
|
286
|
+
onChange: h
|
|
287
|
+
}, null, 40, pe),
|
|
288
|
+
p[2] || (p[2] = i("span", { class: "radio-text" }, "Y轴切割", -1))
|
|
289
|
+
]),
|
|
290
|
+
i("label", me, [
|
|
291
|
+
i("input", {
|
|
292
|
+
type: "radio",
|
|
293
|
+
name: "clipping-axis",
|
|
294
|
+
value: "z",
|
|
295
|
+
checked: v.value,
|
|
296
|
+
onChange: h
|
|
297
|
+
}, null, 40, he),
|
|
298
|
+
p[3] || (p[3] = i("span", { class: "radio-text" }, "Z轴切割", -1))
|
|
299
|
+
])
|
|
300
|
+
])
|
|
301
|
+
])
|
|
302
|
+
]));
|
|
303
|
+
}
|
|
304
|
+
}), Le = /* @__PURE__ */ L(fe, [["__scopeId", "data-v-5bd841c3"]]);
|
|
305
|
+
export {
|
|
306
|
+
Le as C,
|
|
307
|
+
Fe as J,
|
|
308
|
+
Ce as U,
|
|
309
|
+
xe as a,
|
|
310
|
+
be as b,
|
|
311
|
+
A as c,
|
|
312
|
+
ke as d,
|
|
313
|
+
Je as g
|
|
314
|
+
};
|