@ifc-lite/wasm 4.1.3 → 4.2.0
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/package.json +1 -1
- package/pkg/ifc-lite.d.ts +1690 -1472
- package/pkg/ifc-lite.js +2614 -2419
- package/pkg/ifc-lite_bg.wasm +0 -0
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -1,1270 +1,1456 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Packed result of one rule run. Parallel arrays, one entry per clash record;
|
|
6
|
+
* `points` has 3 per record and `bounds` has 6 per record.
|
|
7
|
+
*/
|
|
4
8
|
export class ClashRunResult {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
private constructor();
|
|
10
|
+
free(): void;
|
|
11
|
+
[Symbol.dispose](): void;
|
|
12
|
+
readonly a: Uint32Array;
|
|
13
|
+
readonly b: Uint32Array;
|
|
14
|
+
readonly bounds: Float64Array;
|
|
15
|
+
readonly distance: Float64Array;
|
|
16
|
+
readonly points: Float64Array;
|
|
17
|
+
readonly status: Uint8Array;
|
|
14
18
|
}
|
|
15
19
|
|
|
20
|
+
/**
|
|
21
|
+
* A clash session: ingest element geometry once, then run rules repeatedly.
|
|
22
|
+
*/
|
|
16
23
|
export class ClashSession {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
free(): void;
|
|
25
|
+
[Symbol.dispose](): void;
|
|
26
|
+
/**
|
|
27
|
+
* Ingest N elements from flat arenas.
|
|
28
|
+
*
|
|
29
|
+
* - `positions`: concatenated per-element vertex coords (x,y,z,...)
|
|
30
|
+
* - `pos_ranges`: 2 per element = [float_offset, float_len]
|
|
31
|
+
* - `indices`: concatenated per-element LOCAL (0-based) triangle indices
|
|
32
|
+
* - `idx_ranges`: 2 per element = [idx_offset, idx_len]
|
|
33
|
+
* - `aabbs`: 6 per element = [minx,miny,minz,maxx,maxy,maxz]
|
|
34
|
+
*/
|
|
35
|
+
ingest(positions: Float32Array, pos_ranges: Uint32Array, indices: Uint32Array, idx_ranges: Uint32Array, aabbs: Float32Array): void;
|
|
36
|
+
constructor();
|
|
37
|
+
/**
|
|
38
|
+
* Run one rule. `group_a`/`group_b` are GLOBAL element indices; an empty
|
|
39
|
+
* `group_b` means a self-clash within `group_a`. `mode`: 0 = hard,
|
|
40
|
+
* 1 = clearance. Records carry GLOBAL element indices.
|
|
41
|
+
*/
|
|
42
|
+
runRule(group_a: Uint32Array, group_b: Uint32Array, mode: number, tolerance: number, clearance: number, report_touch: boolean): ClashRunResult;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* A set of closed 2D rings, grouped into disjoint shapes.
|
|
47
|
+
*
|
|
48
|
+
* Rings carry no duplicated closing vertex (connect the last point back to
|
|
49
|
+
* the first). Winding is meaningful: a counter-clockwise ring covers area, a
|
|
50
|
+
* clockwise one removes it, so an outer boundary and its holes are
|
|
51
|
+
* distinguishable without any extra tagging — the property
|
|
52
|
+
* `meshOutline2d`'s flattened contour list relies on too.
|
|
53
|
+
*/
|
|
54
|
+
export class Contours2D {
|
|
55
|
+
free(): void;
|
|
56
|
+
[Symbol.dispose](): void;
|
|
57
|
+
/**
|
|
58
|
+
* Axis-aligned bounds as `[minX, minY, maxX, maxY]`, or `undefined` when
|
|
59
|
+
* empty. Cheap enough to gate the boolean itself: an accumulated occluder
|
|
60
|
+
* whose bounds miss the next element needs no difference at all.
|
|
61
|
+
*/
|
|
62
|
+
bounds(): Float64Array | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Every ring's coordinates concatenated. Paired with `ringLengths()` this
|
|
65
|
+
* reconstructs the set through the constructor, and reads a whole result
|
|
66
|
+
* back in one boundary crossing instead of one per ring. It round-trips the
|
|
67
|
+
* constructor's *sanitised* rings — degenerate rings and explicit closing
|
|
68
|
+
* vertices are dropped at construction, so those are not echoed back.
|
|
69
|
+
*/
|
|
70
|
+
coords(): Float64Array;
|
|
71
|
+
/**
|
|
72
|
+
* Adopt the rings of a `meshOutline2d` result, widening its f32
|
|
73
|
+
* coordinates to the f64 the boolean engine works in.
|
|
74
|
+
*
|
|
75
|
+
* The outline's `axisMin`/`axisMax` are dropped — they describe the cut
|
|
76
|
+
* axis, which a 2D boolean has no notion of; keep them on the JS side if
|
|
77
|
+
* the caller still needs them for band classification.
|
|
78
|
+
*/
|
|
79
|
+
static fromMeshOutline(outline: MeshOutlineJs): Contours2D;
|
|
80
|
+
/**
|
|
81
|
+
* Build a contour set from flat coordinates plus per-ring vertex counts.
|
|
82
|
+
*
|
|
83
|
+
* `coords` is `[x0, y0, x1, y1, …]` with every ring concatenated in order;
|
|
84
|
+
* `ringLengths[i]` is the VERTEX count (not the float count) of ring `i`.
|
|
85
|
+
* Throws when the counts do not add up to `coords.length / 2`.
|
|
86
|
+
*
|
|
87
|
+
* Shape grouping is a property of boolean *results*: a set built here is
|
|
88
|
+
* an unstructured ring soup, so `shapeCount` reports 0 until it has been
|
|
89
|
+
* through an operation (`resolve2d` alone is enough). Degenerate rings
|
|
90
|
+
* (under 3 vertices, non-finite, or exactly collinear) are dropped at
|
|
91
|
+
* construction, so `isEmpty`/`bounds()` report the same rings a later
|
|
92
|
+
* boolean would keep rather than exposing an unsanitised soup.
|
|
93
|
+
*/
|
|
94
|
+
constructor(coords: Float64Array, ring_lengths: Uint32Array);
|
|
95
|
+
/**
|
|
96
|
+
* Ring `index` as a flat `[x0, y0, x1, y1, …]` array, or `undefined` when
|
|
97
|
+
* out of range.
|
|
98
|
+
*/
|
|
99
|
+
ring(index: number): Float64Array | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Vertex count of each ring, in the same order as `coords()`.
|
|
102
|
+
*/
|
|
103
|
+
ringLengths(): Uint32Array;
|
|
104
|
+
/**
|
|
105
|
+
* Ring index at which each shape starts. Entry `s` is shape `s`'s OUTER
|
|
106
|
+
* ring; the rings up to the next entry (or `ringCount`) are its holes.
|
|
107
|
+
*/
|
|
108
|
+
shapeOffsets(): Uint32Array;
|
|
109
|
+
/**
|
|
110
|
+
* True when the set holds no rings. Degenerate rings are dropped at
|
|
111
|
+
* construction and never emitted by an operation, so this also means the
|
|
112
|
+
* set covers no area.
|
|
113
|
+
*/
|
|
114
|
+
readonly isEmpty: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* Total number of boundary rings across every shape.
|
|
117
|
+
*/
|
|
118
|
+
readonly ringCount: number;
|
|
119
|
+
/**
|
|
120
|
+
* Number of disjoint shapes, or 0 for a set that has not been through an
|
|
121
|
+
* operation yet (see the constructor).
|
|
122
|
+
*/
|
|
123
|
+
readonly shapeCount: number;
|
|
36
124
|
}
|
|
37
125
|
|
|
126
|
+
/**
|
|
127
|
+
* A collection of resolved grid axes.
|
|
128
|
+
*/
|
|
38
129
|
export class GridAxisCollection {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
130
|
+
private constructor();
|
|
131
|
+
free(): void;
|
|
132
|
+
[Symbol.dispose](): void;
|
|
133
|
+
/**
|
|
134
|
+
* Get the axis at `index`. Returns `undefined` for out-of-bounds index.
|
|
135
|
+
*/
|
|
136
|
+
getAxis(index: number): GridAxisJs | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Whether the collection is empty.
|
|
139
|
+
*/
|
|
140
|
+
readonly isEmpty: boolean;
|
|
141
|
+
/**
|
|
142
|
+
* Number of grid axes.
|
|
143
|
+
*/
|
|
144
|
+
readonly length: number;
|
|
54
145
|
}
|
|
55
146
|
|
|
147
|
+
/**
|
|
148
|
+
* One grid axis: tag + endpoints in renderer Y-up world space (metres).
|
|
149
|
+
*/
|
|
56
150
|
export class GridAxisJs {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
151
|
+
private constructor();
|
|
152
|
+
free(): void;
|
|
153
|
+
[Symbol.dispose](): void;
|
|
154
|
+
/**
|
|
155
|
+
* Express ID of the `IfcGridAxis`.
|
|
156
|
+
*/
|
|
157
|
+
readonly axisId: number;
|
|
158
|
+
/**
|
|
159
|
+
* End endpoint `[x, y, z]` in renderer Y-up world space (metres).
|
|
160
|
+
*/
|
|
161
|
+
readonly end: Float32Array;
|
|
162
|
+
/**
|
|
163
|
+
* Express ID of the owning `IfcGrid`.
|
|
164
|
+
*/
|
|
165
|
+
readonly gridId: number;
|
|
166
|
+
/**
|
|
167
|
+
* Start endpoint `[x, y, z]` in renderer Y-up world space (metres).
|
|
168
|
+
*/
|
|
169
|
+
readonly start: Float32Array;
|
|
170
|
+
/**
|
|
171
|
+
* Axis tag (e.g. `"A"`, `"1"`); empty string when unauthored.
|
|
172
|
+
*/
|
|
173
|
+
readonly tag: string;
|
|
80
174
|
}
|
|
81
175
|
|
|
176
|
+
/**
|
|
177
|
+
* Main IFC-Lite API
|
|
178
|
+
*/
|
|
82
179
|
export class IfcAPI {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
180
|
+
free(): void;
|
|
181
|
+
[Symbol.dispose](): void;
|
|
182
|
+
/**
|
|
183
|
+
* Run the pre-pass ONCE and return serialized results for worker distribution.
|
|
184
|
+
* Takes raw bytes (&[u8]) to avoid TextDecoder overhead.
|
|
185
|
+
*/
|
|
186
|
+
buildPrePassOnce(data: Uint8Array): any;
|
|
187
|
+
/**
|
|
188
|
+
* Streaming pre-pass: emits geometry jobs in chunks via a JS callback
|
|
189
|
+
* instead of waiting for the full file scan to complete.
|
|
190
|
+
*
|
|
191
|
+
* Single linear walk over the file:
|
|
192
|
+
* 1. Builds the entity index incrementally from the same scan that
|
|
193
|
+
* collects geometry jobs (a separate index scan would double
|
|
194
|
+
* wall-clock).
|
|
195
|
+
* 2. As soon as `IFCPROJECT` has been seen, the unit scale and the
|
|
196
|
+
* first ~50 geometry jobs have been collected, resolves
|
|
197
|
+
* `unitScale` + `rtcOffset` and emits a `meta` callback so the
|
|
198
|
+
* JS host can spin up geometry process workers.
|
|
199
|
+
* 3. Emits `jobs` callbacks every `chunk_size` jobs (or fewer if
|
|
200
|
+
* the meta phase already buffered some).
|
|
201
|
+
* 4. Emits `complete` with the total job count at end of scan.
|
|
202
|
+
*
|
|
203
|
+
* On a 986 MB / 14 M-entity file this drops time-to-first-geometry
|
|
204
|
+
* from ~17 s (full pre-pass + worker spawn + first batch) to ~3 s
|
|
205
|
+
* (first 100 K bytes scanned + meta + first chunk).
|
|
206
|
+
*
|
|
207
|
+
* The callback receives a single `JsValue` argument shaped as one of:
|
|
208
|
+
* `{ type: "meta", unitScale, rtcOffset: [x,y,z], needsShift, buildingRotation? }`
|
|
209
|
+
* `{ type: "jobs", jobs: Uint32Array }` // [id, start, end] triples
|
|
210
|
+
* `{ type: "complete", totalJobs }`
|
|
211
|
+
*/
|
|
212
|
+
buildPrePassStreaming(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean): any;
|
|
213
|
+
/**
|
|
214
|
+
* Sharded pre-pass variant: same scan/discovery/jobs/columns pipeline as
|
|
215
|
+
* `buildPrePassStreaming`, but
|
|
216
|
+
* 1. the entity index is PREBUILT from the host's stitched shard columns
|
|
217
|
+
* (file order; see `scanEntityIndexShard`) — the scan skips its inline
|
|
218
|
+
* index build, the meta RTC ladder resolves against the FULL index
|
|
219
|
+
* (no partial-ladder full-rescan detour), and the post-scan
|
|
220
|
+
* `entity-index` event is skipped (the host already delivered it), and
|
|
221
|
+
* 2. styles resolution is EXTERNAL: the styled-item spans are resolved as
|
|
222
|
+
* shard slices on the geometry workers (`resolveStyledItemsShard`);
|
|
223
|
+
* this call stashes the SUPPORT spans + plane-angle scale, and the
|
|
224
|
+
* follow-up `finalizePrepassStyles` merges + flattens into the exact
|
|
225
|
+
* styles payload the serial path emits. NO `styles` event is emitted
|
|
226
|
+
* here.
|
|
227
|
+
*/
|
|
228
|
+
buildPrePassStreamingSharded(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean, index_ids: Uint32Array, index_starts: Uint32Array, index_lengths: Uint32Array, index_classes: Uint8Array): any;
|
|
229
|
+
/**
|
|
230
|
+
* Clear the cached entity index (call between loads when reusing
|
|
231
|
+
* the same `IfcAPI` instance — e.g. the parser worker keeps one
|
|
232
|
+
* `IfcAPI` alive across multiple `parse` requests).
|
|
233
|
+
*
|
|
234
|
+
* Recovers a poisoned cache Mutex instead of panicking; see `mod_tests.rs`.
|
|
235
|
+
*/
|
|
236
|
+
clearPrePassCache(): void;
|
|
237
|
+
/**
|
|
238
|
+
* Run geometry extraction on `content` and return its typed CSG / opening
|
|
239
|
+
* diagnostics (the `GeometryDiagnostics` contract) as a JS object, or
|
|
240
|
+
* `undefined` when nothing diagnostic-worthy happened (no openings, no
|
|
241
|
+
* failures). Takes the raw IFC bytes (`Uint8Array`) so there is no input-size
|
|
242
|
+
* cap. The produced meshes are dropped; only the diagnostics are returned.
|
|
243
|
+
*/
|
|
244
|
+
diagnoseGeometry(content: Uint8Array): any;
|
|
245
|
+
/**
|
|
246
|
+
* Export tabular **CSV**. `mode` ∈ {`"entities"`, `"properties"`, `"quantities"`,
|
|
247
|
+
* `"spatial"`}. `delimiter` defaults to `,` when empty; `include_properties` adds
|
|
248
|
+
* flattened `Pset_Prop` columns to the entities view.
|
|
249
|
+
*/
|
|
250
|
+
exportCsv(content: Uint8Array, mode: string, delimiter: string, include_properties: boolean): Uint8Array;
|
|
251
|
+
/**
|
|
252
|
+
* Export the render geometry in `content` as a binary **GLB** (`Uint8Array`).
|
|
253
|
+
*
|
|
254
|
+
* `hidden` / `isolated` are express-id visibility filters; `hidden_types_csv` is a
|
|
255
|
+
* comma-separated list of IFC type names whose class toggle is off (e.g.
|
|
256
|
+
* `"IfcOpeningElement,IfcSpace"`). `include_metadata` attaches counts + per-node
|
|
257
|
+
* `expressId`. Per-mesh RTC origin rides the node translation (precision-safe).
|
|
258
|
+
* `lit` emits standard PBR materials that shade from normals; omitted or
|
|
259
|
+
* `true` ⇒ lit (the default), `false` ⇒ flat `KHR_materials_unlit` (the
|
|
260
|
+
* historical look — #1321). Optional at the boundary so older 5-arg callers
|
|
261
|
+
* keep lit-by-default behaviour.
|
|
262
|
+
* `emissive` self-illuminates each material at its base colour (core glTF
|
|
263
|
+
* `emissiveFactor`) so renderers without ambient/IBL — Google Earth — don't
|
|
264
|
+
* render the model near-black (#1427); omitted or `false` ⇒ off.
|
|
265
|
+
*
|
|
266
|
+
* Fails CLOSED: when the visible mesh set is empty this throws an `Error`
|
|
267
|
+
* whose message starts with `NO_RENDER_GEOMETRY`, instead of returning a
|
|
268
|
+
* structurally valid but empty GLB. #1438 put that guard only in the TS
|
|
269
|
+
* CLI/MCP wrappers; making the boundary itself refuse means SDK/viewer/
|
|
270
|
+
* direct callers inherit it too (the TS guards stay as defense-in-depth).
|
|
271
|
+
*/
|
|
272
|
+
exportGlb(content: Uint8Array, include_metadata: boolean, hidden: Uint32Array, isolated: Uint32Array, hidden_types_csv: string, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
|
|
273
|
+
/**
|
|
274
|
+
* Assemble a **GLB** from already-produced meshes (the viewer's `MeshData`, flattened)
|
|
275
|
+
* — no re-meshing. Per mesh `i`: `vertex_counts[i]` verts + `index_counts[i]` indices
|
|
276
|
+
* taken in order from the concatenated `positions`/`normals`/`indices`; `colors` is
|
|
277
|
+
* RGBA per mesh, `origins` xyz per mesh, `express_ids` labels each mesh (indices are
|
|
278
|
+
* per-mesh local). The caller passes exactly the meshes it wants emitted.
|
|
279
|
+
*/
|
|
280
|
+
exportGlbFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, express_ids: Uint32Array, include_metadata: boolean, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
|
|
281
|
+
/**
|
|
282
|
+
* Export the `IfcSpace` volumes in `content` as Honeybee **HBJSON** UTF-8 bytes.
|
|
283
|
+
*
|
|
284
|
+
* Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
|
|
285
|
+
* V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
|
|
286
|
+
* is genuinely needed.
|
|
287
|
+
*
|
|
288
|
+
* Rooms are built analytically from extruded-area profiles (watertight by construction);
|
|
289
|
+
* faces are typed Floor / RoofCeiling / Wall with outward normals. The result loads via
|
|
290
|
+
* `honeybee.model.Model.from_hbjson` and is ready for Ladybug Tools / Pollination.
|
|
291
|
+
*
|
|
292
|
+
* ```javascript
|
|
293
|
+
* const api = new IfcAPI();
|
|
294
|
+
* const hbjson = api.exportHbjson(ifcContent, "my_model");
|
|
295
|
+
* ```
|
|
296
|
+
*/
|
|
297
|
+
exportHbjson(content: Uint8Array, name: string): Uint8Array;
|
|
298
|
+
/**
|
|
299
|
+
* Export **IFC5 / IFCX** (the USD-style node graph). `only_known_properties` keeps
|
|
300
|
+
* only properties with an official IFC5 schema.
|
|
301
|
+
*/
|
|
302
|
+
exportIfcx(content: Uint8Array, only_known_properties: boolean, pretty: boolean): Uint8Array;
|
|
303
|
+
/**
|
|
304
|
+
* Export structured **JSON** (array of entity objects with typed property values).
|
|
305
|
+
*/
|
|
306
|
+
exportJson(content: Uint8Array, pretty: boolean, include_properties: boolean, include_quantities: boolean): Uint8Array;
|
|
307
|
+
/**
|
|
308
|
+
* Export **JSON-LD** (`@graph` of `ifc:` nodes). Empty `context` ⇒ buildingSMART
|
|
309
|
+
* IFC4 OWL default. `included` is an express-id isolation filter mirroring the
|
|
310
|
+
* OBJ/glTF/STEP exporters (empty ⇒ all entities).
|
|
311
|
+
*/
|
|
312
|
+
exportJsonld(content: Uint8Array, context: string, include_properties: boolean, include_quantities: boolean, pretty: boolean, included: Uint32Array): Uint8Array;
|
|
313
|
+
/**
|
|
314
|
+
* Package an already-produced **GLB** + georeference into a **KMZ** (`Uint8Array`)
|
|
315
|
+
* for Google Earth: a ZIP of `doc.kml` (a `<Model>` placed at `latitude`/`longitude`/
|
|
316
|
+
* `altitude`) + `model.glb`. `x_axis_abscissa`/`x_axis_ordinate` are the
|
|
317
|
+
* `IfcMapConversion` grid-north components; pass both as `undefined` for heading 0.
|
|
318
|
+
*
|
|
319
|
+
* `altitude_mode` selects the KML vertical placement: `"clampToGround"`
|
|
320
|
+
* (the default when omitted) rests the model on the terrain, ignoring
|
|
321
|
+
* `altitude`; `"absolute"` places the origin at `altitude` metres MSL.
|
|
322
|
+
* Google Earth's terrain already encodes the site elevation, so clamping
|
|
323
|
+
* keeps a wrong/zero/double-counted OrthogonalHeight from floating the
|
|
324
|
+
* model into the sky (#1427); absolute is offered for models whose
|
|
325
|
+
* OrthogonalHeight is a true MSL elevation the user wants honoured.
|
|
326
|
+
*/
|
|
327
|
+
exportKmz(glb: Uint8Array, latitude: number, longitude: number, altitude: number, x_axis_abscissa: number | null | undefined, x_axis_ordinate: number | null | undefined, name: string, altitude_mode?: string | null): Uint8Array;
|
|
328
|
+
/**
|
|
329
|
+
* Build a Google-Earth-ready **KMZ** (`Uint8Array`) straight from the viewer's
|
|
330
|
+
* already-produced meshes — the working path (#1427). The model is embedded as
|
|
331
|
+
* **COLLADA** (`model.dae`), the only `<Model>` format Google Earth loads (a GLB
|
|
332
|
+
* raises "Unsupported element: Model"), with emission-lit double-sided materials
|
|
333
|
+
* placement. Mesh arrays match `exportGlbFromMeshes`;
|
|
334
|
+
* `latitude`/`longitude`/`altitude` + `x_axis_abscissa`/`x_axis_ordinate`
|
|
335
|
+
* (grid-north, `undefined` ⇒ heading 0) place + orient the model.
|
|
336
|
+
* `altitude_mode` (`"clampToGround"` default ⇒ rest on terrain, ignoring
|
|
337
|
+
* `altitude`; `"absolute"` ⇒ place at `altitude` metres MSL) selects the
|
|
338
|
+
* KML vertical placement (#1427).
|
|
339
|
+
*/
|
|
340
|
+
exportKmzFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, latitude: number, longitude: number, altitude: number, x_axis_abscissa: number | null | undefined, x_axis_ordinate: number | null | undefined, name: string, altitude_mode?: string | null): Uint8Array;
|
|
341
|
+
/**
|
|
342
|
+
* Merge several IFC models into one STEP/IFC UTF-8 byte buffer (`Uint8Array`).
|
|
343
|
+
* `concatenated` is every model's
|
|
344
|
+
* bytes laid end-to-end; `lengths[i]` is the byte length of model `i`. The first model
|
|
345
|
+
* keeps its ids; later models are id-offset and their project unified to the first.
|
|
346
|
+
*/
|
|
347
|
+
exportMerged(concatenated: Uint8Array, lengths: Uint32Array, schema: string): Uint8Array;
|
|
348
|
+
/**
|
|
349
|
+
* Export the render geometry in `content` as Wavefront **OBJ** UTF-8 bytes.
|
|
350
|
+
*
|
|
351
|
+
* Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
|
|
352
|
+
* V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
|
|
353
|
+
* is genuinely needed.
|
|
354
|
+
*
|
|
355
|
+
* `hidden` / `isolated` are express-id filters mirroring the viewer's visibility
|
|
356
|
+
* state (empty `isolated` ⇒ all visible). Instanced type-library shapes are skipped.
|
|
357
|
+
*
|
|
358
|
+
* ```javascript
|
|
359
|
+
* const obj = api.exportObj(ifcContent, true, new Uint32Array(), new Uint32Array());
|
|
360
|
+
* ```
|
|
361
|
+
*/
|
|
362
|
+
exportObj(content: Uint8Array, include_normals: boolean, hidden: Uint32Array, isolated: Uint32Array): Uint8Array;
|
|
363
|
+
/**
|
|
364
|
+
* Re-serialize the model in `content` to STEP/IFC UTF-8 bytes.
|
|
365
|
+
*
|
|
366
|
+
* Returned as UTF-8 bytes (`Uint8Array`) so output is not capped by the
|
|
367
|
+
* V8 max-string ceiling (~512 MB); decode with `TextDecoder` when a string
|
|
368
|
+
* is genuinely needed.
|
|
369
|
+
*
|
|
370
|
+
* `schema` is the FILE_SCHEMA label to write (empty ⇒ preserve the source schema).
|
|
371
|
+
* `included` is an express-id allowlist (empty ⇒ whole model); when set, the forward
|
|
372
|
+
* `#`-reference closure is added so the subset never dangles a reference.
|
|
373
|
+
* `mutations_json` carries `MutablePropertyView` edits (attribute updates +
|
|
374
|
+
* property-set synthesis); empty ⇒ none. See `export_step_json` for the shape.
|
|
375
|
+
*/
|
|
376
|
+
exportStep(content: Uint8Array, schema: string, included: Uint32Array, mutations_json: string): Uint8Array;
|
|
377
|
+
/**
|
|
378
|
+
* Extract raw profile polygons from all building elements with `IfcExtrudedAreaSolid`
|
|
379
|
+
* representations.
|
|
380
|
+
*
|
|
381
|
+
* Returns a [`ProfileCollection`] whose entries each carry:
|
|
382
|
+
* - A 2D polygon (outer + holes) in local profile space (metres)
|
|
383
|
+
* - A 4 × 4 column-major transform in WebGL Y-up world space
|
|
384
|
+
* - Extrusion direction (world space) and depth (metres)
|
|
385
|
+
*
|
|
386
|
+
* Use [`ProfileProjector`] (TypeScript) to convert these into `DrawingLine[]`
|
|
387
|
+
* for clean projection without tessellation artifacts.
|
|
388
|
+
*
|
|
389
|
+
* ```javascript
|
|
390
|
+
* const api = new IfcAPI();
|
|
391
|
+
* const profiles = api.extractProfiles(ifcContent, 0);
|
|
392
|
+
* console.log('Profiles:', profiles.length);
|
|
393
|
+
* for (let i = 0; i < profiles.length; i++) {
|
|
394
|
+
* const p = profiles.get(i);
|
|
395
|
+
* console.log(p.ifcType, 'depth:', p.extrusionDepth);
|
|
396
|
+
* }
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
399
|
+
extractProfiles(content: string, model_index: number): ProfileCollection;
|
|
400
|
+
/**
|
|
401
|
+
* Sharded pre-pass: merge the shard-resolved styled-item columns with the
|
|
402
|
+
* SUPPORT spans (extracted host-side from the shard classes) and run the
|
|
403
|
+
* CANONICAL styles flatten. Returns the exact `styles` event payload the
|
|
404
|
+
* serial path emits. Runs on any worker with `setEntityIndex` installed.
|
|
405
|
+
* Span arguments are `[id, start, len]` triples; `plane_angle_to_radians`
|
|
406
|
+
* comes from the meta event.
|
|
407
|
+
*/
|
|
408
|
+
finalizePrepassStyles(data: Uint8Array, orphan_ids: Uint32Array, orphan_colors: Float32Array, geom_ids: Uint32Array, geom_colors: Float32Array, colour_map_spans: Uint32Array, material_def_spans: Uint32Array, rel_material_spans: Uint32Array, void_spans: Uint32Array, fills_spans: Uint32Array, aggregate_spans: Uint32Array, plane_angle_to_radians: number): any;
|
|
409
|
+
/**
|
|
410
|
+
* Get WASM memory for zero-copy access
|
|
411
|
+
*/
|
|
412
|
+
getMemory(): any;
|
|
413
|
+
/**
|
|
414
|
+
* Structured pipeline diagnostics accumulated across every
|
|
415
|
+
* `processGeometryBatch*` call since the last load reset
|
|
416
|
+
* (`clearPrePassCache` / `setEntityIndex`), as a JS object with a
|
|
417
|
+
* `schemaVersion` field — or `undefined` when no batch has run yet.
|
|
418
|
+
* Includes per-batch summed geometry wall time, mesh/triangle counts,
|
|
419
|
+
* the degenerate-backstop drop count, and the CSG failure aggregates.
|
|
420
|
+
*/
|
|
421
|
+
getPipelineDiagnostics(): any;
|
|
422
|
+
/**
|
|
423
|
+
* Create and initialize the IFC API
|
|
424
|
+
*/
|
|
425
|
+
constructor();
|
|
426
|
+
/**
|
|
427
|
+
* Parse the file and return every `IfcAlignment` directrix as a flat
|
|
428
|
+
* `Float32Array` of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` in
|
|
429
|
+
* the renderer's Y-up world space (RTC-subtracted, metres). Consecutive
|
|
430
|
+
* samples form line segments. Feed straight to
|
|
431
|
+
* `renderer.uploadAnnotationLines3D(...)`.
|
|
432
|
+
*
|
|
433
|
+
* Returns an empty array when the file has no alignments (or none with a
|
|
434
|
+
* resolvable Axis curve), so the caller can clear the overlay cheaply.
|
|
435
|
+
*/
|
|
436
|
+
parseAlignmentLines(content: string): Float32Array;
|
|
437
|
+
/**
|
|
438
|
+
* Parse the file and return structured per-axis data (tag + endpoints) in
|
|
439
|
+
* the renderer's Y-up world space (RTC-subtracted, metres). Use this when
|
|
440
|
+
* you also need the axis tags (to render grid bubbles / labels).
|
|
441
|
+
*/
|
|
442
|
+
parseGridAxes(content: string): GridAxisCollection;
|
|
443
|
+
/**
|
|
444
|
+
* Parse the file and return every `IfcGridAxis` as a flat `Float32Array`
|
|
445
|
+
* of 3D line-list vertices `[x0,y0,z0, x1,y1,z1, …]` (one segment per
|
|
446
|
+
* axis) in the renderer's Y-up world space (RTC-subtracted, metres). Feed
|
|
447
|
+
* straight to a line pipeline (e.g. `uploadAnnotationLines3D`).
|
|
448
|
+
*
|
|
449
|
+
* Returns an empty array when the file has no grids, so the caller can
|
|
450
|
+
* clear the overlay cheaply.
|
|
451
|
+
*/
|
|
452
|
+
parseGridLines(content: string): Float32Array;
|
|
453
|
+
/**
|
|
454
|
+
* Parse IFC file and extract symbolic representations (Plan,
|
|
455
|
+
* Annotation, FootPrint, Axis). These are 2D curves used for
|
|
456
|
+
* architectural drawings instead of sectioning 3D geometry.
|
|
457
|
+
*
|
|
458
|
+
* Example:
|
|
459
|
+
* ```javascript
|
|
460
|
+
* const api = new IfcAPI();
|
|
461
|
+
* const symbols = api.parseSymbolicRepresentations(ifcData);
|
|
462
|
+
* console.log('Found', symbols.totalCount, 'symbolic items');
|
|
463
|
+
* for (let i = 0; i < symbols.polylineCount; i++) {
|
|
464
|
+
* const polyline = symbols.getPolyline(i);
|
|
465
|
+
* console.log('Polyline for', polyline.ifcType, ':', polyline.points);
|
|
466
|
+
* }
|
|
467
|
+
* ```
|
|
468
|
+
*/
|
|
469
|
+
parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
|
|
470
|
+
/**
|
|
471
|
+
* Process geometry for a subset of pre-scanned entities → flat
|
|
472
|
+
* MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
|
|
473
|
+
* Thin wrapper over [`IfcAPI::produce_batch`]; converts each produced mesh
|
|
474
|
+
* to MeshDataJs (the IFC Z-up→WebGL Y-up swap + winding reversal happen
|
|
475
|
+
* there). Output is byte-for-byte what the pre-refactor method produced.
|
|
476
|
+
*/
|
|
477
|
+
processGeometryBatch(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): MeshCollection;
|
|
478
|
+
/**
|
|
479
|
+
* Like [`IfcAPI::process_geometry_batch`] but reads the source bytes held by
|
|
480
|
+
* [`IfcAPI::set_source_bytes`] instead of taking `data`. Byte-for-byte
|
|
481
|
+
* identical output — it delegates to the legacy twin with the held slice.
|
|
482
|
+
*/
|
|
483
|
+
processGeometryBatchFromSource(jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): MeshCollection;
|
|
484
|
+
/**
|
|
485
|
+
* Like [`IfcAPI::process_geometry_batch`] but collates the batch's meshes
|
|
486
|
+
* into a GPU-instancing shard (IFNS wire format) instead of a flat
|
|
487
|
+
* MeshCollection. Repeated geometry collapses to one template + per-
|
|
488
|
+
* occurrence transforms; non-instanceable meshes ride as flat singleton
|
|
489
|
+
* templates so nothing is dropped. The shard stays in the producer-native
|
|
490
|
+
* (IFC Z-up) frame — the renderer composes the constant Z-up→Y-up swap at
|
|
491
|
+
* upload. Each batch shard renders independently: affinity routing already
|
|
492
|
+
* co-locates identical geometry on one worker, so per-batch collation
|
|
493
|
+
* captures ~all the dedup and no cross-batch merge is needed. Returns empty
|
|
494
|
+
* bytes only when the batch produced zero non-empty meshes.
|
|
495
|
+
*/
|
|
496
|
+
processGeometryBatchInstanced(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): Uint8Array;
|
|
497
|
+
/**
|
|
498
|
+
* Produce a batch ONCE and PARTITION it (the instanced-ONLY path): opaque
|
|
499
|
+
* ordinary occurrences (colour alpha >= 0.99 AND geometry_class == 0) are
|
|
500
|
+
* collated into the instanced shard; everything else (transparent glass,
|
|
501
|
+
* type-product geometry) goes to the flat MeshCollection. Each mesh takes
|
|
502
|
+
* exactly ONE route, so produce_batch runs once (no emit-both 2× meshing)
|
|
503
|
+
* and the renderer draws opaque occurrences via instancing instead of flat.
|
|
504
|
+
* Partition mirrors the renderer gates: INSTANCED_ALPHA_CUTOFF (0.99 =
|
|
505
|
+
* OPAQUE_ALPHA_CUTOFF) for transparency, geometry_class for the Model/Types
|
|
506
|
+
* split.
|
|
507
|
+
*
|
|
508
|
+
* NOTE: the renderer must be instanced-feature-complete (picking / selection
|
|
509
|
+
* / lens overlays on instanced geometry) before the worker calls this in
|
|
510
|
+
* place of processGeometryBatch — otherwise those features break for the
|
|
511
|
+
* opaque bulk. See the instanced-only follow-ups.
|
|
512
|
+
*/
|
|
513
|
+
processGeometryBatchPartitioned(data: Uint8Array, jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): PartitionedBatch;
|
|
514
|
+
/**
|
|
515
|
+
* Like [`IfcAPI::process_geometry_batch_partitioned`] but reads the source
|
|
516
|
+
* bytes held by [`IfcAPI::set_source_bytes`] instead of taking `data`.
|
|
517
|
+
* Byte-for-byte identical output — it delegates to the legacy twin.
|
|
518
|
+
*/
|
|
519
|
+
processGeometryBatchPartitionedFromSource(jobs_flat: Uint32Array, unit_scale: number, rtc_x: number, rtc_y: number, rtc_z: number, needs_shift: boolean, void_keys: Uint32Array, void_counts: Uint32Array, void_values: Uint32Array, style_ids: Uint32Array, style_colors: Uint8Array, plane_angle_to_radians?: number | null, material_element_ids?: Uint32Array | null, material_color_counts?: Uint32Array | null, material_colors_rgba?: Uint8Array | null): PartitionedBatch;
|
|
520
|
+
/**
|
|
521
|
+
* Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
|
|
522
|
+
* styled-item span list on this worker, against the entity index installed
|
|
523
|
+
* by `setEntityIndex`. Returns raw resolved maps as flat columns:
|
|
524
|
+
* `{ orphanIds, orphanColors (f32 rgba per id), geomIds, geomColors }`.
|
|
525
|
+
* The host merges shard results IN SHARD ORDER with first-wins per
|
|
526
|
+
* geometry id, reproducing the serial resolver's file-order precedence,
|
|
527
|
+
* then hands the merged columns to `finalizePrepassStyles`.
|
|
528
|
+
* `spans` is `[id, start, len]` triples.
|
|
529
|
+
*/
|
|
530
|
+
resolveStyledItemsShard(data: Uint8Array, spans: Uint32Array): any;
|
|
531
|
+
/**
|
|
532
|
+
* Fast entity scanning using SIMD-accelerated Rust scanner
|
|
533
|
+
* Returns array of entity references for data model parsing
|
|
534
|
+
* Much faster than TypeScript byte-by-byte scanning (5-10x speedup)
|
|
535
|
+
*/
|
|
536
|
+
scanEntitiesFast(content: string): any;
|
|
537
|
+
/**
|
|
538
|
+
* Fast entity scanning from raw bytes (avoids TextDecoder.decode on JS side).
|
|
539
|
+
* Accepts Uint8Array directly — saves ~2-5s for 487MB files by skipping
|
|
540
|
+
* JS string creation and UTF-16→UTF-8 conversion.
|
|
541
|
+
*/
|
|
542
|
+
scanEntitiesFastBytes(data: Uint8Array): any;
|
|
543
|
+
/**
|
|
544
|
+
* SPIKE (sharded pre-pass): scan the entity index over a single byte range.
|
|
545
|
+
*
|
|
546
|
+
* Each idle browser geometry worker calls this on its `[range_start,
|
|
547
|
+
* range_end)` shard; the main thread stitches the returned columns into the
|
|
548
|
+
* full entity index (byte-identical to the single-threaded
|
|
549
|
+
* `build_entity_index`) by binary-searching each shard for the previous
|
|
550
|
+
* shard's `handoff`. Delegates to `ifc_lite_processing::scan_shard`, the
|
|
551
|
+
* exact per-chunk primitive the native `build_entity_index_parallel` fans
|
|
552
|
+
* across cores — so the sharded merge cannot drift from the serial builder.
|
|
553
|
+
*
|
|
554
|
+
* Byte offsets returned are GLOBAL (relative to file start), so shards
|
|
555
|
+
* concatenate without rewriting. Returns a plain object:
|
|
556
|
+
* `{ ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array,
|
|
557
|
+
* handoff: number }`
|
|
558
|
+
* where `handoff` is the global start of the first entity at/after
|
|
559
|
+
* `range_end` (the next shard's first real entity), or `-1` at EOF.
|
|
560
|
+
*/
|
|
561
|
+
scanEntityIndexShard(data: Uint8Array, range_start: number, range_end: number): any;
|
|
562
|
+
/**
|
|
563
|
+
* Fast geometry-only entity scanning
|
|
564
|
+
* Scans only entities that have geometry, skipping 99% of non-geometry entities
|
|
565
|
+
* Returns array of geometry entity references for parallel processing
|
|
566
|
+
* Much faster than scanning all entities (3x speedup for large files)
|
|
567
|
+
*/
|
|
568
|
+
scanGeometryEntitiesFast(content: string): any;
|
|
569
|
+
/**
|
|
570
|
+
* Enable or disable per-entity geometry fingerprinting in
|
|
571
|
+
* `processGeometryBatch`, used by the viewer's revision-diff feature.
|
|
572
|
+
*
|
|
573
|
+
* Pass a positive `tolerance` (metres) to enable — it is the quantization
|
|
574
|
+
* grid the hash snaps positions to (larger = more tolerant of float noise,
|
|
575
|
+
* smaller = catches finer edits; the `f32` precision floor of model-local
|
|
576
|
+
* coordinates means values below ~1 mm mostly hash noise). Pass `null`/
|
|
577
|
+
* `undefined` (or a non-positive value) to disable. Default: disabled.
|
|
578
|
+
*/
|
|
579
|
+
setComputeGeometryHashes(tolerance?: number | null): void;
|
|
580
|
+
/**
|
|
581
|
+
* Populate `cached_entity_index` from pre-extracted column arrays.
|
|
582
|
+
*
|
|
583
|
+
* Used by the streaming pre-pass to share its already-built entity
|
|
584
|
+
* index across worker realms via SAB-backed Uint32Arrays — every
|
|
585
|
+
* process worker would otherwise re-scan the entire file in
|
|
586
|
+
* `processGeometryBatch`'s lazy build path (~5 s on a 1 GB IFC),
|
|
587
|
+
* even though the pre-pass worker built the same index minutes
|
|
588
|
+
* earlier.
|
|
589
|
+
*
|
|
590
|
+
* Builds a compact [`ColumnarEntityIndex`] from the three input slices
|
|
591
|
+
* (sorted `u32` columns + binary search) instead of a per-worker
|
|
592
|
+
* `FxHashMap` — ~229 MB vs ~436 MB on a 19.1 M-entity model (#1682).
|
|
593
|
+
* [`ColumnarEntityIndex::from_columns`] verifies the id ordering once
|
|
594
|
+
* (O(n)) and only argsorts if the producer did not emit sorted columns.
|
|
595
|
+
*
|
|
596
|
+
* `lengths[i]` is the byte length of entity `ids[i]`, so lookup returns
|
|
597
|
+
* `(start, start + length)` to match the existing `(start, end)` layout.
|
|
598
|
+
*
|
|
599
|
+
* Idempotent in the sense that repeated calls REPLACE the cache —
|
|
600
|
+
* supports the parser-worker pattern of reusing one IfcAPI across
|
|
601
|
+
* multiple loads with different files.
|
|
602
|
+
*/
|
|
603
|
+
setEntityIndex(ids: Uint32Array, starts: Uint32Array, lengths: Uint32Array): void;
|
|
604
|
+
/**
|
|
605
|
+
* Install the pre-computed set of type ids that an `IfcRelDefinesByType`
|
|
606
|
+
* instantiates (#957 follow-up), so the worker's first type-product batch
|
|
607
|
+
* skips the per-worker [`Self::get_or_build_instantiated_type_ids`]
|
|
608
|
+
* full-file walk. Same injection contract as [`Self::set_referenced_repmaps`].
|
|
609
|
+
*/
|
|
610
|
+
setInstantiatedTypeIds(ids: Uint32Array): void;
|
|
611
|
+
/**
|
|
612
|
+
* Install the pre-computed #1623 Phase 3 don't-bake plan: the flat list of
|
|
613
|
+
* `IfcRepresentationMap` ids that an `IfcMappedItem` instantiates >= 2 times.
|
|
614
|
+
* The streaming pre-pass tallies it in the SAME scan that builds the referenced-
|
|
615
|
+
* repmap set (`styling::build_mapped_instance_plan_from_spans`) and ships the id
|
|
616
|
+
* list here. The batch path arms its router with it (batch-local template mode),
|
|
617
|
+
* so a repeated single-solid mapped source materializes ONCE per batch and the
|
|
618
|
+
* rest ride as instances in the IFNS shard.
|
|
619
|
+
*
|
|
620
|
+
* Same injection contract as [`Self::set_referenced_repmaps`]: installed after
|
|
621
|
+
* `setEntityIndex` (which clears it on content swap), and a no-op absence leaves
|
|
622
|
+
* the batch path materializing every occurrence (byte-identical). Each id is
|
|
623
|
+
* stored as `(2, id)` — the batch-local router only needs the eligibility set
|
|
624
|
+
* (count >= 2); the min-id template slot is unused in batch-local mode.
|
|
625
|
+
*/
|
|
626
|
+
setMappedInstancePlan(source_ids: Uint32Array): void;
|
|
627
|
+
/**
|
|
628
|
+
* Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
|
|
629
|
+
* from its flat SoA encoding, so the worker's first batch skips the
|
|
630
|
+
* per-worker [`Self::get_or_build_material_layer_index`] full-file decode
|
|
631
|
+
* scan (the dominant first-batch cost on layered architectural models,
|
|
632
|
+
* which run this on the DEFAULT view). The streaming pre-pass built the
|
|
633
|
+
* index once from the `IfcRelAssociatesMaterial` spans it already scanned
|
|
634
|
+
* (`MaterialLayerIndex::from_spans`) and flat-encoded it here; the flat
|
|
635
|
+
* encoding round-trips bit-for-bit (proven in `material_layer_index` tests),
|
|
636
|
+
* so the injected index equals each worker's `from_content` result.
|
|
637
|
+
*
|
|
638
|
+
* Same injection contract as [`Self::set_referenced_repmaps`]: installed
|
|
639
|
+
* after `setEntityIndex`, and a no-op absence leaves the lazy build intact.
|
|
640
|
+
*/
|
|
641
|
+
setMaterialLayerIndex(element_ids: Uint32Array, axis: Uint32Array, layer_counts: Uint32Array, direction_sense: Float64Array, offset: Float64Array, layer_material_ids: Uint32Array, layer_thicknesses: Float64Array): void;
|
|
642
|
+
/**
|
|
643
|
+
* Toggle the "render multilayer walls as a single solid" mode (issue #540).
|
|
644
|
+
*
|
|
645
|
+
* When `enabled` is `true`, every subsequent `processGeometryBatch` call
|
|
646
|
+
* will suppress geometry emission for `IfcBuildingElementPart` entities
|
|
647
|
+
* whose `IfcRelAggregates` parent wall is sliceable (has an
|
|
648
|
+
* `IfcMaterialLayerSetUsage`) AND has its own `Representation`. The
|
|
649
|
+
* parent wall keeps its per-layer sub-mesh colouring, so the visual
|
|
650
|
+
* result is the same as the layered render but with one mesh per wall
|
|
651
|
+
* instead of one per layer part — much cheaper for both CPU and GPU.
|
|
652
|
+
*
|
|
653
|
+
* Default is `false`. Pass `true` before calling `processGeometryBatch`.
|
|
654
|
+
*/
|
|
655
|
+
setMergeLayers(enabled: boolean): void;
|
|
656
|
+
/**
|
|
657
|
+
* Enable or disable the PARAMETRIC rectangular-opening fast path (the
|
|
658
|
+
* placement-frame, ground-truth-exact analytic cut) for `processGeometryBatch`.
|
|
659
|
+
*
|
|
660
|
+
* DEFAULT ON (corpus-validated; native defaults ON too, and wasm has no env to
|
|
661
|
+
* read `IFC_LITE_RECT_PARAM`, so both targets default in LOCKSTEP -- the
|
|
662
|
+
* byte-identical native==wasm contract requires both take the same path). This
|
|
663
|
+
* toggle is the wasm-side escape hatch mirroring `IFC_LITE_RECT_PARAM=0`.
|
|
664
|
+
* The path subtracts rectangular openings as exact parametric boxes in the host's
|
|
665
|
+
* own placement frame (rotated walls included), deferring any non-clean case to
|
|
666
|
+
* the exact kernel. Pass `false` before `processGeometryBatch` to opt out.
|
|
667
|
+
*/
|
|
668
|
+
setRectParamFastPath(enabled: boolean): void;
|
|
669
|
+
/**
|
|
670
|
+
* Install the pre-computed set of `IfcRepresentationMap` ids referenced by
|
|
671
|
+
* an `IfcMappedItem` (issue #957), so the worker's first type-product batch
|
|
672
|
+
* SKIPS the per-worker [`Self::get_or_build_referenced_repmaps`] full-file
|
|
673
|
+
* walk. The streaming pre-pass built the same set once from the
|
|
674
|
+
* `IfcMappedItem` spans it already scanned (see
|
|
675
|
+
* `styling::build_referenced_representation_maps_from_spans`) and ships the
|
|
676
|
+
* id list here — bit-identical to what each worker would compute, since a
|
|
677
|
+
* set's membership is order-invariant and consumers only call `.contains`.
|
|
678
|
+
*
|
|
679
|
+
* Installed AFTER `setEntityIndex` (which clears this cache on content
|
|
680
|
+
* swap), so the injected value survives. When this setter is never called
|
|
681
|
+
* (native path, non-streaming callers), the lazy build path is unchanged.
|
|
682
|
+
*/
|
|
683
|
+
setReferencedRepmaps(ids: Uint32Array): void;
|
|
684
|
+
/**
|
|
685
|
+
* Toggle the tier-independent small-cut skip (#1286). When `true`,
|
|
686
|
+
* `processGeometryBatch` drops `IfcBooleanResult` differences whose cutter is
|
|
687
|
+
* tiny relative to its host (steel copes/notches) while keeping the
|
|
688
|
+
* tessellation tier — so curves stay full-density. The viewer enables this for
|
|
689
|
+
* the on-screen load; exports/drawings leave it off so their geometry keeps
|
|
690
|
+
* every cut. Default off ⇒ byte-identical to before.
|
|
691
|
+
*
|
|
692
|
+
* Set BEFORE processing — meshes already emitted are not regenerated.
|
|
693
|
+
*/
|
|
694
|
+
setSkipSmallCuts(on: boolean): void;
|
|
695
|
+
/**
|
|
696
|
+
* Store the whole IFC source file ONCE per load so the `*FromSource` batch
|
|
697
|
+
* variants can read it from the wasm heap instead of re-copying it per call.
|
|
698
|
+
*
|
|
699
|
+
* Mirrors the `setEntityIndex` lifecycle: called once per worker per load,
|
|
700
|
+
* and REPLACES the previous file wholesale (repeated calls swap the bytes),
|
|
701
|
+
* so a parser/geometry worker reusing one `IfcAPI` across loads is safe.
|
|
702
|
+
* The bytes must be the exact source the batch jobs' byte spans index into
|
|
703
|
+
* (the same buffer passed as `data` to the legacy `processGeometryBatch*`),
|
|
704
|
+
* or the decoded entities won't match — the JS worker installs its own
|
|
705
|
+
* session buffer, so this holds by construction.
|
|
706
|
+
*
|
|
707
|
+
* Taking `Vec<u8>` (by value) means wasm-bindgen hands us ownership of the
|
|
708
|
+
* single JS→wasm copy directly; we wrap it in `Arc` with no second copy.
|
|
709
|
+
*/
|
|
710
|
+
setSourceBytes(data: Uint8Array): void;
|
|
711
|
+
/**
|
|
712
|
+
* Select the tessellation detail level applied by every subsequent
|
|
713
|
+
* `processGeometryBatch` call (issue #976, step 4).
|
|
714
|
+
*
|
|
715
|
+
* `level` is one of `"lowest" | "low" | "medium" | "high" | "highest"`
|
|
716
|
+
* (case-insensitive). `"medium"` is the default and reproduces the
|
|
717
|
+
* engine's historical hardcoded densities byte-for-byte; lower levels
|
|
718
|
+
* trade curved-surface smoothness for throughput, higher levels reduce
|
|
719
|
+
* faceting on pipes / cylinders / NURBS at a triangle-count cost.
|
|
720
|
+
* Pass `null`/`undefined` to reset to the default.
|
|
721
|
+
*
|
|
722
|
+
* Set BEFORE processing — meshes already emitted are not regenerated.
|
|
723
|
+
* Throws on an unrecognized level so typos fail loudly instead of
|
|
724
|
+
* silently rendering at the wrong density.
|
|
725
|
+
*/
|
|
726
|
+
setTessellationQuality(level?: string | null): void;
|
|
727
|
+
/**
|
|
728
|
+
* Simplify already-produced element meshes at per-element demesher
|
|
729
|
+
* levels (1-4 = cavity removal + clustering at 0.5/0.25/0.10/0.03
|
|
730
|
+
* triangle ratio, 5 = bounding box).
|
|
731
|
+
*
|
|
732
|
+
* One RECORD per input `MeshData` entry (an element may span several
|
|
733
|
+
* records — per-material submeshes; pass all of them, grouped or not).
|
|
734
|
+
* Per record `i`: `vertexCounts[i]` vertices from `positions` (and
|
|
735
|
+
* `normals` when non-empty), `indexCounts[i]` indices from `indices`
|
|
736
|
+
* (per-record local), `origins[i*3..]`, `localToWorld[i*16..]` valid
|
|
737
|
+
* only when `localToWorldPresent[i] != 0`, level `levels[i]` (records
|
|
738
|
+
* of one element must agree). Arrays are the boundary Y-up convention
|
|
739
|
+
* when `yUp` is true (the browser/SDK case).
|
|
740
|
+
*
|
|
741
|
+
* `rtcX/Y/Z` = `coordinateInfo.originShift` (IFC Z-up metres);
|
|
742
|
+
* `unitScale` = metres per project length unit.
|
|
743
|
+
*/
|
|
744
|
+
simplifyMeshes(express_ids: Uint32Array, levels: Uint8Array, positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, origins: Float64Array, local_to_world: Float64Array, local_to_world_present: Uint8Array, rtc_x: number, rtc_y: number, rtc_z: number, unit_scale: number, y_up: boolean): SimplifiedMeshes;
|
|
745
|
+
/**
|
|
746
|
+
* Check if API is initialized
|
|
747
|
+
*/
|
|
748
|
+
readonly is_ready: boolean;
|
|
749
|
+
/**
|
|
750
|
+
* Get version string
|
|
751
|
+
*/
|
|
752
|
+
readonly version: string;
|
|
656
753
|
}
|
|
657
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Collection of mesh data for returning multiple meshes
|
|
757
|
+
*/
|
|
658
758
|
export class MeshCollection {
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
759
|
+
private constructor();
|
|
760
|
+
free(): void;
|
|
761
|
+
[Symbol.dispose](): void;
|
|
762
|
+
/**
|
|
763
|
+
* Get mesh at index (clones — non-destructive). Prefer `takeMesh` on the
|
|
764
|
+
* hot streaming path; this stays for callers that read meshes more than once.
|
|
765
|
+
*/
|
|
766
|
+
get(index: number): MeshDataJs | undefined;
|
|
767
|
+
/**
|
|
768
|
+
* Check if RTC offset is significant (>10km)
|
|
769
|
+
*/
|
|
770
|
+
hasRtcOffset(): boolean;
|
|
771
|
+
/**
|
|
772
|
+
* #1097 perf: MOVE the mesh at `index` out of the collection (the Vec
|
|
773
|
+
* buffers are `std::mem::take`-n, leaving an empty stub). The streaming
|
|
774
|
+
* worker reads each mesh exactly once, so moving avoids the full vertex-
|
|
775
|
+
* data clone `get` pays — one fewer copy of positions/normals/indices/uvs/
|
|
776
|
+
* texture per mesh (the JS getters still do the single Rust→JS copy). Calling
|
|
777
|
+
* it twice for the same index yields the second call an empty mesh.
|
|
778
|
+
*/
|
|
779
|
+
takeMesh(index: number): MeshDataJs | undefined;
|
|
780
|
+
/**
|
|
781
|
+
* Get building rotation angle in radians (from IfcSite placement)
|
|
782
|
+
* Returns None if no rotation was detected
|
|
783
|
+
*/
|
|
784
|
+
readonly buildingRotation: number | undefined;
|
|
785
|
+
/**
|
|
786
|
+
* The batch's typed CSG / opening diagnostics as a JS object (the
|
|
787
|
+
* `GeometryDiagnostics` contract), or `undefined` if none were recorded. The
|
|
788
|
+
* worker merges these across batches. One serialized value keeps the rich
|
|
789
|
+
* nested shape as a single FFI crossing instead of dozens of getters.
|
|
790
|
+
*/
|
|
791
|
+
readonly diagnostics: any;
|
|
792
|
+
/**
|
|
793
|
+
* Number of per-entity geometry fingerprints recorded.
|
|
794
|
+
*/
|
|
795
|
+
readonly geometryHashCount: number;
|
|
796
|
+
/**
|
|
797
|
+
* Express ids for the per-entity geometry fingerprints, parallel to
|
|
798
|
+
* [`Self::geometry_hash_values`]. Empty unless geometry hashing was
|
|
799
|
+
* enabled via `IfcAPI.setComputeGeometryHashes`.
|
|
800
|
+
*/
|
|
801
|
+
readonly geometryHashIds: Uint32Array;
|
|
802
|
+
/**
|
|
803
|
+
* Per-entity geometry fingerprints as a `BigUint64Array`, parallel to
|
|
804
|
+
* [`Self::geometry_hash_ids`]. `u64` is exposed (not hex strings) so JS
|
|
805
|
+
* can compare with `===` and key maps without allocation. Empty unless
|
|
806
|
+
* geometry hashing was enabled.
|
|
807
|
+
*/
|
|
808
|
+
readonly geometryHashValues: BigUint64Array;
|
|
809
|
+
/**
|
|
810
|
+
* Get number of meshes
|
|
811
|
+
*/
|
|
812
|
+
readonly length: number;
|
|
813
|
+
/**
|
|
814
|
+
* Get RTC offset X (for converting local coords back to world coords)
|
|
815
|
+
* Add this to local X coordinates to get world X coordinates
|
|
816
|
+
*/
|
|
817
|
+
readonly rtcOffsetX: number;
|
|
818
|
+
/**
|
|
819
|
+
* Get RTC offset Y
|
|
820
|
+
*/
|
|
821
|
+
readonly rtcOffsetY: number;
|
|
822
|
+
/**
|
|
823
|
+
* Get RTC offset Z
|
|
824
|
+
*/
|
|
825
|
+
readonly rtcOffsetZ: number;
|
|
826
|
+
/**
|
|
827
|
+
* Get total triangle count across all meshes
|
|
828
|
+
*/
|
|
829
|
+
readonly totalTriangles: number;
|
|
830
|
+
/**
|
|
831
|
+
* Get total vertex count across all meshes
|
|
832
|
+
*/
|
|
833
|
+
readonly totalVertices: number;
|
|
734
834
|
}
|
|
735
835
|
|
|
836
|
+
/**
|
|
837
|
+
* Individual mesh data with express ID and color (matches MeshData interface)
|
|
838
|
+
*/
|
|
736
839
|
export class MeshDataJs {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
840
|
+
private constructor();
|
|
841
|
+
free(): void;
|
|
842
|
+
[Symbol.dispose](): void;
|
|
843
|
+
/**
|
|
844
|
+
* Get color as [r, g, b, a] array
|
|
845
|
+
*/
|
|
846
|
+
readonly color: Float32Array;
|
|
847
|
+
/**
|
|
848
|
+
* Get express ID
|
|
849
|
+
*/
|
|
850
|
+
readonly expressId: number;
|
|
851
|
+
/**
|
|
852
|
+
* Geometry provenance for the viewer's Model/Types switch (#957 follow-up):
|
|
853
|
+
* 0 = occurrence, 1 = orphan type geometry (no occurrence), 2 = instanced
|
|
854
|
+
* type geometry (hidden in Model mode, shown in Types mode).
|
|
855
|
+
*/
|
|
856
|
+
readonly geometryClass: number;
|
|
857
|
+
/**
|
|
858
|
+
* True when this mesh carries a surface texture (#961).
|
|
859
|
+
*/
|
|
860
|
+
readonly hasTexture: boolean;
|
|
861
|
+
/**
|
|
862
|
+
* Get IFC type name (e.g., "IfcWall", "IfcSpace")
|
|
863
|
+
*/
|
|
864
|
+
readonly ifcType: string;
|
|
865
|
+
/**
|
|
866
|
+
* Get indices as Uint32Array (copy to JS)
|
|
867
|
+
*/
|
|
868
|
+
readonly indices: Uint32Array;
|
|
869
|
+
/**
|
|
870
|
+
* Local (pre-placement, object-space) AABB (issue #1474), WebGL Y-up,
|
|
871
|
+
* `[minX,minY,minZ,maxX,maxY,maxZ]`. `undefined` when not captured
|
|
872
|
+
* (wasm-bindgen maps `Option::None` to `undefined`, not `null`).
|
|
873
|
+
*/
|
|
874
|
+
readonly localBounds: Float32Array | undefined;
|
|
875
|
+
/**
|
|
876
|
+
* The resolved `IfcLocalPlacement` chain for this mesh (issue #1474),
|
|
877
|
+
* row-major 4×4, WebGL Y-up. `undefined` when not captured (see
|
|
878
|
+
* `local_bounds` above).
|
|
879
|
+
*/
|
|
880
|
+
readonly localToWorld: Float64Array | undefined;
|
|
881
|
+
/**
|
|
882
|
+
* Get normals as Float32Array (copy to JS)
|
|
883
|
+
*/
|
|
884
|
+
readonly normals: Float32Array;
|
|
885
|
+
/**
|
|
886
|
+
* Per-element local-frame origin (Float64Array[3], WebGL Y-up, metres):
|
|
887
|
+
* world position of vertex i = `origin + positions[3i..3i+3]`. Returns
|
|
888
|
+
* [0,0,0] when positions are absolute (legacy / local frame off).
|
|
889
|
+
*/
|
|
890
|
+
readonly origin: Float64Array;
|
|
891
|
+
/**
|
|
892
|
+
* Get positions as Float32Array (copy to JS)
|
|
893
|
+
*/
|
|
894
|
+
readonly positions: Float32Array;
|
|
895
|
+
/**
|
|
896
|
+
* Optional SurfaceColour for the "Shading" GLB-export choice — only
|
|
897
|
+
* present when the file authored a distinct DiffuseColour. JS sees
|
|
898
|
+
* `undefined` when absent (most files).
|
|
899
|
+
*/
|
|
900
|
+
readonly shadingColor: Float32Array | undefined;
|
|
901
|
+
readonly textureHeight: number;
|
|
902
|
+
/**
|
|
903
|
+
* Stable texture dedup key (`IfcSurfaceTexture` express id, #1781).
|
|
904
|
+
* 0 when the mesh is untextured.
|
|
905
|
+
*/
|
|
906
|
+
readonly textureId: number;
|
|
907
|
+
/**
|
|
908
|
+
* Sampler wrap for the S axis (`IfcSurfaceTexture.RepeatS`): true = repeat.
|
|
909
|
+
*/
|
|
910
|
+
readonly textureRepeatS: boolean;
|
|
911
|
+
/**
|
|
912
|
+
* Sampler wrap for the T axis (`IfcSurfaceTexture.RepeatT`): true = repeat.
|
|
913
|
+
*/
|
|
914
|
+
readonly textureRepeatT: boolean;
|
|
915
|
+
/**
|
|
916
|
+
* Decoded RGBA8 texture bytes (`width*height*4`). Empty when untextured.
|
|
917
|
+
*/
|
|
918
|
+
readonly textureRgba: Uint8Array;
|
|
919
|
+
/**
|
|
920
|
+
* External image reference (`IfcImageTexture.URLReference`, #1781) for the
|
|
921
|
+
* host to resolve — e.g. a sibling image inside the `.ifcZIP`. `undefined`
|
|
922
|
+
* for untextured meshes and Rust-decoded blob/pixel textures.
|
|
923
|
+
*/
|
|
924
|
+
readonly textureUrl: string | undefined;
|
|
925
|
+
readonly textureWidth: number;
|
|
926
|
+
/**
|
|
927
|
+
* Get triangle count
|
|
928
|
+
*/
|
|
929
|
+
readonly triangleCount: number;
|
|
930
|
+
/**
|
|
931
|
+
* Per-vertex texture coordinates as Float32Array (u, v pairs). Empty when
|
|
932
|
+
* the mesh is untextured.
|
|
933
|
+
*/
|
|
934
|
+
readonly uvs: Float32Array;
|
|
935
|
+
/**
|
|
936
|
+
* Get vertex count
|
|
937
|
+
*/
|
|
938
|
+
readonly vertexCount: number;
|
|
836
939
|
}
|
|
837
940
|
|
|
941
|
+
/**
|
|
942
|
+
* A mesh's projected footprint outline.
|
|
943
|
+
*
|
|
944
|
+
* Contours are closed rings in drawing 2D space (same basis as `projectTo2D`
|
|
945
|
+
* in `@ifc-lite/drawing-2d`), WITHOUT a duplicated closing vertex.
|
|
946
|
+
* `axisMin`/`axisMax` are the element's extent along the cut axis (world
|
|
947
|
+
* units, not flip-adjusted) for band classification on the TS side.
|
|
948
|
+
*/
|
|
838
949
|
export class MeshOutlineJs {
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
950
|
+
private constructor();
|
|
951
|
+
free(): void;
|
|
952
|
+
[Symbol.dispose](): void;
|
|
953
|
+
/**
|
|
954
|
+
* Ring `i` as a flat `[u0, v0, u1, v1, …]` array, or `undefined` if out of
|
|
955
|
+
* range. The ring is closed implicitly (connect the last point to the
|
|
956
|
+
* first).
|
|
957
|
+
*/
|
|
958
|
+
contour(index: number): Float32Array | undefined;
|
|
959
|
+
/**
|
|
960
|
+
* Element extent (max) along the cut axis, world units.
|
|
961
|
+
*/
|
|
962
|
+
readonly axisMax: number;
|
|
963
|
+
/**
|
|
964
|
+
* Element extent (min) along the cut axis, world units.
|
|
965
|
+
*/
|
|
966
|
+
readonly axisMin: number;
|
|
967
|
+
/**
|
|
968
|
+
* Number of boundary rings (outer + holes).
|
|
969
|
+
*/
|
|
970
|
+
readonly contourCount: number;
|
|
860
971
|
}
|
|
861
972
|
|
|
973
|
+
/**
|
|
974
|
+
* Result of [`IfcAPI::process_geometry_batch_partitioned`]: the flat
|
|
975
|
+
* MeshCollection (transparent + type geometry) and the instanced IFNS shard
|
|
976
|
+
* (opaque ordinary occurrences) from ONE produce_batch. Take-once accessors so
|
|
977
|
+
* the JS side moves each out without a clone.
|
|
978
|
+
*/
|
|
862
979
|
export class PartitionedBatch {
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
980
|
+
private constructor();
|
|
981
|
+
free(): void;
|
|
982
|
+
[Symbol.dispose](): void;
|
|
983
|
+
/**
|
|
984
|
+
* The flat MeshCollection (transparent glass + type-product geometry).
|
|
985
|
+
* Moves out — call once.
|
|
986
|
+
*/
|
|
987
|
+
takeMeshes(): MeshCollection | undefined;
|
|
988
|
+
/**
|
|
989
|
+
* The instanced IFNS shard bytes (opaque ordinary occurrences). Moves out.
|
|
990
|
+
*/
|
|
991
|
+
takeShard(): Uint8Array;
|
|
992
|
+
/**
|
|
993
|
+
* Number of occurrences routed into the instanced shard this batch. The viewer
|
|
994
|
+
* folds this into its total mesh count so the count reflects ALL rendered
|
|
995
|
+
* geometry (flat + instanced), not just the flat MeshCollection.
|
|
996
|
+
*/
|
|
997
|
+
readonly instancedOccurrences: number;
|
|
881
998
|
}
|
|
882
999
|
|
|
1000
|
+
/**
|
|
1001
|
+
* A collection of extracted profiles.
|
|
1002
|
+
*/
|
|
883
1003
|
export class ProfileCollection {
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
1004
|
+
private constructor();
|
|
1005
|
+
free(): void;
|
|
1006
|
+
[Symbol.dispose](): void;
|
|
1007
|
+
/**
|
|
1008
|
+
* Get profile at `index`. Returns `undefined` for out-of-bounds index.
|
|
1009
|
+
*/
|
|
1010
|
+
get(index: number): ProfileEntryJs | undefined;
|
|
1011
|
+
/**
|
|
1012
|
+
* Number of profiles.
|
|
1013
|
+
*/
|
|
1014
|
+
readonly length: number;
|
|
895
1015
|
}
|
|
896
1016
|
|
|
1017
|
+
/**
|
|
1018
|
+
* A single profile entry – raw 2D polygon + world transform.
|
|
1019
|
+
*
|
|
1020
|
+
* Profile points are in **local 2D profile space** (metres).
|
|
1021
|
+
* Apply `transform` to `[x, y, 0, 1]` to get WebGL Y-up world coordinates.
|
|
1022
|
+
*/
|
|
897
1023
|
export class ProfileEntryJs {
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
1024
|
+
private constructor();
|
|
1025
|
+
free(): void;
|
|
1026
|
+
[Symbol.dispose](): void;
|
|
1027
|
+
/**
|
|
1028
|
+
* Express ID of the building element.
|
|
1029
|
+
*/
|
|
1030
|
+
readonly expressId: number;
|
|
1031
|
+
/**
|
|
1032
|
+
* Extrusion depth (metres).
|
|
1033
|
+
*/
|
|
1034
|
+
readonly extrusionDepth: number;
|
|
1035
|
+
/**
|
|
1036
|
+
* Extrusion direction `[dx, dy, dz]` in WebGL Y-up world space (unit vector).
|
|
1037
|
+
*/
|
|
1038
|
+
readonly extrusionDir: Float32Array;
|
|
1039
|
+
/**
|
|
1040
|
+
* Number of points per hole.
|
|
1041
|
+
*/
|
|
1042
|
+
readonly holeCounts: Uint32Array;
|
|
1043
|
+
/**
|
|
1044
|
+
* All hole points concatenated: `[x0, y0, x1, y1, …]` (metres).
|
|
1045
|
+
*/
|
|
1046
|
+
readonly holePoints: Float32Array;
|
|
1047
|
+
/**
|
|
1048
|
+
* IFC type name (e.g., `"IfcWall"`).
|
|
1049
|
+
*/
|
|
1050
|
+
readonly ifcType: string;
|
|
1051
|
+
/**
|
|
1052
|
+
* Model index for multi-model federation.
|
|
1053
|
+
*/
|
|
1054
|
+
readonly modelIndex: number;
|
|
1055
|
+
/**
|
|
1056
|
+
* Outer boundary: flat `[x0, y0, x1, y1, …]` in local profile space (metres).
|
|
1057
|
+
*/
|
|
1058
|
+
readonly outerPoints: Float32Array;
|
|
1059
|
+
/**
|
|
1060
|
+
* 4 × 4 column-major transform in WebGL Y-up world space.
|
|
1061
|
+
* `M * [x, y, 0, 1]ᵀ` gives the world position.
|
|
1062
|
+
*/
|
|
1063
|
+
readonly transform: Float32Array;
|
|
938
1064
|
}
|
|
939
1065
|
|
|
1066
|
+
/**
|
|
1067
|
+
* Flat result of `simplifyMeshes`: per surviving element `i`,
|
|
1068
|
+
* `vertexCounts[i]` vertices and `indexCounts[i]` indices taken in order
|
|
1069
|
+
* from the concatenated arrays (mirrors the `exportGlbFromMeshes` wire
|
|
1070
|
+
* convention). `localPositions` is 1:1 with `renderPositions` (f64, file
|
|
1071
|
+
* units, element object frame); `localIndices` is 1:1 with `renderIndices`
|
|
1072
|
+
* but in the IFC frame's winding. Skipped elements are reported in
|
|
1073
|
+
* `skippedIds` / `skippedReasons` and must keep their original geometry.
|
|
1074
|
+
*/
|
|
940
1075
|
export class SimplifiedMeshes {
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
1076
|
+
private constructor();
|
|
1077
|
+
free(): void;
|
|
1078
|
+
[Symbol.dispose](): void;
|
|
1079
|
+
readonly cavitiesDropped: Uint32Array;
|
|
1080
|
+
readonly elementIds: Uint32Array;
|
|
1081
|
+
readonly indexCounts: Uint32Array;
|
|
1082
|
+
readonly levels: Uint8Array;
|
|
1083
|
+
readonly localIndices: Uint32Array;
|
|
1084
|
+
readonly localPositions: Float64Array;
|
|
1085
|
+
readonly renderIndices: Uint32Array;
|
|
1086
|
+
readonly renderNormals: Float32Array;
|
|
1087
|
+
/**
|
|
1088
|
+
* xyz per element (frame matches the render positions' convention).
|
|
1089
|
+
*/
|
|
1090
|
+
readonly renderOrigins: Float64Array;
|
|
1091
|
+
readonly renderPositions: Float32Array;
|
|
1092
|
+
readonly skippedIds: Uint32Array;
|
|
1093
|
+
/**
|
|
1094
|
+
* Skip reason per `skippedIds` entry (stable slugs:
|
|
1095
|
+
* `no-geometry` / `missing-placement` / `singular-placement` /
|
|
1096
|
+
* `empty-result` / `invalid-unit-scale`).
|
|
1097
|
+
*/
|
|
1098
|
+
readonly skippedReasons: any[];
|
|
1099
|
+
readonly trisAfter: Uint32Array;
|
|
1100
|
+
readonly trisBefore: Uint32Array;
|
|
1101
|
+
readonly vertexCounts: Uint32Array;
|
|
967
1102
|
}
|
|
968
1103
|
|
|
1104
|
+
/**
|
|
1105
|
+
* A persistent, editable floor-plate topology. See the module docs.
|
|
1106
|
+
*/
|
|
969
1107
|
export class SpacePlateHandle {
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
+
free(): void;
|
|
1109
|
+
[Symbol.dispose](): void;
|
|
1110
|
+
/**
|
|
1111
|
+
* Author a new room from a flat ring `[x0, y0, x1, y1, …]` (no repeated
|
|
1112
|
+
* closing vertex). `source` `-1` marks a user-drawn room. Winding is
|
|
1113
|
+
* normalised to CCW; returns the new room patch. The room is its own
|
|
1114
|
+
* connected component — it does not merge into existing topology.
|
|
1115
|
+
*/
|
|
1116
|
+
addFace(coords: Float64Array, source: number): any;
|
|
1117
|
+
/**
|
|
1118
|
+
* Bounding half-edges of a face paired with their source element —
|
|
1119
|
+
* `[{ edge, source }, …]` — for `IfcRelSpaceBoundary` at bake.
|
|
1120
|
+
*/
|
|
1121
|
+
boundingElements(face: number): any;
|
|
1122
|
+
/**
|
|
1123
|
+
* Dissolve a degree-2 vertex, welding its two edges into one straight
|
|
1124
|
+
* edge between the neighbours — the inverse of `splitEdge`, and the
|
|
1125
|
+
* "delete this corner / node" affordance. Returns the rooms it changed.
|
|
1126
|
+
* Rejects a wall junction (degree ≥ 3) or a weld that would duplicate an
|
|
1127
|
+
* edge.
|
|
1128
|
+
*/
|
|
1129
|
+
dissolveVertex(v: number): any;
|
|
1130
|
+
/**
|
|
1131
|
+
* Move a vertex; returns the rooms it changed. A shared wall is one edge
|
|
1132
|
+
* whose endpoints are shared vertices, so one drag updates both rooms.
|
|
1133
|
+
*/
|
|
1134
|
+
dragVertex(v: number, x: number, y: number): any;
|
|
1135
|
+
/**
|
|
1136
|
+
* Deep-copy the plate for an undo/redo snapshot. The clone owns its own
|
|
1137
|
+
* heap; the caller must `.free()` it like any handle.
|
|
1138
|
+
*/
|
|
1139
|
+
duplicate(): SpacePlateHandle;
|
|
1140
|
+
/**
|
|
1141
|
+
* Absolute area (m²) of a face.
|
|
1142
|
+
*/
|
|
1143
|
+
faceArea(face: number): number;
|
|
1144
|
+
/**
|
|
1145
|
+
* Flat outline `[x0, y0, x1, y1, …]` of a face (no repeated closing vertex).
|
|
1146
|
+
*/
|
|
1147
|
+
faceOutline(face: number): Float64Array;
|
|
1148
|
+
/**
|
|
1149
|
+
* Nearest live vertex id to `(x, y)` within `tol`, or `undefined`.
|
|
1150
|
+
*/
|
|
1151
|
+
findVertexNear(x: number, y: number, tol: number): number | undefined;
|
|
1152
|
+
/**
|
|
1153
|
+
* FACE-BASED build: rooms are the gaps between wall footprint rectangles.
|
|
1154
|
+
* `rectCoords` is flat `[x0, y0, x1, y1, x2, y2, x3, y3, …]` — 8 f64 per wall
|
|
1155
|
+
* (its 4 plan-rectangle corners, CCW). A bounded arrangement face is a room
|
|
1156
|
+
* only if its centroid is outside every rectangle (a gap, not a wall
|
|
1157
|
+
* interior). The room outline IS the net (inner-face) area; `gapBoundary`
|
|
1158
|
+
* gives the centre axis (½ thickness) and the gross outer face.
|
|
1159
|
+
*/
|
|
1160
|
+
static fromWallRects(rect_coords: Float64Array, snap_tolerance: number, min_area: number): SpacePlateHandle;
|
|
1161
|
+
/**
|
|
1162
|
+
* Face-based gap-room boundary as flat `[x0, y0, …]`: each edge pushed
|
|
1163
|
+
* OUTWARD (into the wall) by `factor × the source wall's half-thickness`.
|
|
1164
|
+
* `0` → net (the gap / inner faces); `1` → centre axis (½ thickness, the
|
|
1165
|
+
* editable node line on the wall mid); `2` → gross outer face.
|
|
1166
|
+
*/
|
|
1167
|
+
gapBoundary(face: number, factor: number): Float64Array;
|
|
1168
|
+
/**
|
|
1169
|
+
* Remove a shared wall, unioning the two rooms it separated. Returns the
|
|
1170
|
+
* surviving room.
|
|
1171
|
+
*/
|
|
1172
|
+
mergeFaces(edge: number): any;
|
|
1173
|
+
/**
|
|
1174
|
+
* The room on the far side of a half-edge (its twin's face), or
|
|
1175
|
+
* `undefined`. O(1) — the "who's across this wall" query.
|
|
1176
|
+
*/
|
|
1177
|
+
neighborAcross(edge: number): number | undefined;
|
|
1178
|
+
/**
|
|
1179
|
+
* The face outline offset to a wall boundary, as flat `[x0, y0, …]`: each
|
|
1180
|
+
* edge is moved by its own wall's half-thickness — inward when `inset`
|
|
1181
|
+
* (the net / inner face), outward otherwise (the gross / outer face).
|
|
1182
|
+
* Shared room↔room edges are pinned when pushing outward. Falls back to the
|
|
1183
|
+
* centreline outline when no offset applies — so it's always a sane ring.
|
|
1184
|
+
* (For a `center` boundary just use `faceOutline`.)
|
|
1185
|
+
*/
|
|
1186
|
+
netOutline(face: number, inset: boolean): Float64Array;
|
|
1187
|
+
/**
|
|
1188
|
+
* Build a plate from flat wall-axis segments.
|
|
1189
|
+
*
|
|
1190
|
+
* `segCoords`: `[ax, ay, bx, by, …]` (length a multiple of 4).
|
|
1191
|
+
* `segSources`: one `i32` per segment, `-1` for none.
|
|
1192
|
+
* `segHalfThickness`: one `f64` per segment — half the wall's thickness in
|
|
1193
|
+
* metres, carried onto the derived edges for `netOutline`. Pass an empty
|
|
1194
|
+
* array (or all zeros) when thickness is unknown (centreline only).
|
|
1195
|
+
* `snapTolerance` / `minArea`: pass `<= 0` to take the defaults.
|
|
1196
|
+
*/
|
|
1197
|
+
constructor(seg_coords: Float64Array, seg_sources: Int32Array, seg_half_thickness: Float64Array, snap_tolerance: number, min_area: number);
|
|
1198
|
+
/**
|
|
1199
|
+
* Sweep the whole plate clean: remove dangling spur walls, isolated nodes,
|
|
1200
|
+
* and redundant collinear nodes — the "clean up orphans" / eraser action.
|
|
1201
|
+
* Area-neutral and idempotent. Returns how many topology elements were
|
|
1202
|
+
* pruned (0 = the plate was already clean); the caller re-renders via
|
|
1203
|
+
* `snapshot` like any other edit.
|
|
1204
|
+
*/
|
|
1205
|
+
prune(): number;
|
|
1206
|
+
/**
|
|
1207
|
+
* Remove a wall edge, choosing the right semantics from its two faces:
|
|
1208
|
+
* two real rooms → union them; a bridge / spur / outer-only wall → delete
|
|
1209
|
+
* it and auto-clean the orphaned inner lines and nodes it leaves; a real
|
|
1210
|
+
* enclosing wall (room ↔ exterior) → rejected (`BordersExterior`). This is
|
|
1211
|
+
* the "remove this wall and tidy up" affordance for the orphan cruft the
|
|
1212
|
+
* non-destructive wall arrangement leaves behind. Returns the rooms it
|
|
1213
|
+
* changed (empty if the edge bounded no room).
|
|
1214
|
+
*/
|
|
1215
|
+
removeEdge(edge: number): any;
|
|
1216
|
+
/**
|
|
1217
|
+
* Face ids of every live room.
|
|
1218
|
+
*/
|
|
1219
|
+
roomIds(): Uint32Array;
|
|
1220
|
+
/**
|
|
1221
|
+
* Set a face's floor / ceiling planes (the vertical dimension that turns a
|
|
1222
|
+
* 2D face into a prismatic space at bake).
|
|
1223
|
+
*/
|
|
1224
|
+
setFaceHeight(face: number, floor_z: number, ceiling_z: number, non_planar: boolean): void;
|
|
1225
|
+
/**
|
|
1226
|
+
* All live rooms as `{ face, area, simple, outline }` patches.
|
|
1227
|
+
*/
|
|
1228
|
+
snapshot(): any;
|
|
1229
|
+
/**
|
|
1230
|
+
* Insert a new vertex at `(x, y)` on edge `edge`, subdividing it (no new
|
|
1231
|
+
* face). Returns the new vertex id — use it as a `splitFace` endpoint to
|
|
1232
|
+
* cut between points that weren't existing corners. Project `(x, y)` onto
|
|
1233
|
+
* the edge to keep areas unchanged.
|
|
1234
|
+
*/
|
|
1235
|
+
splitEdge(edge: number, x: number, y: number): number;
|
|
1236
|
+
/**
|
|
1237
|
+
* Subdivide a face with a partition between two of its vertices. `source`
|
|
1238
|
+
* `-1` marks a brand-new partition (materialised as a fresh wall at bake).
|
|
1239
|
+
* Returns the kept face and the new face.
|
|
1240
|
+
*/
|
|
1241
|
+
splitFace(face: number, va: number, vb: number, source: number): any;
|
|
1242
|
+
/**
|
|
1243
|
+
* Number of live rooms.
|
|
1244
|
+
*/
|
|
1245
|
+
readonly roomCount: number;
|
|
1108
1246
|
}
|
|
1109
1247
|
|
|
1248
|
+
/**
|
|
1249
|
+
* A 2D circle/arc for symbolic representations
|
|
1250
|
+
*/
|
|
1110
1251
|
export class SymbolicCircle {
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1252
|
+
private constructor();
|
|
1253
|
+
free(): void;
|
|
1254
|
+
[Symbol.dispose](): void;
|
|
1255
|
+
readonly centerX: number;
|
|
1256
|
+
readonly centerY: number;
|
|
1257
|
+
readonly endAngle: number;
|
|
1258
|
+
readonly expressId: number;
|
|
1259
|
+
readonly ifcType: string;
|
|
1260
|
+
/**
|
|
1261
|
+
* Check if this is a full circle
|
|
1262
|
+
*/
|
|
1263
|
+
readonly isFullCircle: boolean;
|
|
1264
|
+
readonly radius: number;
|
|
1265
|
+
readonly repIdentifier: string;
|
|
1266
|
+
readonly startAngle: number;
|
|
1267
|
+
/**
|
|
1268
|
+
* World-Y elevation captured from the placement chain.
|
|
1269
|
+
*/
|
|
1270
|
+
readonly worldY: number;
|
|
1130
1271
|
}
|
|
1131
1272
|
|
|
1273
|
+
/**
|
|
1274
|
+
* A 2D filled region (IfcAnnotationFillArea / IfcAnnotationFillAreaOccurrence).
|
|
1275
|
+
*
|
|
1276
|
+
* Stores one outer ring of 2D points plus an offset table indexing inner
|
|
1277
|
+
* rings (holes). Both rings are stored flat in `points` so the JS side can
|
|
1278
|
+
* view the buffer as one Float32Array. The optional `hatch_*` fields encode
|
|
1279
|
+
* IfcFillAreaStyleHatching (line spacing, primary/secondary angles, line
|
|
1280
|
+
* width) when the IfcStyledItem chain resolves to a hatching style; absent
|
|
1281
|
+
* styles render as a solid fill.
|
|
1282
|
+
*
|
|
1283
|
+
* `holes_offsets` is an inclusive-prefix array describing where each hole
|
|
1284
|
+
* begins. The outer ring is implicitly at `points[0..holes_offsets[0]]`
|
|
1285
|
+
* (or all points if `holes_offsets` is empty). Each `holes_offsets[i]` is a
|
|
1286
|
+
* vertex index, not a byte offset.
|
|
1287
|
+
*/
|
|
1132
1288
|
export class SymbolicFillArea {
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1289
|
+
private constructor();
|
|
1290
|
+
free(): void;
|
|
1291
|
+
[Symbol.dispose](): void;
|
|
1292
|
+
readonly expressId: number;
|
|
1293
|
+
readonly fillA: number;
|
|
1294
|
+
readonly fillB: number;
|
|
1295
|
+
readonly fillG: number;
|
|
1296
|
+
readonly fillR: number;
|
|
1297
|
+
readonly hasHatching: boolean;
|
|
1298
|
+
readonly hatchAngle: number;
|
|
1299
|
+
readonly hatchAngleSecondary: number;
|
|
1300
|
+
readonly hatchLineWidth: number;
|
|
1301
|
+
readonly hatchSpacing: number;
|
|
1302
|
+
readonly holeCount: number;
|
|
1303
|
+
/**
|
|
1304
|
+
* Vertex indices marking the start of each hole. Empty = no holes.
|
|
1305
|
+
*/
|
|
1306
|
+
readonly holesOffsets: Uint32Array;
|
|
1307
|
+
readonly ifcType: string;
|
|
1308
|
+
readonly pointCount: number;
|
|
1309
|
+
/**
|
|
1310
|
+
* Flattened ring vertices.
|
|
1311
|
+
*/
|
|
1312
|
+
readonly points: Float32Array;
|
|
1313
|
+
readonly repIdentifier: string;
|
|
1314
|
+
readonly worldY: number;
|
|
1159
1315
|
}
|
|
1160
1316
|
|
|
1317
|
+
/**
|
|
1318
|
+
* A single 2D polyline for symbolic representations (Plan, Annotation, FootPrint)
|
|
1319
|
+
* Points are stored as [x1, y1, x2, y2, ...] in 2D coordinates
|
|
1320
|
+
*/
|
|
1161
1321
|
export class SymbolicPolyline {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1322
|
+
private constructor();
|
|
1323
|
+
free(): void;
|
|
1324
|
+
[Symbol.dispose](): void;
|
|
1325
|
+
/**
|
|
1326
|
+
* Get express ID of the parent element
|
|
1327
|
+
*/
|
|
1328
|
+
readonly expressId: number;
|
|
1329
|
+
/**
|
|
1330
|
+
* Get IFC type name (e.g., "IfcDoor", "IfcWindow")
|
|
1331
|
+
*/
|
|
1332
|
+
readonly ifcType: string;
|
|
1333
|
+
/**
|
|
1334
|
+
* Check if this is a closed loop
|
|
1335
|
+
*/
|
|
1336
|
+
readonly isClosed: boolean;
|
|
1337
|
+
/**
|
|
1338
|
+
* Get number of points
|
|
1339
|
+
*/
|
|
1340
|
+
readonly pointCount: number;
|
|
1341
|
+
/**
|
|
1342
|
+
* Get 2D points as Float32Array [x1, y1, x2, y2, ...]
|
|
1343
|
+
*/
|
|
1344
|
+
readonly points: Float32Array;
|
|
1345
|
+
/**
|
|
1346
|
+
* Get representation identifier ("Plan", "Annotation", "FootPrint", "Axis")
|
|
1347
|
+
*/
|
|
1348
|
+
readonly repIdentifier: string;
|
|
1349
|
+
/**
|
|
1350
|
+
* World-Y elevation captured from the placement chain (or first 3D
|
|
1351
|
+
* point's Z component). JS uses this as the canonical bucket key.
|
|
1352
|
+
*/
|
|
1353
|
+
readonly worldY: number;
|
|
1194
1354
|
}
|
|
1195
1355
|
|
|
1356
|
+
/**
|
|
1357
|
+
* Collection of symbolic representations for an IFC model
|
|
1358
|
+
*/
|
|
1196
1359
|
export class SymbolicRepresentationCollection {
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1360
|
+
private constructor();
|
|
1361
|
+
free(): void;
|
|
1362
|
+
[Symbol.dispose](): void;
|
|
1363
|
+
/**
|
|
1364
|
+
* Get circle at index
|
|
1365
|
+
*/
|
|
1366
|
+
getCircle(index: number): SymbolicCircle | undefined;
|
|
1367
|
+
/**
|
|
1368
|
+
* Get all express IDs that have symbolic representations
|
|
1369
|
+
*/
|
|
1370
|
+
getExpressIds(): Uint32Array;
|
|
1371
|
+
/**
|
|
1372
|
+
* Get fill area at index.
|
|
1373
|
+
*/
|
|
1374
|
+
getFill(index: number): SymbolicFillArea | undefined;
|
|
1375
|
+
/**
|
|
1376
|
+
* Get polyline at index
|
|
1377
|
+
*/
|
|
1378
|
+
getPolyline(index: number): SymbolicPolyline | undefined;
|
|
1379
|
+
/**
|
|
1380
|
+
* Get text annotation at index.
|
|
1381
|
+
*/
|
|
1382
|
+
getText(index: number): SymbolicText | undefined;
|
|
1383
|
+
/**
|
|
1384
|
+
* Get number of circles/arcs
|
|
1385
|
+
*/
|
|
1386
|
+
readonly circleCount: number;
|
|
1387
|
+
/**
|
|
1388
|
+
* Get number of fill areas
|
|
1389
|
+
*/
|
|
1390
|
+
readonly fillCount: number;
|
|
1391
|
+
/**
|
|
1392
|
+
* Check if collection is empty
|
|
1393
|
+
*/
|
|
1394
|
+
readonly isEmpty: boolean;
|
|
1395
|
+
/**
|
|
1396
|
+
* Get number of polylines
|
|
1397
|
+
*/
|
|
1398
|
+
readonly polylineCount: number;
|
|
1399
|
+
/**
|
|
1400
|
+
* Get number of text annotations
|
|
1401
|
+
*/
|
|
1402
|
+
readonly textCount: number;
|
|
1403
|
+
/**
|
|
1404
|
+
* Get total count of all symbolic items
|
|
1405
|
+
*/
|
|
1406
|
+
readonly totalCount: number;
|
|
1244
1407
|
}
|
|
1245
1408
|
|
|
1409
|
+
/**
|
|
1410
|
+
* A 2D text annotation (IfcTextLiteral / IfcTextLiteralWithExtent).
|
|
1411
|
+
*
|
|
1412
|
+
* Position is in the same 2D coordinate space as `SymbolicPolyline` (i.e. the
|
|
1413
|
+
* floor-plan / annotation overlay's local frame after applying placement +
|
|
1414
|
+
* RTC). The text-orientation pair `(cos, sin)` rotates the baseline from the
|
|
1415
|
+
* `+x` axis. Height is the IFC font height in model units, scaled by the
|
|
1416
|
+
* project's length-unit factor so the renderer can convert directly to world
|
|
1417
|
+
* units. Alignment is the IFC `BoxAlignment` string verbatim
|
|
1418
|
+
* (`top-left`, `center`, `bottom-right`, …) — the renderer can interpret it.
|
|
1419
|
+
*/
|
|
1246
1420
|
export class SymbolicText {
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1421
|
+
private constructor();
|
|
1422
|
+
free(): void;
|
|
1423
|
+
[Symbol.dispose](): void;
|
|
1424
|
+
readonly alignment: string;
|
|
1425
|
+
readonly colorA: number;
|
|
1426
|
+
readonly colorB: number;
|
|
1427
|
+
readonly colorG: number;
|
|
1428
|
+
readonly colorR: number;
|
|
1429
|
+
readonly content: string;
|
|
1430
|
+
readonly dirX: number;
|
|
1431
|
+
readonly dirY: number;
|
|
1432
|
+
readonly expressId: number;
|
|
1433
|
+
readonly height: number;
|
|
1434
|
+
readonly ifcType: string;
|
|
1435
|
+
readonly repIdentifier: string;
|
|
1436
|
+
readonly targetPx: number;
|
|
1437
|
+
readonly worldY: number;
|
|
1438
|
+
readonly x: number;
|
|
1439
|
+
readonly y: number;
|
|
1266
1440
|
}
|
|
1267
1441
|
|
|
1442
|
+
/**
|
|
1443
|
+
* `a - b`, keeping EVERY disjoint remnant.
|
|
1444
|
+
*
|
|
1445
|
+
* This is the operation the existing `subtract_2d` could not stand in for: it
|
|
1446
|
+
* returns one shape per island, where `subtract_2d` collapses to the largest
|
|
1447
|
+
* (correct for a single extrusion profile, silent geometry loss anywhere else).
|
|
1448
|
+
*
|
|
1449
|
+
* `b` may hold any number of rings; they subtract as their union, so there is
|
|
1450
|
+
* no separate "difference against many" entry point.
|
|
1451
|
+
*/
|
|
1452
|
+
export function difference2d(a: Contours2D, b: Contours2D): Contours2D;
|
|
1453
|
+
|
|
1268
1454
|
/**
|
|
1269
1455
|
* Get WASM memory to allow JavaScript to create TypedArray views
|
|
1270
1456
|
*/
|
|
@@ -1278,6 +1464,11 @@ export function get_memory(): any;
|
|
|
1278
1464
|
*/
|
|
1279
1465
|
export function init(): void;
|
|
1280
1466
|
|
|
1467
|
+
/**
|
|
1468
|
+
* `a ∩ b`.
|
|
1469
|
+
*/
|
|
1470
|
+
export function intersection2d(a: Contours2D, b: Contours2D): Contours2D;
|
|
1471
|
+
|
|
1281
1472
|
/**
|
|
1282
1473
|
* Compute the winding-robust 2D footprint outline of a triangle mesh.
|
|
1283
1474
|
*
|
|
@@ -1297,6 +1488,18 @@ export function init(): void;
|
|
|
1297
1488
|
*/
|
|
1298
1489
|
export function meshOutline2d(positions: Float32Array, indices: Uint32Array, axis: number, flipped: boolean): MeshOutlineJs | undefined;
|
|
1299
1490
|
|
|
1491
|
+
/**
|
|
1492
|
+
* Resolve a ring soup into disjoint outer/hole shapes without changing the
|
|
1493
|
+
* area it covers (a self-union). Use it to give a hand-built set — or a
|
|
1494
|
+
* `meshOutline2d` result — the shape grouping the operations produce.
|
|
1495
|
+
*/
|
|
1496
|
+
export function resolve2d(a: Contours2D): Contours2D;
|
|
1497
|
+
|
|
1498
|
+
/**
|
|
1499
|
+
* `a ∪ b`.
|
|
1500
|
+
*/
|
|
1501
|
+
export function union2d(a: Contours2D, b: Contours2D): Contours2D;
|
|
1502
|
+
|
|
1300
1503
|
/**
|
|
1301
1504
|
* Get the version of IFC-Lite.
|
|
1302
1505
|
*
|
|
@@ -1315,274 +1518,289 @@ export function version(): string;
|
|
|
1315
1518
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
1316
1519
|
|
|
1317
1520
|
export interface InitOutput {
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1521
|
+
readonly memory: WebAssembly.Memory;
|
|
1522
|
+
readonly __wbg_clashrunresult_free: (a: number, b: number) => void;
|
|
1523
|
+
readonly __wbg_clashsession_free: (a: number, b: number) => void;
|
|
1524
|
+
readonly __wbg_contours2d_free: (a: number, b: number) => void;
|
|
1525
|
+
readonly __wbg_gridaxiscollection_free: (a: number, b: number) => void;
|
|
1526
|
+
readonly __wbg_gridaxisjs_free: (a: number, b: number) => void;
|
|
1527
|
+
readonly __wbg_ifcapi_free: (a: number, b: number) => void;
|
|
1528
|
+
readonly __wbg_meshcollection_free: (a: number, b: number) => void;
|
|
1529
|
+
readonly __wbg_meshdatajs_free: (a: number, b: number) => void;
|
|
1530
|
+
readonly __wbg_meshoutlinejs_free: (a: number, b: number) => void;
|
|
1531
|
+
readonly __wbg_partitionedbatch_free: (a: number, b: number) => void;
|
|
1532
|
+
readonly __wbg_profilecollection_free: (a: number, b: number) => void;
|
|
1533
|
+
readonly __wbg_profileentryjs_free: (a: number, b: number) => void;
|
|
1534
|
+
readonly __wbg_simplifiedmeshes_free: (a: number, b: number) => void;
|
|
1535
|
+
readonly __wbg_spaceplatehandle_free: (a: number, b: number) => void;
|
|
1536
|
+
readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
|
|
1537
|
+
readonly __wbg_symbolicfillarea_free: (a: number, b: number) => void;
|
|
1538
|
+
readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
|
|
1539
|
+
readonly __wbg_symbolicrepresentationcollection_free: (a: number, b: number) => void;
|
|
1540
|
+
readonly __wbg_symbolictext_free: (a: number, b: number) => void;
|
|
1541
|
+
readonly clashrunresult_a: (a: number, b: number) => void;
|
|
1542
|
+
readonly clashrunresult_b: (a: number, b: number) => void;
|
|
1543
|
+
readonly clashrunresult_bounds: (a: number, b: number) => void;
|
|
1544
|
+
readonly clashrunresult_distance: (a: number, b: number) => void;
|
|
1545
|
+
readonly clashrunresult_points: (a: number, b: number) => void;
|
|
1546
|
+
readonly clashrunresult_status: (a: number, b: number) => void;
|
|
1547
|
+
readonly clashsession_ingest: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
1548
|
+
readonly clashsession_new: () => number;
|
|
1549
|
+
readonly clashsession_runRule: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
|
|
1550
|
+
readonly contours2d_bounds: (a: number) => number;
|
|
1551
|
+
readonly contours2d_coords: (a: number) => number;
|
|
1552
|
+
readonly contours2d_fromMeshOutline: (a: number) => number;
|
|
1553
|
+
readonly contours2d_isEmpty: (a: number) => number;
|
|
1554
|
+
readonly contours2d_new: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1555
|
+
readonly contours2d_ring: (a: number, b: number) => number;
|
|
1556
|
+
readonly contours2d_ringCount: (a: number) => number;
|
|
1557
|
+
readonly contours2d_ringLengths: (a: number) => number;
|
|
1558
|
+
readonly contours2d_shapeCount: (a: number) => number;
|
|
1559
|
+
readonly contours2d_shapeOffsets: (a: number) => number;
|
|
1560
|
+
readonly difference2d: (a: number, b: number) => number;
|
|
1561
|
+
readonly gridaxiscollection_getAxis: (a: number, b: number) => number;
|
|
1562
|
+
readonly gridaxiscollection_isEmpty: (a: number) => number;
|
|
1563
|
+
readonly gridaxiscollection_length: (a: number) => number;
|
|
1564
|
+
readonly gridaxisjs_axisId: (a: number) => number;
|
|
1565
|
+
readonly gridaxisjs_end: (a: number) => number;
|
|
1566
|
+
readonly gridaxisjs_gridId: (a: number) => number;
|
|
1567
|
+
readonly gridaxisjs_start: (a: number) => number;
|
|
1568
|
+
readonly gridaxisjs_tag: (a: number, b: number) => void;
|
|
1569
|
+
readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
|
|
1570
|
+
readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
1571
|
+
readonly ifcapi_buildPrePassStreamingSharded: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number) => void;
|
|
1572
|
+
readonly ifcapi_clearPrePassCache: (a: number) => void;
|
|
1573
|
+
readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
|
|
1574
|
+
readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
1575
|
+
readonly ifcapi_exportGlb: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number) => void;
|
|
1576
|
+
readonly ifcapi_exportGlbFromMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number) => void;
|
|
1577
|
+
readonly ifcapi_exportHbjson: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1578
|
+
readonly ifcapi_exportIfcx: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1579
|
+
readonly ifcapi_exportJson: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
1580
|
+
readonly ifcapi_exportJsonld: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => void;
|
|
1581
|
+
readonly ifcapi_exportKmz: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
|
|
1582
|
+
readonly ifcapi_exportKmzFromMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number) => void;
|
|
1583
|
+
readonly ifcapi_exportMerged: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
1584
|
+
readonly ifcapi_exportObj: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
1585
|
+
readonly ifcapi_exportStep: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => void;
|
|
1586
|
+
readonly ifcapi_extractProfiles: (a: number, b: number, c: number, d: number) => number;
|
|
1587
|
+
readonly ifcapi_finalizePrepassStyles: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number) => void;
|
|
1588
|
+
readonly ifcapi_getMemory: (a: number) => number;
|
|
1589
|
+
readonly ifcapi_getPipelineDiagnostics: (a: number) => number;
|
|
1590
|
+
readonly ifcapi_is_ready: (a: number) => number;
|
|
1591
|
+
readonly ifcapi_new: () => number;
|
|
1592
|
+
readonly ifcapi_parseAlignmentLines: (a: number, b: number, c: number) => number;
|
|
1593
|
+
readonly ifcapi_parseGridAxes: (a: number, b: number, c: number) => number;
|
|
1594
|
+
readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
|
|
1595
|
+
readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
|
|
1596
|
+
readonly ifcapi_processGeometryBatch: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number) => number;
|
|
1597
|
+
readonly ifcapi_processGeometryBatchFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number) => number;
|
|
1598
|
+
readonly ifcapi_processGeometryBatchInstanced: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number) => void;
|
|
1599
|
+
readonly ifcapi_processGeometryBatchPartitioned: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number) => number;
|
|
1600
|
+
readonly ifcapi_processGeometryBatchPartitionedFromSource: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number) => number;
|
|
1601
|
+
readonly ifcapi_resolveStyledItemsShard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1602
|
+
readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
|
|
1603
|
+
readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
|
|
1604
|
+
readonly ifcapi_scanEntityIndexShard: (a: number, b: number, c: number, d: number, e: number) => number;
|
|
1605
|
+
readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
|
|
1606
|
+
readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
|
|
1607
|
+
readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
1608
|
+
readonly ifcapi_setInstantiatedTypeIds: (a: number, b: number, c: number) => void;
|
|
1609
|
+
readonly ifcapi_setMappedInstancePlan: (a: number, b: number, c: number) => void;
|
|
1610
|
+
readonly ifcapi_setMaterialLayerIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number) => void;
|
|
1611
|
+
readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
|
|
1612
|
+
readonly ifcapi_setRectParamFastPath: (a: number, b: number) => void;
|
|
1613
|
+
readonly ifcapi_setReferencedRepmaps: (a: number, b: number, c: number) => void;
|
|
1614
|
+
readonly ifcapi_setSkipSmallCuts: (a: number, b: number) => void;
|
|
1615
|
+
readonly ifcapi_setSourceBytes: (a: number, b: number, c: number) => void;
|
|
1616
|
+
readonly ifcapi_setTessellationQuality: (a: number, b: number, c: number, d: number) => void;
|
|
1617
|
+
readonly ifcapi_simplifyMeshes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number) => void;
|
|
1618
|
+
readonly ifcapi_version: (a: number, b: number) => void;
|
|
1619
|
+
readonly intersection2d: (a: number, b: number) => number;
|
|
1620
|
+
readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
|
1621
|
+
readonly meshcollection_buildingRotation: (a: number, b: number) => void;
|
|
1622
|
+
readonly meshcollection_diagnostics: (a: number) => number;
|
|
1623
|
+
readonly meshcollection_geometryHashCount: (a: number) => number;
|
|
1624
|
+
readonly meshcollection_geometryHashIds: (a: number) => number;
|
|
1625
|
+
readonly meshcollection_geometryHashValues: (a: number) => number;
|
|
1626
|
+
readonly meshcollection_get: (a: number, b: number) => number;
|
|
1627
|
+
readonly meshcollection_hasRtcOffset: (a: number) => number;
|
|
1628
|
+
readonly meshcollection_length: (a: number) => number;
|
|
1629
|
+
readonly meshcollection_rtcOffsetX: (a: number) => number;
|
|
1630
|
+
readonly meshcollection_rtcOffsetY: (a: number) => number;
|
|
1631
|
+
readonly meshcollection_rtcOffsetZ: (a: number) => number;
|
|
1632
|
+
readonly meshcollection_takeMesh: (a: number, b: number) => number;
|
|
1633
|
+
readonly meshcollection_totalTriangles: (a: number) => number;
|
|
1634
|
+
readonly meshcollection_totalVertices: (a: number) => number;
|
|
1635
|
+
readonly meshdatajs_color: (a: number, b: number) => void;
|
|
1636
|
+
readonly meshdatajs_expressId: (a: number) => number;
|
|
1637
|
+
readonly meshdatajs_geometryClass: (a: number) => number;
|
|
1638
|
+
readonly meshdatajs_hasTexture: (a: number) => number;
|
|
1639
|
+
readonly meshdatajs_ifcType: (a: number, b: number) => void;
|
|
1640
|
+
readonly meshdatajs_indices: (a: number) => number;
|
|
1641
|
+
readonly meshdatajs_localBounds: (a: number, b: number) => void;
|
|
1642
|
+
readonly meshdatajs_localToWorld: (a: number, b: number) => void;
|
|
1643
|
+
readonly meshdatajs_normals: (a: number) => number;
|
|
1644
|
+
readonly meshdatajs_origin: (a: number) => number;
|
|
1645
|
+
readonly meshdatajs_positions: (a: number) => number;
|
|
1646
|
+
readonly meshdatajs_shadingColor: (a: number, b: number) => void;
|
|
1647
|
+
readonly meshdatajs_textureHeight: (a: number) => number;
|
|
1648
|
+
readonly meshdatajs_textureId: (a: number) => number;
|
|
1649
|
+
readonly meshdatajs_textureRepeatS: (a: number) => number;
|
|
1650
|
+
readonly meshdatajs_textureRepeatT: (a: number) => number;
|
|
1651
|
+
readonly meshdatajs_textureRgba: (a: number) => number;
|
|
1652
|
+
readonly meshdatajs_textureUrl: (a: number, b: number) => void;
|
|
1653
|
+
readonly meshdatajs_textureWidth: (a: number) => number;
|
|
1654
|
+
readonly meshdatajs_triangleCount: (a: number) => number;
|
|
1655
|
+
readonly meshdatajs_uvs: (a: number) => number;
|
|
1656
|
+
readonly meshdatajs_vertexCount: (a: number) => number;
|
|
1657
|
+
readonly meshoutlinejs_axisMax: (a: number) => number;
|
|
1658
|
+
readonly meshoutlinejs_axisMin: (a: number) => number;
|
|
1659
|
+
readonly meshoutlinejs_contour: (a: number, b: number) => number;
|
|
1660
|
+
readonly partitionedbatch_instancedOccurrences: (a: number) => number;
|
|
1661
|
+
readonly partitionedbatch_takeMeshes: (a: number) => number;
|
|
1662
|
+
readonly partitionedbatch_takeShard: (a: number, b: number) => void;
|
|
1663
|
+
readonly profilecollection_get: (a: number, b: number) => number;
|
|
1664
|
+
readonly profilecollection_length: (a: number) => number;
|
|
1665
|
+
readonly profileentryjs_expressId: (a: number) => number;
|
|
1666
|
+
readonly profileentryjs_extrusionDepth: (a: number) => number;
|
|
1667
|
+
readonly profileentryjs_extrusionDir: (a: number) => number;
|
|
1668
|
+
readonly profileentryjs_holeCounts: (a: number) => number;
|
|
1669
|
+
readonly profileentryjs_holePoints: (a: number) => number;
|
|
1670
|
+
readonly profileentryjs_ifcType: (a: number, b: number) => void;
|
|
1671
|
+
readonly profileentryjs_modelIndex: (a: number) => number;
|
|
1672
|
+
readonly profileentryjs_outerPoints: (a: number) => number;
|
|
1673
|
+
readonly profileentryjs_transform: (a: number) => number;
|
|
1674
|
+
readonly resolve2d: (a: number) => number;
|
|
1675
|
+
readonly simplifiedmeshes_cavitiesDropped: (a: number, b: number) => void;
|
|
1676
|
+
readonly simplifiedmeshes_elementIds: (a: number, b: number) => void;
|
|
1677
|
+
readonly simplifiedmeshes_indexCounts: (a: number, b: number) => void;
|
|
1678
|
+
readonly simplifiedmeshes_levels: (a: number, b: number) => void;
|
|
1679
|
+
readonly simplifiedmeshes_localIndices: (a: number, b: number) => void;
|
|
1680
|
+
readonly simplifiedmeshes_localPositions: (a: number, b: number) => void;
|
|
1681
|
+
readonly simplifiedmeshes_renderIndices: (a: number, b: number) => void;
|
|
1682
|
+
readonly simplifiedmeshes_renderNormals: (a: number, b: number) => void;
|
|
1683
|
+
readonly simplifiedmeshes_renderOrigins: (a: number, b: number) => void;
|
|
1684
|
+
readonly simplifiedmeshes_renderPositions: (a: number, b: number) => void;
|
|
1685
|
+
readonly simplifiedmeshes_skippedIds: (a: number, b: number) => void;
|
|
1686
|
+
readonly simplifiedmeshes_skippedReasons: (a: number, b: number) => void;
|
|
1687
|
+
readonly simplifiedmeshes_trisAfter: (a: number, b: number) => void;
|
|
1688
|
+
readonly simplifiedmeshes_trisBefore: (a: number, b: number) => void;
|
|
1689
|
+
readonly simplifiedmeshes_vertexCounts: (a: number, b: number) => void;
|
|
1690
|
+
readonly spaceplatehandle_addFace: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1691
|
+
readonly spaceplatehandle_boundingElements: (a: number, b: number, c: number) => void;
|
|
1692
|
+
readonly spaceplatehandle_dissolveVertex: (a: number, b: number, c: number) => void;
|
|
1693
|
+
readonly spaceplatehandle_dragVertex: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1694
|
+
readonly spaceplatehandle_duplicate: (a: number) => number;
|
|
1695
|
+
readonly spaceplatehandle_faceArea: (a: number, b: number) => number;
|
|
1696
|
+
readonly spaceplatehandle_faceOutline: (a: number, b: number, c: number) => void;
|
|
1697
|
+
readonly spaceplatehandle_findVertexNear: (a: number, b: number, c: number, d: number) => number;
|
|
1698
|
+
readonly spaceplatehandle_fromWallRects: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1699
|
+
readonly spaceplatehandle_gapBoundary: (a: number, b: number, c: number, d: number) => void;
|
|
1700
|
+
readonly spaceplatehandle_mergeFaces: (a: number, b: number, c: number) => void;
|
|
1701
|
+
readonly spaceplatehandle_neighborAcross: (a: number, b: number) => number;
|
|
1702
|
+
readonly spaceplatehandle_netOutline: (a: number, b: number, c: number, d: number) => void;
|
|
1703
|
+
readonly spaceplatehandle_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
1704
|
+
readonly spaceplatehandle_prune: (a: number) => number;
|
|
1705
|
+
readonly spaceplatehandle_removeEdge: (a: number, b: number, c: number) => void;
|
|
1706
|
+
readonly spaceplatehandle_roomCount: (a: number) => number;
|
|
1707
|
+
readonly spaceplatehandle_roomIds: (a: number, b: number) => void;
|
|
1708
|
+
readonly spaceplatehandle_setFaceHeight: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1709
|
+
readonly spaceplatehandle_snapshot: (a: number, b: number) => void;
|
|
1710
|
+
readonly spaceplatehandle_splitEdge: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
1711
|
+
readonly spaceplatehandle_splitFace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
1712
|
+
readonly symboliccircle_centerX: (a: number) => number;
|
|
1713
|
+
readonly symboliccircle_centerY: (a: number) => number;
|
|
1714
|
+
readonly symboliccircle_endAngle: (a: number) => number;
|
|
1715
|
+
readonly symboliccircle_expressId: (a: number) => number;
|
|
1716
|
+
readonly symboliccircle_ifcType: (a: number, b: number) => void;
|
|
1717
|
+
readonly symboliccircle_isFullCircle: (a: number) => number;
|
|
1718
|
+
readonly symboliccircle_radius: (a: number) => number;
|
|
1719
|
+
readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
|
|
1720
|
+
readonly symboliccircle_startAngle: (a: number) => number;
|
|
1721
|
+
readonly symboliccircle_worldY: (a: number) => number;
|
|
1722
|
+
readonly symbolicfillarea_fillA: (a: number) => number;
|
|
1723
|
+
readonly symbolicfillarea_fillB: (a: number) => number;
|
|
1724
|
+
readonly symbolicfillarea_fillG: (a: number) => number;
|
|
1725
|
+
readonly symbolicfillarea_fillR: (a: number) => number;
|
|
1726
|
+
readonly symbolicfillarea_hasHatching: (a: number) => number;
|
|
1727
|
+
readonly symbolicfillarea_hatchAngle: (a: number) => number;
|
|
1728
|
+
readonly symbolicfillarea_hatchAngleSecondary: (a: number) => number;
|
|
1729
|
+
readonly symbolicfillarea_hatchLineWidth: (a: number) => number;
|
|
1730
|
+
readonly symbolicfillarea_hatchSpacing: (a: number) => number;
|
|
1731
|
+
readonly symbolicfillarea_holeCount: (a: number) => number;
|
|
1732
|
+
readonly symbolicfillarea_holesOffsets: (a: number) => number;
|
|
1733
|
+
readonly symbolicfillarea_ifcType: (a: number, b: number) => void;
|
|
1734
|
+
readonly symbolicfillarea_pointCount: (a: number) => number;
|
|
1735
|
+
readonly symbolicfillarea_points: (a: number) => number;
|
|
1736
|
+
readonly symbolicfillarea_repIdentifier: (a: number, b: number) => void;
|
|
1737
|
+
readonly symbolicfillarea_worldY: (a: number) => number;
|
|
1738
|
+
readonly symbolicpolyline_expressId: (a: number) => number;
|
|
1739
|
+
readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
|
|
1740
|
+
readonly symbolicpolyline_isClosed: (a: number) => number;
|
|
1741
|
+
readonly symbolicpolyline_points: (a: number) => number;
|
|
1742
|
+
readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
|
|
1743
|
+
readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
|
|
1744
|
+
readonly symbolicrepresentationcollection_fillCount: (a: number) => number;
|
|
1745
|
+
readonly symbolicrepresentationcollection_getCircle: (a: number, b: number) => number;
|
|
1746
|
+
readonly symbolicrepresentationcollection_getExpressIds: (a: number, b: number) => void;
|
|
1747
|
+
readonly symbolicrepresentationcollection_getFill: (a: number, b: number) => number;
|
|
1748
|
+
readonly symbolicrepresentationcollection_getPolyline: (a: number, b: number) => number;
|
|
1749
|
+
readonly symbolicrepresentationcollection_getText: (a: number, b: number) => number;
|
|
1750
|
+
readonly symbolicrepresentationcollection_isEmpty: (a: number) => number;
|
|
1751
|
+
readonly symbolicrepresentationcollection_polylineCount: (a: number) => number;
|
|
1752
|
+
readonly symbolicrepresentationcollection_textCount: (a: number) => number;
|
|
1753
|
+
readonly symbolicrepresentationcollection_totalCount: (a: number) => number;
|
|
1754
|
+
readonly symbolictext_alignment: (a: number, b: number) => void;
|
|
1755
|
+
readonly symbolictext_colorA: (a: number) => number;
|
|
1756
|
+
readonly symbolictext_content: (a: number, b: number) => void;
|
|
1757
|
+
readonly symbolictext_ifcType: (a: number, b: number) => void;
|
|
1758
|
+
readonly symbolictext_repIdentifier: (a: number, b: number) => void;
|
|
1759
|
+
readonly symbolictext_targetPx: (a: number) => number;
|
|
1760
|
+
readonly union2d: (a: number, b: number) => number;
|
|
1761
|
+
readonly version: (a: number) => void;
|
|
1762
|
+
readonly init: () => void;
|
|
1763
|
+
readonly meshoutlinejs_contourCount: (a: number) => number;
|
|
1764
|
+
readonly symbolicpolyline_pointCount: (a: number) => number;
|
|
1765
|
+
readonly get_memory: () => number;
|
|
1766
|
+
readonly symbolicfillarea_expressId: (a: number) => number;
|
|
1767
|
+
readonly symbolicpolyline_worldY: (a: number) => number;
|
|
1768
|
+
readonly symbolictext_colorB: (a: number) => number;
|
|
1769
|
+
readonly symbolictext_colorG: (a: number) => number;
|
|
1770
|
+
readonly symbolictext_colorR: (a: number) => number;
|
|
1771
|
+
readonly symbolictext_dirX: (a: number) => number;
|
|
1772
|
+
readonly symbolictext_dirY: (a: number) => number;
|
|
1773
|
+
readonly symbolictext_expressId: (a: number) => number;
|
|
1774
|
+
readonly symbolictext_height: (a: number) => number;
|
|
1775
|
+
readonly symbolictext_worldY: (a: number) => number;
|
|
1776
|
+
readonly symbolictext_x: (a: number) => number;
|
|
1777
|
+
readonly symbolictext_y: (a: number) => number;
|
|
1778
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
1779
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
1780
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
1781
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
1782
|
+
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
1783
|
+
readonly __wbindgen_start: () => void;
|
|
1566
1784
|
}
|
|
1567
1785
|
|
|
1568
1786
|
export type SyncInitInput = BufferSource | WebAssembly.Module;
|
|
1569
1787
|
|
|
1570
1788
|
/**
|
|
1571
|
-
* Instantiates the given `module`, which can either be bytes or
|
|
1572
|
-
* a precompiled `WebAssembly.Module`.
|
|
1573
|
-
*
|
|
1574
|
-
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1575
|
-
*
|
|
1576
|
-
* @returns {InitOutput}
|
|
1577
|
-
*/
|
|
1789
|
+
* Instantiates the given `module`, which can either be bytes or
|
|
1790
|
+
* a precompiled `WebAssembly.Module`.
|
|
1791
|
+
*
|
|
1792
|
+
* @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
|
|
1793
|
+
*
|
|
1794
|
+
* @returns {InitOutput}
|
|
1795
|
+
*/
|
|
1578
1796
|
export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
|
|
1579
1797
|
|
|
1580
1798
|
/**
|
|
1581
|
-
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1582
|
-
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1583
|
-
*
|
|
1584
|
-
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1585
|
-
*
|
|
1586
|
-
* @returns {Promise<InitOutput>}
|
|
1587
|
-
*/
|
|
1799
|
+
* If `module_or_path` is {RequestInfo} or {URL}, makes a request and
|
|
1800
|
+
* for everything else, calls `WebAssembly.instantiate` directly.
|
|
1801
|
+
*
|
|
1802
|
+
* @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
|
|
1803
|
+
*
|
|
1804
|
+
* @returns {Promise<InitOutput>}
|
|
1805
|
+
*/
|
|
1588
1806
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|