printbench 0.6.4 → 0.6.5
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/printbench.css +1 -1
- package/dist/printbench.js +339 -339
- package/package.json +1 -1
package/dist/printbench.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { toRaw as IB, ref as r, computed as PA, nextTick as PB, shallowRef as qQ, inject as tA, onUnmounted as
|
|
1
|
+
import { toRaw as IB, ref as r, computed as PA, nextTick as PB, shallowRef as qQ, inject as tA, onUnmounted as yg, defineComponent as oA, openBlock as c, createElementBlock as y, withModifiers as fA, createElementVNode as P, normalizeClass as vA, renderSlot as iE, createBlock as DA, withCtx as bA, withKeys as jg, toDisplayString as f, createTextVNode as m, createCommentVNode as b, watch as sA, onBeforeUnmount as sE, Teleport as aE, normalizeStyle as DB, Fragment as HA, renderList as kQ, createVNode as ZA, unref as J, withDirectives as RA, vModelText as lA, vShow as Tg, onMounted as HE, isRef as pQ, provide as XA, toRef as PQ } from "vue";
|
|
2
2
|
import { defineStore as Bg, getActivePinia as KE, setActivePinia as ME, createPinia as JE } from "pinia";
|
|
3
|
-
import { GLTFLoader as
|
|
4
|
-
import { Vector3 as Z, LoadingManager as tE, Color as ZQ, Quaternion as gg, Matrix4 as $, Euler as NE, Scene as YE, Group as RQ, Raycaster as cE, Plane as LE, Object3D as RE, WebGLRenderer as rE, PerspectiveCamera as eE, GridHelper as
|
|
3
|
+
import { GLTFLoader as zg } from "three/examples/jsm/loaders/GLTFLoader.js";
|
|
4
|
+
import { Vector3 as Z, LoadingManager as tE, Color as ZQ, Quaternion as gg, Matrix4 as $, Euler as NE, Scene as YE, Group as RQ, Raycaster as cE, Plane as LE, Object3D as RE, WebGLRenderer as rE, PerspectiveCamera as eE, GridHelper as og, DirectionalLight as cQ, HemisphereLight as ig, AmbientLight as sg, PMREMGenerator as yE, Box3 as DQ, Box3Helper as ag, MeshStandardMaterial as LA, BufferGeometry as lQ, BufferAttribute as qA, MeshNormalMaterial as jE, DoubleSide as _A, CanvasTexture as Hg, SRGBColorSpace as TE, Mesh as OQ, Vector2 as Kg, PlaneGeometry as zE, LineSegments as hE, LineBasicMaterial as Mg, Points as bE, PointsMaterial as dE, Line as SE, Sprite as nE, SpriteMaterial as xE } from "three";
|
|
5
5
|
import { DRACOLoader as pE } from "three/examples/jsm/loaders/DRACOLoader.js";
|
|
6
6
|
import { MeshoptDecoder as lE } from "three/examples/jsm/libs/meshopt_decoder.module.js";
|
|
7
7
|
import { STLLoader as qE } from "three/examples/jsm/loaders/STLLoader.js";
|
|
@@ -11,7 +11,7 @@ import VQ from "jszip";
|
|
|
11
11
|
import { OrbitControls as ZE } from "three/examples/jsm/controls/OrbitControls.js";
|
|
12
12
|
import { TransformControls as uE } from "three/examples/jsm/controls/TransformControls.js";
|
|
13
13
|
import { RoomEnvironment as VE } from "three/examples/jsm/environments/RoomEnvironment.js";
|
|
14
|
-
import { Evaluator as mE, Brush as
|
|
14
|
+
import { Evaluator as mE, Brush as Jg, ADDITION as WE, SUBTRACTION as XE, INTERSECTION as _E } from "three-bvh-csg";
|
|
15
15
|
import { STLExporter as $E } from "three/examples/jsm/exporters/STLExporter.js";
|
|
16
16
|
import { GLTFExporter as AI } from "three/examples/jsm/exporters/GLTFExporter.js";
|
|
17
17
|
const zA = [
|
|
@@ -64,7 +64,7 @@ function FQ(A) {
|
|
|
64
64
|
function zB(A) {
|
|
65
65
|
return Math.max(A[0], A[1], A[2], 0);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function hg(A) {
|
|
68
68
|
return BI(zB(FQ(A)));
|
|
69
69
|
}
|
|
70
70
|
function EI(A, g) {
|
|
@@ -87,11 +87,11 @@ function $A(A = "id") {
|
|
|
87
87
|
function hA(A, g = 0) {
|
|
88
88
|
return A.kind === "primary" ? A.meshId : A.kind === "primitive" ? A.id : A.kind === "boolean" || A.kind === "merge" ? A.id || `idx:${g}` : "id" in A && typeof A.id == "string" && A.id ? A.id : A.kind === "clean" || A.kind === "simplify" || A.kind === "sliceBase" || A.kind === "trimPlane" || A.kind === "transform" ? hA(A.node, g) : `idx:${g}`;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function bg(A) {
|
|
91
91
|
const g = (E) => Math.max(0, Math.min(255, Math.round(E * 255))).toString(16).padStart(2, "0");
|
|
92
92
|
return `#${g(A[0])}${g(A[1])}${g(A[2])}`;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function dg(A) {
|
|
95
95
|
const g = A.trim().replace(/^#/, ""), E = (I) => I.split("").map((C) => C + C).join(""), B = g.length === 3 || g.length === 4 ? E(g) : g;
|
|
96
96
|
if (B.length !== 6 && B.length !== 8) return;
|
|
97
97
|
const Q = Number.parseInt(B.slice(0, 6), 16);
|
|
@@ -99,7 +99,7 @@ function bg(A) {
|
|
|
99
99
|
return [(Q >> 16 & 255) / 255, (Q >> 8 & 255) / 255, (Q & 255) / 255];
|
|
100
100
|
}
|
|
101
101
|
function CI(A) {
|
|
102
|
-
return `${
|
|
102
|
+
return `${bg(A ?? [0.5411764705882353, 0.7058823529411765, 1])}FF`;
|
|
103
103
|
}
|
|
104
104
|
function wQ(A) {
|
|
105
105
|
return JSON.parse(JSON.stringify(A));
|
|
@@ -128,7 +128,7 @@ function CB(A, g = /* @__PURE__ */ new Set()) {
|
|
|
128
128
|
}
|
|
129
129
|
return g;
|
|
130
130
|
}
|
|
131
|
-
const
|
|
131
|
+
const Sg = `async function zC(B = {}) {
|
|
132
132
|
var C, g = B, E = !!globalThis.window, i = !!globalThis.WorkerGlobalScope, D = globalThis.process?.versions?.node && globalThis.process?.type != "renderer";
|
|
133
133
|
if (D) {
|
|
134
134
|
const { createRequire: A } = await Promise.resolve().then(function() {
|
|
@@ -3072,11 +3072,11 @@ self.onmessage = async (B) => {
|
|
|
3072
3072
|
var rB = /* @__PURE__ */ Object.freeze({
|
|
3073
3073
|
__proto__: null
|
|
3074
3074
|
});
|
|
3075
|
-
`,
|
|
3075
|
+
`, tg = typeof self < "u" && self.Blob && new Blob(["URL.revokeObjectURL(import.meta.url);", Sg], { type: "text/javascript;charset=utf-8" });
|
|
3076
3076
|
function PI(A) {
|
|
3077
3077
|
let g;
|
|
3078
3078
|
try {
|
|
3079
|
-
if (g =
|
|
3079
|
+
if (g = tg && (self.URL || self.webkitURL).createObjectURL(tg), !g) throw "";
|
|
3080
3080
|
const E = new Worker(g, {
|
|
3081
3081
|
type: "module",
|
|
3082
3082
|
name: A?.name
|
|
@@ -3086,7 +3086,7 @@ function PI(A) {
|
|
|
3086
3086
|
}), E;
|
|
3087
3087
|
} catch {
|
|
3088
3088
|
return new Worker(
|
|
3089
|
-
"data:text/javascript;charset=utf-8," + encodeURIComponent(
|
|
3089
|
+
"data:text/javascript;charset=utf-8," + encodeURIComponent(Sg),
|
|
3090
3090
|
{
|
|
3091
3091
|
type: "module",
|
|
3092
3092
|
name: A?.name
|
|
@@ -3310,15 +3310,15 @@ function MI(A) {
|
|
|
3310
3310
|
}), !g.length || !E.length) throw new Error("卡扣 GLB 中没有网格");
|
|
3311
3311
|
return Eg(new Float32Array(g), new Uint32Array(E));
|
|
3312
3312
|
}
|
|
3313
|
-
async function
|
|
3314
|
-
const E = await new
|
|
3313
|
+
async function Ng(A) {
|
|
3314
|
+
const E = await new zg().loadAsync(A);
|
|
3315
3315
|
return MI(E.scene);
|
|
3316
3316
|
}
|
|
3317
|
-
async function
|
|
3317
|
+
async function Yg() {
|
|
3318
3318
|
if (RB) return RB;
|
|
3319
3319
|
if (EB) return EB;
|
|
3320
3320
|
EB = (async () => {
|
|
3321
|
-
const [A, g] = await Promise.all([
|
|
3321
|
+
const [A, g] = await Promise.all([Ng(HI), Ng(KI)]);
|
|
3322
3322
|
return RB = { ao: A, tu: g }, RB;
|
|
3323
3323
|
})();
|
|
3324
3324
|
try {
|
|
@@ -3490,7 +3490,7 @@ function cI(A) {
|
|
|
3490
3490
|
const Q = Number(OA(B[1], "id")), I = [], C = /<base\b([^>]*)\/?>/gi;
|
|
3491
3491
|
let D;
|
|
3492
3492
|
for (; D = C.exec(B[2]); ) {
|
|
3493
|
-
const F = OA(D[1], "displaycolor"), v = F ?
|
|
3493
|
+
const F = OA(D[1], "displaycolor"), v = F ? dg(F) : void 0;
|
|
3494
3494
|
v && I.push(v);
|
|
3495
3495
|
}
|
|
3496
3496
|
Number.isFinite(Q) && I.length && g.set(Q, I);
|
|
@@ -3625,7 +3625,7 @@ function TI() {
|
|
|
3625
3625
|
return Q.setDecoderPath(""), Q;
|
|
3626
3626
|
}
|
|
3627
3627
|
function zI() {
|
|
3628
|
-
const A = new
|
|
3628
|
+
const A = new zg();
|
|
3629
3629
|
return $B || ($B = TI()), A.setDRACOLoader($B), A.setMeshoptDecoder(lE), A;
|
|
3630
3630
|
}
|
|
3631
3631
|
function hI(A) {
|
|
@@ -3638,7 +3638,7 @@ function Qg(A) {
|
|
|
3638
3638
|
function bI(A) {
|
|
3639
3639
|
return ("map" in A ? A.map : void 0) ?? void 0;
|
|
3640
3640
|
}
|
|
3641
|
-
function
|
|
3641
|
+
function cg(A) {
|
|
3642
3642
|
return A[0] > 0.97 && A[1] > 0.97 && A[2] > 0.97;
|
|
3643
3643
|
}
|
|
3644
3644
|
function dI(A) {
|
|
@@ -3685,7 +3685,7 @@ function nI(A, g, E, B, Q, I) {
|
|
|
3685
3685
|
}
|
|
3686
3686
|
return C;
|
|
3687
3687
|
}
|
|
3688
|
-
function
|
|
3688
|
+
function ng(A, g, E, B) {
|
|
3689
3689
|
const Q = A.getAttribute("position");
|
|
3690
3690
|
if (!Q) throw new Error("网格缺少 position 属性");
|
|
3691
3691
|
const I = A.getIndex(), C = new Float32Array(Q.count * 3), D = new Z();
|
|
@@ -3718,14 +3718,14 @@ function Sg(A, g, E, B) {
|
|
|
3718
3718
|
if (Y.length <= 1) {
|
|
3719
3719
|
if (d = e[0]?.canvas, S = e[0]?.flipY, Y[0]) {
|
|
3720
3720
|
const N = Qg(Y[0]);
|
|
3721
|
-
(!
|
|
3721
|
+
(!cg(N) || d) && (j = N);
|
|
3722
3722
|
}
|
|
3723
3723
|
} else {
|
|
3724
3724
|
const N = e.map((x) => x?.canvas).filter((x) => !!x);
|
|
3725
3725
|
if (new Set(N).size === 1 && N.length === Y.length) {
|
|
3726
3726
|
d = N[0], S = e.find((o) => o)?.flipY;
|
|
3727
3727
|
const x = Qg(Y[0]);
|
|
3728
|
-
(!
|
|
3728
|
+
(!cg(x) || d) && (j = x);
|
|
3729
3729
|
} else
|
|
3730
3730
|
H = nI(Q.count, F, L, A.groups, Y, e);
|
|
3731
3731
|
}
|
|
@@ -3764,7 +3764,7 @@ function Ag(A, g) {
|
|
|
3764
3764
|
(Array.isArray(F.geometry) ? F.geometry : [F.geometry]).forEach((H, K) => {
|
|
3765
3765
|
if (!H) return;
|
|
3766
3766
|
const Y = (typeof F.name == "string" ? F.name.trim() : "") || `${g}_${E.length || K}`;
|
|
3767
|
-
E.push(
|
|
3767
|
+
E.push(ng(H, Y, F.matrixWorld, F.material));
|
|
3768
3768
|
}), F.material && (Q = !0);
|
|
3769
3769
|
}
|
|
3770
3770
|
}), { meshes: E, depth: B, hasMat: Q };
|
|
@@ -3790,7 +3790,7 @@ async function Ig(A) {
|
|
|
3790
3790
|
};
|
|
3791
3791
|
}
|
|
3792
3792
|
if (g === "stl") {
|
|
3793
|
-
const Q = new qE().parse(E), I =
|
|
3793
|
+
const Q = new qE().parse(E), I = ng(Q, A.name.replace(/\.[^.]+$/, ""));
|
|
3794
3794
|
return {
|
|
3795
3795
|
meshes: [I],
|
|
3796
3796
|
summary: {
|
|
@@ -3938,7 +3938,7 @@ function rB(A) {
|
|
|
3938
3938
|
const g = A.toLowerCase().match(OI);
|
|
3939
3939
|
return g ? g[1] : null;
|
|
3940
3940
|
}
|
|
3941
|
-
function
|
|
3941
|
+
function Lg(A) {
|
|
3942
3942
|
if (!A) return null;
|
|
3943
3943
|
const g = A.split(";")[0].trim().toLowerCase();
|
|
3944
3944
|
return g === "text/plain" ? null : ZI[g] ?? null;
|
|
@@ -3949,10 +3949,10 @@ function WI(A, g, E) {
|
|
|
3949
3949
|
const Q = decodeURIComponent(A.pathname.split("/").pop() || "");
|
|
3950
3950
|
if (Q && rB(Q)) return Q;
|
|
3951
3951
|
if (B) {
|
|
3952
|
-
const C =
|
|
3952
|
+
const C = Lg(E ?? null);
|
|
3953
3953
|
if (C) return `${B.replace(/[/\\]/g, "_")}.${C}`;
|
|
3954
3954
|
}
|
|
3955
|
-
const I =
|
|
3955
|
+
const I = Lg(E ?? null) ?? rB(Q);
|
|
3956
3956
|
if (I)
|
|
3957
3957
|
return `${(Q || "model").replace(/\.[^.]+$/, "") || "model"}.${I}`;
|
|
3958
3958
|
throw new Error("无法判断文件格式,请使用以 .glb / .gltf / .stl / .obj / .3mf / .zip 结尾的地址");
|
|
@@ -3976,12 +3976,12 @@ async function XI(A, g = fetch) {
|
|
|
3976
3976
|
const F = B.headers.get("content-type") || "application/octet-stream";
|
|
3977
3977
|
return new File([I], C, { type: F });
|
|
3978
3978
|
}
|
|
3979
|
-
const
|
|
3979
|
+
const xg = "printbench.settings";
|
|
3980
3980
|
function _I() {
|
|
3981
3981
|
try {
|
|
3982
|
-
const A = localStorage.getItem(
|
|
3982
|
+
const A = localStorage.getItem(xg);
|
|
3983
3983
|
if (A) {
|
|
3984
|
-
const g = JSON.parse(A), E =
|
|
3984
|
+
const g = JSON.parse(A), E = Rg();
|
|
3985
3985
|
return {
|
|
3986
3986
|
...E,
|
|
3987
3987
|
...g,
|
|
@@ -3990,9 +3990,9 @@ function _I() {
|
|
|
3990
3990
|
}
|
|
3991
3991
|
} catch {
|
|
3992
3992
|
}
|
|
3993
|
-
return
|
|
3993
|
+
return Rg();
|
|
3994
3994
|
}
|
|
3995
|
-
function
|
|
3995
|
+
function Rg() {
|
|
3996
3996
|
return {
|
|
3997
3997
|
defaultUnit: "mm",
|
|
3998
3998
|
defaultExport: "glb",
|
|
@@ -4009,7 +4009,7 @@ function Lg() {
|
|
|
4009
4009
|
const rQ = Bg("printbench-settings", () => {
|
|
4010
4010
|
const A = r(_I());
|
|
4011
4011
|
function g() {
|
|
4012
|
-
localStorage.setItem(
|
|
4012
|
+
localStorage.setItem(xg, JSON.stringify(A.value));
|
|
4013
4013
|
}
|
|
4014
4014
|
function E(B) {
|
|
4015
4015
|
A.value = { ...A.value, ...B }, g();
|
|
@@ -4094,7 +4094,7 @@ async function AC(A) {
|
|
|
4094
4094
|
} catch {
|
|
4095
4095
|
}
|
|
4096
4096
|
}
|
|
4097
|
-
async function
|
|
4097
|
+
async function pg() {
|
|
4098
4098
|
try {
|
|
4099
4099
|
const A = await eQ();
|
|
4100
4100
|
return await new Promise((g, E) => {
|
|
@@ -4199,7 +4199,7 @@ function LQ(A, g) {
|
|
|
4199
4199
|
degenerateCount: D
|
|
4200
4200
|
};
|
|
4201
4201
|
}
|
|
4202
|
-
function
|
|
4202
|
+
function lg(A, g) {
|
|
4203
4203
|
const E = Math.hypot(A[0], A[1], A[2]);
|
|
4204
4204
|
return E < 1e-12 ? { normal: [0, 1, 0], offset: g } : {
|
|
4205
4205
|
normal: [A[0] / E, A[1] / E, A[2] / E],
|
|
@@ -4207,7 +4207,7 @@ function pg(A, g) {
|
|
|
4207
4207
|
};
|
|
4208
4208
|
}
|
|
4209
4209
|
function PC(A, g, E, B) {
|
|
4210
|
-
const { normal: Q, offset: I } =
|
|
4210
|
+
const { normal: Q, offset: I } = lg(A, g);
|
|
4211
4211
|
let C = 1 / 0, D = -1 / 0;
|
|
4212
4212
|
for (const F of [E[0], B[0]])
|
|
4213
4213
|
for (const v of [E[1], B[1]])
|
|
@@ -4265,7 +4265,7 @@ function jB(A) {
|
|
|
4265
4265
|
const E = -A.min[1] + 1e-6;
|
|
4266
4266
|
return new $().makeTranslation(0, E, 0).elements.slice();
|
|
4267
4267
|
}
|
|
4268
|
-
function
|
|
4268
|
+
function rg(A, g) {
|
|
4269
4269
|
return new $().fromArray(A).multiply(new $().fromArray(g)).elements.slice();
|
|
4270
4270
|
}
|
|
4271
4271
|
function FC(A, g) {
|
|
@@ -4349,7 +4349,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
4349
4349
|
const w = {};
|
|
4350
4350
|
return Q.value.forEach((i, s) => {
|
|
4351
4351
|
const M = KA(s);
|
|
4352
|
-
M && (w[hA(i, s)] =
|
|
4352
|
+
M && (w[hA(i, s)] = bg(M));
|
|
4353
4353
|
}), w;
|
|
4354
4354
|
});
|
|
4355
4355
|
function KA(w) {
|
|
@@ -4366,7 +4366,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
4366
4366
|
}
|
|
4367
4367
|
function GQ(w) {
|
|
4368
4368
|
w && Object.entries(w).forEach(([i, s]) => {
|
|
4369
|
-
const M =
|
|
4369
|
+
const M = dg(s);
|
|
4370
4370
|
M && SA(i, M);
|
|
4371
4371
|
});
|
|
4372
4372
|
}
|
|
@@ -4517,7 +4517,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
4517
4517
|
s.setBusy(!0, "解析模型…"), VA();
|
|
4518
4518
|
try {
|
|
4519
4519
|
if (w.size > yB) throw new Error("文件过大,请先在外部简化后再导入");
|
|
4520
|
-
const M = await Ig(w), h = M.declaredUnit ? M.declaredUnit : M.meshes.length ?
|
|
4520
|
+
const M = await Ig(w), h = M.declaredUnit ? M.declaredUnit : M.meshes.length ? hg(M.meshes.map((q) => ({ positions: q.buffers.positions }))) : i, n = eB[h];
|
|
4521
4521
|
B.value = jQ(M.meshes, n), t.value = {}, z.value = {}, A.value = "mm", g.value = h, E.value = w.name, K.value = M.summary, Q.value = B.value.map((q) => ({
|
|
4522
4522
|
kind: "primary",
|
|
4523
4523
|
meshId: q.id,
|
|
@@ -4783,11 +4783,11 @@ const QQ = Bg("printbench-project", () => {
|
|
|
4783
4783
|
return n.toast("fail", "当前零件体积过小,无法拆件"), !1;
|
|
4784
4784
|
const SQ = M !== "none" ? 0 : s;
|
|
4785
4785
|
await EQ();
|
|
4786
|
-
const iQ = M === "ballSnap" || M === "qiuSnap" ? await
|
|
4786
|
+
const iQ = M === "ballSnap" || M === "qiuSnap" ? await Yg() : void 0;
|
|
4787
4787
|
let pA = [V];
|
|
4788
4788
|
try {
|
|
4789
4789
|
for (let GA = 0; GA < i.length; GA++) {
|
|
4790
|
-
const { normal: IQ, offset: sQ } =
|
|
4790
|
+
const { normal: IQ, offset: sQ } = lg(i[GA].normal, i[GA].offset), CQ = [];
|
|
4791
4791
|
let QB = !1;
|
|
4792
4792
|
for (const nQ of pA) {
|
|
4793
4793
|
const BB = LQ(nQ.positions, nQ.indices);
|
|
@@ -4870,7 +4870,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
4870
4870
|
);
|
|
4871
4871
|
}
|
|
4872
4872
|
await EQ();
|
|
4873
|
-
const h = w === "ballSnap" || w === "qiuSnap" ? await
|
|
4873
|
+
const h = w === "ballSnap" || w === "qiuSnap" ? await Yg() : void 0;
|
|
4874
4874
|
let n;
|
|
4875
4875
|
try {
|
|
4876
4876
|
n = await sI(M, w, i, h);
|
|
@@ -4986,7 +4986,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
4986
4986
|
const n = w(h, M);
|
|
4987
4987
|
if (!n) continue;
|
|
4988
4988
|
const q = new $().fromArray(n);
|
|
4989
|
-
tQ(q) || s.push({ index: M, next:
|
|
4989
|
+
tQ(q) || s.push({ index: M, next: rg(n, aB(M)) });
|
|
4990
4990
|
}
|
|
4991
4991
|
if (s.length) {
|
|
4992
4992
|
QA();
|
|
@@ -5012,7 +5012,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
5012
5012
|
if (!s.length) return;
|
|
5013
5013
|
const M = F.value >= 0 && s.includes(F.value) ? F.value : s[0], h = bQ(M);
|
|
5014
5014
|
if (!h) return;
|
|
5015
|
-
const n = GC(w, h), q =
|
|
5015
|
+
const n = GC(w, h), q = rg(n, aB(M));
|
|
5016
5016
|
QA(), UQ(M, q, !1, { skipHistory: !0, skipEvaluate: !0 }), T.value = !0, await IA();
|
|
5017
5017
|
}
|
|
5018
5018
|
function dQ(w) {
|
|
@@ -5056,7 +5056,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
5056
5056
|
T.value = !0, x.value && AC(JB());
|
|
5057
5057
|
}
|
|
5058
5058
|
async function AB() {
|
|
5059
|
-
const w = await
|
|
5059
|
+
const w = await pg();
|
|
5060
5060
|
w && await tB(w);
|
|
5061
5061
|
}
|
|
5062
5062
|
function VB() {
|
|
@@ -5148,7 +5148,7 @@ const QQ = Bg("printbench-project", () => {
|
|
|
5148
5148
|
function sC(A, g) {
|
|
5149
5149
|
return `${(A.replace(/\.[^.]+$/, "") || "printbench").trim() || "printbench"}-snapshot.${g === "jpeg" ? "jpg" : "png"}`;
|
|
5150
5150
|
}
|
|
5151
|
-
function
|
|
5151
|
+
function qg(A) {
|
|
5152
5152
|
return iC[A];
|
|
5153
5153
|
}
|
|
5154
5154
|
function aC(A) {
|
|
@@ -5250,7 +5250,7 @@ class KC {
|
|
|
5250
5250
|
E.updateMatrixWorld(), E === this.gizmoPivot ? this.syncMeshFromGizmoPivot() : this.gizmoMatrix = E.matrixWorld.elements.slice();
|
|
5251
5251
|
}
|
|
5252
5252
|
this.onTransformChange?.();
|
|
5253
|
-
}), this.gizmoPivot.name = "part-gizmo-pivot", this.scene.add(this.gizmoPivot), this.scene.add(this.modelGroup), this.scene.add(this.overlayGroup), this.scene.add(this.defectGroup), this.scene.add(this.measureGroup), this.scene.add(this.transform.getHelper()), this.lightsGroup.name = "lights", this.scene.add(this.lightsGroup), this.setLightingMode("neutral"), this.grid = new
|
|
5253
|
+
}), this.gizmoPivot.name = "part-gizmo-pivot", this.scene.add(this.gizmoPivot), this.scene.add(this.modelGroup), this.scene.add(this.overlayGroup), this.scene.add(this.defectGroup), this.scene.add(this.measureGroup), this.scene.add(this.transform.getHelper()), this.lightsGroup.name = "lights", this.scene.add(this.lightsGroup), this.setLightingMode("neutral"), this.grid = new og(200, 20, 3817808, 2764860), this.scene.add(this.grid), this.loop();
|
|
5254
5254
|
}
|
|
5255
5255
|
resize(g, E) {
|
|
5256
5256
|
this.camera.aspect = g / Math.max(1, E), this.camera.updateProjectionMatrix();
|
|
@@ -5299,11 +5299,11 @@ class KC {
|
|
|
5299
5299
|
this.envMap && (this.scene.environment = null, this.envMap.dispose(), this.envMap = null), this.pmrem?.dispose(), this.pmrem = null, this.scene.environmentIntensity = 1;
|
|
5300
5300
|
}
|
|
5301
5301
|
buildNeutralLights() {
|
|
5302
|
-
const g = new
|
|
5302
|
+
const g = new ig(13625599, 1711138, 1.1), E = new cQ(16777215, 1.4);
|
|
5303
5303
|
E.position.set(40, 80, 30), this.lightsGroup.add(g, E), this.registerLight(g, 1.1), this.registerLight(E, 1.4);
|
|
5304
5304
|
}
|
|
5305
5305
|
buildStudioLights() {
|
|
5306
|
-
const g = new
|
|
5306
|
+
const g = new sg(16777215, 0.42), E = new ig(16777215, 10132122, 0.4), B = new cQ(16777215, 0.85);
|
|
5307
5307
|
B.position.set(4, 8, 4);
|
|
5308
5308
|
const Q = new cQ(16777215, 0.55);
|
|
5309
5309
|
Q.position.set(-5, 3, 4);
|
|
@@ -5318,7 +5318,7 @@ class KC {
|
|
|
5318
5318
|
E.position.set(40, 80, 30), this.lightsGroup.add(E), this.registerLight(E, 0.35);
|
|
5319
5319
|
}
|
|
5320
5320
|
buildHeadlampLights() {
|
|
5321
|
-
const g = new
|
|
5321
|
+
const g = new sg(16777215, 0.35), E = new cQ(16777215, 1.2);
|
|
5322
5322
|
E.position.set(0.4, 0.55, 1), this.camera.add(E), this.camera.add(E.target), E.target.position.set(0, 0, -1), this.lightsGroup.add(g), this.registerLight(g, 0.35), this.registerLight(E, 1.2);
|
|
5323
5323
|
}
|
|
5324
5324
|
/** Print bed volume: X×Z footprint centered on origin, Y height from Y=0. */
|
|
@@ -5328,7 +5328,7 @@ class KC {
|
|
|
5328
5328
|
new Z(-g.x / 2, 0, -g.z / 2),
|
|
5329
5329
|
new Z(g.x / 2, g.y, g.z / 2)
|
|
5330
5330
|
);
|
|
5331
|
-
this.bedHelper = new
|
|
5331
|
+
this.bedHelper = new ag(B, this.bedOverflow ? this.bedColorWarn : this.bedColorOk), this.scene.add(this.bedHelper);
|
|
5332
5332
|
}
|
|
5333
5333
|
setBedOverflow(g) {
|
|
5334
5334
|
if (this.bedOverflow = g, !this.bedHelper) return;
|
|
@@ -5394,7 +5394,7 @@ class KC {
|
|
|
5394
5394
|
else if (T || x || j?.baseColor) {
|
|
5395
5395
|
x && j?.colors && e.setAttribute("color", new qA(j.colors, 3)), T && j?.uvs && e.setAttribute("uv", new qA(j.uvs, 2));
|
|
5396
5396
|
const t = j?.texture, z = T && t ? (() => {
|
|
5397
|
-
const O = new
|
|
5397
|
+
const O = new Hg(t);
|
|
5398
5398
|
return O.colorSpace = TE, O.flipY = j?.flipY ?? !1, O.needsUpdate = !0, O;
|
|
5399
5399
|
})() : null, p = j?.baseColor ? new ZQ().fromArray(j.baseColor) : new ZQ(16777215);
|
|
5400
5400
|
d = new LA({
|
|
@@ -5425,7 +5425,7 @@ class KC {
|
|
|
5425
5425
|
o.name = E[Y] ?? `part_${Y}`, o.visible = B[Y] !== !1, o.userData.index = Y, this.modelGroup.add(o), this.meshes.push(o);
|
|
5426
5426
|
}), D && this.meshes.length) {
|
|
5427
5427
|
const L = new DQ().setFromObject(this.modelGroup);
|
|
5428
|
-
this.bboxHelper = new
|
|
5428
|
+
this.bboxHelper = new ag(L, 15774761), this.scene.add(this.bboxHelper);
|
|
5429
5429
|
}
|
|
5430
5430
|
this.fitIfNeeded();
|
|
5431
5431
|
}
|
|
@@ -5442,13 +5442,13 @@ class KC {
|
|
|
5442
5442
|
const E = g.getSize(new Z()), B = g.getCenter(new Z()), Q = Math.max(E.x, E.y, E.z, 1);
|
|
5443
5443
|
this.controls.target.copy(B), this.camera.position.copy(B).add(new Z(Q, Q * 0.8, Q * 1.2)), this.camera.near = Q / 200, this.camera.far = Q * 40, this.camera.updateProjectionMatrix();
|
|
5444
5444
|
const I = Math.max(50, Math.ceil(Q * 3 / 10) * 10);
|
|
5445
|
-
this.scene.remove(this.grid), this.grid = new
|
|
5445
|
+
this.scene.remove(this.grid), this.grid = new og(I, 20, 3817808, 2764860), this.scene.add(this.grid);
|
|
5446
5446
|
}
|
|
5447
5447
|
resetView() {
|
|
5448
5448
|
this.camera.up.set(0, 1, 0), this.fitted = !1, this.fit();
|
|
5449
5449
|
}
|
|
5450
5450
|
pick(g, E) {
|
|
5451
|
-
this.raycaster.setFromCamera(new
|
|
5451
|
+
this.raycaster.setFromCamera(new Kg(g, E), this.camera);
|
|
5452
5452
|
const B = this.raycaster.intersectObjects(this.meshes, !1);
|
|
5453
5453
|
if (!B.length) return null;
|
|
5454
5454
|
const Q = B[0], I = Q.object;
|
|
@@ -5581,7 +5581,7 @@ class KC {
|
|
|
5581
5581
|
}
|
|
5582
5582
|
pickSplitPlane(g, E) {
|
|
5583
5583
|
if (!this.splitPlanes.length) return null;
|
|
5584
|
-
this.raycaster.setFromCamera(new
|
|
5584
|
+
this.raycaster.setFromCamera(new Kg(g, E), this.camera);
|
|
5585
5585
|
const B = this.raycaster.intersectObjects(this.splitPlanes, !1);
|
|
5586
5586
|
if (!B.length) return null;
|
|
5587
5587
|
const Q = this.splitPlanes.indexOf(B[0].object);
|
|
@@ -5655,7 +5655,7 @@ class KC {
|
|
|
5655
5655
|
try {
|
|
5656
5656
|
const C = Q.geometry.clone(), D = I.geometry.clone();
|
|
5657
5657
|
C.applyMatrix4(Q.matrixWorld), D.applyMatrix4(I.matrixWorld);
|
|
5658
|
-
const F = new
|
|
5658
|
+
const F = new Jg(C), v = new Jg(D);
|
|
5659
5659
|
F.matrixAutoUpdate = !1, v.matrixAutoUpdate = !1, F.updateMatrixWorld(!0), v.updateMatrixWorld(!0);
|
|
5660
5660
|
const H = B === "union" ? WE : B === "difference" ? XE : _E, K = this.evaluator.evaluate(F, v, H);
|
|
5661
5661
|
K.matrixAutoUpdate = !1, K.matrix.identity(), K.updateMatrixWorld(!0);
|
|
@@ -5735,7 +5735,7 @@ class KC {
|
|
|
5735
5735
|
}
|
|
5736
5736
|
linesFromPairs(g, E) {
|
|
5737
5737
|
const B = new lQ();
|
|
5738
|
-
return B.setAttribute("position", new qA(g, 3)), new hE(B, new
|
|
5738
|
+
return B.setAttribute("position", new qA(g, 3)), new hE(B, new Mg({ color: E, depthTest: !1 }));
|
|
5739
5739
|
}
|
|
5740
5740
|
trisFromPositions(g, E, B) {
|
|
5741
5741
|
const Q = new lQ();
|
|
@@ -5761,7 +5761,7 @@ class KC {
|
|
|
5761
5761
|
const C = new lQ();
|
|
5762
5762
|
if (C.setAttribute("position", new qA(I, 3)), this.measureGroup.add(new bE(C, new dE({ color: 16769162, size: 6, sizeAttenuation: !1 }))), Q.length >= 2) {
|
|
5763
5763
|
const D = new lQ();
|
|
5764
|
-
D.setAttribute("position", new qA(I, 3)), this.measureGroup.add(new SE(D, new
|
|
5764
|
+
D.setAttribute("position", new qA(I, 3)), this.measureGroup.add(new SE(D, new Mg({ color: 16769162 })));
|
|
5765
5765
|
}
|
|
5766
5766
|
if (B && Q.length) {
|
|
5767
5767
|
const D = Q[Q.length - 1];
|
|
@@ -5773,7 +5773,7 @@ class KC {
|
|
|
5773
5773
|
B.width = 256, B.height = 64;
|
|
5774
5774
|
const Q = B.getContext("2d");
|
|
5775
5775
|
Q.fillStyle = "rgba(20,24,32,0.85)", Q.fillRect(0, 0, 256, 64), Q.fillStyle = "#ffe08a", Q.font = "22px sans-serif", Q.fillText(g, 12, 40);
|
|
5776
|
-
const I = new nE(new xE({ map: new
|
|
5776
|
+
const I = new nE(new xE({ map: new Hg(B), depthTest: !1 }));
|
|
5777
5777
|
return I.position.copy(E), I.scale.set(16, 4, 1), I;
|
|
5778
5778
|
}
|
|
5779
5779
|
flyTo(g) {
|
|
@@ -5853,7 +5853,7 @@ function NC(A) {
|
|
|
5853
5853
|
<h2>测量</h2><ul>${B || "<li>无</li>"}</ul>
|
|
5854
5854
|
</body></html>`;
|
|
5855
5855
|
}
|
|
5856
|
-
const
|
|
5856
|
+
const BF = {
|
|
5857
5857
|
numeric: !0,
|
|
5858
5858
|
primitives: !0,
|
|
5859
5859
|
split: !0,
|
|
@@ -5891,19 +5891,19 @@ function YC(A) {
|
|
|
5891
5891
|
actionButtons: A?.actionButtons === "icon" || A?.actionButtons === "text" ? A.actionButtons : "icon-text"
|
|
5892
5892
|
};
|
|
5893
5893
|
}
|
|
5894
|
-
const wg = /* @__PURE__ */ Symbol("printbench-upload-url"),
|
|
5894
|
+
const wg = /* @__PURE__ */ Symbol("printbench-upload-url"), Og = /* @__PURE__ */ Symbol("printbench-model-url"), Fg = /* @__PURE__ */ Symbol("printbench-custom-export"), fg = /* @__PURE__ */ Symbol("printbench-mode"), Zg = /* @__PURE__ */ Symbol(
|
|
5895
5895
|
"printbench-selected-part-ids"
|
|
5896
|
-
),
|
|
5896
|
+
), ug = /* @__PURE__ */ Symbol(
|
|
5897
5897
|
"printbench-part-colors"
|
|
5898
|
-
), hB = /* @__PURE__ */ Symbol("printbench-hooks"),
|
|
5898
|
+
), hB = /* @__PURE__ */ Symbol("printbench-hooks"), Vg = /* @__PURE__ */ Symbol(
|
|
5899
5899
|
"printbench-features"
|
|
5900
|
-
), Vg = /* @__PURE__ */ Symbol(
|
|
5901
|
-
"printbench-bed-size-mm"
|
|
5902
5900
|
), mg = /* @__PURE__ */ Symbol(
|
|
5901
|
+
"printbench-bed-size-mm"
|
|
5902
|
+
), Wg = /* @__PURE__ */ Symbol(
|
|
5903
5903
|
"printbench-show-bed-volume"
|
|
5904
5904
|
);
|
|
5905
5905
|
function cC(A, g, E) {
|
|
5906
|
-
return g || (A.length ?
|
|
5906
|
+
return g || (A.length ? hg(A.map((B) => ({ positions: B.buffers.positions }))) : E);
|
|
5907
5907
|
}
|
|
5908
5908
|
function LC(A) {
|
|
5909
5909
|
const g = QQ(), E = rQ(), B = UA(), Q = r(!1), I = r(!1), C = r(""), D = r(null), F = r("mm"), v = r(!1), H = qQ(null);
|
|
@@ -6013,7 +6013,7 @@ function RC(A, g) {
|
|
|
6013
6013
|
return E.add(C.toLowerCase()), C;
|
|
6014
6014
|
});
|
|
6015
6015
|
}
|
|
6016
|
-
function
|
|
6016
|
+
function eg(A) {
|
|
6017
6017
|
const g = new $E(), E = new RQ();
|
|
6018
6018
|
A.forEach((I) => {
|
|
6019
6019
|
const C = Dg(I), D = new OQ(C);
|
|
@@ -6024,15 +6024,15 @@ function rg(A) {
|
|
|
6024
6024
|
}
|
|
6025
6025
|
async function rC(A, g, E) {
|
|
6026
6026
|
if (A.length <= 1)
|
|
6027
|
-
return { buf:
|
|
6027
|
+
return { buf: eg(A), name: `${g}.stl`, mime: "model/stl" };
|
|
6028
6028
|
const B = new VQ();
|
|
6029
6029
|
return RC(E.length === A.length ? E : A.map((C, D) => `part_${D + 1}`), "stl").forEach((C, D) => {
|
|
6030
|
-
const F =
|
|
6031
|
-
if (!
|
|
6030
|
+
const F = eg([A[D]]);
|
|
6031
|
+
if (!Xg(F)) throw new Error("导出文件头校验失败");
|
|
6032
6032
|
B.file(C, F);
|
|
6033
6033
|
}), { buf: await B.generateAsync({ type: "arraybuffer", compression: "DEFLATE" }), name: `${g}.zip`, mime: "application/zip" };
|
|
6034
6034
|
}
|
|
6035
|
-
function
|
|
6035
|
+
function Xg(A) {
|
|
6036
6036
|
if (A.byteLength < 84) return !1;
|
|
6037
6037
|
const E = new DataView(A).getUint32(80, !0);
|
|
6038
6038
|
return A.byteLength === 84 + E * 50;
|
|
@@ -6068,7 +6068,7 @@ class vg extends Error {
|
|
|
6068
6068
|
function jC(A) {
|
|
6069
6069
|
return (A ?? "").trim();
|
|
6070
6070
|
}
|
|
6071
|
-
async function
|
|
6071
|
+
async function _g(A, g, E) {
|
|
6072
6072
|
const B = jC(E?.endpoint);
|
|
6073
6073
|
if (!B) throw new vg();
|
|
6074
6074
|
const Q = new FormData();
|
|
@@ -6156,7 +6156,7 @@ function TC(A) {
|
|
|
6156
6156
|
const gA = [...g.partNames];
|
|
6157
6157
|
if (F.value === "stl") {
|
|
6158
6158
|
const u = await rC(z, o, gA);
|
|
6159
|
-
if (u.name.endsWith(".stl") && !
|
|
6159
|
+
if (u.name.endsWith(".stl") && !Xg(u.buf)) throw new Error("导出文件头校验失败");
|
|
6160
6160
|
return { ...u, size: AA, longestEdgeMm: O };
|
|
6161
6161
|
}
|
|
6162
6162
|
if (F.value === "glb") {
|
|
@@ -6196,7 +6196,7 @@ function TC(A) {
|
|
|
6196
6196
|
}
|
|
6197
6197
|
K.value = 80;
|
|
6198
6198
|
const EA = new Blob([new Uint8Array(z)], { type: O });
|
|
6199
|
-
await
|
|
6199
|
+
await _g(
|
|
6200
6200
|
EA,
|
|
6201
6201
|
{
|
|
6202
6202
|
fileName: p,
|
|
@@ -6300,7 +6300,7 @@ function zC(A) {
|
|
|
6300
6300
|
const wA = await e(x, o);
|
|
6301
6301
|
z = wA.blob, p = wA.width, O = wA.height, D.value = x;
|
|
6302
6302
|
}
|
|
6303
|
-
const AA = sC(g.fileName, x), gA =
|
|
6303
|
+
const AA = sC(g.fileName, x), gA = qg(x), EA = {
|
|
6304
6304
|
action: T,
|
|
6305
6305
|
format: x,
|
|
6306
6306
|
fileName: AA,
|
|
@@ -6313,7 +6313,7 @@ function zC(A) {
|
|
|
6313
6313
|
return I.onSnapshot?.(EA), console.log(`已生成 ${AA}`), R(), EA;
|
|
6314
6314
|
if (T === "download")
|
|
6315
6315
|
return j(z, AA), I.onSnapshot?.(EA), console.log(`已下载 ${AA}`), R(), EA;
|
|
6316
|
-
const u = await
|
|
6316
|
+
const u = await _g(
|
|
6317
6317
|
z,
|
|
6318
6318
|
{ fileName: AA, format: x },
|
|
6319
6319
|
{ endpoint: B.value }
|
|
@@ -6334,7 +6334,7 @@ function zC(A) {
|
|
|
6334
6334
|
const x = T?.format ?? "png";
|
|
6335
6335
|
return D.value = x, v.value = null, U(T?.action ?? "download", x, T?.quality);
|
|
6336
6336
|
}
|
|
6337
|
-
return
|
|
6337
|
+
return yg(() => L()), {
|
|
6338
6338
|
snapshotOpen: C,
|
|
6339
6339
|
snapshotFmt: D,
|
|
6340
6340
|
previewUrl: F,
|
|
@@ -6431,7 +6431,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6431
6431
|
placeholder: "https://example.com/model.stl",
|
|
6432
6432
|
value: A.url,
|
|
6433
6433
|
onInput: Q[1] || (Q[1] = (I) => E("update:url", I.target.value)),
|
|
6434
|
-
onKeydown: Q[2] || (Q[2] =
|
|
6434
|
+
onKeydown: Q[2] || (Q[2] = jg(fA((I) => E("import-url"), ["prevent"]), ["enter"]))
|
|
6435
6435
|
}, null, 40, dC),
|
|
6436
6436
|
P("div", SC, [
|
|
6437
6437
|
P("button", {
|
|
@@ -6677,7 +6677,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6677
6677
|
}
|
|
6678
6678
|
}), $C = { class: "row" }, AP = ["checked"], QP = ["checked"], BP = ["checked"], gP = {
|
|
6679
6679
|
key: 0,
|
|
6680
|
-
class: "row"
|
|
6680
|
+
class: "row unit-row"
|
|
6681
6681
|
}, EP = { class: "row" }, IP = ["value"], CP = {
|
|
6682
6682
|
key: 1,
|
|
6683
6683
|
class: "bar",
|
|
@@ -6781,10 +6781,15 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6781
6781
|
_: 1
|
|
6782
6782
|
}));
|
|
6783
6783
|
}
|
|
6784
|
-
}),
|
|
6784
|
+
}), kg = (A, g) => {
|
|
6785
|
+
const E = A.__vccOpts || A;
|
|
6786
|
+
for (const [B, Q] of g)
|
|
6787
|
+
E[B] = Q;
|
|
6788
|
+
return E;
|
|
6789
|
+
}, wP = /* @__PURE__ */ kg(DP, [["__scopeId", "data-v-d70135e8"]]), FP = ["src"], vP = {
|
|
6785
6790
|
key: 1,
|
|
6786
6791
|
class: "hint"
|
|
6787
|
-
},
|
|
6792
|
+
}, kP = { class: "row" }, GP = ["checked"], UP = ["checked"], oP = { class: "actions" }, iP = ["disabled"], sP = ["disabled"], aP = /* @__PURE__ */ oA({
|
|
6788
6793
|
__name: "SnapshotDialog",
|
|
6789
6794
|
props: {
|
|
6790
6795
|
previewUrl: {},
|
|
@@ -6803,15 +6808,15 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6803
6808
|
class: "snapshot-preview",
|
|
6804
6809
|
src: A.previewUrl,
|
|
6805
6810
|
alt: "当前视角快照"
|
|
6806
|
-
}, null, 8,
|
|
6807
|
-
P("div",
|
|
6811
|
+
}, null, 8, FP)) : (c(), y("p", vP, "尚未生成预览")),
|
|
6812
|
+
P("div", kP, [
|
|
6808
6813
|
P("label", null, [
|
|
6809
6814
|
P("input", {
|
|
6810
6815
|
type: "radio",
|
|
6811
6816
|
value: "png",
|
|
6812
6817
|
checked: A.format === "png",
|
|
6813
6818
|
onChange: Q[0] || (Q[0] = (I) => E("update:format", "png"))
|
|
6814
|
-
}, null, 40,
|
|
6819
|
+
}, null, 40, GP),
|
|
6815
6820
|
Q[6] || (Q[6] = m(" PNG", -1))
|
|
6816
6821
|
]),
|
|
6817
6822
|
P("label", null, [
|
|
@@ -6820,12 +6825,12 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6820
6825
|
value: "jpeg",
|
|
6821
6826
|
checked: A.format === "jpeg",
|
|
6822
6827
|
onChange: Q[1] || (Q[1] = (I) => E("update:format", "jpeg"))
|
|
6823
|
-
}, null, 40,
|
|
6828
|
+
}, null, 40, UP),
|
|
6824
6829
|
Q[7] || (Q[7] = m(" JPEG", -1))
|
|
6825
6830
|
])
|
|
6826
6831
|
]),
|
|
6827
6832
|
Q[9] || (Q[9] = P("p", { style: { "font-size": "12px", color: "var(--muted)" } }, "按当前相机视角截取模型,不含网格、变换手柄、切面与测量。换格式会重新截取。", -1)),
|
|
6828
|
-
P("div",
|
|
6833
|
+
P("div", oP, [
|
|
6829
6834
|
P("button", {
|
|
6830
6835
|
class: "btn",
|
|
6831
6836
|
type: "button",
|
|
@@ -6836,19 +6841,19 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6836
6841
|
type: "button",
|
|
6837
6842
|
disabled: !A.previewUrl,
|
|
6838
6843
|
onClick: Q[3] || (Q[3] = (I) => E("recapture"))
|
|
6839
|
-
}, "重新截取", 8,
|
|
6844
|
+
}, "重新截取", 8, iP),
|
|
6840
6845
|
P("button", {
|
|
6841
6846
|
class: "btn",
|
|
6842
6847
|
type: "button",
|
|
6843
6848
|
disabled: !A.previewUrl,
|
|
6844
6849
|
onClick: Q[4] || (Q[4] = (I) => E("download"))
|
|
6845
|
-
}, "下载", 8,
|
|
6850
|
+
}, "下载", 8, sP)
|
|
6846
6851
|
])
|
|
6847
6852
|
]),
|
|
6848
6853
|
_: 1
|
|
6849
6854
|
}));
|
|
6850
6855
|
}
|
|
6851
|
-
}),
|
|
6856
|
+
}), HP = { class: "row" }, KP = { class: "row" }, MP = { class: "section" }, JP = { class: "checks" }, tP = ["checked"], NP = ["checked"], YP = ["checked"], cP = ["checked"], LP = { class: "row" }, RP = { class: "section" }, rP = { class: "bed-xyz" }, eP = { class: "axis" }, yP = ["value"], jP = { class: "axis" }, TP = ["value"], zP = { class: "axis" }, hP = ["value"], bP = { class: "bed-presets" }, dP = ["onClick"], SP = { class: "row" }, nP = ["value"], xP = { class: "actions" }, pP = /* @__PURE__ */ oA({
|
|
6852
6857
|
__name: "SettingsDialog",
|
|
6853
6858
|
emits: ["close"],
|
|
6854
6859
|
setup(A) {
|
|
@@ -6880,7 +6885,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6880
6885
|
}, {
|
|
6881
6886
|
default: bA(() => [
|
|
6882
6887
|
F[26] || (F[26] = P("h3", null, "设置", -1)),
|
|
6883
|
-
P("div",
|
|
6888
|
+
P("div", HP, [
|
|
6884
6889
|
F[13] || (F[13] = P("span", { class: "label" }, "默认导入单位", -1)),
|
|
6885
6890
|
ZA(vQ, {
|
|
6886
6891
|
"model-value": J(Q).state.defaultUnit,
|
|
@@ -6889,7 +6894,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6889
6894
|
"onUpdate:modelValue": F[0] || (F[0] = (v) => J(Q).patch({ defaultUnit: v }))
|
|
6890
6895
|
}, null, 8, ["model-value"])
|
|
6891
6896
|
]),
|
|
6892
|
-
P("div",
|
|
6897
|
+
P("div", KP, [
|
|
6893
6898
|
F[14] || (F[14] = P("span", { class: "label" }, "默认导出", -1)),
|
|
6894
6899
|
ZA(vQ, {
|
|
6895
6900
|
"model-value": J(Q).state.defaultExport,
|
|
@@ -6898,15 +6903,15 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6898
6903
|
"onUpdate:modelValue": F[1] || (F[1] = (v) => J(Q).patch({ defaultExport: v }))
|
|
6899
6904
|
}, null, 8, ["model-value"])
|
|
6900
6905
|
]),
|
|
6901
|
-
P("div",
|
|
6906
|
+
P("div", MP, [
|
|
6902
6907
|
F[20] || (F[20] = P("div", { class: "section-title" }, "显示", -1)),
|
|
6903
|
-
P("div",
|
|
6908
|
+
P("div", JP, [
|
|
6904
6909
|
P("label", null, [
|
|
6905
6910
|
P("input", {
|
|
6906
6911
|
type: "checkbox",
|
|
6907
6912
|
checked: J(Q).state.showGrid,
|
|
6908
6913
|
onChange: F[2] || (F[2] = (v) => J(Q).patch({ showGrid: v.target.checked }))
|
|
6909
|
-
}, null, 40,
|
|
6914
|
+
}, null, 40, tP),
|
|
6910
6915
|
F[15] || (F[15] = m(" 网格地板 ", -1))
|
|
6911
6916
|
]),
|
|
6912
6917
|
P("label", null, [
|
|
@@ -6914,7 +6919,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6914
6919
|
type: "checkbox",
|
|
6915
6920
|
checked: J(Q).state.showLights,
|
|
6916
6921
|
onChange: F[3] || (F[3] = (v) => J(Q).patch({ showLights: v.target.checked }))
|
|
6917
|
-
}, null, 40,
|
|
6922
|
+
}, null, 40, NP),
|
|
6918
6923
|
F[16] || (F[16] = m(" 场景光照 ", -1))
|
|
6919
6924
|
]),
|
|
6920
6925
|
P("label", null, [
|
|
@@ -6922,7 +6927,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6922
6927
|
type: "checkbox",
|
|
6923
6928
|
checked: J(Q).state.showBbox,
|
|
6924
6929
|
onChange: F[4] || (F[4] = (v) => J(Q).patch({ showBbox: v.target.checked }))
|
|
6925
|
-
}, null, 40,
|
|
6930
|
+
}, null, 40, YP),
|
|
6926
6931
|
F[17] || (F[17] = m(" 包围盒 ", -1))
|
|
6927
6932
|
]),
|
|
6928
6933
|
P("label", null, [
|
|
@@ -6930,11 +6935,11 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6930
6935
|
type: "checkbox",
|
|
6931
6936
|
checked: J(Q).state.showBedVolume,
|
|
6932
6937
|
onChange: F[5] || (F[5] = (v) => J(Q).patch({ showBedVolume: v.target.checked }))
|
|
6933
|
-
}, null, 40,
|
|
6938
|
+
}, null, 40, cP),
|
|
6934
6939
|
F[18] || (F[18] = m(" 打印床体积 ", -1))
|
|
6935
6940
|
])
|
|
6936
6941
|
]),
|
|
6937
|
-
P("div",
|
|
6942
|
+
P("div", LP, [
|
|
6938
6943
|
F[19] || (F[19] = P("span", { class: "label" }, "灯光模式", -1)),
|
|
6939
6944
|
ZA(vQ, {
|
|
6940
6945
|
"model-value": J(Q).state.lightingMode,
|
|
@@ -6945,13 +6950,13 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6945
6950
|
}, null, 8, ["model-value", "disabled"])
|
|
6946
6951
|
])
|
|
6947
6952
|
]),
|
|
6948
|
-
P("div",
|
|
6953
|
+
P("div", RP, [
|
|
6949
6954
|
F[24] || (F[24] = P("div", { class: "section-title" }, [
|
|
6950
6955
|
m("打印床尺寸 "),
|
|
6951
6956
|
P("span", { class: "unit" }, "mm · X × 高Y × Z")
|
|
6952
6957
|
], -1)),
|
|
6953
|
-
P("div",
|
|
6954
|
-
P("label",
|
|
6958
|
+
P("div", rP, [
|
|
6959
|
+
P("label", eP, [
|
|
6955
6960
|
F[21] || (F[21] = P("span", null, "X", -1)),
|
|
6956
6961
|
P("input", {
|
|
6957
6962
|
type: "number",
|
|
@@ -6959,9 +6964,9 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6959
6964
|
step: "1",
|
|
6960
6965
|
value: J(Q).state.bedSizeMm.x,
|
|
6961
6966
|
onChange: F[7] || (F[7] = (v) => C("x", v.target.value))
|
|
6962
|
-
}, null, 40,
|
|
6967
|
+
}, null, 40, yP)
|
|
6963
6968
|
]),
|
|
6964
|
-
P("label",
|
|
6969
|
+
P("label", jP, [
|
|
6965
6970
|
F[22] || (F[22] = P("span", null, "Y(高)", -1)),
|
|
6966
6971
|
P("input", {
|
|
6967
6972
|
type: "number",
|
|
@@ -6969,9 +6974,9 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6969
6974
|
step: "1",
|
|
6970
6975
|
value: J(Q).state.bedSizeMm.y,
|
|
6971
6976
|
onChange: F[8] || (F[8] = (v) => C("y", v.target.value))
|
|
6972
|
-
}, null, 40,
|
|
6977
|
+
}, null, 40, TP)
|
|
6973
6978
|
]),
|
|
6974
|
-
P("label",
|
|
6979
|
+
P("label", zP, [
|
|
6975
6980
|
F[23] || (F[23] = P("span", null, "Z", -1)),
|
|
6976
6981
|
P("input", {
|
|
6977
6982
|
type: "number",
|
|
@@ -6979,28 +6984,28 @@ const dA = /* @__PURE__ */ oA({
|
|
|
6979
6984
|
step: "1",
|
|
6980
6985
|
value: J(Q).state.bedSizeMm.z,
|
|
6981
6986
|
onChange: F[9] || (F[9] = (v) => C("z", v.target.value))
|
|
6982
|
-
}, null, 40,
|
|
6987
|
+
}, null, 40, hP)
|
|
6983
6988
|
])
|
|
6984
6989
|
]),
|
|
6985
|
-
P("div",
|
|
6990
|
+
P("div", bP, [
|
|
6986
6991
|
(c(), y(HA, null, kQ(I, (v) => P("button", {
|
|
6987
6992
|
key: v.label,
|
|
6988
6993
|
class: "btn preset",
|
|
6989
6994
|
type: "button",
|
|
6990
6995
|
onClick: (H) => J(Q).patch({ bedSizeMm: { ...v.size } })
|
|
6991
|
-
}, f(v.label), 9,
|
|
6996
|
+
}, f(v.label), 9, dP)), 64))
|
|
6992
6997
|
])
|
|
6993
6998
|
]),
|
|
6994
|
-
P("div",
|
|
6999
|
+
P("div", SP, [
|
|
6995
7000
|
F[25] || (F[25] = P("span", { class: "label" }, "最小壁厚 mm", -1)),
|
|
6996
7001
|
P("input", {
|
|
6997
7002
|
type: "number",
|
|
6998
7003
|
step: "0.1",
|
|
6999
7004
|
value: J(Q).state.wallThicknessMinMm,
|
|
7000
7005
|
onChange: F[10] || (F[10] = (v) => J(Q).patch({ wallThicknessMinMm: Number(v.target.value) }))
|
|
7001
|
-
}, null, 40,
|
|
7006
|
+
}, null, 40, nP)
|
|
7002
7007
|
]),
|
|
7003
|
-
P("div",
|
|
7008
|
+
P("div", xP, [
|
|
7004
7009
|
P("button", {
|
|
7005
7010
|
class: "btn primary",
|
|
7006
7011
|
onClick: F[11] || (F[11] = (v) => D.$emit("close"))
|
|
@@ -7010,12 +7015,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7010
7015
|
_: 1
|
|
7011
7016
|
}));
|
|
7012
7017
|
}
|
|
7013
|
-
}),
|
|
7014
|
-
const E = A.__vccOpts || A;
|
|
7015
|
-
for (const [B, Q] of g)
|
|
7016
|
-
E[B] = Q;
|
|
7017
|
-
return E;
|
|
7018
|
-
}, pP = /* @__PURE__ */ _g(xP, [["__scopeId", "data-v-04a6df4b"]]), lP = { class: "actions" }, qP = /* @__PURE__ */ oA({
|
|
7018
|
+
}), lP = /* @__PURE__ */ kg(pP, [["__scopeId", "data-v-04a6df4b"]]), qP = { class: "actions" }, OP = /* @__PURE__ */ oA({
|
|
7019
7019
|
__name: "HelpDialog",
|
|
7020
7020
|
props: {
|
|
7021
7021
|
showReplayTour: { type: Boolean, default: !0 }
|
|
@@ -7096,7 +7096,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7096
7096
|
m(":审核报告可下 JSON/HTML,无红级可本地标可打印。打开草稿能力后 Ctrl+S 写自动草稿,未配置则不检测、不弹窗。设置含默认单位、导出格式、网格/灯光/包围盒、最小壁厚。")
|
|
7097
7097
|
], -1)),
|
|
7098
7098
|
Q[17] || (Q[17] = P("p", null, "快捷键:Ctrl+Z / Y 撤销重做 · Ctrl+S 草稿 · P 观察预览 · 1/2/3 变换 · Esc 取消手柄/预览/测量/拆件切面 · F 自适应 · Shift 吸附 · Ctrl 多选/框选", -1)),
|
|
7099
|
-
P("div",
|
|
7099
|
+
P("div", qP, [
|
|
7100
7100
|
A.showReplayTour ? (c(), y("button", {
|
|
7101
7101
|
key: 0,
|
|
7102
7102
|
class: "btn",
|
|
@@ -7113,10 +7113,10 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7113
7113
|
_: 1
|
|
7114
7114
|
}));
|
|
7115
7115
|
}
|
|
7116
|
-
}),
|
|
7116
|
+
}), fP = { key: 0 }, ZP = ["checked", "disabled"], uP = {
|
|
7117
7117
|
key: 1,
|
|
7118
7118
|
style: { "font-size": "12px", color: "var(--danger)" }
|
|
7119
|
-
},
|
|
7119
|
+
}, VP = { class: "actions" }, mP = /* @__PURE__ */ oA({
|
|
7120
7120
|
__name: "ReviewDialog",
|
|
7121
7121
|
props: {
|
|
7122
7122
|
printable: { type: Boolean }
|
|
@@ -7130,7 +7130,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7130
7130
|
default: bA(() => [
|
|
7131
7131
|
I[6] || (I[6] = P("h3", null, "本地审核报告", -1)),
|
|
7132
7132
|
I[7] || (I[7] = P("p", null, "汇总校验、体积、包围盒与测量。不上传后端。", -1)),
|
|
7133
|
-
J(B).diagnosis ? (c(), y("p",
|
|
7133
|
+
J(B).diagnosis ? (c(), y("p", fP, "体积 " + f(J(B).diagnosis.volumeMm3.toFixed(1)) + " mm³ · 包围盒 " + f(J(B).diagnosis.bbox.size.map((C) => C.toFixed(1)).join(" × ")) + " mm", 1)) : b("", !0),
|
|
7134
7134
|
P("ul", null, [
|
|
7135
7135
|
(c(!0), y(HA, null, kQ(J(B).diagnosis?.items ?? [], (C) => (c(), y("li", {
|
|
7136
7136
|
key: C.id
|
|
@@ -7142,11 +7142,11 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7142
7142
|
checked: A.printable,
|
|
7143
7143
|
disabled: J(TB)(J(B).diagnosis),
|
|
7144
7144
|
onChange: I[0] || (I[0] = (C) => E("update:printable", C.target.checked))
|
|
7145
|
-
}, null, 40,
|
|
7145
|
+
}, null, 40, ZP),
|
|
7146
7146
|
I[5] || (I[5] = m(" 标记为可打印(本地) ", -1))
|
|
7147
7147
|
]),
|
|
7148
|
-
J(TB)(J(B).diagnosis) ? (c(), y("p",
|
|
7149
|
-
P("div",
|
|
7148
|
+
J(TB)(J(B).diagnosis) ? (c(), y("p", uP, "存在红级阻断,不可标记为可打印。")) : b("", !0),
|
|
7149
|
+
P("div", VP, [
|
|
7150
7150
|
P("button", {
|
|
7151
7151
|
class: "btn",
|
|
7152
7152
|
onClick: I[1] || (I[1] = (C) => E("download", "json"))
|
|
@@ -7164,10 +7164,10 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7164
7164
|
_: 1
|
|
7165
7165
|
}));
|
|
7166
7166
|
}
|
|
7167
|
-
}),
|
|
7167
|
+
}), WP = { class: "field" }, XP = ["value"], _P = ["disabled"], $P = { class: "grow" }, AD = ["onClick"], QD = ["onClick"], BD = {
|
|
7168
7168
|
key: 0,
|
|
7169
7169
|
style: { color: "var(--muted)", "font-size": "13px" }
|
|
7170
|
-
},
|
|
7170
|
+
}, gD = { class: "actions" }, ED = /* @__PURE__ */ oA({
|
|
7171
7171
|
__name: "DraftsDialog",
|
|
7172
7172
|
props: {
|
|
7173
7173
|
name: {},
|
|
@@ -7182,35 +7182,35 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7182
7182
|
}, {
|
|
7183
7183
|
default: bA(() => [
|
|
7184
7184
|
Q[4] || (Q[4] = P("h3", null, "命名草稿", -1)),
|
|
7185
|
-
P("div",
|
|
7185
|
+
P("div", WP, [
|
|
7186
7186
|
P("input", {
|
|
7187
7187
|
value: A.name,
|
|
7188
7188
|
placeholder: "草稿名称",
|
|
7189
7189
|
style: { width: "160px" },
|
|
7190
7190
|
onInput: Q[0] || (Q[0] = (I) => E("update:name", I.target.value))
|
|
7191
|
-
}, null, 40,
|
|
7191
|
+
}, null, 40, XP),
|
|
7192
7192
|
P("button", {
|
|
7193
7193
|
class: "btn primary",
|
|
7194
7194
|
disabled: !A.canSave,
|
|
7195
7195
|
onClick: Q[1] || (Q[1] = (I) => E("save"))
|
|
7196
|
-
}, "保存当前", 8,
|
|
7196
|
+
}, "保存当前", 8, _P)
|
|
7197
7197
|
]),
|
|
7198
7198
|
(c(!0), y(HA, null, kQ(A.drafts, (I) => (c(), y("div", {
|
|
7199
7199
|
key: I.id,
|
|
7200
7200
|
class: "item"
|
|
7201
7201
|
}, [
|
|
7202
|
-
P("span",
|
|
7202
|
+
P("span", $P, f(I.name) + " · " + f(I.updatedAt.slice(0, 16).replace("T", " ")), 1),
|
|
7203
7203
|
P("button", {
|
|
7204
7204
|
class: "btn",
|
|
7205
7205
|
onClick: (C) => E("open", I.id)
|
|
7206
|
-
}, "打开", 8,
|
|
7206
|
+
}, "打开", 8, AD),
|
|
7207
7207
|
P("button", {
|
|
7208
7208
|
class: "btn danger",
|
|
7209
7209
|
onClick: (C) => E("remove", I.id)
|
|
7210
|
-
}, "删", 8,
|
|
7210
|
+
}, "删", 8, QD)
|
|
7211
7211
|
]))), 128)),
|
|
7212
|
-
A.drafts.length ? b("", !0) : (c(), y("p",
|
|
7213
|
-
P("div",
|
|
7212
|
+
A.drafts.length ? b("", !0) : (c(), y("p", BD, "尚无命名草稿。Ctrl+S 仍会写入自动草稿。")),
|
|
7213
|
+
P("div", gD, [
|
|
7214
7214
|
P("button", {
|
|
7215
7215
|
class: "btn primary",
|
|
7216
7216
|
onClick: Q[2] || (Q[2] = (I) => E("close"))
|
|
@@ -7220,7 +7220,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7220
7220
|
_: 1
|
|
7221
7221
|
}));
|
|
7222
7222
|
}
|
|
7223
|
-
}),
|
|
7223
|
+
}), ID = { class: "actions" }, CD = /* @__PURE__ */ oA({
|
|
7224
7224
|
__name: "ConfirmDialog",
|
|
7225
7225
|
setup(A) {
|
|
7226
7226
|
const g = UA();
|
|
@@ -7231,7 +7231,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7231
7231
|
default: bA(() => [
|
|
7232
7232
|
P("h3", null, f(J(g).confirm.title), 1),
|
|
7233
7233
|
P("p", null, f(J(g).confirm.body), 1),
|
|
7234
|
-
P("div",
|
|
7234
|
+
P("div", ID, [
|
|
7235
7235
|
P("button", {
|
|
7236
7236
|
class: "btn",
|
|
7237
7237
|
onClick: B[0] || (B[0] = (Q) => J(g).answer(!1))
|
|
@@ -7250,7 +7250,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7250
7250
|
_: 1
|
|
7251
7251
|
})) : b("", !0);
|
|
7252
7252
|
}
|
|
7253
|
-
}),
|
|
7253
|
+
}), PD = { class: "actions" }, DD = /* @__PURE__ */ oA({
|
|
7254
7254
|
__name: "ErrorDialog",
|
|
7255
7255
|
props: {
|
|
7256
7256
|
message: {}
|
|
@@ -7265,7 +7265,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7265
7265
|
Q[3] || (Q[3] = P("h3", null, "发生错误", -1)),
|
|
7266
7266
|
P("p", null, f(A.message), 1),
|
|
7267
7267
|
Q[4] || (Q[4] = P("p", { style: { "font-size": "12px", color: "var(--muted)" } }, "请描述复现步骤并保留文件。模型仍可继续尝试导出。", -1)),
|
|
7268
|
-
P("div",
|
|
7268
|
+
P("div", PD, [
|
|
7269
7269
|
P("button", {
|
|
7270
7270
|
class: "btn",
|
|
7271
7271
|
onClick: Q[0] || (Q[0] = (I) => E("copy"))
|
|
@@ -7299,85 +7299,85 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7299
7299
|
rotate: "M12.9 5.1A5.2 5.2 0 1 0 13.2 9h-1.6a3.6 3.6 0 1 1-.2-2.7l-1.5 1.5H14V3.6L12.9 5.1z",
|
|
7300
7300
|
/** Scale: corner expand */
|
|
7301
7301
|
scale: "M2 2h4v1.5H4.56L11.5 10.44V9H13v5H8v-1.5h1.56L2.62 5.56H4V2H2zm10 0h2v2h-2V2zM2 12h2v2H2v-2z"
|
|
7302
|
-
},
|
|
7302
|
+
}, wD = { class: "panel-hd" }, FD = { class: "ttl" }, vD = ["title"], kD = {
|
|
7303
7303
|
class: "ico",
|
|
7304
7304
|
viewBox: "0 0 16 16",
|
|
7305
7305
|
"aria-hidden": "true"
|
|
7306
|
-
},
|
|
7306
|
+
}, GD = ["d"], UD = ["title"], oD = { class: "panel-bd" }, iD = { class: "tree" }, sD = {
|
|
7307
7307
|
key: 0,
|
|
7308
7308
|
class: "tree-empty"
|
|
7309
|
-
},
|
|
7309
|
+
}, aD = ["onClick", "onContextmenu"], HD = ["checked", "onClick"], KD = ["value", "onInput"], MD = { class: "idx" }, JD = { class: "grow" }, tD = ["onClick"], ND = ["disabled"], YD = {
|
|
7310
7310
|
key: 0,
|
|
7311
7311
|
class: "ico",
|
|
7312
7312
|
viewBox: "0 0 16 16",
|
|
7313
7313
|
"aria-hidden": "true"
|
|
7314
|
-
},
|
|
7314
|
+
}, cD = ["d"], LD = { key: 1 }, RD = ["disabled"], rD = {
|
|
7315
7315
|
key: 0,
|
|
7316
7316
|
class: "ico",
|
|
7317
7317
|
viewBox: "0 0 16 16",
|
|
7318
7318
|
"aria-hidden": "true"
|
|
7319
|
-
},
|
|
7319
|
+
}, eD = ["d"], yD = { key: 1 }, jD = ["title", "aria-label", "disabled"], TD = {
|
|
7320
7320
|
key: 0,
|
|
7321
7321
|
class: "ico",
|
|
7322
7322
|
viewBox: "0 0 16 16",
|
|
7323
7323
|
"aria-hidden": "true"
|
|
7324
|
-
},
|
|
7324
|
+
}, zD = ["d"], hD = { key: 1 }, bD = ["disabled"], dD = {
|
|
7325
7325
|
key: 0,
|
|
7326
7326
|
class: "ico",
|
|
7327
7327
|
viewBox: "0 0 16 16",
|
|
7328
7328
|
"aria-hidden": "true"
|
|
7329
|
-
},
|
|
7329
|
+
}, SD = ["d"], nD = { key: 1 }, xD = ["disabled"], pD = {
|
|
7330
7330
|
key: 0,
|
|
7331
7331
|
class: "ico",
|
|
7332
7332
|
viewBox: "0 0 16 16",
|
|
7333
7333
|
"aria-hidden": "true"
|
|
7334
|
-
},
|
|
7334
|
+
}, lD = ["d"], qD = { key: 1 }, OD = ["disabled"], fD = {
|
|
7335
7335
|
key: 0,
|
|
7336
7336
|
class: "ico",
|
|
7337
7337
|
viewBox: "0 0 16 16",
|
|
7338
7338
|
"aria-hidden": "true"
|
|
7339
|
-
},
|
|
7339
|
+
}, ZD = ["d"], uD = { key: 1 }, VD = ["disabled"], mD = {
|
|
7340
7340
|
key: 0,
|
|
7341
7341
|
class: "ico",
|
|
7342
7342
|
viewBox: "0 0 16 16",
|
|
7343
7343
|
"aria-hidden": "true"
|
|
7344
|
-
},
|
|
7344
|
+
}, WD = ["d"], XD = { key: 1 }, _D = ["aria-checked", "disabled"], $D = {
|
|
7345
7345
|
key: 0,
|
|
7346
7346
|
class: "ico",
|
|
7347
7347
|
viewBox: "0 0 16 16",
|
|
7348
7348
|
"aria-hidden": "true"
|
|
7349
|
-
},
|
|
7349
|
+
}, A0 = ["d"], Q0 = { key: 1 }, B0 = ["aria-checked", "disabled"], g0 = {
|
|
7350
7350
|
key: 0,
|
|
7351
7351
|
class: "ico",
|
|
7352
7352
|
viewBox: "0 0 16 16",
|
|
7353
7353
|
"aria-hidden": "true"
|
|
7354
|
-
},
|
|
7354
|
+
}, E0 = ["d"], I0 = { key: 1 }, C0 = ["aria-checked", "disabled"], P0 = {
|
|
7355
7355
|
key: 0,
|
|
7356
7356
|
class: "ico",
|
|
7357
7357
|
viewBox: "0 0 16 16",
|
|
7358
7358
|
"aria-hidden": "true"
|
|
7359
|
-
},
|
|
7359
|
+
}, D0 = ["d"], w0 = { key: 1 }, F0 = {
|
|
7360
7360
|
key: 0,
|
|
7361
7361
|
class: "btn-grid"
|
|
7362
|
-
},
|
|
7362
|
+
}, v0 = ["disabled"], k0 = ["disabled"], G0 = ["disabled"], U0 = ["disabled"], o0 = ["disabled"], i0 = ["disabled"], s0 = {
|
|
7363
7363
|
key: 1,
|
|
7364
7364
|
class: "btn-grid"
|
|
7365
|
-
},
|
|
7365
|
+
}, a0 = { class: "btn-grid" }, H0 = ["disabled"], K0 = ["disabled"], M0 = ["disabled"], J0 = ["disabled"], t0 = { class: "scale-row" }, N0 = ["value", "disabled"], Y0 = { class: "btn-row" }, c0 = ["disabled"], L0 = ["disabled"], R0 = {
|
|
7366
7366
|
key: 0,
|
|
7367
7367
|
class: "hint"
|
|
7368
|
-
},
|
|
7368
|
+
}, r0 = { class: "xyz" }, e0 = { class: "btn-row" }, y0 = ["disabled"], j0 = {
|
|
7369
7369
|
key: 0,
|
|
7370
7370
|
class: "hint"
|
|
7371
|
-
},
|
|
7371
|
+
}, T0 = {
|
|
7372
7372
|
key: 1,
|
|
7373
7373
|
class: "split-list"
|
|
7374
|
-
},
|
|
7374
|
+
}, z0 = ["onClick"], h0 = ["onClick"], b0 = { class: "btn-row" }, d0 = ["disabled"], S0 = ["disabled"], n0 = {
|
|
7375
7375
|
key: 2,
|
|
7376
7376
|
class: "btn-row"
|
|
7377
|
-
},
|
|
7377
|
+
}, x0 = ["disabled"], p0 = { class: "xyz" }, l0 = { class: "xyz" }, q0 = { class: "xyz" }, O0 = { class: "check" }, f0 = ["checked"], Z0 = { class: "btn-row" }, u0 = ["disabled"], V0 = { class: "btn-grid" }, m0 = ["disabled"], W0 = ["disabled"], X0 = ["disabled"], _0 = ["disabled"], $0 = { class: "btn-grid" }, Aw = { class: "btn-row" }, Qw = ["disabled"], Bw = ["disabled"], gw = {
|
|
7378
7378
|
key: 0,
|
|
7379
7379
|
class: "hint"
|
|
7380
|
-
},
|
|
7380
|
+
}, Ew = { class: "row" }, Iw = ["onKeydown"], Cw = { class: "actions" }, Pw = ["disabled"], Dw = /* @__PURE__ */ oA({
|
|
7381
7381
|
__name: "PartsPanel",
|
|
7382
7382
|
props: {
|
|
7383
7383
|
open: { type: Boolean },
|
|
@@ -7440,8 +7440,8 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7440
7440
|
P("aside", {
|
|
7441
7441
|
class: vA(["panel parts", { collapsed: !A.open, float: A.panelMode === "float" }])
|
|
7442
7442
|
}, [
|
|
7443
|
-
P("div",
|
|
7444
|
-
P("span",
|
|
7443
|
+
P("div", wD, [
|
|
7444
|
+
P("span", FD, "零件树 · " + f(J(D).partNames.length), 1),
|
|
7445
7445
|
A.features.hidePanelModeToggle ? b("", !0) : (c(), y("button", {
|
|
7446
7446
|
key: 0,
|
|
7447
7447
|
class: "panel-toggle",
|
|
@@ -7449,23 +7449,23 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7449
7449
|
title: A.panelMode === "float" ? "切换为通栏" : "切换为悬浮",
|
|
7450
7450
|
onClick: T
|
|
7451
7451
|
}, [
|
|
7452
|
-
(c(), y("svg",
|
|
7452
|
+
(c(), y("svg", kD, [
|
|
7453
7453
|
P("path", {
|
|
7454
7454
|
d: A.panelMode === "float" ? J(cA).dock : J(cA).float,
|
|
7455
7455
|
fill: "currentColor"
|
|
7456
|
-
}, null, 8,
|
|
7456
|
+
}, null, 8, GD)
|
|
7457
7457
|
]))
|
|
7458
|
-
], 8,
|
|
7458
|
+
], 8, vD)),
|
|
7459
7459
|
P("button", {
|
|
7460
7460
|
class: "panel-toggle",
|
|
7461
7461
|
type: "button",
|
|
7462
7462
|
title: A.open ? "收起零件栏" : "展开零件栏",
|
|
7463
7463
|
onClick: o[0] || (o[0] = (t) => C("update:open", !A.open))
|
|
7464
|
-
}, f(A.open ? "‹" : "›"), 9,
|
|
7464
|
+
}, f(A.open ? "‹" : "›"), 9, UD)
|
|
7465
7465
|
]),
|
|
7466
|
-
RA(P("div",
|
|
7467
|
-
P("div",
|
|
7468
|
-
A.hasModel ? b("", !0) : (c(), y("p",
|
|
7466
|
+
RA(P("div", oD, [
|
|
7467
|
+
P("div", iD, [
|
|
7468
|
+
A.hasModel ? b("", !0) : (c(), y("p", sD, "尚未导入零件")),
|
|
7469
7469
|
(c(!0), y(HA, null, kQ(J(D).partNames, (t, z) => (c(), y("div", {
|
|
7470
7470
|
key: z,
|
|
7471
7471
|
class: vA(["item", { active: J(D).selectedIds.includes(z) }]),
|
|
@@ -7477,7 +7477,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7477
7477
|
checked: J(D).visibility[z],
|
|
7478
7478
|
title: "显示/隐藏",
|
|
7479
7479
|
onClick: fA((p) => J(D).toggleVisible(z), ["stop"])
|
|
7480
|
-
}, null, 8,
|
|
7480
|
+
}, null, 8, HD),
|
|
7481
7481
|
P("input", {
|
|
7482
7482
|
class: "swatch",
|
|
7483
7483
|
type: "color",
|
|
@@ -7486,16 +7486,16 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7486
7486
|
onClick: o[1] || (o[1] = fA(() => {
|
|
7487
7487
|
}, ["stop"])),
|
|
7488
7488
|
onInput: fA((p) => C("part-color", z, p.target.value), ["stop"])
|
|
7489
|
-
}, null, 40,
|
|
7490
|
-
P("span",
|
|
7491
|
-
P("span",
|
|
7489
|
+
}, null, 40, KD),
|
|
7490
|
+
P("span", MD, f(z + 1), 1),
|
|
7491
|
+
P("span", JD, f(t), 1),
|
|
7492
7492
|
P("button", {
|
|
7493
7493
|
type: "button",
|
|
7494
7494
|
class: "btn rename-btn",
|
|
7495
7495
|
title: "重命名",
|
|
7496
7496
|
onClick: fA((p) => R(z), ["stop"])
|
|
7497
|
-
}, " 编辑 ", 8,
|
|
7498
|
-
], 42,
|
|
7497
|
+
}, " 编辑 ", 8, tD)
|
|
7498
|
+
], 42, aD))), 128))
|
|
7499
7499
|
]),
|
|
7500
7500
|
P("div", {
|
|
7501
7501
|
class: vA(["btn-grid core-actions", {
|
|
@@ -7512,14 +7512,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7512
7512
|
disabled: A.observe || A.splitMode,
|
|
7513
7513
|
onClick: o[2] || (o[2] = (t) => C("import"))
|
|
7514
7514
|
}, [
|
|
7515
|
-
Y.value ? (c(), y("svg",
|
|
7515
|
+
Y.value ? (c(), y("svg", YD, [
|
|
7516
7516
|
P("path", {
|
|
7517
7517
|
d: J(cA).import,
|
|
7518
7518
|
fill: "currentColor"
|
|
7519
|
-
}, null, 8,
|
|
7519
|
+
}, null, 8, cD)
|
|
7520
7520
|
])) : b("", !0),
|
|
7521
|
-
e.value ? (c(), y("span",
|
|
7522
|
-
], 8,
|
|
7521
|
+
e.value ? (c(), y("span", LD, "导入")) : b("", !0)
|
|
7522
|
+
], 8, ND),
|
|
7523
7523
|
P("button", {
|
|
7524
7524
|
class: "btn icon-btn",
|
|
7525
7525
|
type: "button",
|
|
@@ -7528,14 +7528,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7528
7528
|
disabled: !A.hasModel || A.splitMode,
|
|
7529
7529
|
onClick: o[3] || (o[3] = (t) => C("export"))
|
|
7530
7530
|
}, [
|
|
7531
|
-
Y.value ? (c(), y("svg",
|
|
7531
|
+
Y.value ? (c(), y("svg", rD, [
|
|
7532
7532
|
P("path", {
|
|
7533
7533
|
d: J(cA).export,
|
|
7534
7534
|
fill: "currentColor"
|
|
7535
|
-
}, null, 8,
|
|
7535
|
+
}, null, 8, eD)
|
|
7536
7536
|
])) : b("", !0),
|
|
7537
|
-
e.value ? (c(), y("span",
|
|
7538
|
-
], 8,
|
|
7537
|
+
e.value ? (c(), y("span", yD, "导出")) : b("", !0)
|
|
7538
|
+
], 8, RD),
|
|
7539
7539
|
A.features.extras ? (c(), y("button", {
|
|
7540
7540
|
key: 0,
|
|
7541
7541
|
class: vA(["btn icon-btn", { primary: A.observe }]),
|
|
@@ -7545,14 +7545,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7545
7545
|
disabled: !A.hasModel,
|
|
7546
7546
|
onClick: o[4] || (o[4] = (t) => C("toggle-preview"))
|
|
7547
7547
|
}, [
|
|
7548
|
-
Y.value ? (c(), y("svg",
|
|
7548
|
+
Y.value ? (c(), y("svg", TD, [
|
|
7549
7549
|
P("path", {
|
|
7550
7550
|
d: A.observe ? J(cA).edit : J(cA).preview,
|
|
7551
7551
|
fill: "currentColor"
|
|
7552
|
-
}, null, 8,
|
|
7552
|
+
}, null, 8, zD)
|
|
7553
7553
|
])) : b("", !0),
|
|
7554
|
-
e.value ? (c(), y("span",
|
|
7555
|
-
], 10,
|
|
7554
|
+
e.value ? (c(), y("span", hD, f(A.observe ? "编辑" : "预览"), 1)) : b("", !0)
|
|
7555
|
+
], 10, jD)) : b("", !0),
|
|
7556
7556
|
A.features.restore ? (c(), y("button", {
|
|
7557
7557
|
key: 1,
|
|
7558
7558
|
class: "btn icon-btn",
|
|
@@ -7562,14 +7562,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7562
7562
|
disabled: !A.hasModel || A.geomLocked || A.splitMode,
|
|
7563
7563
|
onClick: o[5] || (o[5] = (t) => C("restore"))
|
|
7564
7564
|
}, [
|
|
7565
|
-
Y.value ? (c(), y("svg",
|
|
7565
|
+
Y.value ? (c(), y("svg", dD, [
|
|
7566
7566
|
P("path", {
|
|
7567
7567
|
d: J(cA).restore,
|
|
7568
7568
|
fill: "currentColor"
|
|
7569
|
-
}, null, 8,
|
|
7569
|
+
}, null, 8, SD)
|
|
7570
7570
|
])) : b("", !0),
|
|
7571
|
-
e.value ? (c(), y("span",
|
|
7572
|
-
], 8,
|
|
7571
|
+
e.value ? (c(), y("span", nD, "复原")) : b("", !0)
|
|
7572
|
+
], 8, bD)) : b("", !0),
|
|
7573
7573
|
P("button", {
|
|
7574
7574
|
class: "btn icon-btn",
|
|
7575
7575
|
type: "button",
|
|
@@ -7578,14 +7578,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7578
7578
|
disabled: !A.hasModel || A.observe || A.splitMode,
|
|
7579
7579
|
onClick: o[6] || (o[6] = (t) => C("repair"))
|
|
7580
7580
|
}, [
|
|
7581
|
-
Y.value ? (c(), y("svg",
|
|
7581
|
+
Y.value ? (c(), y("svg", pD, [
|
|
7582
7582
|
P("path", {
|
|
7583
7583
|
d: J(cA).repair,
|
|
7584
7584
|
fill: "currentColor"
|
|
7585
|
-
}, null, 8,
|
|
7585
|
+
}, null, 8, lD)
|
|
7586
7586
|
])) : b("", !0),
|
|
7587
|
-
e.value ? (c(), y("span",
|
|
7588
|
-
], 8,
|
|
7587
|
+
e.value ? (c(), y("span", qD, "修复")) : b("", !0)
|
|
7588
|
+
], 8, xD),
|
|
7589
7589
|
P("button", {
|
|
7590
7590
|
class: "btn icon-btn",
|
|
7591
7591
|
type: "button",
|
|
@@ -7594,14 +7594,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7594
7594
|
disabled: !A.hasModel || !d.value || A.geomLocked || A.splitMode,
|
|
7595
7595
|
onClick: o[7] || (o[7] = (t) => J(D).duplicatePart(J(D).selected))
|
|
7596
7596
|
}, [
|
|
7597
|
-
Y.value ? (c(), y("svg",
|
|
7597
|
+
Y.value ? (c(), y("svg", fD, [
|
|
7598
7598
|
P("path", {
|
|
7599
7599
|
d: J(cA).copy,
|
|
7600
7600
|
fill: "currentColor"
|
|
7601
|
-
}, null, 8,
|
|
7601
|
+
}, null, 8, ZD)
|
|
7602
7602
|
])) : b("", !0),
|
|
7603
|
-
e.value ? (c(), y("span",
|
|
7604
|
-
], 8,
|
|
7603
|
+
e.value ? (c(), y("span", uD, "复制")) : b("", !0)
|
|
7604
|
+
], 8, OD),
|
|
7605
7605
|
P("button", {
|
|
7606
7606
|
class: "btn icon-btn danger",
|
|
7607
7607
|
type: "button",
|
|
@@ -7610,14 +7610,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7610
7610
|
disabled: !A.hasModel || !d.value || A.geomLocked || A.splitMode,
|
|
7611
7611
|
onClick: j
|
|
7612
7612
|
}, [
|
|
7613
|
-
Y.value ? (c(), y("svg",
|
|
7613
|
+
Y.value ? (c(), y("svg", mD, [
|
|
7614
7614
|
P("path", {
|
|
7615
7615
|
d: J(cA).trash,
|
|
7616
7616
|
fill: "currentColor"
|
|
7617
|
-
}, null, 8,
|
|
7617
|
+
}, null, 8, WD)
|
|
7618
7618
|
])) : b("", !0),
|
|
7619
|
-
e.value ? (c(), y("span",
|
|
7620
|
-
], 8,
|
|
7619
|
+
e.value ? (c(), y("span", XD, "删除")) : b("", !0)
|
|
7620
|
+
], 8, VD)
|
|
7621
7621
|
], 2),
|
|
7622
7622
|
P("div", {
|
|
7623
7623
|
class: vA(["btn-grid tool-mode", {
|
|
@@ -7638,14 +7638,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7638
7638
|
disabled: !A.hasModel || A.geomLocked,
|
|
7639
7639
|
onClick: o[8] || (o[8] = (t) => J(D).transformMode = "translate")
|
|
7640
7640
|
}, [
|
|
7641
|
-
Y.value ? (c(), y("svg",
|
|
7641
|
+
Y.value ? (c(), y("svg", $D, [
|
|
7642
7642
|
P("path", {
|
|
7643
7643
|
d: J(cA).translate,
|
|
7644
7644
|
fill: "currentColor"
|
|
7645
|
-
}, null, 8,
|
|
7645
|
+
}, null, 8, A0)
|
|
7646
7646
|
])) : b("", !0),
|
|
7647
|
-
e.value ? (c(), y("span",
|
|
7648
|
-
], 10,
|
|
7647
|
+
e.value ? (c(), y("span", Q0, "移动")) : b("", !0)
|
|
7648
|
+
], 10, _D),
|
|
7649
7649
|
P("button", {
|
|
7650
7650
|
class: vA(["btn icon-btn", { primary: J(D).transformMode === "rotate" }]),
|
|
7651
7651
|
type: "button",
|
|
@@ -7656,14 +7656,14 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7656
7656
|
disabled: !A.hasModel || A.geomLocked,
|
|
7657
7657
|
onClick: o[9] || (o[9] = (t) => J(D).transformMode = "rotate")
|
|
7658
7658
|
}, [
|
|
7659
|
-
Y.value ? (c(), y("svg",
|
|
7659
|
+
Y.value ? (c(), y("svg", g0, [
|
|
7660
7660
|
P("path", {
|
|
7661
7661
|
d: J(cA).rotate,
|
|
7662
7662
|
fill: "currentColor"
|
|
7663
|
-
}, null, 8,
|
|
7663
|
+
}, null, 8, E0)
|
|
7664
7664
|
])) : b("", !0),
|
|
7665
|
-
e.value ? (c(), y("span",
|
|
7666
|
-
], 10,
|
|
7665
|
+
e.value ? (c(), y("span", I0, "旋转")) : b("", !0)
|
|
7666
|
+
], 10, B0),
|
|
7667
7667
|
P("button", {
|
|
7668
7668
|
class: vA(["btn icon-btn", { primary: J(D).transformMode === "scale" }]),
|
|
7669
7669
|
type: "button",
|
|
@@ -7674,49 +7674,49 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7674
7674
|
disabled: !A.hasModel || A.geomLocked,
|
|
7675
7675
|
onClick: o[10] || (o[10] = (t) => J(D).transformMode = "scale")
|
|
7676
7676
|
}, [
|
|
7677
|
-
Y.value ? (c(), y("svg",
|
|
7677
|
+
Y.value ? (c(), y("svg", P0, [
|
|
7678
7678
|
P("path", {
|
|
7679
7679
|
d: J(cA).scale,
|
|
7680
7680
|
fill: "currentColor"
|
|
7681
|
-
}, null, 8,
|
|
7681
|
+
}, null, 8, D0)
|
|
7682
7682
|
])) : b("", !0),
|
|
7683
|
-
e.value ? (c(), y("span",
|
|
7684
|
-
], 10,
|
|
7683
|
+
e.value ? (c(), y("span", w0, "缩放")) : b("", !0)
|
|
7684
|
+
], 10, C0)
|
|
7685
7685
|
], 2),
|
|
7686
|
-
A.features.extras ? (c(), y("div",
|
|
7686
|
+
A.features.extras ? (c(), y("div", F0, [
|
|
7687
7687
|
P("button", {
|
|
7688
7688
|
class: "btn",
|
|
7689
7689
|
disabled: !A.hasModel || A.observe,
|
|
7690
7690
|
onClick: o[11] || (o[11] = //@ts-ignore
|
|
7691
7691
|
(...t) => J(D).undo && J(D).undo(...t))
|
|
7692
|
-
}, "撤销", 8,
|
|
7692
|
+
}, "撤销", 8, v0),
|
|
7693
7693
|
P("button", {
|
|
7694
7694
|
class: "btn",
|
|
7695
7695
|
disabled: !A.hasModel || A.observe,
|
|
7696
7696
|
onClick: o[12] || (o[12] = //@ts-ignore
|
|
7697
7697
|
(...t) => J(D).redo && J(D).redo(...t))
|
|
7698
|
-
}, "重做", 8,
|
|
7698
|
+
}, "重做", 8, k0),
|
|
7699
7699
|
P("button", {
|
|
7700
7700
|
class: "btn",
|
|
7701
7701
|
disabled: !A.hasModel,
|
|
7702
7702
|
onClick: o[13] || (o[13] = (t) => C("reset-view"))
|
|
7703
|
-
}, "复位视角", 8,
|
|
7703
|
+
}, "复位视角", 8, G0),
|
|
7704
7704
|
P("button", {
|
|
7705
7705
|
class: "btn",
|
|
7706
7706
|
disabled: !A.hasModel,
|
|
7707
7707
|
onClick: o[14] || (o[14] = (t) => C("update:clipOn", !A.clipOn))
|
|
7708
|
-
}, "剖切", 8,
|
|
7708
|
+
}, "剖切", 8, U0),
|
|
7709
7709
|
P("button", {
|
|
7710
7710
|
class: "btn",
|
|
7711
7711
|
disabled: !A.hasModel,
|
|
7712
7712
|
onClick: o[15] || (o[15] = (t) => C("snapshot"))
|
|
7713
|
-
}, "快照", 8,
|
|
7713
|
+
}, "快照", 8, o0),
|
|
7714
7714
|
A.features.extras ? (c(), y("button", {
|
|
7715
7715
|
key: 0,
|
|
7716
7716
|
class: "btn",
|
|
7717
7717
|
disabled: !A.hasModel,
|
|
7718
7718
|
onClick: o[16] || (o[16] = (t) => C("review"))
|
|
7719
|
-
}, "审核", 8,
|
|
7719
|
+
}, "审核", 8, i0)) : b("", !0),
|
|
7720
7720
|
A.features.extras ? (c(), y("button", {
|
|
7721
7721
|
key: 1,
|
|
7722
7722
|
class: "btn",
|
|
@@ -7728,7 +7728,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7728
7728
|
onClick: o[18] || (o[18] = (t) => C("help"))
|
|
7729
7729
|
}, "帮助")) : b("", !0)
|
|
7730
7730
|
])) : b("", !0),
|
|
7731
|
-
A.features.extras || A.features.drafts ? (c(), y("div",
|
|
7731
|
+
A.features.extras || A.features.drafts ? (c(), y("div", s0, [
|
|
7732
7732
|
A.features.drafts ? (c(), y("button", {
|
|
7733
7733
|
key: 0,
|
|
7734
7734
|
class: "btn",
|
|
@@ -7737,33 +7737,33 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7737
7737
|
])) : b("", !0),
|
|
7738
7738
|
A.features.layout ? (c(), y(HA, { key: 2 }, [
|
|
7739
7739
|
o[55] || (o[55] = P("div", { class: "sec" }, "布局", -1)),
|
|
7740
|
-
P("div",
|
|
7740
|
+
P("div", a0, [
|
|
7741
7741
|
P("button", {
|
|
7742
7742
|
class: "btn",
|
|
7743
7743
|
type: "button",
|
|
7744
7744
|
disabled: A.geomLocked || !A.hasModel || A.splitMode,
|
|
7745
7745
|
onClick: o[20] || (o[20] = (t) => C("drop-bed"))
|
|
7746
|
-
}, " 贴地 ", 8,
|
|
7746
|
+
}, " 贴地 ", 8, H0),
|
|
7747
7747
|
P("button", {
|
|
7748
7748
|
class: "btn",
|
|
7749
7749
|
type: "button",
|
|
7750
7750
|
disabled: A.geomLocked || !A.hasModel || A.splitMode,
|
|
7751
7751
|
onClick: o[21] || (o[21] = (t) => C("mirror", "x"))
|
|
7752
|
-
}, " 镜像 X ", 8,
|
|
7752
|
+
}, " 镜像 X ", 8, K0),
|
|
7753
7753
|
P("button", {
|
|
7754
7754
|
class: "btn",
|
|
7755
7755
|
type: "button",
|
|
7756
7756
|
disabled: A.geomLocked || !A.hasModel || A.splitMode,
|
|
7757
7757
|
onClick: o[22] || (o[22] = (t) => C("mirror", "y"))
|
|
7758
|
-
}, " 镜像 Y ", 8,
|
|
7758
|
+
}, " 镜像 Y ", 8, M0),
|
|
7759
7759
|
P("button", {
|
|
7760
7760
|
class: "btn",
|
|
7761
7761
|
type: "button",
|
|
7762
7762
|
disabled: A.geomLocked || !A.hasModel || A.splitMode,
|
|
7763
7763
|
onClick: o[23] || (o[23] = (t) => C("mirror", "z"))
|
|
7764
|
-
}, " 镜像 Z ", 8,
|
|
7764
|
+
}, " 镜像 Z ", 8, J0)
|
|
7765
7765
|
]),
|
|
7766
|
-
P("div",
|
|
7766
|
+
P("div", t0, [
|
|
7767
7767
|
o[53] || (o[53] = P("span", null, "缩放到", -1)),
|
|
7768
7768
|
P("input", {
|
|
7769
7769
|
type: "number",
|
|
@@ -7772,7 +7772,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7772
7772
|
value: A.scaleTarget,
|
|
7773
7773
|
disabled: A.geomLocked || !A.hasModel || A.splitMode,
|
|
7774
7774
|
onChange: o[24] || (o[24] = (t) => C("update:scaleTarget", Number(t.target.value)))
|
|
7775
|
-
}, null, 40,
|
|
7775
|
+
}, null, 40, N0),
|
|
7776
7776
|
ZA(vQ, {
|
|
7777
7777
|
"model-value": A.scaleMode,
|
|
7778
7778
|
options: E,
|
|
@@ -7782,26 +7782,26 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7782
7782
|
}, null, 8, ["model-value", "disabled"]),
|
|
7783
7783
|
o[54] || (o[54] = P("span", null, "mm", -1))
|
|
7784
7784
|
]),
|
|
7785
|
-
P("div",
|
|
7785
|
+
P("div", Y0, [
|
|
7786
7786
|
P("button", {
|
|
7787
7787
|
class: "btn",
|
|
7788
7788
|
type: "button",
|
|
7789
7789
|
disabled: A.geomLocked || !A.hasModel || A.splitMode || !(A.scaleTarget > 0),
|
|
7790
7790
|
onClick: o[26] || (o[26] = (t) => C("scale-size"))
|
|
7791
|
-
}, " 应用缩放 ", 8,
|
|
7791
|
+
}, " 应用缩放 ", 8, c0),
|
|
7792
7792
|
P("button", {
|
|
7793
7793
|
class: vA(["btn", { primary: A.faceDownPick }]),
|
|
7794
7794
|
type: "button",
|
|
7795
7795
|
disabled: A.geomLocked || !A.hasModel || A.splitMode,
|
|
7796
7796
|
onClick: o[27] || (o[27] = (t) => C("toggle-face-down"))
|
|
7797
|
-
}, f(A.faceDownPick ? "点选表面…" : "选面朝下"), 11,
|
|
7797
|
+
}, f(A.faceDownPick ? "点选表面…" : "选面朝下"), 11, L0)
|
|
7798
7798
|
]),
|
|
7799
|
-
A.faceDownPick ? (c(), y("p",
|
|
7799
|
+
A.faceDownPick ? (c(), y("p", R0, "点击模型表面,将该面朝下并贴地。Esc 取消。")) : b("", !0)
|
|
7800
7800
|
], 64)) : b("", !0),
|
|
7801
7801
|
A.features.split ? (c(), y(HA, { key: 3 }, [
|
|
7802
7802
|
o[57] || (o[57] = P("div", { class: "sec" }, "打印拆件", -1)),
|
|
7803
7803
|
o[58] || (o[58] = P("p", { class: "hint" }, " 放置切面后确认拆件;缩放切面可限制切开范围(只切断粉色矩形盖住的部分)。须封闭实体。 ", -1)),
|
|
7804
|
-
P("div",
|
|
7804
|
+
P("div", r0, [
|
|
7805
7805
|
o[56] || (o[56] = P("span", null, "卡扣", -1)),
|
|
7806
7806
|
ZA(vQ, {
|
|
7807
7807
|
"model-value": A.splitConnector,
|
|
@@ -7810,15 +7810,15 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7810
7810
|
"onUpdate:modelValue": o[28] || (o[28] = (t) => C("update:splitConnector", t))
|
|
7811
7811
|
}, null, 8, ["model-value"])
|
|
7812
7812
|
]),
|
|
7813
|
-
P("div",
|
|
7813
|
+
P("div", e0, [
|
|
7814
7814
|
P("button", {
|
|
7815
7815
|
class: "btn",
|
|
7816
7816
|
disabled: A.geomLocked || !A.hasModel,
|
|
7817
7817
|
onClick: o[29] || (o[29] = (t) => C("enter-split"))
|
|
7818
|
-
}, f(A.splitMode ? "再加切面" : "放置切面"), 9,
|
|
7818
|
+
}, f(A.splitMode ? "再加切面" : "放置切面"), 9, y0)
|
|
7819
7819
|
]),
|
|
7820
|
-
A.splitMode ? (c(), y("p",
|
|
7821
|
-
A.splitMode ? (c(), y("div",
|
|
7820
|
+
A.splitMode ? (c(), y("p", j0, "粉色为当前切面(大小即切开范围)。点列表或画布切换,删除只去掉该切面。")) : b("", !0),
|
|
7821
|
+
A.splitMode ? (c(), y("div", T0, [
|
|
7822
7822
|
(c(!0), y(HA, null, kQ(A.splitCount, (t) => (c(), y("div", {
|
|
7823
7823
|
key: t,
|
|
7824
7824
|
class: "btn-row"
|
|
@@ -7826,31 +7826,31 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7826
7826
|
P("button", {
|
|
7827
7827
|
class: vA(["btn", { primary: A.splitActive === t - 1 }]),
|
|
7828
7828
|
onClick: (z) => C("select-split", t - 1)
|
|
7829
|
-
}, " 切面 " + f(t), 11,
|
|
7829
|
+
}, " 切面 " + f(t), 11, z0),
|
|
7830
7830
|
P("button", {
|
|
7831
7831
|
class: "btn danger",
|
|
7832
7832
|
onClick: fA((z) => C("remove-split", t - 1), ["stop"])
|
|
7833
|
-
}, "删除", 8,
|
|
7833
|
+
}, "删除", 8, h0)
|
|
7834
7834
|
]))), 128))
|
|
7835
7835
|
])) : b("", !0),
|
|
7836
|
-
P("div",
|
|
7836
|
+
P("div", b0, [
|
|
7837
7837
|
P("button", {
|
|
7838
7838
|
class: "btn primary",
|
|
7839
7839
|
disabled: !A.splitMode || J(F).busy,
|
|
7840
7840
|
onClick: o[30] || (o[30] = (t) => C("confirm-split"))
|
|
7841
|
-
}, " 确认拆件 ", 8,
|
|
7841
|
+
}, " 确认拆件 ", 8, d0),
|
|
7842
7842
|
P("button", {
|
|
7843
7843
|
class: "btn",
|
|
7844
7844
|
disabled: !A.splitMode || J(F).busy,
|
|
7845
7845
|
onClick: o[31] || (o[31] = (t) => C("cancel-split"))
|
|
7846
|
-
}, "取消", 8,
|
|
7846
|
+
}, "取消", 8, S0)
|
|
7847
7847
|
]),
|
|
7848
|
-
A.features.autoSplit ? (c(), y("div",
|
|
7848
|
+
A.features.autoSplit ? (c(), y("div", n0, [
|
|
7849
7849
|
P("button", {
|
|
7850
7850
|
class: "btn primary",
|
|
7851
7851
|
disabled: A.geomLocked || J(F).busy || J(D).roots.length < 2,
|
|
7852
7852
|
onClick: o[32] || (o[32] = (t) => C("auto-split"))
|
|
7853
|
-
}, " 自动拆件 ", 8,
|
|
7853
|
+
}, " 自动拆件 ", 8, x0)
|
|
7854
7854
|
])) : b("", !0)
|
|
7855
7855
|
], 64)) : b("", !0),
|
|
7856
7856
|
A.features.numeric ? (c(), y(HA, { key: 4 }, [
|
|
@@ -7861,7 +7861,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7861
7861
|
P("span", null, "Y"),
|
|
7862
7862
|
P("span", null, "Z")
|
|
7863
7863
|
], -1)),
|
|
7864
|
-
P("div",
|
|
7864
|
+
P("div", p0, [
|
|
7865
7865
|
o[59] || (o[59] = P("span", null, "位移", -1)),
|
|
7866
7866
|
RA(P("input", {
|
|
7867
7867
|
"onUpdate:modelValue": o[33] || (o[33] = (t) => A.nx.x = t),
|
|
@@ -7900,7 +7900,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7900
7900
|
]
|
|
7901
7901
|
])
|
|
7902
7902
|
]),
|
|
7903
|
-
P("div",
|
|
7903
|
+
P("div", l0, [
|
|
7904
7904
|
o[60] || (o[60] = P("span", null, "旋转", -1)),
|
|
7905
7905
|
RA(P("input", {
|
|
7906
7906
|
"onUpdate:modelValue": o[36] || (o[36] = (t) => A.nx.rx = t),
|
|
@@ -7939,7 +7939,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7939
7939
|
]
|
|
7940
7940
|
])
|
|
7941
7941
|
]),
|
|
7942
|
-
P("div",
|
|
7942
|
+
P("div", q0, [
|
|
7943
7943
|
o[61] || (o[61] = P("span", null, "缩放", -1)),
|
|
7944
7944
|
RA(P("input", {
|
|
7945
7945
|
"onUpdate:modelValue": o[39] || (o[39] = (t) => A.nx.sx = t),
|
|
@@ -7978,47 +7978,47 @@ const dA = /* @__PURE__ */ oA({
|
|
|
7978
7978
|
]
|
|
7979
7979
|
])
|
|
7980
7980
|
]),
|
|
7981
|
-
P("label",
|
|
7981
|
+
P("label", O0, [
|
|
7982
7982
|
P("input", {
|
|
7983
7983
|
type: "checkbox",
|
|
7984
7984
|
checked: A.snapOn,
|
|
7985
7985
|
onChange: o[42] || (o[42] = (t) => C("update:snapOn", t.target.checked))
|
|
7986
|
-
}, null, 40,
|
|
7986
|
+
}, null, 40, f0),
|
|
7987
7987
|
o[62] || (o[62] = m(" 轴向吸附(Shift)", -1))
|
|
7988
7988
|
]),
|
|
7989
|
-
P("div",
|
|
7989
|
+
P("div", Z0, [
|
|
7990
7990
|
P("button", {
|
|
7991
7991
|
class: "btn",
|
|
7992
7992
|
disabled: !A.hasModel || A.geomLocked,
|
|
7993
7993
|
onClick: o[43] || (o[43] = (t) => C("apply-numeric"))
|
|
7994
|
-
}, "应用数值", 8,
|
|
7994
|
+
}, "应用数值", 8, u0)
|
|
7995
7995
|
])
|
|
7996
7996
|
], 64)) : b("", !0),
|
|
7997
7997
|
A.features.primitives ? (c(), y(HA, { key: 5 }, [
|
|
7998
7998
|
o[65] || (o[65] = P("div", { class: "sec" }, "基本体 / 布尔", -1)),
|
|
7999
|
-
P("div",
|
|
7999
|
+
P("div", V0, [
|
|
8000
8000
|
P("button", {
|
|
8001
8001
|
class: "btn",
|
|
8002
8002
|
disabled: A.geomLocked,
|
|
8003
8003
|
onClick: o[44] || (o[44] = (t) => C("add-prim", "box"))
|
|
8004
|
-
}, "立方体", 8,
|
|
8004
|
+
}, "立方体", 8, m0),
|
|
8005
8005
|
P("button", {
|
|
8006
8006
|
class: "btn",
|
|
8007
8007
|
disabled: A.geomLocked,
|
|
8008
8008
|
onClick: o[45] || (o[45] = (t) => C("add-prim", "cylinder"))
|
|
8009
|
-
}, "圆柱", 8,
|
|
8009
|
+
}, "圆柱", 8, W0),
|
|
8010
8010
|
P("button", {
|
|
8011
8011
|
class: "btn",
|
|
8012
8012
|
disabled: A.geomLocked,
|
|
8013
8013
|
onClick: o[46] || (o[46] = (t) => C("add-prim", "sphere"))
|
|
8014
|
-
}, "球", 8,
|
|
8014
|
+
}, "球", 8, X0),
|
|
8015
8015
|
P("button", {
|
|
8016
8016
|
class: "btn",
|
|
8017
8017
|
disabled: A.geomLocked,
|
|
8018
8018
|
onClick: o[47] || (o[47] = (t) => C("add-prim", "prism"))
|
|
8019
|
-
}, "棱柱", 8,
|
|
8019
|
+
}, "棱柱", 8, _0)
|
|
8020
8020
|
]),
|
|
8021
|
-
P("div",
|
|
8021
|
+
P("div", $0, [
|
|
8022
8022
|
ZA(vQ, {
|
|
8023
8023
|
"model-value": A.boolOp,
|
|
8024
8024
|
options: Q,
|
|
@@ -8032,22 +8032,22 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8032
8032
|
"onUpdate:modelValue": o[49] || (o[49] = (t) => C("update:boolB", Number(t)))
|
|
8033
8033
|
}, null, 8, ["model-value", "options"])
|
|
8034
8034
|
]),
|
|
8035
|
-
P("div",
|
|
8035
|
+
P("div", Aw, [
|
|
8036
8036
|
P("button", {
|
|
8037
8037
|
class: "btn",
|
|
8038
8038
|
disabled: A.geomLocked || J(D).roots.length < 2,
|
|
8039
8039
|
onClick: o[50] || (o[50] = (t) => C("preview-bool"))
|
|
8040
|
-
}, "实时预览", 8,
|
|
8040
|
+
}, "实时预览", 8, Qw),
|
|
8041
8041
|
P("button", {
|
|
8042
8042
|
class: "btn primary",
|
|
8043
8043
|
disabled: A.geomLocked || J(D).roots.length < 2,
|
|
8044
8044
|
onClick: o[51] || (o[51] = (t) => C("confirm-bool"))
|
|
8045
|
-
}, "确认精算", 8,
|
|
8045
|
+
}, "确认精算", 8, Bw)
|
|
8046
8046
|
]),
|
|
8047
|
-
A.previewOn ? (c(), y("p",
|
|
8047
|
+
A.previewOn ? (c(), y("p", gw, "布尔预览仅供参考,不进入导出。")) : b("", !0)
|
|
8048
8048
|
], 64)) : b("", !0)
|
|
8049
8049
|
], 512), [
|
|
8050
|
-
[
|
|
8050
|
+
[Tg, A.open]
|
|
8051
8051
|
])
|
|
8052
8052
|
], 2),
|
|
8053
8053
|
v.value !== null ? (c(), DA(dA, {
|
|
@@ -8056,19 +8056,19 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8056
8056
|
}, {
|
|
8057
8057
|
default: bA(() => [
|
|
8058
8058
|
o[66] || (o[66] = P("h3", null, "重命名零件", -1)),
|
|
8059
|
-
P("div",
|
|
8059
|
+
P("div", Ew, [
|
|
8060
8060
|
RA(P("input", {
|
|
8061
8061
|
ref_key: "renameInput",
|
|
8062
8062
|
ref: K,
|
|
8063
8063
|
"onUpdate:modelValue": o[52] || (o[52] = (t) => H.value = t),
|
|
8064
8064
|
class: "url-input",
|
|
8065
8065
|
placeholder: "零件名称",
|
|
8066
|
-
onKeydown:
|
|
8067
|
-
}, null, 40,
|
|
8066
|
+
onKeydown: jg(fA(N, ["prevent"]), ["enter"])
|
|
8067
|
+
}, null, 40, Iw), [
|
|
8068
8068
|
[lA, H.value]
|
|
8069
8069
|
])
|
|
8070
8070
|
]),
|
|
8071
|
-
P("div",
|
|
8071
|
+
P("div", Cw, [
|
|
8072
8072
|
P("button", {
|
|
8073
8073
|
class: "btn",
|
|
8074
8074
|
type: "button",
|
|
@@ -8079,31 +8079,31 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8079
8079
|
type: "button",
|
|
8080
8080
|
disabled: !H.value.trim(),
|
|
8081
8081
|
onClick: N
|
|
8082
|
-
}, "确定", 8,
|
|
8082
|
+
}, "确定", 8, Pw)
|
|
8083
8083
|
])
|
|
8084
8084
|
]),
|
|
8085
8085
|
_: 1
|
|
8086
8086
|
})) : b("", !0)
|
|
8087
8087
|
], 64));
|
|
8088
8088
|
}
|
|
8089
|
-
}),
|
|
8089
|
+
}), ww = { class: "panel-hd" }, Fw = ["title"], vw = { class: "panel-bd" }, kw = {
|
|
8090
8090
|
key: 0,
|
|
8091
8091
|
style: { color: "var(--muted)", "font-size": "13px" }
|
|
8092
|
-
},
|
|
8092
|
+
}, Gw = ["onClick"], Uw = {
|
|
8093
8093
|
key: 1,
|
|
8094
8094
|
class: "field",
|
|
8095
8095
|
style: { "flex-wrap": "wrap" }
|
|
8096
|
-
},
|
|
8096
|
+
}, ow = {
|
|
8097
8097
|
key: 2,
|
|
8098
8098
|
style: { "font-size": "12px", color: "var(--warn)" }
|
|
8099
|
-
},
|
|
8099
|
+
}, iw = {
|
|
8100
8100
|
key: 3,
|
|
8101
8101
|
style: { "font-size": "12px", color: "var(--muted)" }
|
|
8102
|
-
},
|
|
8102
|
+
}, sw = {
|
|
8103
8103
|
key: 4,
|
|
8104
8104
|
class: "panel-hd",
|
|
8105
8105
|
style: { margin: "8px -8px" }
|
|
8106
|
-
},
|
|
8106
|
+
}, aw = /* @__PURE__ */ oA({
|
|
8107
8107
|
__name: "DiagnosisPanel",
|
|
8108
8108
|
props: {
|
|
8109
8109
|
open: { type: Boolean },
|
|
@@ -8115,17 +8115,17 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8115
8115
|
return (Q, I) => (c(), y("aside", {
|
|
8116
8116
|
class: vA(["panel right", { collapsed: !A.open }])
|
|
8117
8117
|
}, [
|
|
8118
|
-
P("div",
|
|
8118
|
+
P("div", ww, [
|
|
8119
8119
|
P("button", {
|
|
8120
8120
|
class: "panel-toggle",
|
|
8121
8121
|
type: "button",
|
|
8122
8122
|
title: A.open ? "收起诊断栏" : "展开诊断栏",
|
|
8123
8123
|
onClick: I[0] || (I[0] = (C) => E("update:open", !A.open))
|
|
8124
|
-
}, f(A.open ? "›" : "‹"), 9,
|
|
8124
|
+
}, f(A.open ? "›" : "‹"), 9, Fw),
|
|
8125
8125
|
I[1] || (I[1] = P("span", { class: "ttl" }, "诊断", -1))
|
|
8126
8126
|
]),
|
|
8127
|
-
RA(P("div",
|
|
8128
|
-
J(B).diagnosis ? b("", !0) : (c(), y("p",
|
|
8127
|
+
RA(P("div", vw, [
|
|
8128
|
+
J(B).diagnosis ? b("", !0) : (c(), y("p", kw, "导入模型后自动体检。")),
|
|
8129
8129
|
(c(!0), y(HA, null, kQ(J(B).diagnosis?.items ?? [], (C) => (c(), y("div", {
|
|
8130
8130
|
key: C.id,
|
|
8131
8131
|
class: vA(["diag", [C.level, { active: A.activeDefect === C.id }]]),
|
|
@@ -8133,27 +8133,27 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8133
8133
|
}, [
|
|
8134
8134
|
P("h4", null, f(C.title), 1),
|
|
8135
8135
|
P("p", null, f(C.explanation), 1)
|
|
8136
|
-
], 10,
|
|
8137
|
-
J(B).summary ? (c(), y("div",
|
|
8136
|
+
], 10, Gw))), 128)),
|
|
8137
|
+
J(B).summary ? (c(), y("div", Uw, [
|
|
8138
8138
|
P("span", null, "面数 " + f(J(B).summary.triangleCount), 1),
|
|
8139
8139
|
P("span", null, "顶点 " + f(J(B).summary.vertexCount), 1)
|
|
8140
8140
|
])) : b("", !0),
|
|
8141
|
-
J(B).summary?.hasAnimations ? (c(), y("p",
|
|
8142
|
-
J(B).appearances.some(Boolean) ? (c(), y("p",
|
|
8143
|
-
J(B).measurements.length ? (c(), y("div",
|
|
8141
|
+
J(B).summary?.hasAnimations ? (c(), y("p", ow, "动画将在打印流程中忽略。")) : b("", !0),
|
|
8142
|
+
J(B).appearances.some(Boolean) ? (c(), y("p", iw, "外观为预览:贴图/顶点色不进入几何内核。修复、布尔或拆件后可能回到默认色。")) : b("", !0),
|
|
8143
|
+
J(B).measurements.length ? (c(), y("div", sw, "测量")) : b("", !0),
|
|
8144
8144
|
(c(!0), y(HA, null, kQ(J(B).measurements, (C, D) => (c(), y("p", {
|
|
8145
8145
|
key: D,
|
|
8146
8146
|
style: { "font-size": "12px" }
|
|
8147
8147
|
}, f(C.label) + " " + f(C.value.toFixed(2)) + " " + f(C.unit), 1))), 128))
|
|
8148
8148
|
], 512), [
|
|
8149
|
-
[
|
|
8149
|
+
[Tg, A.open]
|
|
8150
8150
|
])
|
|
8151
8151
|
], 2));
|
|
8152
8152
|
}
|
|
8153
|
-
}),
|
|
8153
|
+
}), Hw = { class: "statusbar" }, Kw = { key: 0 }, Mw = {
|
|
8154
8154
|
key: 1,
|
|
8155
8155
|
class: "warn"
|
|
8156
|
-
},
|
|
8156
|
+
}, Jw = /* @__PURE__ */ oA({
|
|
8157
8157
|
__name: "StatusBar",
|
|
8158
8158
|
setup(A) {
|
|
8159
8159
|
const g = QQ(), E = PA(() => {
|
|
@@ -8162,15 +8162,15 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8162
8162
|
const Q = [];
|
|
8163
8163
|
return B.overflowX && Q.push("X"), B.overflowY && Q.push("Y"), B.overflowZ && Q.push("Z"), `超出打印床 · ${Q.join("/")}`;
|
|
8164
8164
|
});
|
|
8165
|
-
return (B, Q) => (c(), y("footer",
|
|
8165
|
+
return (B, Q) => (c(), y("footer", Hw, [
|
|
8166
8166
|
P("span", null, f(J(gI)(J(g).bboxSize)), 1),
|
|
8167
8167
|
Q[0] || (Q[0] = P("span", null, "内部单位 mm", -1)),
|
|
8168
|
-
J(g).diagnosis ? (c(), y("span",
|
|
8169
|
-
E.value ? (c(), y("span",
|
|
8168
|
+
J(g).diagnosis ? (c(), y("span", Kw, "体积 " + f(J(g).diagnosis.volumeMm3.toFixed(0)) + " mm³", 1)) : b("", !0),
|
|
8169
|
+
E.value ? (c(), y("span", Mw, f(E.value), 1)) : b("", !0),
|
|
8170
8170
|
P("span", null, f(J(g).fileName || "未打开文件"), 1)
|
|
8171
8171
|
]));
|
|
8172
8172
|
}
|
|
8173
|
-
}),
|
|
8173
|
+
}), tw = /* @__PURE__ */ kg(Jw, [["__scopeId", "data-v-b085aeeb"]]), Nw = ["disabled"], Yw = /* @__PURE__ */ oA({
|
|
8174
8174
|
__name: "PartContextMenu",
|
|
8175
8175
|
props: {
|
|
8176
8176
|
x: {},
|
|
@@ -8215,7 +8215,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8215
8215
|
onClick: K[3] || (K[3] = (L) => {
|
|
8216
8216
|
J(Q).mergeSelected(J(Q).selectedIds), B("close");
|
|
8217
8217
|
})
|
|
8218
|
-
}, "合并所选", 8,
|
|
8218
|
+
}, "合并所选", 8, Nw),
|
|
8219
8219
|
A.layout ? (c(), y(HA, { key: 0 }, [
|
|
8220
8220
|
P("button", { onClick: F }, "贴地"),
|
|
8221
8221
|
P("button", {
|
|
@@ -8227,32 +8227,32 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8227
8227
|
], 64)) : b("", !0)
|
|
8228
8228
|
], 4));
|
|
8229
8229
|
}
|
|
8230
|
-
}),
|
|
8230
|
+
}), cw = {
|
|
8231
8231
|
key: 0,
|
|
8232
8232
|
class: "empty"
|
|
8233
|
-
},
|
|
8233
|
+
}, Lw = {
|
|
8234
8234
|
key: 1,
|
|
8235
8235
|
class: "preview-lighting"
|
|
8236
|
-
},
|
|
8236
|
+
}, Rw = {
|
|
8237
8237
|
key: 6,
|
|
8238
8238
|
class: "preview-tag",
|
|
8239
8239
|
style: { left: "auto", right: "10px" }
|
|
8240
|
-
},
|
|
8240
|
+
}, rw = {
|
|
8241
8241
|
key: 7,
|
|
8242
8242
|
class: "clip-slider"
|
|
8243
|
-
},
|
|
8243
|
+
}, ew = ["min", "max", "step"], yw = {
|
|
8244
8244
|
key: 8,
|
|
8245
8245
|
class: "live-read"
|
|
8246
|
-
},
|
|
8246
|
+
}, jw = {
|
|
8247
8247
|
key: 10,
|
|
8248
8248
|
class: "tour"
|
|
8249
|
-
},
|
|
8249
|
+
}, Tw = { key: 0 }, zw = { key: 1 }, hw = { key: 2 }, bw = {
|
|
8250
8250
|
class: "actions",
|
|
8251
8251
|
style: { display: "flex", gap: "8px", "justify-content": "flex-end" }
|
|
8252
|
-
},
|
|
8252
|
+
}, dw = {
|
|
8253
8253
|
key: 14,
|
|
8254
8254
|
class: "busy"
|
|
8255
|
-
},
|
|
8255
|
+
}, Sw = { class: "toasts" }, nw = /* @__PURE__ */ oA({
|
|
8256
8256
|
__name: "Workbench",
|
|
8257
8257
|
setup(A, { expose: g }) {
|
|
8258
8258
|
const E = [
|
|
@@ -8260,7 +8260,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8260
8260
|
{ value: "studio", label: "摄影棚" },
|
|
8261
8261
|
{ value: "ibl", label: "环境光照" },
|
|
8262
8262
|
{ value: "headlamp", label: "跟随头灯" }
|
|
8263
|
-
], B = QQ(), Q = rQ(), I = UA(), C = tA(
|
|
8263
|
+
], B = QQ(), Q = rQ(), I = UA(), C = tA(Og, r(void 0)), D = tA(fg, r("edit")), F = tA(Zg, r(void 0)), v = tA(ug, r(void 0)), H = tA(Vg, r(void 0)), K = tA(mg, r(void 0)), L = tA(Wg, r(void 0)), Y = tA(hB, {});
|
|
8264
8264
|
let e = !1, d = !1;
|
|
8265
8265
|
function S(G) {
|
|
8266
8266
|
if (!G) return null;
|
|
@@ -8312,7 +8312,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8312
8312
|
confirmExport: HB,
|
|
8313
8313
|
exportFile: OB
|
|
8314
8314
|
} = TC({
|
|
8315
|
-
onBlocking: (G) =>
|
|
8315
|
+
onBlocking: (G) => Gg(G),
|
|
8316
8316
|
onRepair: () => IQ()
|
|
8317
8317
|
}), {
|
|
8318
8318
|
snapshotOpen: _Q,
|
|
@@ -8326,7 +8326,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8326
8326
|
exportSnapshot: JB
|
|
8327
8327
|
} = zC({
|
|
8328
8328
|
capture: (G, k) => U.value ? U.value.captureStill({
|
|
8329
|
-
mime:
|
|
8329
|
+
mime: qg(G),
|
|
8330
8330
|
quality: k ?? (G === "jpeg" ? 0.92 : void 0)
|
|
8331
8331
|
}) : Promise.reject(new Error("画布未就绪"))
|
|
8332
8332
|
});
|
|
@@ -8564,7 +8564,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8564
8564
|
};
|
|
8565
8565
|
}
|
|
8566
8566
|
if (window.addEventListener("keydown", YB), window.addEventListener("keyup", cB), window.addEventListener("beforeunload", () => B.scheduleAutosave()), B.setAutosaveEnabled(BA.value.drafts), !iA.value && BA.value.drafts) {
|
|
8567
|
-
const k = await
|
|
8567
|
+
const k = await pg();
|
|
8568
8568
|
k?.roots?.length && await I.ask("发现未完成草稿", "检测到上次编辑的项目草稿,是否恢复?") && await B.restore(k);
|
|
8569
8569
|
}
|
|
8570
8570
|
!iA.value && BA.value.extras && !BA.value.hideTour && !Q.state.skipTour && (t.value = 0);
|
|
@@ -8575,7 +8575,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8575
8575
|
}
|
|
8576
8576
|
const G = C.value?.trim();
|
|
8577
8577
|
G && await qB(G);
|
|
8578
|
-
}),
|
|
8578
|
+
}), yg(() => {
|
|
8579
8579
|
window.removeEventListener("keydown", YB), window.removeEventListener("keyup", cB), N?.disconnect(), U.value?.dispose();
|
|
8580
8580
|
});
|
|
8581
8581
|
function YB(G) {
|
|
@@ -8723,8 +8723,8 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8723
8723
|
await IQ();
|
|
8724
8724
|
const xQ = TA();
|
|
8725
8725
|
if (xQ.length) {
|
|
8726
|
-
const
|
|
8727
|
-
return I.toast("fail",
|
|
8726
|
+
const Ug = "修复后仍有未封闭零件,请检查后再试自动拆件";
|
|
8727
|
+
return I.toast("fail", Ug), { ok: !1, needsRepair: !0, repairPartNames: xQ, message: Ug };
|
|
8728
8728
|
}
|
|
8729
8729
|
}
|
|
8730
8730
|
return await B.confirmContactAssemble(k, a) ? { ok: !0, message: "自动拆件完成" } : { ok: !1, message: "自动拆件失败" };
|
|
@@ -8883,7 +8883,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8883
8883
|
}
|
|
8884
8884
|
p.value = G.b, U.value?.clearPreview(), O.value = !1, await B.applyBoolean(G.a, G.b, z.value);
|
|
8885
8885
|
}
|
|
8886
|
-
function
|
|
8886
|
+
function Gg(G) {
|
|
8887
8887
|
rA.value = G, U.value?.showDefects(B.defects, G), U.value?.flyToDefect(B.defects, G), I.toast("info", `已定位:${G}`);
|
|
8888
8888
|
}
|
|
8889
8889
|
function wE(G) {
|
|
@@ -8954,7 +8954,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
8954
8954
|
onDrop: k[42] || (k[42] = (a) => !iA.value && J(pB)(a)),
|
|
8955
8955
|
onPaste: k[43] || (k[43] = (a) => !iA.value && J(lB)(a))
|
|
8956
8956
|
}, [
|
|
8957
|
-
iA.value ? b("", !0) : (c(), DA(
|
|
8957
|
+
iA.value ? b("", !0) : (c(), DA(Dw, {
|
|
8958
8958
|
key: 0,
|
|
8959
8959
|
open: GQ.value,
|
|
8960
8960
|
"onUpdate:open": k[0] || (k[0] = (a) => GQ.value = a),
|
|
@@ -9028,7 +9028,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9028
9028
|
ref_key: "canvasRef",
|
|
9029
9029
|
ref: j
|
|
9030
9030
|
}, null, 512),
|
|
9031
|
-
!yA.value && !BA.value.hideEmpty && !iA.value ? (c(), y("div",
|
|
9031
|
+
!yA.value && !BA.value.hideEmpty && !iA.value ? (c(), y("div", cw, [...k[44] || (k[44] = [
|
|
9032
9032
|
P("h2", null, "拖入 GLB / STL / OBJ / 3MF 开始", -1),
|
|
9033
9033
|
P("p", null, "也可从网络地址导入,解析在浏览器内完成。", -1),
|
|
9034
9034
|
P("div", { class: "steps" }, [
|
|
@@ -9046,7 +9046,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9046
9046
|
])
|
|
9047
9047
|
], -1)
|
|
9048
9048
|
])])) : b("", !0),
|
|
9049
|
-
kA.value && !BA.value.hidePreviewLighting ? (c(), y("div",
|
|
9049
|
+
kA.value && !BA.value.hidePreviewLighting ? (c(), y("div", Lw, [
|
|
9050
9050
|
P("label", null, [
|
|
9051
9051
|
k[45] || (k[45] = m(" 灯光 ", -1)),
|
|
9052
9052
|
ZA(vQ, {
|
|
@@ -9073,8 +9073,8 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9073
9073
|
key: 5,
|
|
9074
9074
|
class: vA(["preview-tag", { "below-lighting": kA.value && !BA.value.hidePreviewLighting }])
|
|
9075
9075
|
}, "选面朝下 · 点击表面 · Esc 取消", 2)) : b("", !0),
|
|
9076
|
-
nA.value ? (c(), y("div",
|
|
9077
|
-
wA.value ? (c(), y("div",
|
|
9076
|
+
nA.value ? (c(), y("div", Rw, "红绿对拍")) : b("", !0),
|
|
9077
|
+
wA.value ? (c(), y("div", rw, [
|
|
9078
9078
|
k[46] || (k[46] = P("label", null, "剖切高度", -1)),
|
|
9079
9079
|
RA(P("input", {
|
|
9080
9080
|
type: "range",
|
|
@@ -9082,7 +9082,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9082
9082
|
max: GB.value,
|
|
9083
9083
|
step: Math.max(0.1, (GB.value - kB.value) / 200),
|
|
9084
9084
|
"onUpdate:modelValue": k[19] || (k[19] = (a) => NA.value = a)
|
|
9085
|
-
}, null, 8,
|
|
9085
|
+
}, null, 8, ew), [
|
|
9086
9086
|
[
|
|
9087
9087
|
lA,
|
|
9088
9088
|
NA.value,
|
|
@@ -9091,15 +9091,15 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9091
9091
|
]
|
|
9092
9092
|
])
|
|
9093
9093
|
])) : b("", !0),
|
|
9094
|
-
u.value ? (c(), y("div",
|
|
9094
|
+
u.value ? (c(), y("div", yw, f(u.value), 1)) : b("", !0),
|
|
9095
9095
|
YA.value ? (c(), y("div", {
|
|
9096
9096
|
key: 9,
|
|
9097
9097
|
class: "marquee",
|
|
9098
9098
|
style: DB({ left: YA.value.x + "px", top: YA.value.y + "px", width: YA.value.w + "px", height: YA.value.h + "px" })
|
|
9099
9099
|
}, null, 4)) : b("", !0),
|
|
9100
|
-
BA.value.extras && !BA.value.hideTour && t.value >= 0 ? (c(), y("div",
|
|
9101
|
-
t.value === 0 ? (c(), y("p",
|
|
9102
|
-
P("div",
|
|
9100
|
+
BA.value.extras && !BA.value.hideTour && t.value >= 0 ? (c(), y("div", jw, [
|
|
9101
|
+
t.value === 0 ? (c(), y("p", Tw, "第一步:导入模型。对话框期间先按毫米预览包围盒,确认单位后再缩放。")) : t.value === 1 ? (c(), y("p", zw, "第二步:点诊断条目飞到缺陷;必要时「修复」并看红绿对拍。")) : (c(), y("p", hw, "第三步:校验通过后导出二进制 STL 或 3MF,交给切片软件(Cura / PrusaSlicer 等)。")),
|
|
9102
|
+
P("div", bw, [
|
|
9103
9103
|
P("button", {
|
|
9104
9104
|
class: "btn",
|
|
9105
9105
|
onClick: k[20] || (k[20] = (a) => {
|
|
@@ -9113,15 +9113,15 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9113
9113
|
])
|
|
9114
9114
|
])) : b("", !0)
|
|
9115
9115
|
], 544),
|
|
9116
|
-
iA.value ? b("", !0) : (c(), DA(
|
|
9116
|
+
iA.value ? b("", !0) : (c(), DA(aw, {
|
|
9117
9117
|
key: 1,
|
|
9118
9118
|
open: BQ.value,
|
|
9119
9119
|
"onUpdate:open": k[22] || (k[22] = (a) => BQ.value = a),
|
|
9120
9120
|
"active-defect": rA.value,
|
|
9121
|
-
onFly:
|
|
9121
|
+
onFly: Gg
|
|
9122
9122
|
}, null, 8, ["open", "active-defect"])),
|
|
9123
|
-
!iA.value && !BA.value.hideStatusBar ? (c(), DA(
|
|
9124
|
-
aA.value && !kA.value ? (c(), DA(
|
|
9123
|
+
!iA.value && !BA.value.hideStatusBar ? (c(), DA(tw, { key: 2 })) : b("", !0),
|
|
9124
|
+
aA.value && !kA.value ? (c(), DA(Yw, {
|
|
9125
9125
|
key: 3,
|
|
9126
9126
|
x: aA.value.x,
|
|
9127
9127
|
y: aA.value.y,
|
|
@@ -9152,7 +9152,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9152
9152
|
onClose: k[28] || (k[28] = (a) => UB.value = !1),
|
|
9153
9153
|
onConfirm: J(xB)
|
|
9154
9154
|
}, null, 8, ["file-name", "unit", "onConfirm"])) : b("", !0),
|
|
9155
|
-
J(_Q) ? (c(), DA(
|
|
9155
|
+
J(_Q) ? (c(), DA(aP, {
|
|
9156
9156
|
key: 7,
|
|
9157
9157
|
"preview-url": J(fB),
|
|
9158
9158
|
format: J($Q),
|
|
@@ -9162,7 +9162,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9162
9162
|
onDownload: J(MB),
|
|
9163
9163
|
onUpload: J(uB)
|
|
9164
9164
|
}, null, 8, ["preview-url", "format", "onClose", "onRecapture", "onDownload", "onUpload"])) : b("", !0),
|
|
9165
|
-
J(sB) ? (c(), DA(
|
|
9165
|
+
J(sB) ? (c(), DA(wP, {
|
|
9166
9166
|
key: 8,
|
|
9167
9167
|
format: J(tQ),
|
|
9168
9168
|
"onUpdate:format": k[29] || (k[29] = (a) => pQ(tQ) ? tQ.value = a : null),
|
|
@@ -9174,24 +9174,24 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9174
9174
|
onClose: k[32] || (k[32] = (a) => sB.value = !1),
|
|
9175
9175
|
onDownload: J(HB)
|
|
9176
9176
|
}, null, 8, ["format", "unit", "longest-edge-mm", "progress", "onDownload"])) : b("", !0),
|
|
9177
|
-
BA.value.extras && T.value ? (c(), DA(
|
|
9177
|
+
BA.value.extras && T.value ? (c(), DA(lP, {
|
|
9178
9178
|
key: 9,
|
|
9179
9179
|
onClose: k[33] || (k[33] = (a) => T.value = !1)
|
|
9180
9180
|
})) : b("", !0),
|
|
9181
|
-
BA.value.extras && x.value ? (c(), DA(
|
|
9181
|
+
BA.value.extras && x.value ? (c(), DA(OP, {
|
|
9182
9182
|
key: 10,
|
|
9183
9183
|
"show-replay-tour": !BA.value.hideTour,
|
|
9184
9184
|
onClose: k[34] || (k[34] = (a) => x.value = !1),
|
|
9185
9185
|
onReplayTour: k[35] || (k[35] = (a) => t.value = 0)
|
|
9186
9186
|
}, null, 8, ["show-replay-tour"])) : b("", !0),
|
|
9187
|
-
BA.value.extras && o.value ? (c(), DA(
|
|
9187
|
+
BA.value.extras && o.value ? (c(), DA(mP, {
|
|
9188
9188
|
key: 11,
|
|
9189
9189
|
printable: MQ.value,
|
|
9190
9190
|
"onUpdate:printable": k[36] || (k[36] = (a) => MQ.value = a),
|
|
9191
9191
|
onClose: k[37] || (k[37] = (a) => o.value = !1),
|
|
9192
9192
|
onDownload: wE
|
|
9193
9193
|
}, null, 8, ["printable"])) : b("", !0),
|
|
9194
|
-
BA.value.drafts && J(NB) ? (c(), DA(
|
|
9194
|
+
BA.value.drafts && J(NB) ? (c(), DA(ED, {
|
|
9195
9195
|
key: 12,
|
|
9196
9196
|
name: J(AB),
|
|
9197
9197
|
"onUpdate:name": k[38] || (k[38] = (a) => pQ(AB) ? AB.value = a : null),
|
|
@@ -9202,20 +9202,20 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9202
9202
|
onOpen: J(i),
|
|
9203
9203
|
onRemove: J(s)
|
|
9204
9204
|
}, null, 8, ["name", "drafts", "can-save", "onSave", "onOpen", "onRemove"])) : b("", !0),
|
|
9205
|
-
ZA(
|
|
9206
|
-
gA.value ? (c(), DA(
|
|
9205
|
+
ZA(CD),
|
|
9206
|
+
gA.value ? (c(), DA(DD, {
|
|
9207
9207
|
key: 13,
|
|
9208
9208
|
message: gA.value,
|
|
9209
9209
|
onClose: k[40] || (k[40] = (a) => gA.value = null),
|
|
9210
9210
|
onCopy: oE
|
|
9211
9211
|
}, null, 8, ["message"])) : b("", !0),
|
|
9212
|
-
J(I).busy ? (c(), y("div",
|
|
9212
|
+
J(I).busy ? (c(), y("div", dw, [
|
|
9213
9213
|
P("p", null, f(J(I).busyText), 1),
|
|
9214
9214
|
k[47] || (k[47] = P("div", { class: "bar" }, [
|
|
9215
9215
|
P("i")
|
|
9216
9216
|
], -1))
|
|
9217
9217
|
])) : b("", !0),
|
|
9218
|
-
P("div",
|
|
9218
|
+
P("div", Sw, [
|
|
9219
9219
|
(c(!0), y(HA, null, kQ(J(I).toasts, (a) => (c(), y("div", {
|
|
9220
9220
|
key: a.id,
|
|
9221
9221
|
class: vA(["toast", a.type])
|
|
@@ -9223,7 +9223,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9223
9223
|
])
|
|
9224
9224
|
], 34));
|
|
9225
9225
|
}
|
|
9226
|
-
}),
|
|
9226
|
+
}), gF = /* @__PURE__ */ oA({
|
|
9227
9227
|
__name: "PrintBench",
|
|
9228
9228
|
props: {
|
|
9229
9229
|
uploadUrl: {},
|
|
@@ -9242,7 +9242,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9242
9242
|
setup(A, { expose: g, emit: E }) {
|
|
9243
9243
|
KE() || ME(JE());
|
|
9244
9244
|
const B = A, Q = E;
|
|
9245
|
-
XA(wg, PQ(B, "uploadUrl")), XA(
|
|
9245
|
+
XA(wg, PQ(B, "uploadUrl")), XA(Og, PQ(B, "modelUrl")), XA(Fg, PQ(B, "customExport")), XA(fg, PQ(B, "mode")), XA(Zg, PQ(B, "selectedPartIds")), XA(ug, PQ(B, "partColors")), XA(Vg, PQ(B, "features")), XA(mg, PQ(B, "bedSizeMm")), XA(Wg, PQ(B, "showBedVolume")), XA(hB, {
|
|
9246
9246
|
onReady: () => Q("ready"),
|
|
9247
9247
|
onError: (D) => Q("error", D),
|
|
9248
9248
|
onExported: (D) => Q("exported", D),
|
|
@@ -9269,7 +9269,7 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9269
9269
|
class: vA(["printbench-root", { "is-preview": A.mode === "preview" }]),
|
|
9270
9270
|
style: DB(I.value)
|
|
9271
9271
|
}, [
|
|
9272
|
-
ZA(
|
|
9272
|
+
ZA(nw, {
|
|
9273
9273
|
ref_key: "workbench",
|
|
9274
9274
|
ref: C
|
|
9275
9275
|
}, null, 512)
|
|
@@ -9277,8 +9277,8 @@ const dA = /* @__PURE__ */ oA({
|
|
|
9277
9277
|
}
|
|
9278
9278
|
});
|
|
9279
9279
|
export {
|
|
9280
|
-
|
|
9281
|
-
|
|
9282
|
-
|
|
9280
|
+
BF as PRINTBENCH_FULL_FEATURES,
|
|
9281
|
+
gF as PrintBench,
|
|
9282
|
+
gF as default,
|
|
9283
9283
|
YC as resolveFeatures
|
|
9284
9284
|
};
|