@ifc-lite/wasm 2.4.1 → 2.5.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 +100 -7
- package/pkg/ifc-lite.js +372 -71
- package/pkg/ifc-lite_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -538,6 +538,86 @@ export class ProfileEntryJs {
|
|
|
538
538
|
readonly transform: Float32Array;
|
|
539
539
|
}
|
|
540
540
|
|
|
541
|
+
export class SpacePlateHandle {
|
|
542
|
+
free(): void;
|
|
543
|
+
[Symbol.dispose](): void;
|
|
544
|
+
/**
|
|
545
|
+
* Insert a new vertex at `(x, y)` on edge `edge`, subdividing it (no new
|
|
546
|
+
* face). Returns the new vertex id — use it as a `splitFace` endpoint to
|
|
547
|
+
* cut between points that weren't existing corners. Project `(x, y)` onto
|
|
548
|
+
* the edge to keep areas unchanged.
|
|
549
|
+
*/
|
|
550
|
+
splitEdge(edge: number, x: number, y: number): number;
|
|
551
|
+
/**
|
|
552
|
+
* Subdivide a face with a partition between two of its vertices. `source`
|
|
553
|
+
* `-1` marks a brand-new partition (materialised as a fresh wall at bake).
|
|
554
|
+
* Returns the kept face and the new face.
|
|
555
|
+
*/
|
|
556
|
+
splitFace(face: number, va: number, vb: number, source: number): any;
|
|
557
|
+
/**
|
|
558
|
+
* Move a vertex; returns the rooms it changed. A shared wall is one edge
|
|
559
|
+
* whose endpoints are shared vertices, so one drag updates both rooms.
|
|
560
|
+
*/
|
|
561
|
+
dragVertex(v: number, x: number, y: number): any;
|
|
562
|
+
/**
|
|
563
|
+
* Remove a shared wall, unioning the two rooms it separated. Returns the
|
|
564
|
+
* surviving room.
|
|
565
|
+
*/
|
|
566
|
+
mergeFaces(edge: number): any;
|
|
567
|
+
/**
|
|
568
|
+
* Flat outline `[x0, y0, x1, y1, …]` of a face (no repeated closing vertex).
|
|
569
|
+
*/
|
|
570
|
+
faceOutline(face: number): Float64Array;
|
|
571
|
+
/**
|
|
572
|
+
* The room on the far side of a half-edge (its twin's face), or
|
|
573
|
+
* `undefined`. O(1) — the "who's across this wall" query.
|
|
574
|
+
*/
|
|
575
|
+
neighborAcross(edge: number): number | undefined;
|
|
576
|
+
/**
|
|
577
|
+
* Set a face's floor / ceiling planes (the vertical dimension that turns a
|
|
578
|
+
* 2D face into a prismatic space at bake).
|
|
579
|
+
*/
|
|
580
|
+
setFaceHeight(face: number, floor_z: number, ceiling_z: number, non_planar: boolean): void;
|
|
581
|
+
/**
|
|
582
|
+
* Nearest live vertex id to `(x, y)` within `tol`, or `undefined`.
|
|
583
|
+
*/
|
|
584
|
+
findVertexNear(x: number, y: number, tol: number): number | undefined;
|
|
585
|
+
/**
|
|
586
|
+
* Bounding half-edges of a face paired with their source element —
|
|
587
|
+
* `[{ edge, source }, …]` — for `IfcRelSpaceBoundary` at bake.
|
|
588
|
+
*/
|
|
589
|
+
boundingElements(face: number): any;
|
|
590
|
+
/**
|
|
591
|
+
* Build a plate from flat wall-axis segments.
|
|
592
|
+
*
|
|
593
|
+
* `segCoords`: `[ax, ay, bx, by, …]` (length a multiple of 4).
|
|
594
|
+
* `segSources`: one `i32` per segment, `-1` for none.
|
|
595
|
+
* `snapTolerance` / `minArea`: pass `<= 0` to take the defaults.
|
|
596
|
+
*/
|
|
597
|
+
constructor(seg_coords: Float64Array, seg_sources: Int32Array, snap_tolerance: number, min_area: number);
|
|
598
|
+
/**
|
|
599
|
+
* Face ids of every live room.
|
|
600
|
+
*/
|
|
601
|
+
roomIds(): Uint32Array;
|
|
602
|
+
/**
|
|
603
|
+
* All live rooms as `{ face, area, simple, outline }` patches.
|
|
604
|
+
*/
|
|
605
|
+
snapshot(): any;
|
|
606
|
+
/**
|
|
607
|
+
* Deep-copy the plate for an undo/redo snapshot. The clone owns its own
|
|
608
|
+
* heap; the caller must `.free()` it like any handle.
|
|
609
|
+
*/
|
|
610
|
+
duplicate(): SpacePlateHandle;
|
|
611
|
+
/**
|
|
612
|
+
* Absolute area (m²) of a face.
|
|
613
|
+
*/
|
|
614
|
+
faceArea(face: number): number;
|
|
615
|
+
/**
|
|
616
|
+
* Number of live rooms.
|
|
617
|
+
*/
|
|
618
|
+
readonly roomCount: number;
|
|
619
|
+
}
|
|
620
|
+
|
|
541
621
|
export class SymbolicCircle {
|
|
542
622
|
private constructor();
|
|
543
623
|
free(): void;
|
|
@@ -757,6 +837,7 @@ export interface InitOutput {
|
|
|
757
837
|
readonly __wbg_meshoutlinejs_free: (a: number, b: number) => void;
|
|
758
838
|
readonly __wbg_profilecollection_free: (a: number, b: number) => void;
|
|
759
839
|
readonly __wbg_profileentryjs_free: (a: number, b: number) => void;
|
|
840
|
+
readonly __wbg_spaceplatehandle_free: (a: number, b: number) => void;
|
|
760
841
|
readonly __wbg_symboliccircle_free: (a: number, b: number) => void;
|
|
761
842
|
readonly __wbg_symbolicfillarea_free: (a: number, b: number) => void;
|
|
762
843
|
readonly __wbg_symbolicpolyline_free: (a: number, b: number) => void;
|
|
@@ -848,6 +929,21 @@ export interface InitOutput {
|
|
|
848
929
|
readonly profileentryjs_modelIndex: (a: number) => number;
|
|
849
930
|
readonly profileentryjs_outerPoints: (a: number) => number;
|
|
850
931
|
readonly profileentryjs_transform: (a: number) => number;
|
|
932
|
+
readonly spaceplatehandle_boundingElements: (a: number, b: number, c: number) => void;
|
|
933
|
+
readonly spaceplatehandle_dragVertex: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
934
|
+
readonly spaceplatehandle_duplicate: (a: number) => number;
|
|
935
|
+
readonly spaceplatehandle_faceArea: (a: number, b: number) => number;
|
|
936
|
+
readonly spaceplatehandle_faceOutline: (a: number, b: number, c: number) => void;
|
|
937
|
+
readonly spaceplatehandle_findVertexNear: (a: number, b: number, c: number, d: number) => number;
|
|
938
|
+
readonly spaceplatehandle_mergeFaces: (a: number, b: number, c: number) => void;
|
|
939
|
+
readonly spaceplatehandle_neighborAcross: (a: number, b: number) => number;
|
|
940
|
+
readonly spaceplatehandle_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
941
|
+
readonly spaceplatehandle_roomCount: (a: number) => number;
|
|
942
|
+
readonly spaceplatehandle_roomIds: (a: number, b: number) => void;
|
|
943
|
+
readonly spaceplatehandle_setFaceHeight: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
944
|
+
readonly spaceplatehandle_snapshot: (a: number, b: number) => void;
|
|
945
|
+
readonly spaceplatehandle_splitEdge: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
946
|
+
readonly spaceplatehandle_splitFace: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
851
947
|
readonly symboliccircle_centerX: (a: number) => number;
|
|
852
948
|
readonly symboliccircle_centerY: (a: number) => number;
|
|
853
949
|
readonly symboliccircle_endAngle: (a: number) => number;
|
|
@@ -912,13 +1008,10 @@ export interface InitOutput {
|
|
|
912
1008
|
readonly symbolictext_worldY: (a: number) => number;
|
|
913
1009
|
readonly symbolictext_x: (a: number) => number;
|
|
914
1010
|
readonly symbolictext_y: (a: number) => number;
|
|
915
|
-
readonly
|
|
916
|
-
readonly
|
|
917
|
-
readonly
|
|
918
|
-
readonly
|
|
919
|
-
readonly __wbindgen_export2: (a: number, b: number, c: number) => void;
|
|
920
|
-
readonly __wbindgen_export3: (a: number, b: number) => number;
|
|
921
|
-
readonly __wbindgen_export4: (a: number, b: number, c: number, d: number) => number;
|
|
1011
|
+
readonly __wbindgen_export: (a: number, b: number) => number;
|
|
1012
|
+
readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
|
|
1013
|
+
readonly __wbindgen_export3: (a: number) => void;
|
|
1014
|
+
readonly __wbindgen_export4: (a: number, b: number, c: number) => void;
|
|
922
1015
|
readonly __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
923
1016
|
readonly __wbindgen_start: () => void;
|
|
924
1017
|
}
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -109,7 +109,7 @@ function handleError(f, args) {
|
|
|
109
109
|
try {
|
|
110
110
|
return f.apply(this, args);
|
|
111
111
|
} catch (e) {
|
|
112
|
-
wasm.
|
|
112
|
+
wasm.__wbindgen_export3(addHeapObject(e));
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -171,6 +171,13 @@ function passArrayF32ToWasm0(arg, malloc) {
|
|
|
171
171
|
return ptr;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
+
function passArrayF64ToWasm0(arg, malloc) {
|
|
175
|
+
const ptr = malloc(arg.length * 8, 8) >>> 0;
|
|
176
|
+
getFloat64ArrayMemory0().set(arg, ptr / 8);
|
|
177
|
+
WASM_VECTOR_LEN = arg.length;
|
|
178
|
+
return ptr;
|
|
179
|
+
}
|
|
180
|
+
|
|
174
181
|
function passStringToWasm0(arg, malloc, realloc) {
|
|
175
182
|
if (realloc === undefined) {
|
|
176
183
|
const buf = cachedTextEncoder.encode(arg);
|
|
@@ -245,12 +252,12 @@ if (!('encodeInto' in cachedTextEncoder)) {
|
|
|
245
252
|
|
|
246
253
|
let WASM_VECTOR_LEN = 0;
|
|
247
254
|
|
|
248
|
-
function
|
|
249
|
-
wasm.
|
|
255
|
+
function __wasm_bindgen_func_elem_718(arg0, arg1, arg2) {
|
|
256
|
+
wasm.__wasm_bindgen_func_elem_718(arg0, arg1, addHeapObject(arg2));
|
|
250
257
|
}
|
|
251
258
|
|
|
252
|
-
function
|
|
253
|
-
wasm.
|
|
259
|
+
function __wasm_bindgen_func_elem_752(arg0, arg1, arg2, arg3) {
|
|
260
|
+
wasm.__wasm_bindgen_func_elem_752(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
|
|
254
261
|
}
|
|
255
262
|
|
|
256
263
|
const ClashRunResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -293,6 +300,10 @@ const ProfileEntryJsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
|
293
300
|
? { register: () => {}, unregister: () => {} }
|
|
294
301
|
: new FinalizationRegistry(ptr => wasm.__wbg_profileentryjs_free(ptr >>> 0, 1));
|
|
295
302
|
|
|
303
|
+
const SpacePlateHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
304
|
+
? { register: () => {}, unregister: () => {} }
|
|
305
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_spaceplatehandle_free(ptr >>> 0, 1));
|
|
306
|
+
|
|
296
307
|
const SymbolicCircleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
297
308
|
? { register: () => {}, unregister: () => {} }
|
|
298
309
|
: new FinalizationRegistry(ptr => wasm.__wbg_symboliccircle_free(ptr >>> 0, 1));
|
|
@@ -345,7 +356,7 @@ export class ClashRunResult {
|
|
|
345
356
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
346
357
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
347
358
|
var v1 = getArrayU32FromWasm0(r0, r1).slice();
|
|
348
|
-
wasm.
|
|
359
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
349
360
|
return v1;
|
|
350
361
|
} finally {
|
|
351
362
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -361,7 +372,7 @@ export class ClashRunResult {
|
|
|
361
372
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
362
373
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
363
374
|
var v1 = getArrayU32FromWasm0(r0, r1).slice();
|
|
364
|
-
wasm.
|
|
375
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
365
376
|
return v1;
|
|
366
377
|
} finally {
|
|
367
378
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -377,7 +388,7 @@ export class ClashRunResult {
|
|
|
377
388
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
378
389
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
379
390
|
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
380
|
-
wasm.
|
|
391
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
381
392
|
return v1;
|
|
382
393
|
} finally {
|
|
383
394
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -393,7 +404,7 @@ export class ClashRunResult {
|
|
|
393
404
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
394
405
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
395
406
|
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
396
|
-
wasm.
|
|
407
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
397
408
|
return v1;
|
|
398
409
|
} finally {
|
|
399
410
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -409,7 +420,7 @@ export class ClashRunResult {
|
|
|
409
420
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
410
421
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
411
422
|
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
412
|
-
wasm.
|
|
423
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
413
424
|
return v1;
|
|
414
425
|
} finally {
|
|
415
426
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -425,7 +436,7 @@ export class ClashRunResult {
|
|
|
425
436
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
426
437
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
427
438
|
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
428
|
-
wasm.
|
|
439
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
429
440
|
return v1;
|
|
430
441
|
} finally {
|
|
431
442
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -469,15 +480,15 @@ export class ClashSession {
|
|
|
469
480
|
* @param {Float32Array} aabbs
|
|
470
481
|
*/
|
|
471
482
|
ingest(positions, pos_ranges, indices, idx_ranges, aabbs) {
|
|
472
|
-
const ptr0 = passArrayF32ToWasm0(positions, wasm.
|
|
483
|
+
const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_export);
|
|
473
484
|
const len0 = WASM_VECTOR_LEN;
|
|
474
|
-
const ptr1 = passArray32ToWasm0(pos_ranges, wasm.
|
|
485
|
+
const ptr1 = passArray32ToWasm0(pos_ranges, wasm.__wbindgen_export);
|
|
475
486
|
const len1 = WASM_VECTOR_LEN;
|
|
476
|
-
const ptr2 = passArray32ToWasm0(indices, wasm.
|
|
487
|
+
const ptr2 = passArray32ToWasm0(indices, wasm.__wbindgen_export);
|
|
477
488
|
const len2 = WASM_VECTOR_LEN;
|
|
478
|
-
const ptr3 = passArray32ToWasm0(idx_ranges, wasm.
|
|
489
|
+
const ptr3 = passArray32ToWasm0(idx_ranges, wasm.__wbindgen_export);
|
|
479
490
|
const len3 = WASM_VECTOR_LEN;
|
|
480
|
-
const ptr4 = passArrayF32ToWasm0(aabbs, wasm.
|
|
491
|
+
const ptr4 = passArrayF32ToWasm0(aabbs, wasm.__wbindgen_export);
|
|
481
492
|
const len4 = WASM_VECTOR_LEN;
|
|
482
493
|
wasm.clashsession_ingest(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4);
|
|
483
494
|
}
|
|
@@ -494,9 +505,9 @@ export class ClashSession {
|
|
|
494
505
|
* @returns {ClashRunResult}
|
|
495
506
|
*/
|
|
496
507
|
runRule(group_a, group_b, mode, tolerance, clearance, report_touch) {
|
|
497
|
-
const ptr0 = passArray32ToWasm0(group_a, wasm.
|
|
508
|
+
const ptr0 = passArray32ToWasm0(group_a, wasm.__wbindgen_export);
|
|
498
509
|
const len0 = WASM_VECTOR_LEN;
|
|
499
|
-
const ptr1 = passArray32ToWasm0(group_b, wasm.
|
|
510
|
+
const ptr1 = passArray32ToWasm0(group_b, wasm.__wbindgen_export);
|
|
500
511
|
const len1 = WASM_VECTOR_LEN;
|
|
501
512
|
const ret = wasm.clashsession_runRule(this.__wbg_ptr, ptr0, len0, ptr1, len1, mode, tolerance, clearance, report_touch);
|
|
502
513
|
return ClashRunResult.__wrap(ret);
|
|
@@ -599,7 +610,7 @@ export class GridAxisJs {
|
|
|
599
610
|
return getStringFromWasm0(r0, r1);
|
|
600
611
|
} finally {
|
|
601
612
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
602
|
-
wasm.
|
|
613
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
603
614
|
}
|
|
604
615
|
}
|
|
605
616
|
/**
|
|
@@ -652,7 +663,7 @@ export class IfcAPI {
|
|
|
652
663
|
* @returns {any}
|
|
653
664
|
*/
|
|
654
665
|
buildPrePassFast(data) {
|
|
655
|
-
const ptr0 = passArray8ToWasm0(data, wasm.
|
|
666
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
656
667
|
const len0 = WASM_VECTOR_LEN;
|
|
657
668
|
const ret = wasm.ifcapi_buildPrePassFast(this.__wbg_ptr, ptr0, len0);
|
|
658
669
|
return takeObject(ret);
|
|
@@ -664,7 +675,7 @@ export class IfcAPI {
|
|
|
664
675
|
* @returns {any}
|
|
665
676
|
*/
|
|
666
677
|
buildPrePassOnce(data) {
|
|
667
|
-
const ptr0 = passArray8ToWasm0(data, wasm.
|
|
678
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
668
679
|
const len0 = WASM_VECTOR_LEN;
|
|
669
680
|
const ret = wasm.ifcapi_buildPrePassOnce(this.__wbg_ptr, ptr0, len0);
|
|
670
681
|
return takeObject(ret);
|
|
@@ -687,19 +698,19 @@ export class IfcAPI {
|
|
|
687
698
|
* @returns {MeshCollection}
|
|
688
699
|
*/
|
|
689
700
|
processGeometryBatch(data, jobs_flat, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, void_keys, void_counts, void_values, style_ids, style_colors) {
|
|
690
|
-
const ptr0 = passArray8ToWasm0(data, wasm.
|
|
701
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
691
702
|
const len0 = WASM_VECTOR_LEN;
|
|
692
|
-
const ptr1 = passArray32ToWasm0(jobs_flat, wasm.
|
|
703
|
+
const ptr1 = passArray32ToWasm0(jobs_flat, wasm.__wbindgen_export);
|
|
693
704
|
const len1 = WASM_VECTOR_LEN;
|
|
694
|
-
const ptr2 = passArray32ToWasm0(void_keys, wasm.
|
|
705
|
+
const ptr2 = passArray32ToWasm0(void_keys, wasm.__wbindgen_export);
|
|
695
706
|
const len2 = WASM_VECTOR_LEN;
|
|
696
|
-
const ptr3 = passArray32ToWasm0(void_counts, wasm.
|
|
707
|
+
const ptr3 = passArray32ToWasm0(void_counts, wasm.__wbindgen_export);
|
|
697
708
|
const len3 = WASM_VECTOR_LEN;
|
|
698
|
-
const ptr4 = passArray32ToWasm0(void_values, wasm.
|
|
709
|
+
const ptr4 = passArray32ToWasm0(void_values, wasm.__wbindgen_export);
|
|
699
710
|
const len4 = WASM_VECTOR_LEN;
|
|
700
|
-
const ptr5 = passArray32ToWasm0(style_ids, wasm.
|
|
711
|
+
const ptr5 = passArray32ToWasm0(style_ids, wasm.__wbindgen_export);
|
|
701
712
|
const len5 = WASM_VECTOR_LEN;
|
|
702
|
-
const ptr6 = passArray8ToWasm0(style_colors, wasm.
|
|
713
|
+
const ptr6 = passArray8ToWasm0(style_colors, wasm.__wbindgen_export);
|
|
703
714
|
const len6 = WASM_VECTOR_LEN;
|
|
704
715
|
const ret = wasm.ifcapi_processGeometryBatch(this.__wbg_ptr, ptr0, len0, ptr1, len1, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
705
716
|
return MeshCollection.__wrap(ret);
|
|
@@ -737,7 +748,7 @@ export class IfcAPI {
|
|
|
737
748
|
buildPrePassStreaming(data, on_event, chunk_size) {
|
|
738
749
|
try {
|
|
739
750
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
740
|
-
const ptr0 = passArray8ToWasm0(data, wasm.
|
|
751
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
741
752
|
const len0 = WASM_VECTOR_LEN;
|
|
742
753
|
wasm.ifcapi_buildPrePassStreaming(retptr, this.__wbg_ptr, ptr0, len0, addBorrowedObject(on_event), chunk_size);
|
|
743
754
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
@@ -760,7 +771,7 @@ export class IfcAPI {
|
|
|
760
771
|
* @returns {GridAxisCollection}
|
|
761
772
|
*/
|
|
762
773
|
parseGridAxes(content) {
|
|
763
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
774
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
764
775
|
const len0 = WASM_VECTOR_LEN;
|
|
765
776
|
const ret = wasm.ifcapi_parseGridAxes(this.__wbg_ptr, ptr0, len0);
|
|
766
777
|
return GridAxisCollection.__wrap(ret);
|
|
@@ -777,7 +788,7 @@ export class IfcAPI {
|
|
|
777
788
|
* @returns {Float32Array}
|
|
778
789
|
*/
|
|
779
790
|
parseGridLines(content) {
|
|
780
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
791
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
781
792
|
const len0 = WASM_VECTOR_LEN;
|
|
782
793
|
const ret = wasm.ifcapi_parseGridLines(this.__wbg_ptr, ptr0, len0);
|
|
783
794
|
return takeObject(ret);
|
|
@@ -795,7 +806,7 @@ export class IfcAPI {
|
|
|
795
806
|
* @returns {Float32Array}
|
|
796
807
|
*/
|
|
797
808
|
parseAlignmentLines(content) {
|
|
798
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
809
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
799
810
|
const len0 = WASM_VECTOR_LEN;
|
|
800
811
|
const ret = wasm.ifcapi_parseAlignmentLines(this.__wbg_ptr, ptr0, len0);
|
|
801
812
|
return takeObject(ret);
|
|
@@ -826,7 +837,7 @@ export class IfcAPI {
|
|
|
826
837
|
* @returns {ProfileCollection}
|
|
827
838
|
*/
|
|
828
839
|
extractProfiles(content, model_index) {
|
|
829
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
840
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
830
841
|
const len0 = WASM_VECTOR_LEN;
|
|
831
842
|
const ret = wasm.ifcapi_extractProfiles(this.__wbg_ptr, ptr0, len0, model_index);
|
|
832
843
|
return ProfileCollection.__wrap(ret);
|
|
@@ -865,11 +876,11 @@ export class IfcAPI {
|
|
|
865
876
|
* @param {Uint32Array} lengths
|
|
866
877
|
*/
|
|
867
878
|
setEntityIndex(ids, starts, lengths) {
|
|
868
|
-
const ptr0 = passArray32ToWasm0(ids, wasm.
|
|
879
|
+
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export);
|
|
869
880
|
const len0 = WASM_VECTOR_LEN;
|
|
870
|
-
const ptr1 = passArray32ToWasm0(starts, wasm.
|
|
881
|
+
const ptr1 = passArray32ToWasm0(starts, wasm.__wbindgen_export);
|
|
871
882
|
const len1 = WASM_VECTOR_LEN;
|
|
872
|
-
const ptr2 = passArray32ToWasm0(lengths, wasm.
|
|
883
|
+
const ptr2 = passArray32ToWasm0(lengths, wasm.__wbindgen_export);
|
|
873
884
|
const len2 = WASM_VECTOR_LEN;
|
|
874
885
|
wasm.ifcapi_setEntityIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
|
|
875
886
|
}
|
|
@@ -943,7 +954,7 @@ export class IfcAPI {
|
|
|
943
954
|
return getStringFromWasm0(r0, r1);
|
|
944
955
|
} finally {
|
|
945
956
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
946
|
-
wasm.
|
|
957
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
947
958
|
}
|
|
948
959
|
}
|
|
949
960
|
/**
|
|
@@ -970,7 +981,7 @@ export class IfcAPI {
|
|
|
970
981
|
* @returns {Promise<any>}
|
|
971
982
|
*/
|
|
972
983
|
parseStreaming(content, callback) {
|
|
973
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
984
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
974
985
|
const len0 = WASM_VECTOR_LEN;
|
|
975
986
|
const ret = wasm.ifcapi_parseStreaming(this.__wbg_ptr, ptr0, len0, addHeapObject(callback));
|
|
976
987
|
return takeObject(ret);
|
|
@@ -983,7 +994,7 @@ export class IfcAPI {
|
|
|
983
994
|
* @returns {any}
|
|
984
995
|
*/
|
|
985
996
|
scanEntitiesFast(content) {
|
|
986
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
997
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
987
998
|
const len0 = WASM_VECTOR_LEN;
|
|
988
999
|
const ret = wasm.ifcapi_scanEntitiesFast(this.__wbg_ptr, ptr0, len0);
|
|
989
1000
|
return takeObject(ret);
|
|
@@ -996,7 +1007,7 @@ export class IfcAPI {
|
|
|
996
1007
|
* @returns {any}
|
|
997
1008
|
*/
|
|
998
1009
|
scanEntitiesFastBytes(data) {
|
|
999
|
-
const ptr0 = passArray8ToWasm0(data, wasm.
|
|
1010
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
1000
1011
|
const len0 = WASM_VECTOR_LEN;
|
|
1001
1012
|
const ret = wasm.ifcapi_scanEntitiesFastBytes(this.__wbg_ptr, ptr0, len0);
|
|
1002
1013
|
return takeObject(ret);
|
|
@@ -1010,7 +1021,7 @@ export class IfcAPI {
|
|
|
1010
1021
|
* @returns {any}
|
|
1011
1022
|
*/
|
|
1012
1023
|
scanGeometryEntitiesFast(content) {
|
|
1013
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
1024
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1014
1025
|
const len0 = WASM_VECTOR_LEN;
|
|
1015
1026
|
const ret = wasm.ifcapi_scanGeometryEntitiesFast(this.__wbg_ptr, ptr0, len0);
|
|
1016
1027
|
return takeObject(ret);
|
|
@@ -1022,7 +1033,7 @@ export class IfcAPI {
|
|
|
1022
1033
|
* @returns {any}
|
|
1023
1034
|
*/
|
|
1024
1035
|
scanRelevantEntitiesFastBytes(data) {
|
|
1025
|
-
const ptr0 = passArray8ToWasm0(data, wasm.
|
|
1036
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
1026
1037
|
const len0 = WASM_VECTOR_LEN;
|
|
1027
1038
|
const ret = wasm.ifcapi_scanRelevantEntitiesFastBytes(this.__wbg_ptr, ptr0, len0);
|
|
1028
1039
|
return takeObject(ret);
|
|
@@ -1040,7 +1051,7 @@ export class IfcAPI {
|
|
|
1040
1051
|
* @returns {Promise<any>}
|
|
1041
1052
|
*/
|
|
1042
1053
|
parse(content) {
|
|
1043
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
1054
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1044
1055
|
const len0 = WASM_VECTOR_LEN;
|
|
1045
1056
|
const ret = wasm.ifcapi_parse(this.__wbg_ptr, ptr0, len0);
|
|
1046
1057
|
return takeObject(ret);
|
|
@@ -1064,7 +1075,7 @@ export class IfcAPI {
|
|
|
1064
1075
|
* @returns {SymbolicRepresentationCollection}
|
|
1065
1076
|
*/
|
|
1066
1077
|
parseSymbolicRepresentations(content) {
|
|
1067
|
-
const ptr0 = passStringToWasm0(content, wasm.
|
|
1078
|
+
const ptr0 = passStringToWasm0(content, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1068
1079
|
const len0 = WASM_VECTOR_LEN;
|
|
1069
1080
|
const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
|
|
1070
1081
|
return SymbolicRepresentationCollection.__wrap(ret);
|
|
@@ -1141,7 +1152,7 @@ export class MeshCollection {
|
|
|
1141
1152
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1142
1153
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1143
1154
|
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
1144
|
-
wasm.
|
|
1155
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
1145
1156
|
return v1;
|
|
1146
1157
|
} finally {
|
|
1147
1158
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -1296,7 +1307,7 @@ export class MeshDataJs {
|
|
|
1296
1307
|
let v1;
|
|
1297
1308
|
if (r0 !== 0) {
|
|
1298
1309
|
v1 = getArrayF32FromWasm0(r0, r1).slice();
|
|
1299
|
-
wasm.
|
|
1310
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1300
1311
|
}
|
|
1301
1312
|
return v1;
|
|
1302
1313
|
} finally {
|
|
@@ -1371,7 +1382,7 @@ export class MeshDataJs {
|
|
|
1371
1382
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1372
1383
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1373
1384
|
var v1 = getArrayF32FromWasm0(r0, r1).slice();
|
|
1374
|
-
wasm.
|
|
1385
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1375
1386
|
return v1;
|
|
1376
1387
|
} finally {
|
|
1377
1388
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -1410,7 +1421,7 @@ export class MeshDataJs {
|
|
|
1410
1421
|
return getStringFromWasm0(r0, r1);
|
|
1411
1422
|
} finally {
|
|
1412
1423
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1413
|
-
wasm.
|
|
1424
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1414
1425
|
}
|
|
1415
1426
|
}
|
|
1416
1427
|
/**
|
|
@@ -1626,7 +1637,7 @@ export class ProfileEntryJs {
|
|
|
1626
1637
|
return getStringFromWasm0(r0, r1);
|
|
1627
1638
|
} finally {
|
|
1628
1639
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1629
|
-
wasm.
|
|
1640
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1630
1641
|
}
|
|
1631
1642
|
}
|
|
1632
1643
|
/**
|
|
@@ -1641,6 +1652,289 @@ export class ProfileEntryJs {
|
|
|
1641
1652
|
}
|
|
1642
1653
|
if (Symbol.dispose) ProfileEntryJs.prototype[Symbol.dispose] = ProfileEntryJs.prototype.free;
|
|
1643
1654
|
|
|
1655
|
+
/**
|
|
1656
|
+
* A persistent, editable floor-plate topology. See the module docs.
|
|
1657
|
+
*/
|
|
1658
|
+
export class SpacePlateHandle {
|
|
1659
|
+
static __wrap(ptr) {
|
|
1660
|
+
ptr = ptr >>> 0;
|
|
1661
|
+
const obj = Object.create(SpacePlateHandle.prototype);
|
|
1662
|
+
obj.__wbg_ptr = ptr;
|
|
1663
|
+
SpacePlateHandleFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
1664
|
+
return obj;
|
|
1665
|
+
}
|
|
1666
|
+
__destroy_into_raw() {
|
|
1667
|
+
const ptr = this.__wbg_ptr;
|
|
1668
|
+
this.__wbg_ptr = 0;
|
|
1669
|
+
SpacePlateHandleFinalization.unregister(this);
|
|
1670
|
+
return ptr;
|
|
1671
|
+
}
|
|
1672
|
+
free() {
|
|
1673
|
+
const ptr = this.__destroy_into_raw();
|
|
1674
|
+
wasm.__wbg_spaceplatehandle_free(ptr, 0);
|
|
1675
|
+
}
|
|
1676
|
+
/**
|
|
1677
|
+
* Number of live rooms.
|
|
1678
|
+
* @returns {number}
|
|
1679
|
+
*/
|
|
1680
|
+
get roomCount() {
|
|
1681
|
+
const ret = wasm.spaceplatehandle_roomCount(this.__wbg_ptr);
|
|
1682
|
+
return ret >>> 0;
|
|
1683
|
+
}
|
|
1684
|
+
/**
|
|
1685
|
+
* Insert a new vertex at `(x, y)` on edge `edge`, subdividing it (no new
|
|
1686
|
+
* face). Returns the new vertex id — use it as a `splitFace` endpoint to
|
|
1687
|
+
* cut between points that weren't existing corners. Project `(x, y)` onto
|
|
1688
|
+
* the edge to keep areas unchanged.
|
|
1689
|
+
* @param {number} edge
|
|
1690
|
+
* @param {number} x
|
|
1691
|
+
* @param {number} y
|
|
1692
|
+
* @returns {number}
|
|
1693
|
+
*/
|
|
1694
|
+
splitEdge(edge, x, y) {
|
|
1695
|
+
try {
|
|
1696
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1697
|
+
wasm.spaceplatehandle_splitEdge(retptr, this.__wbg_ptr, edge, x, y);
|
|
1698
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1699
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1700
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1701
|
+
if (r2) {
|
|
1702
|
+
throw takeObject(r1);
|
|
1703
|
+
}
|
|
1704
|
+
return r0 >>> 0;
|
|
1705
|
+
} finally {
|
|
1706
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
/**
|
|
1710
|
+
* Subdivide a face with a partition between two of its vertices. `source`
|
|
1711
|
+
* `-1` marks a brand-new partition (materialised as a fresh wall at bake).
|
|
1712
|
+
* Returns the kept face and the new face.
|
|
1713
|
+
* @param {number} face
|
|
1714
|
+
* @param {number} va
|
|
1715
|
+
* @param {number} vb
|
|
1716
|
+
* @param {number} source
|
|
1717
|
+
* @returns {any}
|
|
1718
|
+
*/
|
|
1719
|
+
splitFace(face, va, vb, source) {
|
|
1720
|
+
try {
|
|
1721
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1722
|
+
wasm.spaceplatehandle_splitFace(retptr, this.__wbg_ptr, face, va, vb, source);
|
|
1723
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1724
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1725
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1726
|
+
if (r2) {
|
|
1727
|
+
throw takeObject(r1);
|
|
1728
|
+
}
|
|
1729
|
+
return takeObject(r0);
|
|
1730
|
+
} finally {
|
|
1731
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
/**
|
|
1735
|
+
* Move a vertex; returns the rooms it changed. A shared wall is one edge
|
|
1736
|
+
* whose endpoints are shared vertices, so one drag updates both rooms.
|
|
1737
|
+
* @param {number} v
|
|
1738
|
+
* @param {number} x
|
|
1739
|
+
* @param {number} y
|
|
1740
|
+
* @returns {any}
|
|
1741
|
+
*/
|
|
1742
|
+
dragVertex(v, x, y) {
|
|
1743
|
+
try {
|
|
1744
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1745
|
+
wasm.spaceplatehandle_dragVertex(retptr, this.__wbg_ptr, v, x, y);
|
|
1746
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1747
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1748
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1749
|
+
if (r2) {
|
|
1750
|
+
throw takeObject(r1);
|
|
1751
|
+
}
|
|
1752
|
+
return takeObject(r0);
|
|
1753
|
+
} finally {
|
|
1754
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
/**
|
|
1758
|
+
* Remove a shared wall, unioning the two rooms it separated. Returns the
|
|
1759
|
+
* surviving room.
|
|
1760
|
+
* @param {number} edge
|
|
1761
|
+
* @returns {any}
|
|
1762
|
+
*/
|
|
1763
|
+
mergeFaces(edge) {
|
|
1764
|
+
try {
|
|
1765
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1766
|
+
wasm.spaceplatehandle_mergeFaces(retptr, this.__wbg_ptr, edge);
|
|
1767
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1768
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1769
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1770
|
+
if (r2) {
|
|
1771
|
+
throw takeObject(r1);
|
|
1772
|
+
}
|
|
1773
|
+
return takeObject(r0);
|
|
1774
|
+
} finally {
|
|
1775
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1776
|
+
}
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* Flat outline `[x0, y0, x1, y1, …]` of a face (no repeated closing vertex).
|
|
1780
|
+
* @param {number} face
|
|
1781
|
+
* @returns {Float64Array}
|
|
1782
|
+
*/
|
|
1783
|
+
faceOutline(face) {
|
|
1784
|
+
try {
|
|
1785
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1786
|
+
wasm.spaceplatehandle_faceOutline(retptr, this.__wbg_ptr, face);
|
|
1787
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1788
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1789
|
+
var v1 = getArrayF64FromWasm0(r0, r1).slice();
|
|
1790
|
+
wasm.__wbindgen_export4(r0, r1 * 8, 8);
|
|
1791
|
+
return v1;
|
|
1792
|
+
} finally {
|
|
1793
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1794
|
+
}
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* The room on the far side of a half-edge (its twin's face), or
|
|
1798
|
+
* `undefined`. O(1) — the "who's across this wall" query.
|
|
1799
|
+
* @param {number} edge
|
|
1800
|
+
* @returns {number | undefined}
|
|
1801
|
+
*/
|
|
1802
|
+
neighborAcross(edge) {
|
|
1803
|
+
const ret = wasm.spaceplatehandle_neighborAcross(this.__wbg_ptr, edge);
|
|
1804
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
1805
|
+
}
|
|
1806
|
+
/**
|
|
1807
|
+
* Set a face's floor / ceiling planes (the vertical dimension that turns a
|
|
1808
|
+
* 2D face into a prismatic space at bake).
|
|
1809
|
+
* @param {number} face
|
|
1810
|
+
* @param {number} floor_z
|
|
1811
|
+
* @param {number} ceiling_z
|
|
1812
|
+
* @param {boolean} non_planar
|
|
1813
|
+
*/
|
|
1814
|
+
setFaceHeight(face, floor_z, ceiling_z, non_planar) {
|
|
1815
|
+
wasm.spaceplatehandle_setFaceHeight(this.__wbg_ptr, face, floor_z, ceiling_z, non_planar);
|
|
1816
|
+
}
|
|
1817
|
+
/**
|
|
1818
|
+
* Nearest live vertex id to `(x, y)` within `tol`, or `undefined`.
|
|
1819
|
+
* @param {number} x
|
|
1820
|
+
* @param {number} y
|
|
1821
|
+
* @param {number} tol
|
|
1822
|
+
* @returns {number | undefined}
|
|
1823
|
+
*/
|
|
1824
|
+
findVertexNear(x, y, tol) {
|
|
1825
|
+
const ret = wasm.spaceplatehandle_findVertexNear(this.__wbg_ptr, x, y, tol);
|
|
1826
|
+
return ret === 0x100000001 ? undefined : ret;
|
|
1827
|
+
}
|
|
1828
|
+
/**
|
|
1829
|
+
* Bounding half-edges of a face paired with their source element —
|
|
1830
|
+
* `[{ edge, source }, …]` — for `IfcRelSpaceBoundary` at bake.
|
|
1831
|
+
* @param {number} face
|
|
1832
|
+
* @returns {any}
|
|
1833
|
+
*/
|
|
1834
|
+
boundingElements(face) {
|
|
1835
|
+
try {
|
|
1836
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1837
|
+
wasm.spaceplatehandle_boundingElements(retptr, this.__wbg_ptr, face);
|
|
1838
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1839
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1840
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1841
|
+
if (r2) {
|
|
1842
|
+
throw takeObject(r1);
|
|
1843
|
+
}
|
|
1844
|
+
return takeObject(r0);
|
|
1845
|
+
} finally {
|
|
1846
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
/**
|
|
1850
|
+
* Build a plate from flat wall-axis segments.
|
|
1851
|
+
*
|
|
1852
|
+
* `segCoords`: `[ax, ay, bx, by, …]` (length a multiple of 4).
|
|
1853
|
+
* `segSources`: one `i32` per segment, `-1` for none.
|
|
1854
|
+
* `snapTolerance` / `minArea`: pass `<= 0` to take the defaults.
|
|
1855
|
+
* @param {Float64Array} seg_coords
|
|
1856
|
+
* @param {Int32Array} seg_sources
|
|
1857
|
+
* @param {number} snap_tolerance
|
|
1858
|
+
* @param {number} min_area
|
|
1859
|
+
*/
|
|
1860
|
+
constructor(seg_coords, seg_sources, snap_tolerance, min_area) {
|
|
1861
|
+
try {
|
|
1862
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1863
|
+
const ptr0 = passArrayF64ToWasm0(seg_coords, wasm.__wbindgen_export);
|
|
1864
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1865
|
+
const ptr1 = passArray32ToWasm0(seg_sources, wasm.__wbindgen_export);
|
|
1866
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1867
|
+
wasm.spaceplatehandle_new(retptr, ptr0, len0, ptr1, len1, snap_tolerance, min_area);
|
|
1868
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1869
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1870
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1871
|
+
if (r2) {
|
|
1872
|
+
throw takeObject(r1);
|
|
1873
|
+
}
|
|
1874
|
+
this.__wbg_ptr = r0 >>> 0;
|
|
1875
|
+
SpacePlateHandleFinalization.register(this, this.__wbg_ptr, this);
|
|
1876
|
+
return this;
|
|
1877
|
+
} finally {
|
|
1878
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1879
|
+
}
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* Face ids of every live room.
|
|
1883
|
+
* @returns {Uint32Array}
|
|
1884
|
+
*/
|
|
1885
|
+
roomIds() {
|
|
1886
|
+
try {
|
|
1887
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1888
|
+
wasm.spaceplatehandle_roomIds(retptr, this.__wbg_ptr);
|
|
1889
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1890
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1891
|
+
var v1 = getArrayU32FromWasm0(r0, r1).slice();
|
|
1892
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
1893
|
+
return v1;
|
|
1894
|
+
} finally {
|
|
1895
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1896
|
+
}
|
|
1897
|
+
}
|
|
1898
|
+
/**
|
|
1899
|
+
* All live rooms as `{ face, area, simple, outline }` patches.
|
|
1900
|
+
* @returns {any}
|
|
1901
|
+
*/
|
|
1902
|
+
snapshot() {
|
|
1903
|
+
try {
|
|
1904
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1905
|
+
wasm.spaceplatehandle_snapshot(retptr, this.__wbg_ptr);
|
|
1906
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1907
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1908
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1909
|
+
if (r2) {
|
|
1910
|
+
throw takeObject(r1);
|
|
1911
|
+
}
|
|
1912
|
+
return takeObject(r0);
|
|
1913
|
+
} finally {
|
|
1914
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1915
|
+
}
|
|
1916
|
+
}
|
|
1917
|
+
/**
|
|
1918
|
+
* Deep-copy the plate for an undo/redo snapshot. The clone owns its own
|
|
1919
|
+
* heap; the caller must `.free()` it like any handle.
|
|
1920
|
+
* @returns {SpacePlateHandle}
|
|
1921
|
+
*/
|
|
1922
|
+
duplicate() {
|
|
1923
|
+
const ret = wasm.spaceplatehandle_duplicate(this.__wbg_ptr);
|
|
1924
|
+
return SpacePlateHandle.__wrap(ret);
|
|
1925
|
+
}
|
|
1926
|
+
/**
|
|
1927
|
+
* Absolute area (m²) of a face.
|
|
1928
|
+
* @param {number} face
|
|
1929
|
+
* @returns {number}
|
|
1930
|
+
*/
|
|
1931
|
+
faceArea(face) {
|
|
1932
|
+
const ret = wasm.spaceplatehandle_faceArea(this.__wbg_ptr, face);
|
|
1933
|
+
return ret;
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
if (Symbol.dispose) SpacePlateHandle.prototype[Symbol.dispose] = SpacePlateHandle.prototype.free;
|
|
1937
|
+
|
|
1644
1938
|
/**
|
|
1645
1939
|
* A 2D circle/arc for symbolic representations
|
|
1646
1940
|
*/
|
|
@@ -1700,7 +1994,7 @@ export class SymbolicCircle {
|
|
|
1700
1994
|
return getStringFromWasm0(r0, r1);
|
|
1701
1995
|
} finally {
|
|
1702
1996
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1703
|
-
wasm.
|
|
1997
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1704
1998
|
}
|
|
1705
1999
|
}
|
|
1706
2000
|
/**
|
|
@@ -1748,7 +2042,7 @@ export class SymbolicCircle {
|
|
|
1748
2042
|
return getStringFromWasm0(r0, r1);
|
|
1749
2043
|
} finally {
|
|
1750
2044
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1751
|
-
wasm.
|
|
2045
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1752
2046
|
}
|
|
1753
2047
|
}
|
|
1754
2048
|
/**
|
|
@@ -1860,7 +2154,7 @@ export class SymbolicFillArea {
|
|
|
1860
2154
|
return getStringFromWasm0(r0, r1);
|
|
1861
2155
|
} finally {
|
|
1862
2156
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1863
|
-
wasm.
|
|
2157
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1864
2158
|
}
|
|
1865
2159
|
}
|
|
1866
2160
|
/**
|
|
@@ -1936,7 +2230,7 @@ export class SymbolicFillArea {
|
|
|
1936
2230
|
return getStringFromWasm0(r0, r1);
|
|
1937
2231
|
} finally {
|
|
1938
2232
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1939
|
-
wasm.
|
|
2233
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1940
2234
|
}
|
|
1941
2235
|
}
|
|
1942
2236
|
}
|
|
@@ -1997,7 +2291,7 @@ export class SymbolicPolyline {
|
|
|
1997
2291
|
return getStringFromWasm0(r0, r1);
|
|
1998
2292
|
} finally {
|
|
1999
2293
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2000
|
-
wasm.
|
|
2294
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2001
2295
|
}
|
|
2002
2296
|
}
|
|
2003
2297
|
/**
|
|
@@ -2034,7 +2328,7 @@ export class SymbolicPolyline {
|
|
|
2034
2328
|
return getStringFromWasm0(r0, r1);
|
|
2035
2329
|
} finally {
|
|
2036
2330
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2037
|
-
wasm.
|
|
2331
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2038
2332
|
}
|
|
2039
2333
|
}
|
|
2040
2334
|
/**
|
|
@@ -2138,7 +2432,7 @@ export class SymbolicRepresentationCollection {
|
|
|
2138
2432
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
2139
2433
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
2140
2434
|
var v1 = getArrayU32FromWasm0(r0, r1).slice();
|
|
2141
|
-
wasm.
|
|
2435
|
+
wasm.__wbindgen_export4(r0, r1 * 4, 4);
|
|
2142
2436
|
return v1;
|
|
2143
2437
|
} finally {
|
|
2144
2438
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -2225,7 +2519,7 @@ export class SymbolicText {
|
|
|
2225
2519
|
return getStringFromWasm0(r0, r1);
|
|
2226
2520
|
} finally {
|
|
2227
2521
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2228
|
-
wasm.
|
|
2522
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2229
2523
|
}
|
|
2230
2524
|
}
|
|
2231
2525
|
/**
|
|
@@ -2307,7 +2601,7 @@ export class SymbolicText {
|
|
|
2307
2601
|
return getStringFromWasm0(r0, r1);
|
|
2308
2602
|
} finally {
|
|
2309
2603
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2310
|
-
wasm.
|
|
2604
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2311
2605
|
}
|
|
2312
2606
|
}
|
|
2313
2607
|
/**
|
|
@@ -2333,7 +2627,7 @@ export class SymbolicText {
|
|
|
2333
2627
|
return getStringFromWasm0(r0, r1);
|
|
2334
2628
|
} finally {
|
|
2335
2629
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2336
|
-
wasm.
|
|
2630
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2337
2631
|
}
|
|
2338
2632
|
}
|
|
2339
2633
|
/**
|
|
@@ -2352,7 +2646,7 @@ export class SymbolicText {
|
|
|
2352
2646
|
return getStringFromWasm0(r0, r1);
|
|
2353
2647
|
} finally {
|
|
2354
2648
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2355
|
-
wasm.
|
|
2649
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2356
2650
|
}
|
|
2357
2651
|
}
|
|
2358
2652
|
/**
|
|
@@ -2407,9 +2701,9 @@ export function init() {
|
|
|
2407
2701
|
* @returns {MeshOutlineJs | undefined}
|
|
2408
2702
|
*/
|
|
2409
2703
|
export function meshOutline2d(positions, indices, axis, flipped) {
|
|
2410
|
-
const ptr0 = passArrayF32ToWasm0(positions, wasm.
|
|
2704
|
+
const ptr0 = passArrayF32ToWasm0(positions, wasm.__wbindgen_export);
|
|
2411
2705
|
const len0 = WASM_VECTOR_LEN;
|
|
2412
|
-
const ptr1 = passArray32ToWasm0(indices, wasm.
|
|
2706
|
+
const ptr1 = passArray32ToWasm0(indices, wasm.__wbindgen_export);
|
|
2413
2707
|
const len1 = WASM_VECTOR_LEN;
|
|
2414
2708
|
const ret = wasm.meshOutline2d(ptr0, len0, ptr1, len1, axis, flipped);
|
|
2415
2709
|
return ret === 0 ? undefined : MeshOutlineJs.__wrap(ret);
|
|
@@ -2442,7 +2736,7 @@ export function version() {
|
|
|
2442
2736
|
return getStringFromWasm0(r0, r1);
|
|
2443
2737
|
} finally {
|
|
2444
2738
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2445
|
-
wasm.
|
|
2739
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
2446
2740
|
}
|
|
2447
2741
|
}
|
|
2448
2742
|
|
|
@@ -2485,6 +2779,13 @@ function __wbg_get_imports() {
|
|
|
2485
2779
|
const ret = Error(getStringFromWasm0(arg0, arg1));
|
|
2486
2780
|
return addHeapObject(ret);
|
|
2487
2781
|
};
|
|
2782
|
+
imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {
|
|
2783
|
+
const ret = String(getObject(arg1));
|
|
2784
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2785
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2786
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2787
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
2788
|
+
};
|
|
2488
2789
|
imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {
|
|
2489
2790
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
2490
2791
|
return ret;
|
|
@@ -2519,7 +2820,7 @@ function __wbg_get_imports() {
|
|
|
2519
2820
|
deferred0_1 = arg1;
|
|
2520
2821
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
2521
2822
|
} finally {
|
|
2522
|
-
wasm.
|
|
2823
|
+
wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
|
|
2523
2824
|
}
|
|
2524
2825
|
};
|
|
2525
2826
|
imports.wbg.__wbg_info_ce6bcc489c22f6f0 = function(arg0) {
|
|
@@ -2544,7 +2845,7 @@ function __wbg_get_imports() {
|
|
|
2544
2845
|
const a = state0.a;
|
|
2545
2846
|
state0.a = 0;
|
|
2546
2847
|
try {
|
|
2547
|
-
return
|
|
2848
|
+
return __wasm_bindgen_func_elem_752(a, state0.b, arg0, arg1);
|
|
2548
2849
|
} finally {
|
|
2549
2850
|
state0.a = a;
|
|
2550
2851
|
}
|
|
@@ -2619,7 +2920,7 @@ function __wbg_get_imports() {
|
|
|
2619
2920
|
};
|
|
2620
2921
|
imports.wbg.__wbg_stack_0ed75d68575b0f3c = function(arg0, arg1) {
|
|
2621
2922
|
const ret = getObject(arg1).stack;
|
|
2622
|
-
const ptr1 = passStringToWasm0(ret, wasm.
|
|
2923
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
2623
2924
|
const len1 = WASM_VECTOR_LEN;
|
|
2624
2925
|
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
2625
2926
|
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
@@ -2647,11 +2948,6 @@ function __wbg_get_imports() {
|
|
|
2647
2948
|
imports.wbg.__wbg_warn_6e567d0d926ff881 = function(arg0) {
|
|
2648
2949
|
console.warn(getObject(arg0));
|
|
2649
2950
|
};
|
|
2650
|
-
imports.wbg.__wbindgen_cast_0093e2d96a856a3b = function(arg0, arg1) {
|
|
2651
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx: 61, function: Function { arguments: [Externref], shim_idx: 62, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2652
|
-
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_674, __wasm_bindgen_func_elem_675);
|
|
2653
|
-
return addHeapObject(ret);
|
|
2654
|
-
};
|
|
2655
2951
|
imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
|
|
2656
2952
|
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
2657
2953
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
@@ -2667,6 +2963,11 @@ function __wbg_get_imports() {
|
|
|
2667
2963
|
const ret = arg0;
|
|
2668
2964
|
return addHeapObject(ret);
|
|
2669
2965
|
};
|
|
2966
|
+
imports.wbg.__wbindgen_cast_efaa74e24e38a7b5 = function(arg0, arg1) {
|
|
2967
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 65, function: Function { arguments: [Externref], shim_idx: 66, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
2968
|
+
const ret = makeMutClosure(arg0, arg1, wasm.__wasm_bindgen_func_elem_717, __wasm_bindgen_func_elem_718);
|
|
2969
|
+
return addHeapObject(ret);
|
|
2970
|
+
};
|
|
2670
2971
|
imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
|
|
2671
2972
|
const ret = getObject(arg0);
|
|
2672
2973
|
return addHeapObject(ret);
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|