@ifc-lite/wasm 3.0.7 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/pkg/ifc-lite.d.ts +71 -0
- package/pkg/ifc-lite.js +177 -0
- package/pkg/ifc-lite_bg.wasm +0 -0
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -131,6 +131,34 @@ export class IfcAPI {
|
|
|
131
131
|
* ```
|
|
132
132
|
*/
|
|
133
133
|
exportObj(content: Uint8Array, include_normals: boolean, hidden: Uint32Array, isolated: Uint32Array): Uint8Array;
|
|
134
|
+
/**
|
|
135
|
+
* Store the whole IFC source file ONCE per load so the `*FromSource` batch
|
|
136
|
+
* variants can read it from the wasm heap instead of re-copying it per call.
|
|
137
|
+
*
|
|
138
|
+
* Mirrors the `setEntityIndex` lifecycle: called once per worker per load,
|
|
139
|
+
* and REPLACES the previous file wholesale (repeated calls swap the bytes),
|
|
140
|
+
* so a parser/geometry worker reusing one `IfcAPI` across loads is safe.
|
|
141
|
+
* The bytes must be the exact source the batch jobs' byte spans index into
|
|
142
|
+
* (the same buffer passed as `data` to the legacy `processGeometryBatch*`),
|
|
143
|
+
* or the decoded entities won't match — the JS worker installs its own
|
|
144
|
+
* session buffer, so this holds by construction.
|
|
145
|
+
*
|
|
146
|
+
* Taking `Vec<u8>` (by value) means wasm-bindgen hands us ownership of the
|
|
147
|
+
* single JS→wasm copy directly; we wrap it in `Arc` with no second copy.
|
|
148
|
+
*/
|
|
149
|
+
setSourceBytes(data: Uint8Array): void;
|
|
150
|
+
/**
|
|
151
|
+
* Like [`IfcAPI::process_geometry_batch`] but reads the source bytes held by
|
|
152
|
+
* [`IfcAPI::set_source_bytes`] instead of taking `data`. Byte-for-byte
|
|
153
|
+
* identical output — it delegates to the legacy twin with the held slice.
|
|
154
|
+
*/
|
|
155
|
+
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;
|
|
156
|
+
/**
|
|
157
|
+
* Like [`IfcAPI::process_geometry_batch_partitioned`] but reads the source
|
|
158
|
+
* bytes held by [`IfcAPI::set_source_bytes`] instead of taking `data`.
|
|
159
|
+
* Byte-for-byte identical output — it delegates to the legacy twin.
|
|
160
|
+
*/
|
|
161
|
+
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;
|
|
134
162
|
/**
|
|
135
163
|
* Process geometry for a subset of pre-scanned entities → flat
|
|
136
164
|
* MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
|
|
@@ -378,6 +406,36 @@ export class IfcAPI {
|
|
|
378
406
|
* Recovers a poisoned cache Mutex instead of panicking; see `mod_tests.rs`.
|
|
379
407
|
*/
|
|
380
408
|
clearPrePassCache(): void;
|
|
409
|
+
/**
|
|
410
|
+
* Install the pre-computed set of `IfcRepresentationMap` ids referenced by
|
|
411
|
+
* an `IfcMappedItem` (issue #957), so the worker's first type-product batch
|
|
412
|
+
* SKIPS the per-worker [`Self::get_or_build_referenced_repmaps`] full-file
|
|
413
|
+
* walk. The streaming pre-pass built the same set once from the
|
|
414
|
+
* `IfcMappedItem` spans it already scanned (see
|
|
415
|
+
* `styling::build_referenced_representation_maps_from_spans`) and ships the
|
|
416
|
+
* id list here — bit-identical to what each worker would compute, since a
|
|
417
|
+
* set's membership is order-invariant and consumers only call `.contains`.
|
|
418
|
+
*
|
|
419
|
+
* Installed AFTER `setEntityIndex` (which clears this cache on content
|
|
420
|
+
* swap), so the injected value survives. When this setter is never called
|
|
421
|
+
* (native path, non-streaming callers), the lazy build path is unchanged.
|
|
422
|
+
*/
|
|
423
|
+
setReferencedRepmaps(ids: Uint32Array): void;
|
|
424
|
+
/**
|
|
425
|
+
* Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
|
|
426
|
+
* from its flat SoA encoding, so the worker's first batch skips the
|
|
427
|
+
* per-worker [`Self::get_or_build_material_layer_index`] full-file decode
|
|
428
|
+
* scan (the dominant first-batch cost on layered architectural models,
|
|
429
|
+
* which run this on the DEFAULT view). The streaming pre-pass built the
|
|
430
|
+
* index once from the `IfcRelAssociatesMaterial` spans it already scanned
|
|
431
|
+
* (`MaterialLayerIndex::from_spans`) and flat-encoded it here; the flat
|
|
432
|
+
* encoding round-trips bit-for-bit (proven in `material_layer_index` tests),
|
|
433
|
+
* so the injected index equals each worker's `from_content` result.
|
|
434
|
+
*
|
|
435
|
+
* Same injection contract as [`Self::set_referenced_repmaps`]: installed
|
|
436
|
+
* after `setEntityIndex`, and a no-op absence leaves the lazy build intact.
|
|
437
|
+
*/
|
|
438
|
+
setMaterialLayerIndex(element_ids: Uint32Array, axis: Uint32Array, layer_counts: Uint32Array, direction_sense: Float64Array, offset: Float64Array, layer_material_ids: Uint32Array, layer_thicknesses: Float64Array): void;
|
|
381
439
|
/**
|
|
382
440
|
* Enable or disable the PARAMETRIC rectangular-opening fast path (the
|
|
383
441
|
* placement-frame, ground-truth-exact analytic cut) for `processGeometryBatch`.
|
|
@@ -407,6 +465,13 @@ export class IfcAPI {
|
|
|
407
465
|
* silently rendering at the wrong density.
|
|
408
466
|
*/
|
|
409
467
|
setTessellationQuality(level?: string | null): void;
|
|
468
|
+
/**
|
|
469
|
+
* Install the pre-computed set of type ids that an `IfcRelDefinesByType`
|
|
470
|
+
* instantiates (#957 follow-up), so the worker's first type-product batch
|
|
471
|
+
* skips the per-worker [`Self::get_or_build_instantiated_type_ids`]
|
|
472
|
+
* full-file walk. Same injection contract as [`Self::set_referenced_repmaps`].
|
|
473
|
+
*/
|
|
474
|
+
setInstantiatedTypeIds(ids: Uint32Array): void;
|
|
410
475
|
/**
|
|
411
476
|
* Enable or disable per-entity geometry fingerprinting in
|
|
412
477
|
* `processGeometryBatch`, used by the viewer's revision-diff feature.
|
|
@@ -1156,16 +1221,22 @@ export interface InitOutput {
|
|
|
1156
1221
|
readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
|
|
1157
1222
|
readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
|
|
1158
1223
|
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;
|
|
1224
|
+
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;
|
|
1159
1225
|
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;
|
|
1160
1226
|
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;
|
|
1227
|
+
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;
|
|
1161
1228
|
readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
|
|
1162
1229
|
readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
|
|
1163
1230
|
readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
|
|
1164
1231
|
readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
|
|
1165
1232
|
readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
|
|
1233
|
+
readonly ifcapi_setInstantiatedTypeIds: (a: number, b: number, c: number) => void;
|
|
1234
|
+
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;
|
|
1166
1235
|
readonly ifcapi_setMergeLayers: (a: number, b: number) => void;
|
|
1167
1236
|
readonly ifcapi_setRectParamFastPath: (a: number, b: number) => void;
|
|
1237
|
+
readonly ifcapi_setReferencedRepmaps: (a: number, b: number, c: number) => void;
|
|
1168
1238
|
readonly ifcapi_setSkipSmallCuts: (a: number, b: number) => void;
|
|
1239
|
+
readonly ifcapi_setSourceBytes: (a: number, b: number, c: number) => void;
|
|
1169
1240
|
readonly ifcapi_setTessellationQuality: (a: number, b: number, c: number, d: number) => void;
|
|
1170
1241
|
readonly ifcapi_version: (a: number, b: number) => void;
|
|
1171
1242
|
readonly meshOutline2d: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -795,6 +795,113 @@ export class IfcAPI {
|
|
|
795
795
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
796
796
|
}
|
|
797
797
|
}
|
|
798
|
+
/**
|
|
799
|
+
* Store the whole IFC source file ONCE per load so the `*FromSource` batch
|
|
800
|
+
* variants can read it from the wasm heap instead of re-copying it per call.
|
|
801
|
+
*
|
|
802
|
+
* Mirrors the `setEntityIndex` lifecycle: called once per worker per load,
|
|
803
|
+
* and REPLACES the previous file wholesale (repeated calls swap the bytes),
|
|
804
|
+
* so a parser/geometry worker reusing one `IfcAPI` across loads is safe.
|
|
805
|
+
* The bytes must be the exact source the batch jobs' byte spans index into
|
|
806
|
+
* (the same buffer passed as `data` to the legacy `processGeometryBatch*`),
|
|
807
|
+
* or the decoded entities won't match — the JS worker installs its own
|
|
808
|
+
* session buffer, so this holds by construction.
|
|
809
|
+
*
|
|
810
|
+
* Taking `Vec<u8>` (by value) means wasm-bindgen hands us ownership of the
|
|
811
|
+
* single JS→wasm copy directly; we wrap it in `Arc` with no second copy.
|
|
812
|
+
* @param {Uint8Array} data
|
|
813
|
+
*/
|
|
814
|
+
setSourceBytes(data) {
|
|
815
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
|
|
816
|
+
const len0 = WASM_VECTOR_LEN;
|
|
817
|
+
wasm.ifcapi_setSourceBytes(this.__wbg_ptr, ptr0, len0);
|
|
818
|
+
}
|
|
819
|
+
/**
|
|
820
|
+
* Like [`IfcAPI::process_geometry_batch`] but reads the source bytes held by
|
|
821
|
+
* [`IfcAPI::set_source_bytes`] instead of taking `data`. Byte-for-byte
|
|
822
|
+
* identical output — it delegates to the legacy twin with the held slice.
|
|
823
|
+
* @param {Uint32Array} jobs_flat
|
|
824
|
+
* @param {number} unit_scale
|
|
825
|
+
* @param {number} rtc_x
|
|
826
|
+
* @param {number} rtc_y
|
|
827
|
+
* @param {number} rtc_z
|
|
828
|
+
* @param {boolean} needs_shift
|
|
829
|
+
* @param {Uint32Array} void_keys
|
|
830
|
+
* @param {Uint32Array} void_counts
|
|
831
|
+
* @param {Uint32Array} void_values
|
|
832
|
+
* @param {Uint32Array} style_ids
|
|
833
|
+
* @param {Uint8Array} style_colors
|
|
834
|
+
* @param {number | null} [plane_angle_to_radians]
|
|
835
|
+
* @param {Uint32Array | null} [material_element_ids]
|
|
836
|
+
* @param {Uint32Array | null} [material_color_counts]
|
|
837
|
+
* @param {Uint8Array | null} [material_colors_rgba]
|
|
838
|
+
* @returns {MeshCollection}
|
|
839
|
+
*/
|
|
840
|
+
processGeometryBatchFromSource(jobs_flat, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, void_keys, void_counts, void_values, style_ids, style_colors, plane_angle_to_radians, material_element_ids, material_color_counts, material_colors_rgba) {
|
|
841
|
+
const ptr0 = passArray32ToWasm0(jobs_flat, wasm.__wbindgen_export);
|
|
842
|
+
const len0 = WASM_VECTOR_LEN;
|
|
843
|
+
const ptr1 = passArray32ToWasm0(void_keys, wasm.__wbindgen_export);
|
|
844
|
+
const len1 = WASM_VECTOR_LEN;
|
|
845
|
+
const ptr2 = passArray32ToWasm0(void_counts, wasm.__wbindgen_export);
|
|
846
|
+
const len2 = WASM_VECTOR_LEN;
|
|
847
|
+
const ptr3 = passArray32ToWasm0(void_values, wasm.__wbindgen_export);
|
|
848
|
+
const len3 = WASM_VECTOR_LEN;
|
|
849
|
+
const ptr4 = passArray32ToWasm0(style_ids, wasm.__wbindgen_export);
|
|
850
|
+
const len4 = WASM_VECTOR_LEN;
|
|
851
|
+
const ptr5 = passArray8ToWasm0(style_colors, wasm.__wbindgen_export);
|
|
852
|
+
const len5 = WASM_VECTOR_LEN;
|
|
853
|
+
var ptr6 = isLikeNone(material_element_ids) ? 0 : passArray32ToWasm0(material_element_ids, wasm.__wbindgen_export);
|
|
854
|
+
var len6 = WASM_VECTOR_LEN;
|
|
855
|
+
var ptr7 = isLikeNone(material_color_counts) ? 0 : passArray32ToWasm0(material_color_counts, wasm.__wbindgen_export);
|
|
856
|
+
var len7 = WASM_VECTOR_LEN;
|
|
857
|
+
var ptr8 = isLikeNone(material_colors_rgba) ? 0 : passArray8ToWasm0(material_colors_rgba, wasm.__wbindgen_export);
|
|
858
|
+
var len8 = WASM_VECTOR_LEN;
|
|
859
|
+
const ret = wasm.ifcapi_processGeometryBatchFromSource(this.__wbg_ptr, ptr0, len0, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, !isLikeNone(plane_angle_to_radians), isLikeNone(plane_angle_to_radians) ? 0 : plane_angle_to_radians, ptr6, len6, ptr7, len7, ptr8, len8);
|
|
860
|
+
return MeshCollection.__wrap(ret);
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Like [`IfcAPI::process_geometry_batch_partitioned`] but reads the source
|
|
864
|
+
* bytes held by [`IfcAPI::set_source_bytes`] instead of taking `data`.
|
|
865
|
+
* Byte-for-byte identical output — it delegates to the legacy twin.
|
|
866
|
+
* @param {Uint32Array} jobs_flat
|
|
867
|
+
* @param {number} unit_scale
|
|
868
|
+
* @param {number} rtc_x
|
|
869
|
+
* @param {number} rtc_y
|
|
870
|
+
* @param {number} rtc_z
|
|
871
|
+
* @param {boolean} needs_shift
|
|
872
|
+
* @param {Uint32Array} void_keys
|
|
873
|
+
* @param {Uint32Array} void_counts
|
|
874
|
+
* @param {Uint32Array} void_values
|
|
875
|
+
* @param {Uint32Array} style_ids
|
|
876
|
+
* @param {Uint8Array} style_colors
|
|
877
|
+
* @param {number | null} [plane_angle_to_radians]
|
|
878
|
+
* @param {Uint32Array | null} [material_element_ids]
|
|
879
|
+
* @param {Uint32Array | null} [material_color_counts]
|
|
880
|
+
* @param {Uint8Array | null} [material_colors_rgba]
|
|
881
|
+
* @returns {PartitionedBatch}
|
|
882
|
+
*/
|
|
883
|
+
processGeometryBatchPartitionedFromSource(jobs_flat, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, void_keys, void_counts, void_values, style_ids, style_colors, plane_angle_to_radians, material_element_ids, material_color_counts, material_colors_rgba) {
|
|
884
|
+
const ptr0 = passArray32ToWasm0(jobs_flat, wasm.__wbindgen_export);
|
|
885
|
+
const len0 = WASM_VECTOR_LEN;
|
|
886
|
+
const ptr1 = passArray32ToWasm0(void_keys, wasm.__wbindgen_export);
|
|
887
|
+
const len1 = WASM_VECTOR_LEN;
|
|
888
|
+
const ptr2 = passArray32ToWasm0(void_counts, wasm.__wbindgen_export);
|
|
889
|
+
const len2 = WASM_VECTOR_LEN;
|
|
890
|
+
const ptr3 = passArray32ToWasm0(void_values, wasm.__wbindgen_export);
|
|
891
|
+
const len3 = WASM_VECTOR_LEN;
|
|
892
|
+
const ptr4 = passArray32ToWasm0(style_ids, wasm.__wbindgen_export);
|
|
893
|
+
const len4 = WASM_VECTOR_LEN;
|
|
894
|
+
const ptr5 = passArray8ToWasm0(style_colors, wasm.__wbindgen_export);
|
|
895
|
+
const len5 = WASM_VECTOR_LEN;
|
|
896
|
+
var ptr6 = isLikeNone(material_element_ids) ? 0 : passArray32ToWasm0(material_element_ids, wasm.__wbindgen_export);
|
|
897
|
+
var len6 = WASM_VECTOR_LEN;
|
|
898
|
+
var ptr7 = isLikeNone(material_color_counts) ? 0 : passArray32ToWasm0(material_color_counts, wasm.__wbindgen_export);
|
|
899
|
+
var len7 = WASM_VECTOR_LEN;
|
|
900
|
+
var ptr8 = isLikeNone(material_colors_rgba) ? 0 : passArray8ToWasm0(material_colors_rgba, wasm.__wbindgen_export);
|
|
901
|
+
var len8 = WASM_VECTOR_LEN;
|
|
902
|
+
const ret = wasm.ifcapi_processGeometryBatchPartitionedFromSource(this.__wbg_ptr, ptr0, len0, unit_scale, rtc_x, rtc_y, rtc_z, needs_shift, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, !isLikeNone(plane_angle_to_radians), isLikeNone(plane_angle_to_radians) ? 0 : plane_angle_to_radians, ptr6, len6, ptr7, len7, ptr8, len8);
|
|
903
|
+
return PartitionedBatch.__wrap(ret);
|
|
904
|
+
}
|
|
798
905
|
/**
|
|
799
906
|
* Process geometry for a subset of pre-scanned entities → flat
|
|
800
907
|
* MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
|
|
@@ -1410,6 +1517,64 @@ export class IfcAPI {
|
|
|
1410
1517
|
clearPrePassCache() {
|
|
1411
1518
|
wasm.ifcapi_clearPrePassCache(this.__wbg_ptr);
|
|
1412
1519
|
}
|
|
1520
|
+
/**
|
|
1521
|
+
* Install the pre-computed set of `IfcRepresentationMap` ids referenced by
|
|
1522
|
+
* an `IfcMappedItem` (issue #957), so the worker's first type-product batch
|
|
1523
|
+
* SKIPS the per-worker [`Self::get_or_build_referenced_repmaps`] full-file
|
|
1524
|
+
* walk. The streaming pre-pass built the same set once from the
|
|
1525
|
+
* `IfcMappedItem` spans it already scanned (see
|
|
1526
|
+
* `styling::build_referenced_representation_maps_from_spans`) and ships the
|
|
1527
|
+
* id list here — bit-identical to what each worker would compute, since a
|
|
1528
|
+
* set's membership is order-invariant and consumers only call `.contains`.
|
|
1529
|
+
*
|
|
1530
|
+
* Installed AFTER `setEntityIndex` (which clears this cache on content
|
|
1531
|
+
* swap), so the injected value survives. When this setter is never called
|
|
1532
|
+
* (native path, non-streaming callers), the lazy build path is unchanged.
|
|
1533
|
+
* @param {Uint32Array} ids
|
|
1534
|
+
*/
|
|
1535
|
+
setReferencedRepmaps(ids) {
|
|
1536
|
+
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export);
|
|
1537
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1538
|
+
wasm.ifcapi_setReferencedRepmaps(this.__wbg_ptr, ptr0, len0);
|
|
1539
|
+
}
|
|
1540
|
+
/**
|
|
1541
|
+
* Install the pre-computed [`ifc_lite_geometry::MaterialLayerIndex`] (#563)
|
|
1542
|
+
* from its flat SoA encoding, so the worker's first batch skips the
|
|
1543
|
+
* per-worker [`Self::get_or_build_material_layer_index`] full-file decode
|
|
1544
|
+
* scan (the dominant first-batch cost on layered architectural models,
|
|
1545
|
+
* which run this on the DEFAULT view). The streaming pre-pass built the
|
|
1546
|
+
* index once from the `IfcRelAssociatesMaterial` spans it already scanned
|
|
1547
|
+
* (`MaterialLayerIndex::from_spans`) and flat-encoded it here; the flat
|
|
1548
|
+
* encoding round-trips bit-for-bit (proven in `material_layer_index` tests),
|
|
1549
|
+
* so the injected index equals each worker's `from_content` result.
|
|
1550
|
+
*
|
|
1551
|
+
* Same injection contract as [`Self::set_referenced_repmaps`]: installed
|
|
1552
|
+
* after `setEntityIndex`, and a no-op absence leaves the lazy build intact.
|
|
1553
|
+
* @param {Uint32Array} element_ids
|
|
1554
|
+
* @param {Uint32Array} axis
|
|
1555
|
+
* @param {Uint32Array} layer_counts
|
|
1556
|
+
* @param {Float64Array} direction_sense
|
|
1557
|
+
* @param {Float64Array} offset
|
|
1558
|
+
* @param {Uint32Array} layer_material_ids
|
|
1559
|
+
* @param {Float64Array} layer_thicknesses
|
|
1560
|
+
*/
|
|
1561
|
+
setMaterialLayerIndex(element_ids, axis, layer_counts, direction_sense, offset, layer_material_ids, layer_thicknesses) {
|
|
1562
|
+
const ptr0 = passArray32ToWasm0(element_ids, wasm.__wbindgen_export);
|
|
1563
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1564
|
+
const ptr1 = passArray32ToWasm0(axis, wasm.__wbindgen_export);
|
|
1565
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1566
|
+
const ptr2 = passArray32ToWasm0(layer_counts, wasm.__wbindgen_export);
|
|
1567
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1568
|
+
const ptr3 = passArrayF64ToWasm0(direction_sense, wasm.__wbindgen_export);
|
|
1569
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1570
|
+
const ptr4 = passArrayF64ToWasm0(offset, wasm.__wbindgen_export);
|
|
1571
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1572
|
+
const ptr5 = passArray32ToWasm0(layer_material_ids, wasm.__wbindgen_export);
|
|
1573
|
+
const len5 = WASM_VECTOR_LEN;
|
|
1574
|
+
const ptr6 = passArrayF64ToWasm0(layer_thicknesses, wasm.__wbindgen_export);
|
|
1575
|
+
const len6 = WASM_VECTOR_LEN;
|
|
1576
|
+
wasm.ifcapi_setMaterialLayerIndex(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
1577
|
+
}
|
|
1413
1578
|
/**
|
|
1414
1579
|
* Enable or disable the PARAMETRIC rectangular-opening fast path (the
|
|
1415
1580
|
* placement-frame, ground-truth-exact analytic cut) for `processGeometryBatch`.
|
|
@@ -1457,6 +1622,18 @@ export class IfcAPI {
|
|
|
1457
1622
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1458
1623
|
}
|
|
1459
1624
|
}
|
|
1625
|
+
/**
|
|
1626
|
+
* Install the pre-computed set of type ids that an `IfcRelDefinesByType`
|
|
1627
|
+
* instantiates (#957 follow-up), so the worker's first type-product batch
|
|
1628
|
+
* skips the per-worker [`Self::get_or_build_instantiated_type_ids`]
|
|
1629
|
+
* full-file walk. Same injection contract as [`Self::set_referenced_repmaps`].
|
|
1630
|
+
* @param {Uint32Array} ids
|
|
1631
|
+
*/
|
|
1632
|
+
setInstantiatedTypeIds(ids) {
|
|
1633
|
+
const ptr0 = passArray32ToWasm0(ids, wasm.__wbindgen_export);
|
|
1634
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1635
|
+
wasm.ifcapi_setInstantiatedTypeIds(this.__wbg_ptr, ptr0, len0);
|
|
1636
|
+
}
|
|
1460
1637
|
/**
|
|
1461
1638
|
* Enable or disable per-entity geometry fingerprinting in
|
|
1462
1639
|
* `processGeometryBatch`, used by the viewer's revision-diff feature.
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|