ss-component-new 1.2.4 → 1.2.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.
Files changed (121) hide show
  1. package/dist/OrbitControls-D1lM0xvz.cjs +1 -0
  2. package/dist/OrbitControls-DI8fa9gz.js +419 -0
  3. package/dist/STLLoader-KxFIlfhN.cjs +6 -0
  4. package/dist/STLLoader-memlq1bT.js +609 -0
  5. package/dist/{animationData-CfT99nMO.cjs → animationData-C-RfOMuc.cjs} +1 -1
  6. package/dist/{animationData-9n1X4UvO.js → animationData-y8dsr3_3.js} +4 -4
  7. package/dist/{array-pg68Qbs1.js → array-A59WrroX.js} +1 -1
  8. package/dist/{array-BPHS7JFA.cjs → array-BtZq8qON.cjs} +1 -1
  9. package/dist/config.js +1 -1
  10. package/dist/{iconfont-ljBfzBSE.js → iconfont-7cEds3Xj.js} +2 -2
  11. package/dist/{iconfont-t5epssvu.cjs → iconfont-CsuwJCas.cjs} +1 -1
  12. package/dist/{index-d6tSWKtY.cjs → index-1z9RrjZc.cjs} +1 -1
  13. package/dist/{index-CCIJ-P3X.cjs → index-3W-Y0xpv.cjs} +1 -1
  14. package/dist/{index-C1lB8apW.js → index-700WRwjB.js} +4 -4
  15. package/dist/{index-CyP2hcVu.js → index-B8mnYY10.js} +6 -6
  16. package/dist/{index-BAj0dyBF.js → index-BCbxnJnH.js} +152 -152
  17. package/dist/index-BKJg9Djt.cjs +1 -0
  18. package/dist/{index-BjXcyVvp.js → index-BLgbZvdb.js} +2 -2
  19. package/dist/{index-DEwcUkb-.js → index-BYDi6Owv.js} +3 -3
  20. package/dist/{index-DPyzaxnq.cjs → index-Bb7Xqt9a.cjs} +1 -1
  21. package/dist/{index-CCsSOTaB.js → index-Bc4DtcwM.js} +2 -2
  22. package/dist/{index-B8J_v2Ky.cjs → index-BstfB43W.cjs} +1 -1
  23. package/dist/{index-DSsZtYMz.js → index-BvApH9cT.js} +2 -2
  24. package/dist/{index-FxX6NP0J.js → index-BwjuTBrR.js} +1 -1
  25. package/dist/{index-zQVJFawn.cjs → index-Bxyl11ug.cjs} +1 -1
  26. package/dist/{index-D0_4keB8.js → index-ByVPv-Yz.js} +5 -5
  27. package/dist/{index-Bx4qIiIa.cjs → index-C1oE8qIa.cjs} +1 -1
  28. package/dist/{index-BuKHInQb.js → index-C461j30b.js} +1 -1
  29. package/dist/{index-CLtFz5gE.js → index-C4zGJtAL.js} +3 -3
  30. package/dist/{index-CMlYJD5U.cjs → index-C5z5UbxK.cjs} +1 -1
  31. package/dist/{index-bj8hK6Pe.js → index-CIH_h4z2.js} +2 -2
  32. package/dist/{index-B9nZeing.cjs → index-CIcvrh1S.cjs} +1 -1
  33. package/dist/{index-CxNBcsll.cjs → index-CJK74ski.cjs} +1 -1
  34. package/dist/{index-LXb5DfDE.cjs → index-CKowlJfn.cjs} +1 -1
  35. package/dist/{index-NFCeQcv4.cjs → index-COKoQtgg.cjs} +1 -1
  36. package/dist/{index-DCf7Tz40.cjs → index-COV5L9rX.cjs} +1 -1
  37. package/dist/{index-DsHRVZ0E.js → index-CX_HTfbe.js} +2 -2
  38. package/dist/{index-UN4JU0ly.js → index-CYp77kPp.js} +1 -1
  39. package/dist/{index---6UATT0.js → index-C_GxFCMg.js} +3 -3
  40. package/dist/{index-pLeOyTaj.js → index-CdELRsxO.js} +6 -6
  41. package/dist/{index-BEJOd_29.js → index-Cj8I0l8I.js} +4 -4
  42. package/dist/{index-CmlXlH2b.cjs → index-CjI5pDiU.cjs} +1 -1
  43. package/dist/{index-DBScQH7L.js → index-Cli0OESv.js} +167 -167
  44. package/dist/{index-B5srJr0o.js → index-CwnxmCht.js} +2 -2
  45. package/dist/{index-CK_O7QdV.cjs → index-CxOoKysB.cjs} +1 -1
  46. package/dist/{index-BrsIZVyD.cjs → index-CxnH4vfV.cjs} +1 -1
  47. package/dist/{index-B5vIeQUq.cjs → index-D2ZBhyUI.cjs} +1 -1
  48. package/dist/{index-DS5z17Mc.js → index-D3-XwkD_.js} +7 -7
  49. package/dist/{index-1DtctdYW.cjs → index-D8WF1ILq.cjs} +1 -1
  50. package/dist/{index-Bi7yv8jC.cjs → index-DIOVPmEg.cjs} +1 -1
  51. package/dist/{index-BOVdAFDH.cjs → index-DLBS_tgM.cjs} +1 -1
  52. package/dist/{index-CDXq3gs4.js → index-DNaqgwk-.js} +20 -20
  53. package/dist/{index-PIEkAjRf.js → index-DPk1uhLn.js} +12 -12
  54. package/dist/{index-CAHYTZ1Q.cjs → index-DQP6am4n.cjs} +1 -1
  55. package/dist/{index-DFg-bhPI.js → index-DSb6SjE3.js} +1 -1
  56. package/dist/{index-Y7MUJdPv.js → index-DTCYk2wI.js} +2 -2
  57. package/dist/{index-DOlPMLvf.cjs → index-DTOlfKkI.cjs} +1 -1
  58. package/dist/{index-8CcD03tl.js → index-DU_1ks22.js} +6 -6
  59. package/dist/{index-BKhDFqMM.cjs → index-DWrDb90D.cjs} +1 -1
  60. package/dist/{index-Dk8D9SRm.js → index-DX6yycjK.js} +1 -1
  61. package/dist/{index-CpE8hbs0.js → index-DYU11-M5.js} +6 -6
  62. package/dist/{index-DPaTtF3h.cjs → index-DYx6r9hf.cjs} +1 -1
  63. package/dist/{index-DJ1PTHpx.cjs → index-De5HlcQy.cjs} +1 -1
  64. package/dist/{index-B5gNufYw.js → index-DgymXtI4.js} +2 -2
  65. package/dist/{index-BNNxPuEV.js → index-Dzrvm_bg.js} +1 -1
  66. package/dist/{index-C-AOuDkl.cjs → index-GmZ7sLUW.cjs} +1 -1
  67. package/dist/{index-DszzdQnM.cjs → index-HvKkM5Lq.cjs} +1 -1
  68. package/dist/{index-Bsdjuxq1.cjs → index-NcJvspI2.cjs} +1 -1
  69. package/dist/{index-C0HHmjrg.cjs → index-O8If5b4T.cjs} +1 -1
  70. package/dist/{index-D-r_YKrq.cjs → index-OsCw48Sn.cjs} +2 -2
  71. package/dist/{index-nUEWiqy9.cjs → index-Y6CA0bCm.cjs} +1 -1
  72. package/dist/{index-CdPbJekh.js → index-Y9ssLsHN.js} +13 -13
  73. package/dist/{index-xHEf6hcO.js → index-yQZ9D_YR.js} +2 -2
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BTu7I4mn.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BhLzDN6s.js} +2 -2
  75. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Cmc1oALS.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DLUx599w.cjs} +1 -1
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-Bg_c-oAL.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-D-2EkcBi.js} +6 -6
  77. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-C795GAHK.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-llikchjv.cjs} +1 -1
  78. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-Bn5qXF4J.cjs → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DiMotFL8.cjs} +1 -1
  79. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-9kDr7Iek.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DodcXWpb.js} +13 -13
  80. package/dist/{index.vue_vue_type_style_index_1_lang-Bn7P4fYM.cjs → index.vue_vue_type_style_index_1_lang-BJQzMo8k.cjs} +45 -46
  81. package/dist/{index.vue_vue_type_style_index_1_lang-D1n_3_F6.js → index.vue_vue_type_style_index_1_lang-BMzWMYje.js} +5012 -5100
  82. package/dist/{index.vue_vue_type_style_index_1_lang-zN5mc8b0.cjs → index.vue_vue_type_style_index_1_lang-BcYTED7W.cjs} +2 -2
  83. package/dist/{index.vue_vue_type_style_index_1_lang-Exyt6qTf.js → index.vue_vue_type_style_index_1_lang-CFvcnWO4.js} +31 -25
  84. package/dist/{isString-BAN9KLwf.js → isString-BNK38WbE.js} +1 -1
  85. package/dist/{isString-ChvWbctO.cjs → isString-BmAegMGI.cjs} +1 -1
  86. package/dist/{main-BUEuCNq-.cjs → main-C3-nmz2f.cjs} +1 -1
  87. package/dist/{main-Dk3BZDsa.js → main-DS4xl7Jm.js} +5 -5
  88. package/dist/ss-component.cjs +1 -1
  89. package/dist/ss-component.css +1 -1
  90. package/dist/ss-component.js +11 -11
  91. package/dist/ss-component2.cjs +1 -1
  92. package/dist/ss-component2.js +12 -12
  93. package/dist/three-viewport-gizmo-BxFHxv_x.js +18587 -0
  94. package/dist/three-viewport-gizmo-CwaL5sMV.cjs +4195 -0
  95. package/dist/{threeLatheView-DfSxRY8B.cjs → threeLatheView-BzHB-t_G.cjs} +1 -1
  96. package/dist/{threeLatheView-DcuDjVv0.js → threeLatheView-sTBlm0tt.js} +4 -4
  97. package/dist/{threeModel-DjjtL0-a.cjs → threeModel-BoNyasP7.cjs} +1 -1
  98. package/dist/{threeModel-YRFvkgXU.js → threeModel-CaxS7sQg.js} +5 -5
  99. package/dist/threePreview-Cy7NY-gw.cjs +1 -0
  100. package/dist/threePreview-DPyqhBkJ.js +1873 -0
  101. package/dist/threeSceneView-BIAOu60U.js +1471 -0
  102. package/dist/threeSceneView-wQdzFhdw.cjs +5 -0
  103. package/dist/{threeSceneViewForCPMPIP-DA-twBdG.cjs → threeSceneViewForCPMPIP-Bkr16khM.cjs} +2 -2
  104. package/dist/{threeSceneViewForCPMPIP-axjwKt9X.js → threeSceneViewForCPMPIP-XYA9PRYN.js} +27 -27
  105. package/dist/{threeViewerHost-D7L1FW__.js → threeViewerHost-BkOYLPdk.js} +4 -4
  106. package/dist/{threeViewerHost-B02OtfCk.cjs → threeViewerHost-D1i6LUb6.cjs} +1 -1
  107. package/dist/{useRayCaster-ClcofJkf.cjs → useRayCaster-0bnGc301.cjs} +1 -1
  108. package/dist/{useRayCaster-CAqupK7D.js → useRayCaster-CdDOIWOo.js} +12 -12
  109. package/package.json +1 -1
  110. package/public/config.js +1 -1
  111. package/dist/OrbitControls-Co_9huz0.cjs +0 -1
  112. package/dist/OrbitControls-DA4VpOM_.js +0 -458
  113. package/dist/STLLoader-DmGTF0Nv.js +0 -657
  114. package/dist/STLLoader-RU7KqloS.cjs +0 -6
  115. package/dist/index-5hLZZ6t-.cjs +0 -1
  116. package/dist/three-viewport-gizmo-BHznJ6W3.js +0 -26015
  117. package/dist/three-viewport-gizmo-BV37JzRa.cjs +0 -4197
  118. package/dist/threePreview-ByUYJkts.cjs +0 -1
  119. package/dist/threePreview-CyYfnbB6.js +0 -1972
  120. package/dist/threeSceneView-mhrcH0WG.cjs +0 -5
  121. package/dist/threeSceneView-zvyCHrp1.js +0 -1469
@@ -0,0 +1,609 @@
1
+ import { y as J, F as W, C as P, o as re, p as T, ax as M, ab as E, aa as Y, a9 as R, h as se, af as Z, ah as H, e as X, V as I, z as ne, au as ie, a6 as oe, J as K, aD as ae, Y as le, b as ce, _ as N } from "./three-viewport-gizmo-BxFHxv_x.js";
2
+ const he = /^[og]\s*(.+)?/, ue = /^mtllib /, pe = /^usemtl /, fe = /^usemap /, Q = /\s+/, $ = new I(), q = new I(), ee = new I(), te = new I(), F = new I(), B = new P();
3
+ function de() {
4
+ const S = {
5
+ objects: [],
6
+ object: {},
7
+ vertices: [],
8
+ normals: [],
9
+ colors: [],
10
+ uvs: [],
11
+ materials: {},
12
+ materialLibraries: [],
13
+ startObject: function(e, s) {
14
+ if (this.object && this.object.fromDeclaration === !1) {
15
+ this.object.name = e, this.object.fromDeclaration = s !== !1;
16
+ return;
17
+ }
18
+ const i = this.object && typeof this.object.currentMaterial == "function" ? this.object.currentMaterial() : void 0;
19
+ if (this.object && typeof this.object._finalize == "function" && this.object._finalize(!0), this.object = {
20
+ name: e || "",
21
+ fromDeclaration: s !== !1,
22
+ geometry: {
23
+ vertices: [],
24
+ normals: [],
25
+ colors: [],
26
+ uvs: [],
27
+ hasUVIndices: !1
28
+ },
29
+ materials: [],
30
+ smooth: !0,
31
+ startMaterial: function(t, r) {
32
+ const h = this._finalize(!1);
33
+ h && (h.inherited || h.groupCount <= 0) && this.materials.splice(h.index, 1);
34
+ const c = {
35
+ index: this.materials.length,
36
+ name: t || "",
37
+ mtllib: Array.isArray(r) && r.length > 0 ? r[r.length - 1] : "",
38
+ smooth: h !== void 0 ? h.smooth : this.smooth,
39
+ groupStart: h !== void 0 ? h.groupEnd : 0,
40
+ groupEnd: -1,
41
+ groupCount: -1,
42
+ inherited: !1,
43
+ clone: function(l) {
44
+ const n = {
45
+ index: typeof l == "number" ? l : this.index,
46
+ name: this.name,
47
+ mtllib: this.mtllib,
48
+ smooth: this.smooth,
49
+ groupStart: 0,
50
+ groupEnd: -1,
51
+ groupCount: -1,
52
+ inherited: !1
53
+ };
54
+ return n.clone = this.clone.bind(n), n;
55
+ }
56
+ };
57
+ return this.materials.push(c), c;
58
+ },
59
+ currentMaterial: function() {
60
+ if (this.materials.length > 0)
61
+ return this.materials[this.materials.length - 1];
62
+ },
63
+ _finalize: function(t) {
64
+ const r = this.currentMaterial();
65
+ if (r && r.groupEnd === -1 && (r.groupEnd = this.geometry.vertices.length / 3, r.groupCount = r.groupEnd - r.groupStart, r.inherited = !1), t && this.materials.length > 1)
66
+ for (let h = this.materials.length - 1; h >= 0; h--)
67
+ this.materials[h].groupCount <= 0 && this.materials.splice(h, 1);
68
+ return t && this.materials.length === 0 && this.materials.push({
69
+ name: "",
70
+ smooth: this.smooth
71
+ }), r;
72
+ }
73
+ }, i && i.name && typeof i.clone == "function") {
74
+ const t = i.clone(0);
75
+ t.inherited = !0, this.object.materials.push(t);
76
+ }
77
+ this.objects.push(this.object);
78
+ },
79
+ finalize: function() {
80
+ this.object && typeof this.object._finalize == "function" && this.object._finalize(!0);
81
+ },
82
+ parseVertexIndex: function(e, s) {
83
+ const i = parseInt(e, 10);
84
+ return (i >= 0 ? i - 1 : i + s / 3) * 3;
85
+ },
86
+ parseNormalIndex: function(e, s) {
87
+ const i = parseInt(e, 10);
88
+ return (i >= 0 ? i - 1 : i + s / 3) * 3;
89
+ },
90
+ parseUVIndex: function(e, s) {
91
+ const i = parseInt(e, 10);
92
+ return (i >= 0 ? i - 1 : i + s / 2) * 2;
93
+ },
94
+ addVertex: function(e, s, i) {
95
+ const t = this.vertices, r = this.object.geometry.vertices;
96
+ r.push(t[e + 0], t[e + 1], t[e + 2]), r.push(t[s + 0], t[s + 1], t[s + 2]), r.push(t[i + 0], t[i + 1], t[i + 2]);
97
+ },
98
+ addVertexPoint: function(e) {
99
+ const s = this.vertices;
100
+ this.object.geometry.vertices.push(s[e + 0], s[e + 1], s[e + 2]);
101
+ },
102
+ addVertexLine: function(e) {
103
+ const s = this.vertices;
104
+ this.object.geometry.vertices.push(s[e + 0], s[e + 1], s[e + 2]);
105
+ },
106
+ addNormal: function(e, s, i) {
107
+ const t = this.normals, r = this.object.geometry.normals;
108
+ r.push(t[e + 0], t[e + 1], t[e + 2]), r.push(t[s + 0], t[s + 1], t[s + 2]), r.push(t[i + 0], t[i + 1], t[i + 2]);
109
+ },
110
+ addFaceNormal: function(e, s, i) {
111
+ const t = this.vertices, r = this.object.geometry.normals;
112
+ $.fromArray(t, e), q.fromArray(t, s), ee.fromArray(t, i), F.subVectors(ee, q), te.subVectors($, q), F.cross(te), F.normalize(), r.push(F.x, F.y, F.z), r.push(F.x, F.y, F.z), r.push(F.x, F.y, F.z);
113
+ },
114
+ addColor: function(e, s, i) {
115
+ const t = this.colors, r = this.object.geometry.colors;
116
+ t[e] !== void 0 && r.push(t[e + 0], t[e + 1], t[e + 2]), t[s] !== void 0 && r.push(t[s + 0], t[s + 1], t[s + 2]), t[i] !== void 0 && r.push(t[i + 0], t[i + 1], t[i + 2]);
117
+ },
118
+ addUV: function(e, s, i) {
119
+ const t = this.uvs, r = this.object.geometry.uvs;
120
+ r.push(t[e + 0], t[e + 1]), r.push(t[s + 0], t[s + 1]), r.push(t[i + 0], t[i + 1]);
121
+ },
122
+ addDefaultUV: function() {
123
+ const e = this.object.geometry.uvs;
124
+ e.push(0, 0), e.push(0, 0), e.push(0, 0);
125
+ },
126
+ addUVLine: function(e) {
127
+ const s = this.uvs;
128
+ this.object.geometry.uvs.push(s[e + 0], s[e + 1]);
129
+ },
130
+ addFace: function(e, s, i, t, r, h, c, l, n) {
131
+ const o = this.vertices.length;
132
+ let a = this.parseVertexIndex(e, o), u = this.parseVertexIndex(s, o), d = this.parseVertexIndex(i, o);
133
+ if (this.addVertex(a, u, d), this.addColor(a, u, d), c !== void 0 && c !== "") {
134
+ const m = this.normals.length;
135
+ a = this.parseNormalIndex(c, m), u = this.parseNormalIndex(l, m), d = this.parseNormalIndex(n, m), this.addNormal(a, u, d);
136
+ } else
137
+ this.addFaceNormal(a, u, d);
138
+ if (t !== void 0 && t !== "") {
139
+ const m = this.uvs.length;
140
+ a = this.parseUVIndex(t, m), u = this.parseUVIndex(r, m), d = this.parseUVIndex(h, m), this.addUV(a, u, d), this.object.geometry.hasUVIndices = !0;
141
+ } else
142
+ this.addDefaultUV();
143
+ },
144
+ addPointGeometry: function(e) {
145
+ this.object.geometry.type = "Points";
146
+ const s = this.vertices.length;
147
+ for (let i = 0, t = e.length; i < t; i++) {
148
+ const r = this.parseVertexIndex(e[i], s);
149
+ this.addVertexPoint(r), this.addColor(r);
150
+ }
151
+ },
152
+ addLineGeometry: function(e, s) {
153
+ this.object.geometry.type = "Line";
154
+ const i = this.vertices.length, t = this.uvs.length;
155
+ for (let r = 0, h = e.length; r < h; r++)
156
+ this.addVertexLine(this.parseVertexIndex(e[r], i));
157
+ for (let r = 0, h = s.length; r < h; r++)
158
+ this.addUVLine(this.parseUVIndex(s[r], t));
159
+ }
160
+ };
161
+ return S.startObject("", !1), S;
162
+ }
163
+ class be extends J {
164
+ constructor(e) {
165
+ super(e), this.materials = null;
166
+ }
167
+ load(e, s, i, t) {
168
+ const r = this, h = new W(this.manager);
169
+ h.setPath(this.path), h.setRequestHeader(this.requestHeader), h.setWithCredentials(this.withCredentials), h.load(e, function(c) {
170
+ try {
171
+ s(r.parse(c));
172
+ } catch (l) {
173
+ t ? t(l) : console.error(l), r.manager.itemError(e);
174
+ }
175
+ }, i, t);
176
+ }
177
+ setMaterials(e) {
178
+ return this.materials = e, this;
179
+ }
180
+ parse(e) {
181
+ const s = new de();
182
+ e.indexOf(`\r
183
+ `) !== -1 && (e = e.replace(/\r\n/g, `
184
+ `)), e.indexOf(`\\
185
+ `) !== -1 && (e = e.replace(/\\\n/g, ""));
186
+ const i = e.split(`
187
+ `);
188
+ let t = [];
189
+ for (let c = 0, l = i.length; c < l; c++) {
190
+ const n = i[c].trimStart();
191
+ if (n.length === 0) continue;
192
+ const o = n.charAt(0);
193
+ if (o !== "#")
194
+ if (o === "v") {
195
+ const a = n.split(Q);
196
+ switch (a[0]) {
197
+ case "v":
198
+ s.vertices.push(
199
+ parseFloat(a[1]),
200
+ parseFloat(a[2]),
201
+ parseFloat(a[3])
202
+ ), a.length >= 7 ? (B.setRGB(
203
+ parseFloat(a[4]),
204
+ parseFloat(a[5]),
205
+ parseFloat(a[6])
206
+ ).convertSRGBToLinear(), s.colors.push(B.r, B.g, B.b)) : s.colors.push(void 0, void 0, void 0);
207
+ break;
208
+ case "vn":
209
+ s.normals.push(
210
+ parseFloat(a[1]),
211
+ parseFloat(a[2]),
212
+ parseFloat(a[3])
213
+ );
214
+ break;
215
+ case "vt":
216
+ s.uvs.push(
217
+ parseFloat(a[1]),
218
+ parseFloat(a[2])
219
+ );
220
+ break;
221
+ }
222
+ } else if (o === "f") {
223
+ const u = n.slice(1).trim().split(Q), d = [];
224
+ for (let p = 0, g = u.length; p < g; p++) {
225
+ const b = u[p];
226
+ if (b.length > 0) {
227
+ const x = b.split("/");
228
+ d.push(x);
229
+ }
230
+ }
231
+ const m = d[0];
232
+ for (let p = 1, g = d.length - 1; p < g; p++) {
233
+ const b = d[p], x = d[p + 1];
234
+ s.addFace(
235
+ m[0],
236
+ b[0],
237
+ x[0],
238
+ m[1],
239
+ b[1],
240
+ x[1],
241
+ m[2],
242
+ b[2],
243
+ x[2]
244
+ );
245
+ }
246
+ } else if (o === "l") {
247
+ const a = n.substring(1).trim().split(" ");
248
+ let u = [];
249
+ const d = [];
250
+ if (n.indexOf("/") === -1)
251
+ u = a;
252
+ else
253
+ for (let m = 0, p = a.length; m < p; m++) {
254
+ const g = a[m].split("/");
255
+ g[0] !== "" && u.push(g[0]), g[1] !== "" && d.push(g[1]);
256
+ }
257
+ s.addLineGeometry(u, d);
258
+ } else if (o === "p") {
259
+ const u = n.slice(1).trim().split(" ");
260
+ s.addPointGeometry(u);
261
+ } else if ((t = he.exec(n)) !== null) {
262
+ const a = (" " + t[0].slice(1).trim()).slice(1);
263
+ s.startObject(a);
264
+ } else if (pe.test(n))
265
+ s.object.startMaterial(n.substring(7).trim(), s.materialLibraries);
266
+ else if (ue.test(n))
267
+ s.materialLibraries.push(n.substring(7).trim());
268
+ else if (fe.test(n))
269
+ console.warn('THREE.OBJLoader: Rendering identifier "usemap" not supported. Textures must be defined in MTL files.');
270
+ else if (o === "s") {
271
+ if (t = n.split(" "), t.length > 1) {
272
+ const u = t[1].trim().toLowerCase();
273
+ s.object.smooth = u !== "0" && u !== "off";
274
+ } else
275
+ s.object.smooth = !0;
276
+ const a = s.object.currentMaterial();
277
+ a && (a.smooth = s.object.smooth);
278
+ } else {
279
+ if (n === "\0") continue;
280
+ console.warn('THREE.OBJLoader: Unexpected line: "' + n + '"');
281
+ }
282
+ }
283
+ s.finalize();
284
+ const r = new re();
285
+ if (r.materialLibraries = [].concat(s.materialLibraries), !(s.objects.length === 1 && s.objects[0].geometry.vertices.length === 0) === !0)
286
+ for (let c = 0, l = s.objects.length; c < l; c++) {
287
+ const n = s.objects[c], o = n.geometry, a = n.materials, u = o.type === "Line", d = o.type === "Points";
288
+ let m = !1;
289
+ if (o.vertices.length === 0) continue;
290
+ const p = new T();
291
+ p.setAttribute("position", new M(o.vertices, 3)), o.normals.length > 0 && p.setAttribute("normal", new M(o.normals, 3)), o.colors.length > 0 && (m = !0, p.setAttribute("color", new M(o.colors, 3))), o.hasUVIndices === !0 && p.setAttribute("uv", new M(o.uvs, 2));
292
+ const g = [];
293
+ for (let x = 0, C = a.length; x < C; x++) {
294
+ const v = a[x], j = v.name + "_" + v.smooth + "_" + m;
295
+ let f = s.materials[j];
296
+ if (this.materials !== null) {
297
+ if (f = this.materials.create(v.name), u && f && !(f instanceof E)) {
298
+ const w = new E();
299
+ Y.prototype.copy.call(w, f), w.color.copy(f.color), f = w;
300
+ } else if (d && f && !(f instanceof R)) {
301
+ const w = new R({ size: 10, sizeAttenuation: !1 });
302
+ Y.prototype.copy.call(w, f), w.color.copy(f.color), w.map = f.map, f = w;
303
+ }
304
+ }
305
+ f === void 0 && (u ? f = new E() : d ? f = new R({ size: 1, sizeAttenuation: !1 }) : f = new se(), f.name = v.name, f.flatShading = !v.smooth, f.vertexColors = m, s.materials[j] = f), g.push(f);
306
+ }
307
+ let b;
308
+ if (g.length > 1) {
309
+ for (let x = 0, C = a.length; x < C; x++) {
310
+ const v = a[x];
311
+ p.addGroup(v.groupStart, v.groupCount, x);
312
+ }
313
+ u ? b = new Z(p, g) : d ? b = new H(p, g) : b = new X(p, g);
314
+ } else
315
+ u ? b = new Z(p, g[0]) : d ? b = new H(p, g[0]) : b = new X(p, g[0]);
316
+ b.name = n.name, r.add(b);
317
+ }
318
+ else if (s.vertices.length > 0) {
319
+ const c = new R({ size: 1, sizeAttenuation: !1 }), l = new T();
320
+ l.setAttribute("position", new M(s.vertices, 3)), s.colors.length > 0 && s.colors[0] !== void 0 && (l.setAttribute("color", new M(s.colors, 3)), c.vertexColors = !0);
321
+ const n = new H(l, c);
322
+ r.add(n);
323
+ }
324
+ return r;
325
+ }
326
+ }
327
+ class xe extends J {
328
+ constructor(e) {
329
+ super(e);
330
+ }
331
+ /**
332
+ * Loads and parses a MTL asset from a URL.
333
+ *
334
+ * @param {String} url - URL to the MTL file.
335
+ * @param {Function} [onLoad] - Callback invoked with the loaded object.
336
+ * @param {Function} [onProgress] - Callback for download progress.
337
+ * @param {Function} [onError] - Callback for download errors.
338
+ *
339
+ * @see setPath setResourcePath
340
+ *
341
+ * @note In order for relative texture references to resolve correctly
342
+ * you must call setResourcePath() explicitly prior to load.
343
+ */
344
+ load(e, s, i, t) {
345
+ const r = this, h = this.path === "" ? ne.extractUrlBase(e) : this.path, c = new W(this.manager);
346
+ c.setPath(this.path), c.setRequestHeader(this.requestHeader), c.setWithCredentials(this.withCredentials), c.load(e, function(l) {
347
+ try {
348
+ s(r.parse(l, h));
349
+ } catch (n) {
350
+ t ? t(n) : console.error(n), r.manager.itemError(e);
351
+ }
352
+ }, i, t);
353
+ }
354
+ setMaterialOptions(e) {
355
+ return this.materialOptions = e, this;
356
+ }
357
+ /**
358
+ * Parses a MTL file.
359
+ *
360
+ * @param {String} text - Content of MTL file
361
+ * @return {MaterialCreator}
362
+ *
363
+ * @see setPath setResourcePath
364
+ *
365
+ * @note In order for relative texture references to resolve correctly
366
+ * you must call setResourcePath() explicitly prior to parse.
367
+ */
368
+ parse(e, s) {
369
+ const i = e.split(`
370
+ `);
371
+ let t = {};
372
+ const r = /\s+/, h = {};
373
+ for (let l = 0; l < i.length; l++) {
374
+ let n = i[l];
375
+ if (n = n.trim(), n.length === 0 || n.charAt(0) === "#")
376
+ continue;
377
+ const o = n.indexOf(" ");
378
+ let a = o >= 0 ? n.substring(0, o) : n;
379
+ a = a.toLowerCase();
380
+ let u = o >= 0 ? n.substring(o + 1) : "";
381
+ if (u = u.trim(), a === "newmtl")
382
+ t = { name: u }, h[u] = t;
383
+ else if (a === "ka" || a === "kd" || a === "ks" || a === "ke") {
384
+ const d = u.split(r, 3);
385
+ t[a] = [parseFloat(d[0]), parseFloat(d[1]), parseFloat(d[2])];
386
+ } else
387
+ t[a] = u;
388
+ }
389
+ const c = new me(this.resourcePath || s, this.materialOptions);
390
+ return c.setCrossOrigin(this.crossOrigin), c.setManager(this.manager), c.setMaterials(h), c;
391
+ }
392
+ }
393
+ class me {
394
+ constructor(e = "", s = {}) {
395
+ this.baseUrl = e, this.options = s, this.materialsInfo = {}, this.materials = {}, this.materialsArray = [], this.nameLookup = {}, this.crossOrigin = "anonymous", this.side = this.options.side !== void 0 ? this.options.side : ie, this.wrap = this.options.wrap !== void 0 ? this.options.wrap : oe;
396
+ }
397
+ setCrossOrigin(e) {
398
+ return this.crossOrigin = e, this;
399
+ }
400
+ setManager(e) {
401
+ this.manager = e;
402
+ }
403
+ setMaterials(e) {
404
+ this.materialsInfo = this.convert(e), this.materials = {}, this.materialsArray = [], this.nameLookup = {};
405
+ }
406
+ convert(e) {
407
+ if (!this.options) return e;
408
+ const s = {};
409
+ for (const i in e) {
410
+ const t = e[i], r = {};
411
+ s[i] = r;
412
+ for (const h in t) {
413
+ let c = !0, l = t[h];
414
+ const n = h.toLowerCase();
415
+ switch (n) {
416
+ case "kd":
417
+ case "ka":
418
+ case "ks":
419
+ this.options && this.options.normalizeRGB && (l = [l[0] / 255, l[1] / 255, l[2] / 255]), this.options && this.options.ignoreZeroRGBs && l[0] === 0 && l[1] === 0 && l[2] === 0 && (c = !1);
420
+ break;
421
+ }
422
+ c && (r[n] = l);
423
+ }
424
+ }
425
+ return s;
426
+ }
427
+ preload() {
428
+ for (const e in this.materialsInfo)
429
+ this.create(e);
430
+ }
431
+ getIndex(e) {
432
+ return this.nameLookup[e];
433
+ }
434
+ getAsArray() {
435
+ let e = 0;
436
+ for (const s in this.materialsInfo)
437
+ this.materialsArray[e] = this.create(s), this.nameLookup[s] = e, e++;
438
+ return this.materialsArray;
439
+ }
440
+ create(e) {
441
+ return this.materials[e] === void 0 && this.createMaterial_(e), this.materials[e];
442
+ }
443
+ createMaterial_(e) {
444
+ const s = this, i = this.materialsInfo[e], t = {
445
+ name: e,
446
+ side: this.side
447
+ };
448
+ function r(c, l) {
449
+ return typeof l != "string" || l === "" ? "" : /^https?:\/\//i.test(l) ? l : c + l;
450
+ }
451
+ function h(c, l) {
452
+ if (t[c]) return;
453
+ const n = s.getTextureParams(l, t), o = s.loadTexture(r(s.baseUrl, n.url));
454
+ o.repeat.copy(n.scale), o.offset.copy(n.offset), o.wrapS = s.wrap, o.wrapT = s.wrap, (c === "map" || c === "emissiveMap") && (o.colorSpace = ce), t[c] = o;
455
+ }
456
+ for (const c in i) {
457
+ const l = i[c];
458
+ let n;
459
+ if (l !== "")
460
+ switch (c.toLowerCase()) {
461
+ // Ns is material specular exponent
462
+ case "kd":
463
+ t.color = new P().fromArray(l).convertSRGBToLinear();
464
+ break;
465
+ case "ks":
466
+ t.specular = new P().fromArray(l).convertSRGBToLinear();
467
+ break;
468
+ case "ke":
469
+ t.emissive = new P().fromArray(l).convertSRGBToLinear();
470
+ break;
471
+ case "map_kd":
472
+ h("map", l);
473
+ break;
474
+ case "map_ks":
475
+ h("specularMap", l);
476
+ break;
477
+ case "map_ke":
478
+ h("emissiveMap", l);
479
+ break;
480
+ case "norm":
481
+ h("normalMap", l);
482
+ break;
483
+ case "map_bump":
484
+ case "bump":
485
+ h("bumpMap", l);
486
+ break;
487
+ case "map_d":
488
+ h("alphaMap", l), t.transparent = !0;
489
+ break;
490
+ case "ns":
491
+ t.shininess = parseFloat(l);
492
+ break;
493
+ case "d":
494
+ n = parseFloat(l), n < 1 && (t.opacity = n, t.transparent = !0);
495
+ break;
496
+ case "tr":
497
+ n = parseFloat(l), this.options && this.options.invertTrProperty && (n = 1 - n), n > 0 && (t.opacity = 1 - n, t.transparent = !0);
498
+ break;
499
+ }
500
+ }
501
+ return this.materials[e] = new se(t), this.materials[e];
502
+ }
503
+ getTextureParams(e, s) {
504
+ const i = {
505
+ scale: new K(1, 1),
506
+ offset: new K(0, 0)
507
+ }, t = e.split(/\s+/);
508
+ let r;
509
+ return r = t.indexOf("-bm"), r >= 0 && (s.bumpScale = parseFloat(t[r + 1]), t.splice(r, 2)), r = t.indexOf("-s"), r >= 0 && (i.scale.set(parseFloat(t[r + 1]), parseFloat(t[r + 2])), t.splice(r, 4)), r = t.indexOf("-o"), r >= 0 && (i.offset.set(parseFloat(t[r + 1]), parseFloat(t[r + 2])), t.splice(r, 4)), i.url = t.join(" ").trim(), i;
510
+ }
511
+ loadTexture(e, s, i, t, r) {
512
+ const h = this.manager !== void 0 ? this.manager : ae;
513
+ let c = h.getHandler(e);
514
+ c === null && (c = new le(h)), c.setCrossOrigin && c.setCrossOrigin(this.crossOrigin);
515
+ const l = c.load(e, i, t, r);
516
+ return s !== void 0 && (l.mapping = s), l;
517
+ }
518
+ }
519
+ class we extends J {
520
+ constructor(e) {
521
+ super(e);
522
+ }
523
+ load(e, s, i, t) {
524
+ const r = this, h = new W(this.manager);
525
+ h.setPath(this.path), h.setResponseType("arraybuffer"), h.setRequestHeader(this.requestHeader), h.setWithCredentials(this.withCredentials), h.load(e, function(c) {
526
+ try {
527
+ s(r.parse(c));
528
+ } catch (l) {
529
+ t ? t(l) : console.error(l), r.manager.itemError(e);
530
+ }
531
+ }, i, t);
532
+ }
533
+ parse(e) {
534
+ function s(n) {
535
+ const o = new DataView(n), a = 32 / 8 * 3 + 32 / 8 * 3 * 3 + 16 / 8, u = o.getUint32(80, !0);
536
+ if (80 + 32 / 8 + u * a === o.byteLength)
537
+ return !0;
538
+ const m = [115, 111, 108, 105, 100];
539
+ for (let p = 0; p < 5; p++)
540
+ if (i(m, o, p)) return !1;
541
+ return !0;
542
+ }
543
+ function i(n, o, a) {
544
+ for (let u = 0, d = n.length; u < d; u++)
545
+ if (n[u] !== o.getUint8(a + u)) return !1;
546
+ return !0;
547
+ }
548
+ function t(n) {
549
+ const o = new DataView(n), a = o.getUint32(80, !0);
550
+ let u, d, m, p = !1, g, b, x, C, v;
551
+ for (let y = 0; y < 70; y++)
552
+ o.getUint32(y, !1) == 1129270351 && o.getUint8(y + 4) == 82 && o.getUint8(y + 5) == 61 && (p = !0, g = new Float32Array(a * 3 * 3), b = o.getUint8(y + 6) / 255, x = o.getUint8(y + 7) / 255, C = o.getUint8(y + 8) / 255, v = o.getUint8(y + 9) / 255);
553
+ const j = 84, f = 12 * 4 + 2, w = new T(), V = new Float32Array(a * 3 * 3), A = new Float32Array(a * 3 * 3), k = new P();
554
+ for (let y = 0; y < a; y++) {
555
+ const U = j + y * f, D = o.getFloat32(U, !0), O = o.getFloat32(U + 4, !0), z = o.getFloat32(U + 8, !0);
556
+ if (p) {
557
+ const L = o.getUint16(U + 48, !0);
558
+ (L & 32768) === 0 ? (u = (L & 31) / 31, d = (L >> 5 & 31) / 31, m = (L >> 10 & 31) / 31) : (u = b, d = x, m = C);
559
+ }
560
+ for (let L = 1; L <= 3; L++) {
561
+ const G = U + L * 12, _ = y * 3 * 3 + (L - 1) * 3;
562
+ V[_] = o.getFloat32(G, !0), V[_ + 1] = o.getFloat32(G + 4, !0), V[_ + 2] = o.getFloat32(G + 8, !0), A[_] = D, A[_ + 1] = O, A[_ + 2] = z, p && (k.set(u, d, m).convertSRGBToLinear(), g[_] = k.r, g[_ + 1] = k.g, g[_ + 2] = k.b);
563
+ }
564
+ }
565
+ return w.setAttribute("position", new N(V, 3)), w.setAttribute("normal", new N(A, 3)), p && (w.setAttribute("color", new N(g, 3)), w.hasColors = !0, w.alpha = v), w;
566
+ }
567
+ function r(n) {
568
+ const o = new T(), a = /solid([\s\S]*?)endsolid/g, u = /facet([\s\S]*?)endfacet/g, d = /solid\s(.+)/;
569
+ let m = 0;
570
+ const p = /[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source, g = new RegExp("vertex" + p + p + p, "g"), b = new RegExp("normal" + p + p + p, "g"), x = [], C = [], v = [], j = new I();
571
+ let f, w = 0, V = 0, A = 0;
572
+ for (; (f = a.exec(n)) !== null; ) {
573
+ V = A;
574
+ const k = f[0], y = (f = d.exec(k)) !== null ? f[1] : "";
575
+ for (v.push(y); (f = u.exec(k)) !== null; ) {
576
+ let O = 0, z = 0;
577
+ const L = f[0];
578
+ for (; (f = b.exec(L)) !== null; )
579
+ j.x = parseFloat(f[1]), j.y = parseFloat(f[2]), j.z = parseFloat(f[3]), z++;
580
+ for (; (f = g.exec(L)) !== null; )
581
+ x.push(parseFloat(f[1]), parseFloat(f[2]), parseFloat(f[3])), C.push(j.x, j.y, j.z), O++, A++;
582
+ z !== 1 && console.error("THREE.STLLoader: Something isn't right with the normal of face number " + m), O !== 3 && console.error("THREE.STLLoader: Something isn't right with the vertices of face number " + m), m++;
583
+ }
584
+ const U = V, D = A - V;
585
+ o.userData.groupNames = v, o.addGroup(U, D, w), w++;
586
+ }
587
+ return o.setAttribute("position", new M(x, 3)), o.setAttribute("normal", new M(C, 3)), o;
588
+ }
589
+ function h(n) {
590
+ return typeof n != "string" ? new TextDecoder().decode(n) : n;
591
+ }
592
+ function c(n) {
593
+ if (typeof n == "string") {
594
+ const o = new Uint8Array(n.length);
595
+ for (let a = 0; a < n.length; a++)
596
+ o[a] = n.charCodeAt(a) & 255;
597
+ return o.buffer || o;
598
+ } else
599
+ return n;
600
+ }
601
+ const l = c(e);
602
+ return s(l) ? t(l) : r(h(e));
603
+ }
604
+ }
605
+ export {
606
+ xe as M,
607
+ be as O,
608
+ we as S
609
+ };
@@ -1 +1 @@
1
- "use strict";const y=require("./index.vue_vue_type_style_index_1_lang-zN5mc8b0.cjs"),I=require("./index.vue_vue_type_style_index_1_lang-Bn7P4fYM.cjs"),U=require("./threeViewerHost-B02OtfCk.cjs"),T=require("./index-d6tSWKtY.cjs");function P(r){try{const c=new URL(r).pathname,i=c.substring(c.lastIndexOf("/")+1);return decodeURIComponent(i)}catch(c){return console.error("无法解析URL以提取文件名:",r,c),"未知文件名"}}function S(r){if(!r)return;const c=r.match(/filename\*\s*=\s*([^;]+)/i);if(c){let n=c[1].trim();n=n.replace(/^"(.*)"$/,"$1");const h=n.split("''");if(h.length===2){const m=h[0].toUpperCase(),f=h[1];try{if(m==="UTF-8")return decodeURIComponent(f)}catch{}return f}try{return decodeURIComponent(n)}catch{return n}}const i=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(i)return i[2].trim()}async function K(r){let c,i;if(/^https?:\/\//.test(r))try{const n=await fetch(r,{method:"GET",cache:"no-store"});if(!n.ok)throw new Error(`下载文件失败: ${n.statusText} (URL: ${r})`);c=await n.blob(),i=P(r)}catch(n){throw console.error("使用 fetch 下载文件时出错:",n),n}else try{const n=await U.downloadAvatarApi({url:r});if(n.status!==200)throw new Error(`下载失败: ${n.status}`);const h=n.headers["content-disposition"];i=S(h)||"无文件名",c=n.data}catch(n){throw console.error("通过 API 下载文件时出错:",n),n}return new File([c],i,{type:c.type})}function N(r){return new Promise((c,i)=>{const n=new FileReader;n.onload=h=>{var m;try{const f=(m=h.target)==null?void 0:m.result,u=I.readSync(f,{type:"array"}),F=u.Sheets[u.SheetNames[0]],E=I.utils.sheet_to_json(F);c(E)}catch(f){i(f)}},n.readAsArrayBuffer(r)})}const V=async()=>{const r="弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/模具筛选安装`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长||0,u=m.外径||0;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工位姿生成`,i,"");let $=["夹持长度"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持长度||0;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w)||[];return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},q=async()=>{const r="双弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/模具筛选安装`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工工艺生成`,i,"");let $=["夹持位置"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持位置||0;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},B=async r=>await K(r),j=async r=>await N(r),X=async r=>{const c=await B(r);return await j(c)};exports.fetchDoubleRobotAnimationData=q;exports.fetchSingleRobotAnimationData=V;exports.initXYZBCList=X;
1
+ "use strict";const y=require("./index.vue_vue_type_style_index_1_lang-BcYTED7W.cjs"),I=require("./index.vue_vue_type_style_index_1_lang-BJQzMo8k.cjs"),U=require("./threeViewerHost-D1i6LUb6.cjs"),T=require("./index-1z9RrjZc.cjs");function P(r){try{const c=new URL(r).pathname,i=c.substring(c.lastIndexOf("/")+1);return decodeURIComponent(i)}catch(c){return console.error("无法解析URL以提取文件名:",r,c),"未知文件名"}}function S(r){if(!r)return;const c=r.match(/filename\*\s*=\s*([^;]+)/i);if(c){let n=c[1].trim();n=n.replace(/^"(.*)"$/,"$1");const h=n.split("''");if(h.length===2){const m=h[0].toUpperCase(),f=h[1];try{if(m==="UTF-8")return decodeURIComponent(f)}catch{}return f}try{return decodeURIComponent(n)}catch{return n}}const i=r.match(/filename\s*=\s*("?)([^";]+)\1/i);if(i)return i[2].trim()}async function K(r){let c,i;if(/^https?:\/\//.test(r))try{const n=await fetch(r,{method:"GET",cache:"no-store"});if(!n.ok)throw new Error(`下载文件失败: ${n.statusText} (URL: ${r})`);c=await n.blob(),i=P(r)}catch(n){throw console.error("使用 fetch 下载文件时出错:",n),n}else try{const n=await U.downloadAvatarApi({url:r});if(n.status!==200)throw new Error(`下载失败: ${n.status}`);const h=n.headers["content-disposition"];i=S(h)||"无文件名",c=n.data}catch(n){throw console.error("通过 API 下载文件时出错:",n),n}return new File([c],i,{type:c.type})}function N(r){return new Promise((c,i)=>{const n=new FileReader;n.onload=h=>{var m;try{const f=(m=h.target)==null?void 0:m.result,u=I.readSync(f,{type:"array"}),F=u.Sheets[u.SheetNames[0]],E=I.utils.sheet_to_json(F);c(E)}catch(f){i(f)}},n.readAsArrayBuffer(r)})}const V=async()=>{const r="弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/模具筛选安装`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长||0,u=m.外径||0;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工位姿生成`,i,"");let $=["夹持长度"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持长度||0;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w)||[];return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},q=async()=>{const r="双弯管仿真加工分析";let c={};const i=sessionStorage.getItem("systemKey"),n=await y.getItemData(`${r}/模具筛选安装`,i,"");let h=["管长","外径"],m={};n==null||n.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{h.includes(a==null?void 0:a.key)&&(m[a.key]=a.value)}))}))});const f=m.管长,u=m.外径;console.log("管长",f,"外径",u,m);const F=f,E=u/2,d=await y.getItemData(`${r}/加工工艺生成`,i,"");let $=["夹持位置"],g={};d==null||d.forEach(e=>{var s;(e==null?void 0:e.comp)==="Form"&&((s=e==null?void 0:e.compData)==null||s.forEach(o=>{var l;(o==null?void 0:o.key)==="formContent"&&((l=o==null?void 0:o.contents)==null||l.forEach(a=>{$.includes(a==null?void 0:a.key)&&(g[a.key]=a.value)}))}))});const k=g.夹持位置||0;console.log("夹持长度",k,g);const x=Number(k),w={},b=await y.getItemData(`${r}/仿真动画生成`,i,"");b==null||b.forEach(e=>{var s,o,l,a,_,R;if((e==null?void 0:e.comp)==="Table"){let L=[],D=(l=(o=(s=e==null?void 0:e.compData)==null?void 0:s.find(t=>(t==null?void 0:t.key)==="header"))==null?void 0:o.contents)==null?void 0:l.map(t=>t==null?void 0:t.label),C=(R=(_=(a=e==null?void 0:e.compData)==null?void 0:a.find(t=>(t==null?void 0:t.key)==="tableContents"))==null?void 0:_.contents)==null?void 0:R.map(t=>(t=t==null?void 0:t.filter(p=>!(p!=null&&p.id)),t));C==null||C.forEach(t=>{L.push(y.getValueToObjectValue(t,D==null?void 0:D.filter(p=>p!=="操作")))}),w[e.name]=L,w[e.name+"Content"]=e}});const A=T.cloneDeep(w);return c={initialPipeLength:F,pipeRadius:E,clampLength:x,animationData:A},c},B=async r=>await K(r),j=async r=>await N(r),X=async r=>{const c=await B(r);return await j(c)};exports.fetchDoubleRobotAnimationData=q;exports.fetchSingleRobotAnimationData=V;exports.initXYZBCList=X;
@@ -1,7 +1,7 @@
1
- import { i as C, k as x } from "./index.vue_vue_type_style_index_1_lang-Exyt6qTf.js";
2
- import { r as K, a as S } from "./index.vue_vue_type_style_index_1_lang-D1n_3_F6.js";
3
- import { d as I } from "./threeViewerHost-D7L1FW__.js";
4
- import { c as P } from "./index-UN4JU0ly.js";
1
+ import { i as C, k as x } from "./index.vue_vue_type_style_index_1_lang-CFvcnWO4.js";
2
+ import { r as K, a as S } from "./index.vue_vue_type_style_index_1_lang-BMzWMYje.js";
3
+ import { d as I } from "./threeViewerHost-BkOYLPdk.js";
4
+ import { c as P } from "./index-CYp77kPp.js";
5
5
  function N(r) {
6
6
  try {
7
7
  const c = new URL(r).pathname, s = c.substring(c.lastIndexOf("/") + 1);
@@ -1,5 +1,5 @@
1
1
  import { watch as Ee, unref as Ue, getCurrentScope as Le, onScopeDispose as We, computed as Oe, ref as q, reactive as De } from "vue";
2
- import { c as s } from "./index-UN4JU0ly.js";
2
+ import { c as s } from "./index-CYp77kPp.js";
3
3
  const Je = typeof window < "u";
4
4
  var ie;
5
5
  Je && ((ie = window == null ? void 0 : window.navigator) != null && ie.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);