three-slicer 0.2.0 → 0.2.2

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.
@@ -1,410 +1,13 @@
1
- const W = {
2
- 0: [0.42, 0.45, 0.5],
3
- 1: [0.85, 0.51, 0.17],
4
- 2: [0.21, 0.45, 0.76],
5
- 3: [0.35, 0.75, 0.85],
6
- 4: [0.16, 0.68, 0.4],
7
- 5: [0.66, 0.42, 0.85],
8
- 6: [0.55, 0.45, 0.35],
9
- 7: [0.95, 0.85, 0.25],
10
- 8: [0.9, 0.35, 0.65],
11
- 9: [0.9, 0.25, 0.25],
12
- 10: [0.6, 0.82, 0.55],
13
- 11: [0.3, 0.72, 0.7]
14
- }, _e = [
15
- [0.85, 0.28, 0.25],
16
- [0.2, 0.52, 0.85],
17
- [0.25, 0.72, 0.38],
18
- [0.96, 0.74, 0.16],
19
- [0.62, 0.36, 0.82],
20
- [0.18, 0.74, 0.74],
21
- [0.95, 0.5, 0.15],
22
- [0.55, 0.56, 0.6]
23
- ];
24
- function de(t) {
25
- const i = String(t ?? "").trim().replace(/^#/, "");
26
- if (i.length !== 3 && i.length !== 6) return null;
27
- const o = i.length === 3 ? i.split("").map((a) => a + a).join("") : i, n = [0, 2, 4].map((a) => parseInt(o.slice(a, a + 2), 16) / 255);
28
- return n.some(Number.isNaN) ? null : n;
29
- }
30
- function re(t) {
31
- const i = Math.round(t[0] * 255), o = Math.round(t[1] * 255), n = Math.round(t[2] * 255);
32
- return i << 16 | o << 8 | n;
33
- }
34
- const fe = { 1: "Wall", 2: "Sparse", 3: "Solid", 4: "Skirt", 5: "Support", 6: "Raft", 7: "Gap fill", 8: "Thin wall", 9: "Bridge", 10: "Ironing", 11: "Prime" }, ue = [
35
- [11, 44, 122],
36
- [19, 89, 133],
37
- [28, 136, 145],
38
- [4, 214, 15],
39
- [170, 242, 0],
40
- [252, 249, 3],
41
- [245, 206, 10],
42
- [227, 136, 32],
43
- [209, 104, 48],
44
- [194, 82, 60],
45
- [148, 38, 22]
46
- ].map((t) => [t[0] / 255, t[1] / 255, t[2] / 255]);
47
- function pe(t, i, o, n) {
48
- const a = n.length;
49
- if (!(o > i)) return n[0];
50
- const l = (o - i) / (a - 1), h = (t - i) / l, _ = Math.max(0, Math.min(a - 1, Math.floor(h))), x = Math.max(0, Math.min(a - 1, _ + 1)), g = h - _, s = n[_], u = n[x];
51
- return [s[0] + (u[0] - s[0]) * g, s[1] + (u[1] - s[1]) * g, s[2] + (u[2] - s[2]) * g];
52
- }
53
- const ge = 15, ve = 4;
54
- function be(t, i) {
55
- const o = t.length, n = i > 0 ? i : 0.42, a = new Array(o);
56
- for (let e = 0; e < o; e++) {
57
- const r = t[e].z;
58
- a[e] = Math.max(0.02, e === 0 ? r : r - t[e - 1].z);
59
- }
60
- const l = [], h = [], _ = [], x = [], g = [], s = [], u = [], v = [], z = [], S = [], I = [], P = new Float64Array(16), G = [], k = [];
61
- let $ = -1, E = 0, ee = 0, te = 0, c = -1, f = 0;
62
- const p = 1e-4, w = (e, r, m, y, d, F, A) => (l.push(e), h.push(r), _.push(m), s.push(y), u.push(d), x.push(F), g.push(A), v.push(f), z.push(!1), l.length - 1);
63
- for (let e = 0; e < o; e++) {
64
- const r = t[e].paths, m = t[e].widths, y = a[e];
65
- if (f = e, !!r)
66
- for (let d = 0; d < r.length; d += 8) {
67
- const F = r[d + 3], A = F & ge, V = F >>> ve, B = r[d], O = r[d + 1], J = r[d + 2], L = r[d + 4], C = r[d + 5], D = r[d + 6];
68
- if (A === 0) {
69
- G.push(B, O, J, L, C, D), k.push(e);
70
- continue;
71
- }
72
- const oe = m && m[d / 8] > 0 ? m[d / 8] : n;
73
- P[A] += Math.hypot(L - B, C - O);
74
- let Q;
75
- $ >= 0 && c === F && Math.abs(E - B) < p && Math.abs(ee - O) < p && Math.abs(te - J) < p ? (Q = $, w(L, C, D, A, V, y, oe)) : (Q = w(B, O, J, A, V, y, oe), w(L, C, D, A, V, y, oe)), z[Q] = !0, $ = Q + 1, E = L, ee = C, te = D, c = F, S.push(Q), I.push(e);
76
- }
77
- }
78
- const b = l.length, M = S.length, R = new Float32Array(b * 4), U = new Float32Array(b * 4);
79
- let ie = 0, ae = !1, Y = 1 / 0, j = 1 / 0, X = 1 / 0, K = -1 / 0, Z = -1 / 0, q = -1 / 0;
80
- for (let e = 0; e < b; e++) {
81
- const r = x[e], m = l[e], y = h[e], d = _[e] - 0.5 * r;
82
- R[e * 4] = m, R[e * 4 + 1] = y, R[e * 4 + 2] = d;
83
- const F = e > 0 && z[e - 1], A = z[e];
84
- let V = 0;
85
- if (F || A) {
86
- const B = F ? l[e] - l[e - 1] : 0, O = F ? h[e] - h[e - 1] : 0, J = F ? _[e] - _[e - 1] : 0, L = A ? l[e + 1] - l[e] : 0, C = A ? h[e + 1] - h[e] : 0, D = A ? _[e + 1] - _[e] : 0;
87
- V = Math.atan2(B * C - O * L, B * L + O * C + J * D);
88
- }
89
- U[e * 4] = r, U[e * 4 + 1] = g[e], U[e * 4 + 2] = V, U[e * 4 + 3] = re(W[s[e]] || W[1]), (!Number.isFinite(m) || !Number.isFinite(y) || !Number.isFinite(d) || !Number.isFinite(V)) && (ae = !0), ie = Math.max(ie, Math.abs(m), Math.abs(y), Math.abs(d)), m < Y && (Y = m), m > K && (K = m), y < j && (j = y), y > Z && (Z = y), d < X && (X = d), d > q && (q = d);
90
- }
91
- const ne = new Uint32Array(M * 4);
92
- for (let e = 0; e < M; e++)
93
- ne[e * 4] = S[e], ne[e * 4 + 1] = I[e];
94
- const T = { vType: new Uint8Array(b), vTool: new Uint8Array(b), vWidth: new Float32Array(b), vHeight: new Float32Array(b), vLayer: new Int32Array(b) };
95
- for (let e = 0; e < b; e++)
96
- T.vType[e] = s[e], T.vTool[e] = u[e], T.vWidth[e] = g[e], T.vHeight[e] = x[e], T.vLayer[e] = v[e];
97
- const le = new Int32Array(o + 1);
98
- {
99
- let e = 0;
100
- for (let r = 0; r < o; r++) {
101
- for (; e < M && I[e] === r; ) e++;
102
- le[r + 1] = e;
103
- }
104
- }
105
- const H = k.length, N = new Float32Array(H * 6);
106
- for (let e = 0; e < N.length; e++) N[e] = G[e];
107
- for (let e = 0; e < N.length; e += 3) {
108
- const r = N[e], m = N[e + 1], y = N[e + 2];
109
- r < Y && (Y = r), r > K && (K = r), m < j && (j = m), m > Z && (Z = m), y < X && (X = y), y > q && (q = y);
110
- }
111
- const se = new Int32Array(o + 1);
112
- {
113
- let e = 0;
114
- for (let r = 0; r < o; r++) {
115
- for (; e < H && k[e] === r; ) e++;
116
- se[r + 1] = e;
117
- }
118
- }
119
- const he = b + H > 0 ? { min: [Y, j, X], max: [K, Z, q] } : null;
120
- return { position: R, hwa: U, segIndex: ne, nV: b, nSeg: M, layerSegPrefix: le, travelPos: N, travelPrefix: se, nTrav: H, layerCount: o, maxAbs: ie, hasNaN: ae, meta: T, typeLengths: P, bbox: he };
121
- }
122
- function ze(t) {
123
- let i = 0;
124
- for (let n = 1; n < 16; n++) i += t[n] || 0;
125
- const o = [];
126
- if (i <= 0) return o;
127
- for (let n = 1; n < 16; n++) {
128
- const a = t[n] || 0;
129
- a > 0 && o.push({ type: n, label: fe[n] || "t" + n, pct: 100 * a / i, color: W[n] || W[1] });
130
- }
131
- return o.sort((n, a) => a.pct - n.pct);
132
- }
133
- const me = `
134
- precision highp float;
135
- precision highp int;
136
- precision highp sampler2D;
137
- precision highp usampler2D;
138
- #define POINTY_CAPS
139
- #define FIX_TWISTING
140
- const vec3 light_top_dir = vec3(-0.4574957, 0.4574957, 0.7624929);
141
- const float light_top_diffuse = 0.6 * 0.8;
142
- const float light_top_specular = 0.6 * 0.125;
143
- const float light_top_shininess = 20.0;
144
- const vec3 light_front_dir = vec3(0.6985074, 0.1397015, 0.6985074);
145
- const float light_front_diffuse = 0.6 * 0.3;
146
- const float ambient = 0.3;
147
- const float emission = 0.15;
148
- const vec3 UP = vec3(0, 0, 1);
149
- uniform mat4 view_matrix;
150
- uniform mat4 projection_matrix;
151
- uniform vec3 camera_position;
152
- uniform sampler2D position_tex;
153
- uniform sampler2D height_width_angle_tex;
154
- uniform int layer_lo; // stage 25: dual slider lower bound (layer). The shader clips out-of-range segments in O(1).
155
- uniform int layer_hi; // the upper bound is cut via instanceCount (sorted by layer).
156
- in float vertex_id_float;
157
- in uint seg_id_a_u; // instance attribute (formerly segment_index_tex.r) — attribute fetch is cheaper than texelFetch
158
- in uint seg_layer_u; // instance attribute (formerly segment_index_tex.g)
159
- out vec3 color;
160
- vec3 decode_color(float col) {
161
- int c = int(round(col));
162
- int r = (c >> 16) & 0xFF;
163
- int g = (c >> 8) & 0xFF;
164
- int b = (c >> 0) & 0xFF;
165
- float f = 1.0 / 255.0;
166
- return f * vec3(r, g, b);
167
- }
168
- float lighting(vec3 eye_position, vec3 eye_normal) {
169
- float top_diffuse = light_top_diffuse * max(dot(eye_normal, light_top_dir), 0.0);
170
- float front_diffuse = light_front_diffuse * max(dot(eye_normal, light_front_dir), 0.0);
171
- float top_specular = light_top_specular * pow(max(dot(-normalize(eye_position), reflect(-light_top_dir, eye_normal)), 0.0), light_top_shininess);
172
- return ambient + top_diffuse + front_diffuse + top_specular + emission;
173
- }
174
- ivec2 tex_coord(sampler2D sampler, int id) {
175
- ivec2 tex_size = textureSize(sampler, 0);
176
- return (tex_size.y == 1) ? ivec2(id, 0) : ivec2(id % tex_size.x, id / tex_size.x);
177
- }
178
- void main() {
179
- int vertex_id = int(vertex_id_float);
180
- int seg_layer = int(seg_layer_u);
181
- if (seg_layer < layer_lo || seg_layer > layer_hi) { gl_Position = vec4(2.0, 2.0, 2.0, 1.0); return; } // out of range -> clip
182
- int id_a = int(seg_id_a_u);
183
- int id_b = id_a + 1;
184
- vec3 pos_a = texelFetch(position_tex, tex_coord(position_tex, id_a), 0).xyz;
185
- vec3 pos_b = texelFetch(position_tex, tex_coord(position_tex, id_b), 0).xyz;
186
- vec3 line = pos_b - pos_a;
187
- float line_len = length(line);
188
- vec3 line_dir;
189
- if (line_len < 1e-4)
190
- line_dir = vec3(1.0, 0.0, 0.0);
191
- else
192
- line_dir = line / line_len;
193
- vec3 line_right_dir;
194
- if (abs(dot(line_dir, UP)) > 0.9) {
195
- line_right_dir = normalize(cross(vec3(1, 0, 0), line_dir));
196
- }
197
- else
198
- line_right_dir = normalize(cross(line_dir, UP));
199
- vec3 line_up_dir = normalize(cross(line_right_dir, line_dir));
200
- const vec2 horizontal_vertical_view_signs_array[16] = vec2[](
201
- vec2(1.0, 0.0), vec2(0.0, 1.0), vec2(0.0, 0.0), vec2(0.0, -1.0),
202
- vec2(0.0, -1.0), vec2(1.0, 0.0), vec2(0.0, 1.0), vec2(0.0, 0.0),
203
- vec2(0.0, 1.0), vec2(-1.0, 0.0), vec2(0.0, 0.0), vec2(1.0, 0.0),
204
- vec2(1.0, 0.0), vec2(0.0, 1.0), vec2(-1.0, 0.0), vec2(0.0, 0.0)
205
- );
206
- int id = vertex_id < 4 ? id_a : id_b;
207
- vec3 endpoint_pos = vertex_id < 4 ? pos_a : pos_b;
208
- vec4 hwa_color = texelFetch(height_width_angle_tex, tex_coord(height_width_angle_tex, id), 0); // .xyz=h/w/angle, .w=packed color
209
- vec3 height_width_angle = hwa_color.xyz;
210
- #ifdef FIX_TWISTING
211
- int closer_id = (dot(camera_position - pos_a, camera_position - pos_a) < dot(camera_position - pos_b, camera_position - pos_b)) ? id_a : id_b;
212
- vec3 closer_pos = (closer_id == id_a) ? pos_a : pos_b;
213
- vec3 camera_view_dir = normalize(closer_pos - camera_position);
214
- vec3 closer_height_width_angle = texelFetch(height_width_angle_tex, tex_coord(height_width_angle_tex, closer_id), 0).xyz;
215
- vec3 diagonal_dir_border = normalize(closer_height_width_angle.x * line_up_dir + closer_height_width_angle.y * line_right_dir);
216
- #else
217
- vec3 camera_view_dir = normalize(endpoint_pos - camera_position);
218
- vec3 diagonal_dir_border = normalize(height_width_angle.x * line_up_dir + height_width_angle.y * line_right_dir);
219
- #endif
220
- bool is_vertical_view = abs(dot(camera_view_dir, line_up_dir)) / abs(dot(diagonal_dir_border, line_up_dir)) >
221
- abs(dot(camera_view_dir, line_right_dir)) / abs(dot(diagonal_dir_border, line_right_dir));
222
- vec2 signs = horizontal_vertical_view_signs_array[vertex_id + 8 * int(is_vertical_view)];
223
- #ifndef POINTY_CAPS
224
- if (vertex_id == 2 || vertex_id == 7) signs = -horizontal_vertical_view_signs_array[(vertex_id - 2) + 8 * int(is_vertical_view)];
225
- #endif
226
- float view_right_sign = sign(dot(-camera_view_dir, line_right_dir));
227
- float view_top_sign = sign(dot(-camera_view_dir, line_up_dir));
228
- float half_height = 0.5 * height_width_angle.x;
229
- float half_width = 0.5 * height_width_angle.y;
230
- vec3 horizontal_dir = half_width * line_right_dir;
231
- vec3 vertical_dir = half_height * line_up_dir;
232
- float horizontal_sign = signs.x * view_right_sign;
233
- float vertical_sign = signs.y * view_top_sign;
234
- vec3 pos = endpoint_pos + horizontal_sign * horizontal_dir + vertical_sign * vertical_dir;
235
- if (vertex_id == 2 || vertex_id == 7) {
236
- float line_dir_sign = (vertex_id == 2) ? -1.0 : 1.0;
237
- if (height_width_angle.z == 0.0) {
238
- #ifdef POINTY_CAPS
239
- pos += line_dir_sign * line_dir * half_width;
240
- #endif
241
- }
242
- else {
243
- pos += line_dir_sign * line_dir * half_width * sin(abs(height_width_angle.z) * 0.5);
244
- pos += sign(height_width_angle.z) * horizontal_dir * cos(abs(height_width_angle.z) * 0.5);
245
- }
246
- }
247
- vec3 eye_position = (view_matrix * vec4(pos, 1.0)).xyz;
248
- vec3 eye_normal = (view_matrix * vec4(normalize(pos - endpoint_pos), 0.0)).xyz;
249
- vec3 color_base = decode_color(hwa_color.w);
250
- color = color_base * lighting(eye_position, eye_normal);
251
- gl_Position = projection_matrix * vec4(eye_position, 1.0);
252
- }
253
- `, ye = `
254
- precision highp float;
255
- in vec3 color;
256
- out vec4 fragment_color;
257
- void main() {
258
- fragment_color = vec4(color, 1.0);
259
- }
260
- `, xe = [
261
- 0,
262
- 1,
263
- 2,
264
- 0,
265
- 2,
266
- 3,
267
- // front spike
268
- 0,
269
- 3,
270
- 4,
271
- 0,
272
- 4,
273
- 5,
274
- // right/bottom body
275
- 0,
276
- 5,
277
- 6,
278
- 0,
279
- 6,
280
- 1,
281
- // left/top body
282
- 5,
283
- 4,
284
- 7,
285
- 5,
286
- 7,
287
- 6
288
- // back spike
289
- ];
290
- function Ae(t, i) {
291
- const o = (c, f) => {
292
- const p = Math.min(2048, Math.max(1, f)), w = Math.max(1, Math.ceil(f / p)), b = new Float32Array(p * w * 4);
293
- b.set(c.subarray(0, Math.min(c.length, p * w * 4)));
294
- const M = new t.DataTexture(b, p, w, t.RGBAFormat, t.FloatType);
295
- return M.minFilter = M.magFilter = t.NearestFilter, M.generateMipmaps = !1, M.needsUpdate = !0, M;
296
- }, n = o(i.position, i.nV), a = o(i.hwa, i.nV), l = new t.InstancedBufferGeometry();
297
- l.setIndex(xe), l.setAttribute("position", new t.BufferAttribute(new Float32Array(8 * 3), 3)), l.setAttribute("vertex_id_float", new t.BufferAttribute(new Float32Array([0, 1, 2, 3, 4, 5, 6, 7]), 1));
298
- const h = new t.InstancedInterleavedBuffer(i.segIndex, 4);
299
- l.setAttribute("seg_id_a_u", new t.InterleavedBufferAttribute(h, 1, 0)), l.setAttribute("seg_layer_u", new t.InterleavedBufferAttribute(h, 1, 1)), l.instanceCount = 0;
300
- const _ = new t.RawShaderMaterial({
301
- glslVersion: t.GLSL3,
302
- uniforms: {
303
- view_matrix: { value: new t.Matrix4() },
304
- projection_matrix: { value: new t.Matrix4() },
305
- camera_position: { value: new t.Vector3() },
306
- position_tex: { value: n },
307
- height_width_angle_tex: { value: a },
308
- layer_lo: { value: 0 },
309
- layer_hi: { value: i.layerCount }
310
- },
311
- vertexShader: me,
312
- fragmentShader: ye,
313
- side: t.DoubleSide
314
- }), x = new t.Mesh(l, _);
315
- let g = null;
316
- if (i.bbox) {
317
- const { min: c, max: f } = i.bbox, p = new t.Vector3((c[0] + f[0]) / 2, (c[1] + f[1]) / 2, (c[2] + f[2]) / 2), w = Math.hypot(f[0] - c[0], f[1] - c[1], f[2] - c[2]) / 2 + 2;
318
- g = new t.Sphere(p, w);
319
- }
320
- x.frustumCulled = !!g, g && (l.boundingSphere = g);
321
- const s = new t.Matrix4(), u = new t.Vector3();
322
- x.onBeforeRender = (c, f, p) => {
323
- _.uniforms.projection_matrix.value.copy(p.projectionMatrix), _.uniforms.view_matrix.value.multiplyMatrices(p.matrixWorldInverse, x.matrixWorld), s.copy(x.matrixWorld).invert(), p.getWorldPosition(u).applyMatrix4(s), _.uniforms.camera_position.value.copy(u);
324
- };
325
- const v = new t.BufferGeometry();
326
- v.setAttribute("position", new t.BufferAttribute(i.travelPos, 3)), v.setDrawRange(0, 0);
327
- const z = new t.LineSegments(v, new t.LineBasicMaterial({ color: 7041658 }));
328
- z.frustumCulled = !!g, z.visible = !1, g && (v.boundingSphere = g);
329
- let S = !1, I = 0, P = i.layerCount - 1;
330
- const G = () => {
331
- const c = i.travelPrefix[I], f = i.travelPrefix[P + 1];
332
- v.setDrawRange(S ? c * 2 : 0, S ? (f - c) * 2 : 0);
333
- }, k = (c, f) => {
334
- const p = i.layerCount;
335
- I = Math.max(0, Math.min(p - 1, c | 0)), P = Math.max(I, Math.min(p - 1, f | 0)), _.uniforms.layer_lo.value = I, _.uniforms.layer_hi.value = P, l.instanceCount = i.layerSegPrefix[P + 1], G();
336
- };
337
- return { mesh: x, travLines: z, setVisibleLayers: (c) => k(0, (c | 0) - 1), setLayerRange: k, setTravelVisible: (c) => {
338
- S = !!c, z.visible = S, G();
339
- }, setColors: (c) => {
340
- const f = a.image.data, p = Math.min(c.length, f.length) / 4;
341
- for (let w = 0; w < p; w++) f[w * 4 + 3] = c[w * 4];
342
- a.needsUpdate = !0;
343
- }, dispose: () => {
344
- l.dispose(), _.dispose(), n.dispose(), a.dispose(), v.dispose(), z.material.dispose();
345
- }, nSeg: i.nSeg, layerCount: i.layerCount };
346
- }
347
- const ce = [
348
- { key: "feature", label: "Feature type", cont: !1, unit: "" },
349
- { key: "speed", label: "Speed", cont: !0, unit: "mm/s" },
350
- { key: "height", label: "Layer Height", cont: !0, unit: "mm" },
351
- { key: "width", label: "Line Width", cont: !0, unit: "mm" },
352
- { key: "fan", label: "Fan Speed", cont: !0, unit: "%" },
353
- { key: "temp", label: "Temperature", cont: !0, unit: "°C" },
354
- // Last, like upstream's EViewType::Tool: it answers "did my painted regions come out on the extruder I assigned?",
355
- // which is a check you run after slicing, not a property you scrub through. Discrete like the feature view — an
356
- // extruder index is a label, and a heatmap over it would imply tool 2 sits "between" tools 1 and 3.
357
- { key: "filament", label: "Filament", cont: !1, unit: "" }
358
- ];
359
- function we(t, i, o, n) {
360
- const a = i.vType[o], l = i.vLayer[o], h = l === 0;
361
- switch (t) {
362
- case "height":
363
- return i.vHeight[o];
364
- case "width":
365
- return i.vWidth[o];
366
- case "speed":
367
- return h ? n.firstLayerSpeed : n.speedByType[a] ?? n.speedByType[1];
368
- case "fan":
369
- return l < n.closeFanLayers ? 0 : a === 9 ? 100 : n.fanNormal;
370
- case "temp":
371
- return h ? n.tempFirst : n.tempNormal;
372
- default:
373
- return 0;
374
- }
375
- }
376
- function Fe(t, i, o) {
377
- const { meta: n, nV: a } = t, l = new Float32Array(a * 4), h = ce.find((s) => s.key === i) || ce[0];
378
- if (!h.cont) {
379
- const s = ((o == null ? void 0 : o.toolColors) ?? []).map(de), u = h.key === "filament" ? (v) => {
380
- const z = n.vTool ? n.vTool[v] : 0;
381
- return s[z] || _e[z % _e.length];
382
- } : (v) => W[n.vType[v]] || W[1];
383
- for (let v = 0; v < a; v++) l[v * 4] = re(u(v));
384
- return { color: l, min: 0, max: 0, viewType: i, label: h.label, unit: h.unit, cont: !1 };
385
- }
386
- let _ = 1 / 0, x = -1 / 0;
387
- const g = new Float32Array(a);
388
- for (let s = 0; s < a; s++) {
389
- const u = we(i, n, s, o);
390
- g[s] = u, u < _ && (_ = u), u > x && (x = u);
391
- }
392
- Number.isFinite(_) || (_ = 0, x = 1);
393
- for (let s = 0; s < a; s++) {
394
- const u = pe(g[s], _, x, ue);
395
- l[s * 4] = re(u);
396
- }
397
- return { color: l, min: _, max: x, viewType: i, label: h.label, unit: h.unit, cont: !0 };
398
- }
1
+ import { D as o, T as E, d as T, e as O, f as e, V as L, b as _, c as t, a as R, r } from "./toolpath_gpu-4foc4FaU.js";
399
2
  export {
400
- ue as DEFAULT_RANGES_COLORS,
401
- _e as TOOL_COLOR,
402
- W as TYPE_COLOR,
403
- fe as TYPE_LABEL,
404
- xe as VERTEX_DATA,
405
- ce as VIEW_TYPES,
406
- be as buildSegmentData,
407
- Fe as computeColors,
408
- Ae as makeToolpath,
409
- ze as roleRatios
3
+ o as DEFAULT_RANGES_COLORS,
4
+ E as TOOL_COLOR,
5
+ T as TYPE_COLOR,
6
+ O as TYPE_LABEL,
7
+ e as VERTEX_DATA,
8
+ L as VIEW_TYPES,
9
+ _ as buildSegmentData,
10
+ t as computeColors,
11
+ R as makeToolpath,
12
+ r as roleRatios
410
13
  };