@solid-labs/fab-one-widget 0.1.7 → 0.1.8
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/geo_wasm.d.ts +529 -0
- package/dist/geo_wasm.js +1686 -0
- package/dist/geo_wasm_bg.wasm +0 -0
- package/package.json +8 -3
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Result of the align-to-origin transform.
|
|
6
|
+
*/
|
|
7
|
+
export class AlignResult {
|
|
8
|
+
private constructor();
|
|
9
|
+
free(): void;
|
|
10
|
+
[Symbol.dispose](): void;
|
|
11
|
+
details(): string;
|
|
12
|
+
mpt(): Float32Array;
|
|
13
|
+
origin(): Float32Array;
|
|
14
|
+
positions(): Float32Array;
|
|
15
|
+
/**
|
|
16
|
+
* Returns [ox, oy, oz, r00, r01, r02, r10, r11, r12, r20, r21, r22]
|
|
17
|
+
* To transform a point p: rotated = R * (p - [ox,oy,oz])
|
|
18
|
+
*/
|
|
19
|
+
transform(): Float32Array;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Result of batch cross-sections along a line.
|
|
24
|
+
*/
|
|
25
|
+
export class BatchCrossSectionResult {
|
|
26
|
+
private constructor();
|
|
27
|
+
free(): void;
|
|
28
|
+
[Symbol.dispose](): void;
|
|
29
|
+
all_loop_points(): Float32Array;
|
|
30
|
+
circumferences(): Float32Array;
|
|
31
|
+
count(): number;
|
|
32
|
+
details(): string;
|
|
33
|
+
offsets(): Uint32Array;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Result of cross-section detection.
|
|
38
|
+
*/
|
|
39
|
+
export class CrossSectionResult {
|
|
40
|
+
private constructor();
|
|
41
|
+
free(): void;
|
|
42
|
+
[Symbol.dispose](): void;
|
|
43
|
+
circumference(): number;
|
|
44
|
+
details(): string;
|
|
45
|
+
is_closed(): boolean;
|
|
46
|
+
loop_points(): Float32Array;
|
|
47
|
+
plane_normal(): Float32Array;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Result of inner shell extraction via ray-casting from interior point.
|
|
52
|
+
*/
|
|
53
|
+
export class ExtractInnerShellResult {
|
|
54
|
+
private constructor();
|
|
55
|
+
free(): void;
|
|
56
|
+
[Symbol.dispose](): void;
|
|
57
|
+
details(): string;
|
|
58
|
+
indices(): Uint32Array;
|
|
59
|
+
inner_count(): number;
|
|
60
|
+
interior_point(): Float32Array;
|
|
61
|
+
positions(): Float32Array;
|
|
62
|
+
total_count(): number;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Result of fill_small_holes.
|
|
67
|
+
*/
|
|
68
|
+
export class FillHolesResult {
|
|
69
|
+
private constructor();
|
|
70
|
+
free(): void;
|
|
71
|
+
[Symbol.dispose](): void;
|
|
72
|
+
details(): string;
|
|
73
|
+
holes_filled(): number;
|
|
74
|
+
indices(): Uint32Array;
|
|
75
|
+
positions(): Float32Array;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Result of weld_and_keep_largest: holds positions + indices.
|
|
80
|
+
* Access via getters since wasm_bindgen can't return tuples.
|
|
81
|
+
*/
|
|
82
|
+
export class MeshResult {
|
|
83
|
+
private constructor();
|
|
84
|
+
free(): void;
|
|
85
|
+
[Symbol.dispose](): void;
|
|
86
|
+
indices(): Uint32Array;
|
|
87
|
+
positions(): Float32Array;
|
|
88
|
+
stats(): string;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Stage 1 result: fully preprocessed mesh ready for interactive steps.
|
|
93
|
+
*
|
|
94
|
+
* Chains four operations in a single WASM call (no JS round-trips):
|
|
95
|
+
* 1. Unit detection & conversion (m → mm)
|
|
96
|
+
* 2. AABB center → origin
|
|
97
|
+
* 3. Vertex welding + largest-component extraction
|
|
98
|
+
* 4. Small-hole filling
|
|
99
|
+
*/
|
|
100
|
+
export class PreprocessResult {
|
|
101
|
+
private constructor();
|
|
102
|
+
free(): void;
|
|
103
|
+
[Symbol.dispose](): void;
|
|
104
|
+
bbox_size(): Float32Array;
|
|
105
|
+
detected_unit(): string;
|
|
106
|
+
holes_filled(): number;
|
|
107
|
+
indices(): Uint32Array;
|
|
108
|
+
log(): string;
|
|
109
|
+
max_dimension(): number;
|
|
110
|
+
positions(): Float32Array;
|
|
111
|
+
unit_converted(): boolean;
|
|
112
|
+
weld_stats(): string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Result of centroid-based alignment refinement.
|
|
117
|
+
*/
|
|
118
|
+
export class RefineAlignmentResult {
|
|
119
|
+
private constructor();
|
|
120
|
+
free(): void;
|
|
121
|
+
[Symbol.dispose](): void;
|
|
122
|
+
centroid_axis(): Float32Array;
|
|
123
|
+
correction_angle(): number;
|
|
124
|
+
details(): string;
|
|
125
|
+
mpt(): Float32Array;
|
|
126
|
+
origin(): Float32Array;
|
|
127
|
+
positions(): Float32Array;
|
|
128
|
+
rotation(): Float32Array;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Result of secondary PCA alignment.
|
|
133
|
+
*/
|
|
134
|
+
export class SecondaryPcaResult {
|
|
135
|
+
private constructor();
|
|
136
|
+
free(): void;
|
|
137
|
+
[Symbol.dispose](): void;
|
|
138
|
+
details(): string;
|
|
139
|
+
mpt(): Float32Array;
|
|
140
|
+
origin(): Float32Array;
|
|
141
|
+
positions(): Float32Array;
|
|
142
|
+
transform(): Float32Array;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Result of shell detection at MPT.
|
|
147
|
+
*/
|
|
148
|
+
export class ShellDetectResult {
|
|
149
|
+
private constructor();
|
|
150
|
+
free(): void;
|
|
151
|
+
[Symbol.dispose](): void;
|
|
152
|
+
avg_thickness(): number;
|
|
153
|
+
details(): string;
|
|
154
|
+
double_hit_count(): number;
|
|
155
|
+
hit_points(): Float32Array;
|
|
156
|
+
hit_ray_lines(): Float32Array;
|
|
157
|
+
is_double_shell(): boolean;
|
|
158
|
+
max_thickness(): number;
|
|
159
|
+
min_thickness(): number;
|
|
160
|
+
miss_ray_lines(): Float32Array;
|
|
161
|
+
ray_count(): number;
|
|
162
|
+
surface_normal(): Float32Array;
|
|
163
|
+
thickness(): number;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Result of subdividing the origin→projection line into ~1" spaced points.
|
|
168
|
+
*/
|
|
169
|
+
export class SubdivideLineResult {
|
|
170
|
+
private constructor();
|
|
171
|
+
free(): void;
|
|
172
|
+
[Symbol.dispose](): void;
|
|
173
|
+
count(): number;
|
|
174
|
+
points(): Float32Array;
|
|
175
|
+
spacing(): number;
|
|
176
|
+
total_distance(): number;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Result of detect_and_convert_units: holds positions + detection info.
|
|
181
|
+
*/
|
|
182
|
+
export class UnitConversionResult {
|
|
183
|
+
private constructor();
|
|
184
|
+
free(): void;
|
|
185
|
+
[Symbol.dispose](): void;
|
|
186
|
+
converted(): boolean;
|
|
187
|
+
detected_unit(): string;
|
|
188
|
+
max_dimension(): number;
|
|
189
|
+
positions(): Float32Array;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Translate geometry so `origin_pt` maps to (0,0,0), then rotate so the
|
|
194
|
+
* vector from `origin_pt` to its projection on the cross-section plane
|
|
195
|
+
* aligns with the +Y axis.
|
|
196
|
+
*
|
|
197
|
+
* `positions`: flat [x,y,z,...] vertex positions
|
|
198
|
+
* `origin_pt`: [x,y,z] the origin point (will become 0,0,0)
|
|
199
|
+
* `mpt`: [x,y,z] the MPT point on the surface
|
|
200
|
+
* `plane_normal`: [nx,ny,nz] the cross-section plane normal
|
|
201
|
+
*/
|
|
202
|
+
export function align_to_origin(positions: Float32Array, origin_pt: Float32Array, mpt: Float32Array, plane_normal: Float32Array): AlignResult;
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* Slice the mesh at each Y height from the given points.
|
|
206
|
+
*
|
|
207
|
+
* After PCA alignment (step 7), the mesh is Y-aligned: origin at (0,0,0),
|
|
208
|
+
* MPT along +Y. Cross-sections are horizontal planes (normal = Y axis)
|
|
209
|
+
* at each subdivision point's Y coordinate.
|
|
210
|
+
*
|
|
211
|
+
* `positions`: flat [x,y,z,...] indexed mesh positions (PCA-aligned)
|
|
212
|
+
* `indices`: flat [i0,i1,i2,...] triangle indices
|
|
213
|
+
* `y_values`: Y coordinates to slice at
|
|
214
|
+
* `max_gap`: maximum gap to bridge when chaining segments (mm)
|
|
215
|
+
*/
|
|
216
|
+
export function batch_cross_sections_y(positions: Float32Array, indices: Uint32Array, y_values: Float32Array, max_gap: number): BatchCrossSectionResult;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Same as `batch_cross_sections_y` but picks the **inner** (smallest substantial)
|
|
220
|
+
* loop at each height. For double-shell meshes this selects the inner wall.
|
|
221
|
+
*
|
|
222
|
+
* Uses a tight chaining tolerance (no gap bridging) to prevent inner+outer
|
|
223
|
+
* wall segments from merging into one figure-8 loop.
|
|
224
|
+
*
|
|
225
|
+
* "Substantial" = circumference >= 30% of the largest loop at that height.
|
|
226
|
+
* Among substantial loops, picks the one with the smallest circumference.
|
|
227
|
+
*/
|
|
228
|
+
export function batch_cross_sections_y_inner(positions: Float32Array, indices: Uint32Array, y_values: Float32Array, _max_gap: number): BatchCrossSectionResult;
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* Compute bounding box from a flat f32 position array [x,y,z, x,y,z, ...]
|
|
232
|
+
* Returns [min_x, min_y, min_z, max_x, max_y, max_z]
|
|
233
|
+
*/
|
|
234
|
+
export function bounding_box(positions: Float32Array): Float32Array;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Translate positions so their AABB center is at origin.
|
|
238
|
+
* Takes flat [x,y,z,...], returns new flat [x,y,z,...].
|
|
239
|
+
*/
|
|
240
|
+
export function center_to_origin(positions: Float32Array): Float32Array;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Detect if positions are in meters or millimeters based on bounding box size.
|
|
244
|
+
* If max AABB dimension < `meter_threshold` (default: 10), assumes meters and scales to mm (*1000).
|
|
245
|
+
* Otherwise assumes already in mm and passes through.
|
|
246
|
+
*/
|
|
247
|
+
export function detect_and_convert_units(positions: Float32Array, meter_threshold: number): UnitConversionResult;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Detect if the surface at `mpt` is single or double shell.
|
|
251
|
+
*
|
|
252
|
+
* Strategy: compute the surface normal at `mpt` (from the closest triangle),
|
|
253
|
+
* then cast rays in a cone of directions around that normal (both sides).
|
|
254
|
+
* For each ray, count surface intersections. If we consistently find pairs
|
|
255
|
+
* of hits with small gaps, it's a double shell.
|
|
256
|
+
*
|
|
257
|
+
* `positions`: flat [x,y,z,...] indexed geometry positions
|
|
258
|
+
* `indices`: flat [i0,i1,i2,...] triangle indices
|
|
259
|
+
* `mpt`: [x,y,z] the MPT point on the surface
|
|
260
|
+
* `max_thickness`: maximum expected wall thickness — hits farther than this are ignored
|
|
261
|
+
*/
|
|
262
|
+
export function detect_shell(positions: Float32Array, indices: Uint32Array, mpt: Float32Array, max_thickness: number): ShellDetectResult;
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Step 5a: Extract the inner shell from a double-walled mesh.
|
|
266
|
+
*
|
|
267
|
+
* Strategy: multi-point face-visibility.
|
|
268
|
+
* 1. Use `hit_points` (outer wall hits from detect_shell) to compute the cavity
|
|
269
|
+
* direction: vector from mean-outer-hit toward MPT = inward = cavity direction.
|
|
270
|
+
* 2. Generate a cluster of probe points at multiple depths inside the cavity,
|
|
271
|
+
* spread laterally for concave-socket robustness.
|
|
272
|
+
* 3. For every triangle, cast a ray from each probe toward the face centroid;
|
|
273
|
+
* if the FIRST hit is that triangle from ANY probe → inner shell.
|
|
274
|
+
*
|
|
275
|
+
* `mpt`: user-placed point on the inner surface
|
|
276
|
+
* `wall_thickness`: median wall thickness from detect_shell
|
|
277
|
+
* `hit_points`: outer-wall hit points from detect_shell [x,y,z,...] (may be empty)
|
|
278
|
+
*/
|
|
279
|
+
export function extract_inner_shell(positions: Float32Array, indices: Uint32Array, mpt: Float32Array, wall_thickness: number, hit_points: Float32Array): ExtractInnerShellResult;
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Find and fill small boundary holes in an indexed mesh.
|
|
283
|
+
*
|
|
284
|
+
* A "hole" is a closed boundary loop of edges that each appear in exactly one triangle.
|
|
285
|
+
* Loops whose total perimeter is < `max_perimeter` are filled via fan triangulation
|
|
286
|
+
* from the loop centroid.
|
|
287
|
+
*
|
|
288
|
+
* `positions`: flat [x,y,z,...] vertex positions
|
|
289
|
+
* `indices`: flat [i0,i1,i2,...] triangle indices
|
|
290
|
+
* `max_perimeter`: maximum hole perimeter in mm to close (e.g. 40.0)
|
|
291
|
+
*/
|
|
292
|
+
export function fill_small_holes(positions: Float32Array, indices: Uint32Array, max_perimeter: number): FillHolesResult;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Find the cross-section plane through `mpt` that gives the smallest circumference.
|
|
296
|
+
*
|
|
297
|
+
* Strategy:
|
|
298
|
+
* 1. Build rotation axes: the surface normal + 8 perturbed axes (±5° tilts)
|
|
299
|
+
* 2. For each axis, coarse scan 90 plane orientations (2° steps)
|
|
300
|
+
* 3. Refine: ±2° around best at 0.1° steps
|
|
301
|
+
* 4. Score loops by circumference × closedness × proximity to MPT
|
|
302
|
+
*
|
|
303
|
+
* `positions`: flat [x,y,z,...] indexed geometry positions
|
|
304
|
+
* `indices`: flat [i0,i1,i2,...] triangle indices
|
|
305
|
+
* `mpt`: [x,y,z] the MPT point on the surface
|
|
306
|
+
* `surface_normal`: [nx,ny,nz] surface normal at MPT
|
|
307
|
+
* `max_gap`: maximum gap to bridge when chaining segments into loops (mm)
|
|
308
|
+
*/
|
|
309
|
+
export function find_min_cross_section(positions: Float32Array, indices: Uint32Array, mpt: Float32Array, surface_normal: Float32Array, max_gap: number): CrossSectionResult;
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Initialize panic hook for better WASM error messages in the browser console.
|
|
313
|
+
* Called automatically on WASM module init.
|
|
314
|
+
*/
|
|
315
|
+
export function init(): void;
|
|
316
|
+
|
|
317
|
+
/**
|
|
318
|
+
* Stage 1: preprocess a raw mesh in one shot.
|
|
319
|
+
*
|
|
320
|
+
* Accepts raw geometry (positions + optional indices) and runs all four
|
|
321
|
+
* automatic preprocessing steps without crossing the WASM boundary in between.
|
|
322
|
+
*
|
|
323
|
+
* **Parameters**
|
|
324
|
+
* - `positions`: flat `[x,y,z, …]` vertex positions
|
|
325
|
+
* - `indices`: flat `[i0,i1,i2, …]` triangle indices (pass empty array for non-indexed)
|
|
326
|
+
* - `meter_threshold`: max AABB dimension (in model units) below which the
|
|
327
|
+
* geometry is assumed to be in meters and scaled ×1000 to mm (default: `10.0`)
|
|
328
|
+
* - `weld_tolerance`: distance within which vertices are merged (default: `1e-4`)
|
|
329
|
+
* - `max_hole_perimeter`: boundary loops shorter than this (mm) are fan-filled (default: `300.0`)
|
|
330
|
+
*/
|
|
331
|
+
export function preprocess_mesh(positions: Float32Array, indices: Uint32Array, meter_threshold: number, weld_tolerance: number, max_hole_perimeter: number): PreprocessResult;
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* Build a BVH from flat triangle positions and ray-cast against it.
|
|
335
|
+
* `positions`: flat [x,y,z, ...] with every 9 floats = 1 triangle
|
|
336
|
+
* `ray_origin`: [ox, oy, oz]
|
|
337
|
+
* `ray_dir`: [dx, dy, dz]
|
|
338
|
+
* Returns indices of triangles whose AABBs the ray intersects.
|
|
339
|
+
*/
|
|
340
|
+
export function ray_cast_bvh(positions: Float32Array, ray_origin: Float32Array, ray_dir: Float32Array): Uint32Array;
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Step 9: Refine alignment using cross-section centroids.
|
|
344
|
+
*
|
|
345
|
+
* Computes PCA on the centroids of cross-section loops to find the "true"
|
|
346
|
+
* limb axis, then rotates the mesh so this axis aligns with +Y.
|
|
347
|
+
*
|
|
348
|
+
* `centroids`: flat [x,y,z,...] centroid of each cross-section loop
|
|
349
|
+
* `all_positions`: flat [x,y,z,...] full mesh positions
|
|
350
|
+
* `origin_pt`: [x,y,z]
|
|
351
|
+
* `mpt`: [x,y,z]
|
|
352
|
+
*/
|
|
353
|
+
export function refine_alignment(centroids: Float32Array, all_positions: Float32Array, origin_pt: Float32Array, mpt: Float32Array): RefineAlignmentResult;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
* Compute PCA on `selected_positions` (the region of interest),
|
|
357
|
+
* then apply the resulting rotation to `all_positions` (full mesh).
|
|
358
|
+
*
|
|
359
|
+
* The principal axis (longest variance) aligns with +Y.
|
|
360
|
+
* Ensures `origin_pt.y < mpt.y` after rotation (origin below MPT).
|
|
361
|
+
*
|
|
362
|
+
* `selected_positions`: flat [x,y,z,...] of selected region vertices
|
|
363
|
+
* `all_positions`: flat [x,y,z,...] of full mesh
|
|
364
|
+
* `origin_pt`: [x,y,z]
|
|
365
|
+
* `mpt`: [x,y,z]
|
|
366
|
+
*/
|
|
367
|
+
export function secondary_pca(selected_positions: Float32Array, all_positions: Float32Array, origin_pt: Float32Array, mpt: Float32Array): SecondaryPcaResult;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* Step 8: Subdivide the line from `origin_pt` to its projection onto the
|
|
371
|
+
* cross-section plane into points spaced roughly 1 inch (25.4 mm) apart.
|
|
372
|
+
*
|
|
373
|
+
* `origin_pt`: [x,y,z] the origin point
|
|
374
|
+
* `mpt`: [x,y,z] a point on the cross-section plane
|
|
375
|
+
* `plane_normal`: [nx,ny,nz] the cross-section plane normal
|
|
376
|
+
*
|
|
377
|
+
* Returns the series of evenly-spaced points along the line (both endpoints included).
|
|
378
|
+
*/
|
|
379
|
+
export function subdivide_origin_to_plane(origin_pt: Float32Array, mpt: Float32Array, plane_normal: Float32Array): SubdivideLineResult;
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Weld close vertices, find connected components, keep only the largest mesh.
|
|
383
|
+
*
|
|
384
|
+
* `positions`: flat [x,y,z,...] — non-indexed (every 9 floats = 1 triangle)
|
|
385
|
+
* `tolerance`: distance within which vertices are merged
|
|
386
|
+
*
|
|
387
|
+
* For indexed input, use `weld_and_keep_largest_indexed`.
|
|
388
|
+
*/
|
|
389
|
+
export function weld_and_keep_largest(positions: Float32Array, tolerance: number): MeshResult;
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Same as above but for indexed geometry.
|
|
393
|
+
* `positions`: flat [x,y,z,...]
|
|
394
|
+
* `indices`: flat [i0,i1,i2, ...] triangle indices
|
|
395
|
+
* `tolerance`: weld distance
|
|
396
|
+
*/
|
|
397
|
+
export function weld_and_keep_largest_indexed(positions: Float32Array, indices: Uint32Array, tolerance: number): MeshResult;
|
|
398
|
+
|
|
399
|
+
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
400
|
+
|
|
401
|
+
export interface InitOutput {
|
|
402
|
+
readonly memory: WebAssembly.Memory;
|
|
403
|
+
readonly __wbg_crosssectionresult_free: (a: number, b: number) => void;
|
|
404
|
+
readonly crosssectionresult_loop_points: (a: number) => [number, number];
|
|
405
|
+
readonly crosssectionresult_plane_normal: (a: number) => [number, number];
|
|
406
|
+
readonly crosssectionresult_circumference: (a: number) => number;
|
|
407
|
+
readonly crosssectionresult_is_closed: (a: number) => number;
|
|
408
|
+
readonly crosssectionresult_details: (a: number) => [number, number];
|
|
409
|
+
readonly find_min_cross_section: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
410
|
+
readonly __wbg_batchcrosssectionresult_free: (a: number, b: number) => void;
|
|
411
|
+
readonly batchcrosssectionresult_all_loop_points: (a: number) => [number, number];
|
|
412
|
+
readonly batchcrosssectionresult_offsets: (a: number) => [number, number];
|
|
413
|
+
readonly batchcrosssectionresult_circumferences: (a: number) => [number, number];
|
|
414
|
+
readonly batchcrosssectionresult_count: (a: number) => number;
|
|
415
|
+
readonly batchcrosssectionresult_details: (a: number) => [number, number];
|
|
416
|
+
readonly batch_cross_sections_y: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
417
|
+
readonly batch_cross_sections_y_inner: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
418
|
+
readonly __wbg_unitconversionresult_free: (a: number, b: number) => void;
|
|
419
|
+
readonly unitconversionresult_positions: (a: number) => [number, number];
|
|
420
|
+
readonly unitconversionresult_detected_unit: (a: number) => [number, number];
|
|
421
|
+
readonly unitconversionresult_converted: (a: number) => number;
|
|
422
|
+
readonly unitconversionresult_max_dimension: (a: number) => number;
|
|
423
|
+
readonly detect_and_convert_units: (a: number, b: number, c: number) => number;
|
|
424
|
+
readonly center_to_origin: (a: number, b: number) => [number, number];
|
|
425
|
+
readonly __wbg_meshresult_free: (a: number, b: number) => void;
|
|
426
|
+
readonly meshresult_positions: (a: number) => [number, number];
|
|
427
|
+
readonly meshresult_indices: (a: number) => [number, number];
|
|
428
|
+
readonly meshresult_stats: (a: number) => [number, number];
|
|
429
|
+
readonly weld_and_keep_largest: (a: number, b: number, c: number) => number;
|
|
430
|
+
readonly weld_and_keep_largest_indexed: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
431
|
+
readonly __wbg_alignresult_free: (a: number, b: number) => void;
|
|
432
|
+
readonly alignresult_positions: (a: number) => [number, number];
|
|
433
|
+
readonly alignresult_mpt: (a: number) => [number, number];
|
|
434
|
+
readonly alignresult_origin: (a: number) => [number, number];
|
|
435
|
+
readonly alignresult_transform: (a: number) => [number, number];
|
|
436
|
+
readonly alignresult_details: (a: number) => [number, number];
|
|
437
|
+
readonly align_to_origin: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
438
|
+
readonly __wbg_secondarypcaresult_free: (a: number, b: number) => void;
|
|
439
|
+
readonly secondarypcaresult_positions: (a: number) => [number, number];
|
|
440
|
+
readonly secondarypcaresult_mpt: (a: number) => [number, number];
|
|
441
|
+
readonly secondarypcaresult_origin: (a: number) => [number, number];
|
|
442
|
+
readonly secondarypcaresult_transform: (a: number) => [number, number];
|
|
443
|
+
readonly secondarypcaresult_details: (a: number) => [number, number];
|
|
444
|
+
readonly secondary_pca: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
445
|
+
readonly __wbg_refinealignmentresult_free: (a: number, b: number) => void;
|
|
446
|
+
readonly refinealignmentresult_positions: (a: number) => [number, number];
|
|
447
|
+
readonly refinealignmentresult_mpt: (a: number) => [number, number];
|
|
448
|
+
readonly refinealignmentresult_origin: (a: number) => [number, number];
|
|
449
|
+
readonly refinealignmentresult_rotation: (a: number) => [number, number];
|
|
450
|
+
readonly refinealignmentresult_centroid_axis: (a: number) => [number, number];
|
|
451
|
+
readonly refinealignmentresult_correction_angle: (a: number) => number;
|
|
452
|
+
readonly refinealignmentresult_details: (a: number) => [number, number];
|
|
453
|
+
readonly refine_alignment: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
454
|
+
readonly __wbg_subdividelineresult_free: (a: number, b: number) => void;
|
|
455
|
+
readonly subdividelineresult_points: (a: number) => [number, number];
|
|
456
|
+
readonly subdividelineresult_count: (a: number) => number;
|
|
457
|
+
readonly subdividelineresult_spacing: (a: number) => number;
|
|
458
|
+
readonly subdividelineresult_total_distance: (a: number) => number;
|
|
459
|
+
readonly subdivide_origin_to_plane: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
460
|
+
readonly __wbg_fillholesresult_free: (a: number, b: number) => void;
|
|
461
|
+
readonly fillholesresult_positions: (a: number) => [number, number];
|
|
462
|
+
readonly fillholesresult_indices: (a: number) => [number, number];
|
|
463
|
+
readonly fillholesresult_holes_filled: (a: number) => number;
|
|
464
|
+
readonly fillholesresult_details: (a: number) => [number, number];
|
|
465
|
+
readonly fill_small_holes: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
466
|
+
readonly __wbg_shelldetectresult_free: (a: number, b: number) => void;
|
|
467
|
+
readonly shelldetectresult_is_double_shell: (a: number) => number;
|
|
468
|
+
readonly shelldetectresult_thickness: (a: number) => number;
|
|
469
|
+
readonly shelldetectresult_ray_count: (a: number) => number;
|
|
470
|
+
readonly shelldetectresult_double_hit_count: (a: number) => number;
|
|
471
|
+
readonly shelldetectresult_avg_thickness: (a: number) => number;
|
|
472
|
+
readonly shelldetectresult_min_thickness: (a: number) => number;
|
|
473
|
+
readonly shelldetectresult_max_thickness: (a: number) => number;
|
|
474
|
+
readonly shelldetectresult_details: (a: number) => [number, number];
|
|
475
|
+
readonly shelldetectresult_hit_ray_lines: (a: number) => [number, number];
|
|
476
|
+
readonly shelldetectresult_miss_ray_lines: (a: number) => [number, number];
|
|
477
|
+
readonly shelldetectresult_hit_points: (a: number) => [number, number];
|
|
478
|
+
readonly shelldetectresult_surface_normal: (a: number) => [number, number];
|
|
479
|
+
readonly detect_shell: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
480
|
+
readonly __wbg_extractinnershellresult_free: (a: number, b: number) => void;
|
|
481
|
+
readonly extractinnershellresult_positions: (a: number) => [number, number];
|
|
482
|
+
readonly extractinnershellresult_indices: (a: number) => [number, number];
|
|
483
|
+
readonly extractinnershellresult_interior_point: (a: number) => [number, number];
|
|
484
|
+
readonly extractinnershellresult_inner_count: (a: number) => number;
|
|
485
|
+
readonly extractinnershellresult_total_count: (a: number) => number;
|
|
486
|
+
readonly extractinnershellresult_details: (a: number) => [number, number];
|
|
487
|
+
readonly extract_inner_shell: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
488
|
+
readonly ray_cast_bvh: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
|
|
489
|
+
readonly __wbg_preprocessresult_free: (a: number, b: number) => void;
|
|
490
|
+
readonly preprocessresult_positions: (a: number) => [number, number];
|
|
491
|
+
readonly preprocessresult_indices: (a: number) => [number, number];
|
|
492
|
+
readonly preprocessresult_bbox_size: (a: number) => [number, number];
|
|
493
|
+
readonly preprocessresult_detected_unit: (a: number) => [number, number];
|
|
494
|
+
readonly preprocessresult_unit_converted: (a: number) => number;
|
|
495
|
+
readonly preprocessresult_max_dimension: (a: number) => number;
|
|
496
|
+
readonly preprocessresult_weld_stats: (a: number) => [number, number];
|
|
497
|
+
readonly preprocessresult_holes_filled: (a: number) => number;
|
|
498
|
+
readonly preprocessresult_log: (a: number) => [number, number];
|
|
499
|
+
readonly preprocess_mesh: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
|
|
500
|
+
readonly init: () => void;
|
|
501
|
+
readonly bounding_box: (a: number, b: number) => [number, number];
|
|
502
|
+
readonly __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
503
|
+
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
|
504
|
+
readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
505
|
+
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
506
|
+
readonly __wbindgen_start: () => void;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
513
|
+
* a precompiled `WebAssembly.Module`.
|
|
514
|
+
*
|
|
515
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
516
|
+
*
|
|
517
|
+
* @returns {InitOutput}
|
|
518
|
+
*/
|
|
519
|
+
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
523
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
524
|
+
*
|
|
525
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
526
|
+
*
|
|
527
|
+
* @returns {Promise<InitOutput>}
|
|
528
|
+
*/
|
|
529
|
+
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|