@ifc-lite/wasm 6.3.0 → 6.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/README.md CHANGED
@@ -111,3 +111,52 @@ See the [WASM API Reference](https://ifclite.dev/docs/api/wasm/).
111
111
  ## License
112
112
 
113
113
  [MPL-2.0](https://mozilla.org/MPL/2.0/)
114
+
115
+
116
+ For appearance authoring, `IfcAPI.catalogAppearance` resolves current IFC product
117
+ classes and type memberships from an effective STEP snapshot before planning.
118
+ It shares bounded native decoding with `planAppearance`; run both in a worker and
119
+ validate the source revision before using a catalog or applying a plan. See the
120
+ [WASM API guide](../../docs/api/wasm.md#effective-appearance-scope-catalog) for the
121
+ request, response and limits.
122
+
123
+ `IfcAPI.planPageAppearance(content, requestJson, rgba)` adds a bounded finite-page
124
+ compositor. It returns an `IFPA` metadata/PNG envelope with per-item digest-named
125
+ assets and ordinary atomic IFC edits. Outside-page albedo is resampled from the
126
+ original canonical style/texture, not a repeated or clamped page border. Run in
127
+ a cancellable worker and retain all generated assets with the command. See the
128
+ [WASM API guide](../../docs/api/wasm.md#finite-page-appearance-output).
129
+
130
+ `IfcAPI.planAnnotationPlane` creates a bounded calibrated image `IfcAnnotation`
131
+ plan for an explicit spatial container, reusing canonical native geometry. Run it
132
+ in a worker and publish its typed entities, source-image lease and returned mesh
133
+ as one existing model/history transaction. See the [WASM API guide](../../docs/api/wasm.md#calibrated-annotation-creation)
134
+ for the Z-up geometry/top-down UV and allocator/source validation contract.
135
+
136
+ `IfcAPI.planCapturedMesh` creates a bounded `IfcBuildingElementProxy` plan from
137
+ an already segmented textured triangle mesh, retaining independent UV seams and
138
+ the original image URI. It uses the same native authoring and geometry path as
139
+ annotation creation. See [captured surface creation](../../docs/api/wasm.md#captured-textured-surface-creation)
140
+ for coordinate, budget and atomic host-commit requirements.
141
+
142
+ Captured-mesh planning preserves optional `repeatS`/`repeatT` image sampler flags
143
+ (default `false`); UVs remain bounded to `[0, 1]`.
144
+
145
+ `IfcAPI.registerScanCorrespondences` fits bounded manual source-scan/IFC point
146
+ pairs and returns a proper rigid transform plus separate fitting and held-out
147
+ residuals. Frames and asset identities are bound into the report; the call does
148
+ not align a loaded model or approve scan accuracy. See the
149
+ [registration contract](../../docs/api/wasm.md#scan-correspondence-registration).
150
+
151
+ `IfcAPI.planMeshTransfer` composes registered opaque textured-mesh observations
152
+ onto supported direct IFC tessellations using the shared atlas planner. Unknown
153
+ samples retain existing target albedo; the IFPA response includes explicit
154
+ coverage and frozen-input bindings. Entirely unknown transfer has no applicable
155
+ plan. See the [transfer contract](../../docs/api/wasm.md#registered-textured-mesh-appearance-transfer)
156
+ for source identity, coordinate frames, budgets and host acceptance requirements.
157
+
158
+ `IfcAPI.preparePdfVectorPage` validates bounded ordered PDF vector graphics states
159
+ and preserves source operator identity, calibrated transforms and paint state.
160
+ Unsupported content remains an explicit blocker. It emits no IFC entities and
161
+ makes no flattened-geometry fidelity claim; see the
162
+ [preparation contract](../../docs/api/wasm.md#pdf-vector-graphics-state-preparation).
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "IFC-Lite Contributors"
6
6
  ],
7
7
  "description": "WebAssembly bindings for IFC-Lite",
8
- "version": "6.3.0",
8
+ "version": "6.5.0",
9
9
  "license": "MPL-2.0",
10
10
  "repository": {
11
11
  "type": "git",
package/pkg/ifc-lite.d.ts CHANGED
@@ -305,6 +305,26 @@ export class IfcAPI {
305
305
  * here.
306
306
  */
307
307
  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;
308
+ /**
309
+ * Existing sharded prepass plus an exact full-source key in complete.
310
+ */
311
+ buildPrePassStreamingShardedWithSourceFingerprint(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;
312
+ /**
313
+ * Existing streaming prepass plus an exact full-source key in complete.
314
+ */
315
+ buildPrePassStreamingWithSourceFingerprint(data: Uint8Array, on_event: Function, chunk_size: number, disabled_type_names: string[] | null | undefined, skip_type_geometry: boolean): any;
316
+ /**
317
+ * Calibrate one raster plane from native-source landmarks and a measured
318
+ * world span. Returns UTF-8 CalibratedPlane JSON. Constant bounded work;
319
+ * does not read IFC, decode image pixels or mutate a model.
320
+ */
321
+ calibrateAppearancePlane(request_json: string): Uint8Array;
322
+ /**
323
+ * Catalog effective IfcProduct classes and IfcRelDefinesByType membership.
324
+ * JSON input is AppearanceCatalogRequest; output is AppearanceCatalog JSON.
325
+ * Run in a worker and validate sourceRevision before using the selectors.
326
+ */
327
+ catalogAppearance(content: Uint8Array, request_json: string): Uint8Array;
308
328
  /**
309
329
  * Clear the cached entity index (call between loads when reusing
310
330
  * the same `IfcAPI` instance — e.g. the parser worker keeps one
@@ -532,6 +552,10 @@ export class IfcAPI {
532
552
  * comes from the meta event.
533
553
  */
534
554
  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;
555
+ /**
556
+ * Finalize prepass styles against the installed source and entity index.
557
+ */
558
+ finalizePrepassStylesFromSource(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;
535
559
  /**
536
560
  * Get WASM memory for zero-copy access
537
561
  */
@@ -593,12 +617,55 @@ export class IfcAPI {
593
617
  * ```
594
618
  */
595
619
  parseSymbolicRepresentations(content: string): SymbolicRepresentationCollection;
620
+ /**
621
+ * Create a calibrated image annotation through canonical native geometry.
622
+ * Input is AnnotationPlaneRequest; output UTF-8 AnnotationPlanePlan JSON.
623
+ * Does not mutate the IFC snapshot or decode the host-owned image.
624
+ */
625
+ planAnnotationPlane(content: Uint8Array, request_json: string): Uint8Array;
626
+ /**
627
+ * Plan image/UV edits against an effective IFC snapshot without mutating it.
628
+ * JSON input uses AppearanceRequest; output is UTF-8 AppearancePlan JSON.
629
+ * Call from a worker, then validate sourceRevision and allocator before an
630
+ * atomic host commit. Preview UVs describe an unsplit canonical mesh item.
631
+ */
632
+ planAppearance(content: Uint8Array, request_json: string): Uint8Array;
633
+ /**
634
+ * Create a captured textured surface through canonical native geometry.
635
+ * Input is CapturedMeshRequest; output UTF-8 CapturedMeshPlan JSON.
636
+ * Does not mutate the IFC snapshot or decode the host-owned image.
637
+ */
638
+ planCapturedMesh(content: Uint8Array, request_json: string): Uint8Array;
639
+ /**
640
+ * Registered mesh observations over canonical target albedo. Host verifies
641
+ * original GLB identity against decoded source mesh/image and freezes frames.
642
+ * Run in an owned cancellable worker. IFPA output adds `transfer` coverage;
643
+ * `plan` is null when no sample is observed. Never infer accuracy approval.
644
+ */
645
+ planMeshTransfer(content: Uint8Array, request_json: string, rgba: Uint8Array): Uint8Array;
646
+ /**
647
+ * Finite-page composition over original canonical albedo. RGBA is supplied
648
+ * separately from the bounded JSON request. Result: IFPA magic, little-endian
649
+ * u32 JSON byte length, metadata JSON, then PNG bytes addressed by metadata.
650
+ * Run in a cancellable worker; atomically adopt every item asset and IFC edit.
651
+ */
652
+ planPageAppearance(content: Uint8Array, request_json: string, rgba: Uint8Array): Uint8Array;
653
+ /**
654
+ * Plan a complete opaque polygonal PDF fill page as canonical IfcAnnotation
655
+ * geometry. Painted strokes, curves and unsupported states refuse atomically.
656
+ */
657
+ planPdfFillAnnotation(source: Uint8Array, request_json: string): Uint8Array;
658
+ /**
659
+ * Prepare bounded ordered PDF vector graphics states. No IFC entities or
660
+ * flattened geometry are produced; unsupported content prevents qualification.
661
+ */
662
+ preparePdfVectorPage(request_json: string): Uint8Array;
596
663
  /**
597
664
  * Process geometry for a subset of pre-scanned entities → flat
598
665
  * MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
599
666
  * Thin wrapper over [`IfcAPI::produce_batch`]; converts each produced mesh
600
- * to MeshDataJs (the IFC Z-up→WebGL Y-up swap + winding reversal happen
601
- * there). Output is byte-for-byte what the pre-refactor method produced.
667
+ * to MeshDataJs (the IFC Z-up→WebGL Y-up rotation with preserved winding happens
668
+ * there). Flat indices preserve source order through this proper rotation.
602
669
  */
603
670
  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;
604
671
  /**
@@ -643,6 +710,11 @@ export class IfcAPI {
643
710
  * Byte-for-byte identical output — it delegates to the legacy twin.
644
711
  */
645
712
  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;
713
+ /**
714
+ * Fit bounded manual correspondences in source metres -> IFC world Z-up
715
+ * metres, reporting held-out errors separately. Does not load or move models.
716
+ */
717
+ registerScanCorrespondences(request_json: string): Uint8Array;
646
718
  /**
647
719
  * Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
648
720
  * styled-item span list on this worker, against the entity index installed
@@ -654,6 +726,10 @@ export class IfcAPI {
654
726
  * `spans` is `[id, start, len]` triples.
655
727
  */
656
728
  resolveStyledItemsShard(data: Uint8Array, spans: Uint32Array): any;
729
+ /**
730
+ * Resolve styled-item spans against the installed source and entity index.
731
+ */
732
+ resolveStyledItemsShardFromSource(spans: Uint32Array): any;
657
733
  /**
658
734
  * Fast entity scanning using SIMD-accelerated Rust scanner
659
735
  * Returns array of entity references for data model parsing
@@ -705,6 +781,10 @@ export class IfcAPI {
705
781
  * (#3430).
706
782
  */
707
783
  scanEntityIndexShard(data: Uint8Array, range_start: number, range_end: number): any;
784
+ /**
785
+ * Scan a shard of the source installed by `setSourceBytes`.
786
+ */
787
+ scanEntityIndexShardFromSource(start: number, end: number): any;
708
788
  /**
709
789
  * Fast geometry-only entity scanning
710
790
  * Scans only entities that have geometry, skipping 99% of non-geometry entities
@@ -735,10 +815,10 @@ export class IfcAPI {
735
815
  * even though the pre-pass worker built the same index minutes
736
816
  * earlier.
737
817
  *
738
- * Builds a compact [`ColumnarEntityIndex`] from the three input slices
818
+ * Adopts the three binding-owned columns into a compact [`ColumnarEntityIndex`]
739
819
  * (sorted `u32` columns + binary search) instead of a per-worker
740
820
  * `FxHashMap` — ~229 MB vs ~436 MB on a 19.1 M-entity model (#1682).
741
- * [`ColumnarEntityIndex::from_columns`] verifies the id ordering once
821
+ * [`ColumnarEntityIndex::from_owned_columns`] verifies the id ordering once
742
822
  * (O(n)) and only argsorts if the producer did not emit sorted columns.
743
823
  *
744
824
  * `lengths[i]` is the byte length of entity `ids[i]`, so lookup returns
@@ -1544,6 +1624,7 @@ export class SymbolicFillArea {
1544
1624
  readonly fillB: number;
1545
1625
  readonly fillG: number;
1546
1626
  readonly fillR: number;
1627
+ readonly geometryItemId: number | undefined;
1547
1628
  readonly hasHatching: boolean;
1548
1629
  readonly hatchAngle: number;
1549
1630
  readonly hatchAngleSecondary: number;
@@ -1976,6 +2057,10 @@ export interface InitOutput {
1976
2057
  readonly ifcapi_buildPrePassOnce: (a: number, b: number, c: number) => number;
1977
2058
  readonly ifcapi_buildPrePassStreaming: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
1978
2059
  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;
2060
+ readonly ifcapi_buildPrePassStreamingShardedWithSourceFingerprint: (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;
2061
+ readonly ifcapi_buildPrePassStreamingWithSourceFingerprint: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
2062
+ readonly ifcapi_calibrateAppearancePlane: (a: number, b: number, c: number, d: number) => void;
2063
+ readonly ifcapi_catalogAppearance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
1979
2064
  readonly ifcapi_clearPrePassCache: (a: number) => void;
1980
2065
  readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
1981
2066
  readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
@@ -1995,6 +2080,7 @@ export interface InitOutput {
1995
2080
  readonly ifcapi_exportUsd: (a: number, b: number, c: number, d: number) => void;
1996
2081
  readonly ifcapi_extractProfiles: (a: number, b: number, c: number, d: number) => number;
1997
2082
  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;
2083
+ readonly ifcapi_finalizePrepassStylesFromSource: (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) => void;
1998
2084
  readonly ifcapi_getMemory: (a: number) => number;
1999
2085
  readonly ifcapi_getPipelineDiagnostics: (a: number) => number;
2000
2086
  readonly ifcapi_is_ready: (a: number) => number;
@@ -2003,15 +2089,25 @@ export interface InitOutput {
2003
2089
  readonly ifcapi_parseGridAxes: (a: number, b: number, c: number) => number;
2004
2090
  readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
2005
2091
  readonly ifcapi_parseSymbolicRepresentations: (a: number, b: number, c: number) => number;
2092
+ readonly ifcapi_planAnnotationPlane: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2093
+ readonly ifcapi_planAppearance: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2094
+ readonly ifcapi_planCapturedMesh: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2095
+ readonly ifcapi_planMeshTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2096
+ readonly ifcapi_planPageAppearance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
2097
+ readonly ifcapi_planPdfFillAnnotation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2098
+ readonly ifcapi_preparePdfVectorPage: (a: number, b: number, c: number, d: number) => void;
2006
2099
  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;
2007
2100
  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;
2008
2101
  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;
2009
2102
  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;
2010
2103
  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;
2104
+ readonly ifcapi_registerScanCorrespondences: (a: number, b: number, c: number, d: number) => void;
2011
2105
  readonly ifcapi_resolveStyledItemsShard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
2106
+ readonly ifcapi_resolveStyledItemsShardFromSource: (a: number, b: number, c: number, d: number) => void;
2012
2107
  readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
2013
2108
  readonly ifcapi_scanEntitiesFastBytes: (a: number, b: number, c: number) => number;
2014
2109
  readonly ifcapi_scanEntityIndexShard: (a: number, b: number, c: number, d: number, e: number) => number;
2110
+ readonly ifcapi_scanEntityIndexShardFromSource: (a: number, b: number, c: number) => number;
2015
2111
  readonly ifcapi_scanGeometryEntitiesFast: (a: number, b: number, c: number) => number;
2016
2112
  readonly ifcapi_setComputeGeometryHashes: (a: number, b: number, c: number) => void;
2017
2113
  readonly ifcapi_setEntityIndex: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
@@ -2136,10 +2232,12 @@ export interface InitOutput {
2136
2232
  readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
2137
2233
  readonly symboliccircle_startAngle: (a: number) => number;
2138
2234
  readonly symboliccircle_worldY: (a: number) => number;
2235
+ readonly symbolicfillarea_expressId: (a: number) => number;
2139
2236
  readonly symbolicfillarea_fillA: (a: number) => number;
2140
2237
  readonly symbolicfillarea_fillB: (a: number) => number;
2141
2238
  readonly symbolicfillarea_fillG: (a: number) => number;
2142
2239
  readonly symbolicfillarea_fillR: (a: number) => number;
2240
+ readonly symbolicfillarea_geometryItemId: (a: number) => number;
2143
2241
  readonly symbolicfillarea_hasHatching: (a: number) => number;
2144
2242
  readonly symbolicfillarea_hatchAngle: (a: number) => number;
2145
2243
  readonly symbolicfillarea_hatchAngleSecondary: (a: number) => number;
@@ -2155,6 +2253,7 @@ export interface InitOutput {
2155
2253
  readonly symbolicpolyline_expressId: (a: number) => number;
2156
2254
  readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
2157
2255
  readonly symbolicpolyline_isClosed: (a: number) => number;
2256
+ readonly symbolicpolyline_pointCount: (a: number) => number;
2158
2257
  readonly symbolicpolyline_points: (a: number) => number;
2159
2258
  readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
2160
2259
  readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
@@ -2172,11 +2271,11 @@ export interface InitOutput {
2172
2271
  readonly symbolicrepresentationcollection_truncatedLimit: (a: number) => number;
2173
2272
  readonly symbolicrepresentationcollection_truncatedReason: (a: number, b: number) => void;
2174
2273
  readonly symbolictext_alignment: (a: number, b: number) => void;
2175
- readonly symbolictext_colorA: (a: number) => number;
2176
2274
  readonly symbolictext_content: (a: number, b: number) => void;
2177
2275
  readonly symbolictext_ifcType: (a: number, b: number) => void;
2178
2276
  readonly symbolictext_repIdentifier: (a: number, b: number) => void;
2179
- readonly symbolictext_targetPx: (a: number) => number;
2277
+ readonly symbolictext_x: (a: number) => number;
2278
+ readonly symbolictext_y: (a: number) => number;
2180
2279
  readonly union2d: (a: number, b: number) => number;
2181
2280
  readonly version: (a: number) => void;
2182
2281
  readonly zonepiecejs_indices: (a: number) => number;
@@ -2186,10 +2285,9 @@ export interface InitOutput {
2186
2285
  readonly zonesplitjs_pieceCount: (a: number) => number;
2187
2286
  readonly zonesplitjs_remainderFailed: (a: number) => number;
2188
2287
  readonly meshoutlinejs_contourCount: (a: number) => number;
2189
- readonly symbolicpolyline_pointCount: (a: number) => number;
2190
2288
  readonly get_memory: () => number;
2191
- readonly symbolicfillarea_expressId: (a: number) => number;
2192
2289
  readonly symbolicpolyline_worldY: (a: number) => number;
2290
+ readonly symbolictext_colorA: (a: number) => number;
2193
2291
  readonly symbolictext_colorB: (a: number) => number;
2194
2292
  readonly symbolictext_colorG: (a: number) => number;
2195
2293
  readonly symbolictext_colorR: (a: number) => number;
@@ -2197,9 +2295,8 @@ export interface InitOutput {
2197
2295
  readonly symbolictext_dirY: (a: number) => number;
2198
2296
  readonly symbolictext_expressId: (a: number) => number;
2199
2297
  readonly symbolictext_height: (a: number) => number;
2298
+ readonly symbolictext_targetPx: (a: number) => number;
2200
2299
  readonly symbolictext_worldY: (a: number) => number;
2201
- readonly symbolictext_x: (a: number) => number;
2202
- readonly symbolictext_y: (a: number) => number;
2203
2300
  readonly zonepiecejs_volume: (a: number) => number;
2204
2301
  readonly zonesplitjs_sumErrorRel: (a: number) => number;
2205
2302
  readonly zonesplitjs_wholeVolume: (a: number) => number;
package/pkg/ifc-lite.js CHANGED
@@ -770,6 +770,133 @@ export class IfcAPI {
770
770
  heap[stack_pointer++] = undefined;
771
771
  }
772
772
  }
773
+ /**
774
+ * Existing sharded prepass plus an exact full-source key in complete.
775
+ * @param {Uint8Array} data
776
+ * @param {Function} on_event
777
+ * @param {number} chunk_size
778
+ * @param {string[] | null | undefined} disabled_type_names
779
+ * @param {boolean} skip_type_geometry
780
+ * @param {Uint32Array} index_ids
781
+ * @param {Uint32Array} index_starts
782
+ * @param {Uint32Array} index_lengths
783
+ * @param {Uint8Array} index_classes
784
+ * @returns {any}
785
+ */
786
+ buildPrePassStreamingShardedWithSourceFingerprint(data, on_event, chunk_size, disabled_type_names, skip_type_geometry, index_ids, index_starts, index_lengths, index_classes) {
787
+ try {
788
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
789
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
790
+ const len0 = WASM_VECTOR_LEN;
791
+ var ptr1 = isLikeNone(disabled_type_names) ? 0 : passArrayJsValueToWasm0(disabled_type_names, wasm.__wbindgen_export);
792
+ var len1 = WASM_VECTOR_LEN;
793
+ const ptr2 = passArray32ToWasm0(index_ids, wasm.__wbindgen_export);
794
+ const len2 = WASM_VECTOR_LEN;
795
+ const ptr3 = passArray32ToWasm0(index_starts, wasm.__wbindgen_export);
796
+ const len3 = WASM_VECTOR_LEN;
797
+ const ptr4 = passArray32ToWasm0(index_lengths, wasm.__wbindgen_export);
798
+ const len4 = WASM_VECTOR_LEN;
799
+ const ptr5 = passArray8ToWasm0(index_classes, wasm.__wbindgen_export);
800
+ const len5 = WASM_VECTOR_LEN;
801
+ wasm.ifcapi_buildPrePassStreamingShardedWithSourceFingerprint(retptr, this.__wbg_ptr, ptr0, len0, addBorrowedObject(on_event), chunk_size, ptr1, len1, skip_type_geometry, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5);
802
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
803
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
804
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
805
+ if (r2) {
806
+ throw takeObject(r1);
807
+ }
808
+ return takeObject(r0);
809
+ } finally {
810
+ wasm.__wbindgen_add_to_stack_pointer(16);
811
+ heap[stack_pointer++] = undefined;
812
+ }
813
+ }
814
+ /**
815
+ * Existing streaming prepass plus an exact full-source key in complete.
816
+ * @param {Uint8Array} data
817
+ * @param {Function} on_event
818
+ * @param {number} chunk_size
819
+ * @param {string[] | null | undefined} disabled_type_names
820
+ * @param {boolean} skip_type_geometry
821
+ * @returns {any}
822
+ */
823
+ buildPrePassStreamingWithSourceFingerprint(data, on_event, chunk_size, disabled_type_names, skip_type_geometry) {
824
+ try {
825
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
826
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
827
+ const len0 = WASM_VECTOR_LEN;
828
+ var ptr1 = isLikeNone(disabled_type_names) ? 0 : passArrayJsValueToWasm0(disabled_type_names, wasm.__wbindgen_export);
829
+ var len1 = WASM_VECTOR_LEN;
830
+ wasm.ifcapi_buildPrePassStreamingWithSourceFingerprint(retptr, this.__wbg_ptr, ptr0, len0, addBorrowedObject(on_event), chunk_size, ptr1, len1, skip_type_geometry);
831
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
832
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
833
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
834
+ if (r2) {
835
+ throw takeObject(r1);
836
+ }
837
+ return takeObject(r0);
838
+ } finally {
839
+ wasm.__wbindgen_add_to_stack_pointer(16);
840
+ heap[stack_pointer++] = undefined;
841
+ }
842
+ }
843
+ /**
844
+ * Calibrate one raster plane from native-source landmarks and a measured
845
+ * world span. Returns UTF-8 CalibratedPlane JSON. Constant bounded work;
846
+ * does not read IFC, decode image pixels or mutate a model.
847
+ * @param {string} request_json
848
+ * @returns {Uint8Array}
849
+ */
850
+ calibrateAppearancePlane(request_json) {
851
+ try {
852
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
853
+ const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
854
+ const len0 = WASM_VECTOR_LEN;
855
+ wasm.ifcapi_calibrateAppearancePlane(retptr, this.__wbg_ptr, ptr0, len0);
856
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
857
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
858
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
859
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
860
+ if (r3) {
861
+ throw takeObject(r2);
862
+ }
863
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
864
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
865
+ return v2;
866
+ } finally {
867
+ wasm.__wbindgen_add_to_stack_pointer(16);
868
+ }
869
+ }
870
+ /**
871
+ * Catalog effective IfcProduct classes and IfcRelDefinesByType membership.
872
+ * JSON input is AppearanceCatalogRequest; output is AppearanceCatalog JSON.
873
+ * Run in a worker and validate sourceRevision before using the selectors.
874
+ * @param {Uint8Array} content
875
+ * @param {string} request_json
876
+ * @returns {Uint8Array}
877
+ */
878
+ catalogAppearance(content, request_json) {
879
+ try {
880
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
881
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
882
+ const len0 = WASM_VECTOR_LEN;
883
+ const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
884
+ const len1 = WASM_VECTOR_LEN;
885
+ wasm.ifcapi_catalogAppearance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
886
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
887
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
888
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
889
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
890
+ if (r3) {
891
+ throw takeObject(r2);
892
+ }
893
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
894
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
895
+ return v3;
896
+ } finally {
897
+ wasm.__wbindgen_add_to_stack_pointer(16);
898
+ }
899
+ }
773
900
  /**
774
901
  * Clear the cached entity index (call between loads when reusing
775
902
  * the same `IfcAPI` instance — e.g. the parser worker keeps one
@@ -1435,6 +1562,56 @@ export class IfcAPI {
1435
1562
  wasm.__wbindgen_add_to_stack_pointer(16);
1436
1563
  }
1437
1564
  }
1565
+ /**
1566
+ * Finalize prepass styles against the installed source and entity index.
1567
+ * @param {Uint32Array} orphan_ids
1568
+ * @param {Float32Array} orphan_colors
1569
+ * @param {Uint32Array} geom_ids
1570
+ * @param {Float32Array} geom_colors
1571
+ * @param {Uint32Array} colour_map_spans
1572
+ * @param {Uint32Array} material_def_spans
1573
+ * @param {Uint32Array} rel_material_spans
1574
+ * @param {Uint32Array} void_spans
1575
+ * @param {Uint32Array} fills_spans
1576
+ * @param {Uint32Array} aggregate_spans
1577
+ * @param {number} plane_angle_to_radians
1578
+ * @returns {any}
1579
+ */
1580
+ finalizePrepassStylesFromSource(orphan_ids, orphan_colors, geom_ids, geom_colors, colour_map_spans, material_def_spans, rel_material_spans, void_spans, fills_spans, aggregate_spans, plane_angle_to_radians) {
1581
+ try {
1582
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1583
+ const ptr0 = passArray32ToWasm0(orphan_ids, wasm.__wbindgen_export);
1584
+ const len0 = WASM_VECTOR_LEN;
1585
+ const ptr1 = passArrayF32ToWasm0(orphan_colors, wasm.__wbindgen_export);
1586
+ const len1 = WASM_VECTOR_LEN;
1587
+ const ptr2 = passArray32ToWasm0(geom_ids, wasm.__wbindgen_export);
1588
+ const len2 = WASM_VECTOR_LEN;
1589
+ const ptr3 = passArrayF32ToWasm0(geom_colors, wasm.__wbindgen_export);
1590
+ const len3 = WASM_VECTOR_LEN;
1591
+ const ptr4 = passArray32ToWasm0(colour_map_spans, wasm.__wbindgen_export);
1592
+ const len4 = WASM_VECTOR_LEN;
1593
+ const ptr5 = passArray32ToWasm0(material_def_spans, wasm.__wbindgen_export);
1594
+ const len5 = WASM_VECTOR_LEN;
1595
+ const ptr6 = passArray32ToWasm0(rel_material_spans, wasm.__wbindgen_export);
1596
+ const len6 = WASM_VECTOR_LEN;
1597
+ const ptr7 = passArray32ToWasm0(void_spans, wasm.__wbindgen_export);
1598
+ const len7 = WASM_VECTOR_LEN;
1599
+ const ptr8 = passArray32ToWasm0(fills_spans, wasm.__wbindgen_export);
1600
+ const len8 = WASM_VECTOR_LEN;
1601
+ const ptr9 = passArray32ToWasm0(aggregate_spans, wasm.__wbindgen_export);
1602
+ const len9 = WASM_VECTOR_LEN;
1603
+ wasm.ifcapi_finalizePrepassStylesFromSource(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, ptr7, len7, ptr8, len8, ptr9, len9, plane_angle_to_radians);
1604
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1605
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1606
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1607
+ if (r2) {
1608
+ throw takeObject(r1);
1609
+ }
1610
+ return takeObject(r0);
1611
+ } finally {
1612
+ wasm.__wbindgen_add_to_stack_pointer(16);
1613
+ }
1614
+ }
1438
1615
  /**
1439
1616
  * Get WASM memory for zero-copy access
1440
1617
  * @returns {any}
@@ -1545,12 +1722,226 @@ export class IfcAPI {
1545
1722
  const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
1546
1723
  return SymbolicRepresentationCollection.__wrap(ret);
1547
1724
  }
1725
+ /**
1726
+ * Create a calibrated image annotation through canonical native geometry.
1727
+ * Input is AnnotationPlaneRequest; output UTF-8 AnnotationPlanePlan JSON.
1728
+ * Does not mutate the IFC snapshot or decode the host-owned image.
1729
+ * @param {Uint8Array} content
1730
+ * @param {string} request_json
1731
+ * @returns {Uint8Array}
1732
+ */
1733
+ planAnnotationPlane(content, request_json) {
1734
+ try {
1735
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1736
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
1737
+ const len0 = WASM_VECTOR_LEN;
1738
+ const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1739
+ const len1 = WASM_VECTOR_LEN;
1740
+ wasm.ifcapi_planAnnotationPlane(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1741
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1742
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1743
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1744
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1745
+ if (r3) {
1746
+ throw takeObject(r2);
1747
+ }
1748
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1749
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1750
+ return v3;
1751
+ } finally {
1752
+ wasm.__wbindgen_add_to_stack_pointer(16);
1753
+ }
1754
+ }
1755
+ /**
1756
+ * Plan image/UV edits against an effective IFC snapshot without mutating it.
1757
+ * JSON input uses AppearanceRequest; output is UTF-8 AppearancePlan JSON.
1758
+ * Call from a worker, then validate sourceRevision and allocator before an
1759
+ * atomic host commit. Preview UVs describe an unsplit canonical mesh item.
1760
+ * @param {Uint8Array} content
1761
+ * @param {string} request_json
1762
+ * @returns {Uint8Array}
1763
+ */
1764
+ planAppearance(content, request_json) {
1765
+ try {
1766
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1767
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
1768
+ const len0 = WASM_VECTOR_LEN;
1769
+ const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1770
+ const len1 = WASM_VECTOR_LEN;
1771
+ wasm.ifcapi_planAppearance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1772
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1773
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1774
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1775
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1776
+ if (r3) {
1777
+ throw takeObject(r2);
1778
+ }
1779
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1780
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1781
+ return v3;
1782
+ } finally {
1783
+ wasm.__wbindgen_add_to_stack_pointer(16);
1784
+ }
1785
+ }
1786
+ /**
1787
+ * Create a captured textured surface through canonical native geometry.
1788
+ * Input is CapturedMeshRequest; output UTF-8 CapturedMeshPlan JSON.
1789
+ * Does not mutate the IFC snapshot or decode the host-owned image.
1790
+ * @param {Uint8Array} content
1791
+ * @param {string} request_json
1792
+ * @returns {Uint8Array}
1793
+ */
1794
+ planCapturedMesh(content, request_json) {
1795
+ try {
1796
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1797
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
1798
+ const len0 = WASM_VECTOR_LEN;
1799
+ const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1800
+ const len1 = WASM_VECTOR_LEN;
1801
+ wasm.ifcapi_planCapturedMesh(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1802
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1803
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1804
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1805
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1806
+ if (r3) {
1807
+ throw takeObject(r2);
1808
+ }
1809
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1810
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1811
+ return v3;
1812
+ } finally {
1813
+ wasm.__wbindgen_add_to_stack_pointer(16);
1814
+ }
1815
+ }
1816
+ /**
1817
+ * Registered mesh observations over canonical target albedo. Host verifies
1818
+ * original GLB identity against decoded source mesh/image and freezes frames.
1819
+ * Run in an owned cancellable worker. IFPA output adds `transfer` coverage;
1820
+ * `plan` is null when no sample is observed. Never infer accuracy approval.
1821
+ * @param {Uint8Array} content
1822
+ * @param {string} request_json
1823
+ * @param {Uint8Array} rgba
1824
+ * @returns {Uint8Array}
1825
+ */
1826
+ planMeshTransfer(content, request_json, rgba) {
1827
+ try {
1828
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1829
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
1830
+ const len0 = WASM_VECTOR_LEN;
1831
+ const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1832
+ const len1 = WASM_VECTOR_LEN;
1833
+ const ptr2 = passArray8ToWasm0(rgba, wasm.__wbindgen_export);
1834
+ const len2 = WASM_VECTOR_LEN;
1835
+ wasm.ifcapi_planMeshTransfer(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1836
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1837
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1838
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1839
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1840
+ if (r3) {
1841
+ throw takeObject(r2);
1842
+ }
1843
+ var v4 = getArrayU8FromWasm0(r0, r1).slice();
1844
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1845
+ return v4;
1846
+ } finally {
1847
+ wasm.__wbindgen_add_to_stack_pointer(16);
1848
+ }
1849
+ }
1850
+ /**
1851
+ * Finite-page composition over original canonical albedo. RGBA is supplied
1852
+ * separately from the bounded JSON request. Result: IFPA magic, little-endian
1853
+ * u32 JSON byte length, metadata JSON, then PNG bytes addressed by metadata.
1854
+ * Run in a cancellable worker; atomically adopt every item asset and IFC edit.
1855
+ * @param {Uint8Array} content
1856
+ * @param {string} request_json
1857
+ * @param {Uint8Array} rgba
1858
+ * @returns {Uint8Array}
1859
+ */
1860
+ planPageAppearance(content, request_json, rgba) {
1861
+ try {
1862
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1863
+ const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
1864
+ const len0 = WASM_VECTOR_LEN;
1865
+ const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1866
+ const len1 = WASM_VECTOR_LEN;
1867
+ const ptr2 = passArray8ToWasm0(rgba, wasm.__wbindgen_export);
1868
+ const len2 = WASM_VECTOR_LEN;
1869
+ wasm.ifcapi_planPageAppearance(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2);
1870
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1871
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1872
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1873
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1874
+ if (r3) {
1875
+ throw takeObject(r2);
1876
+ }
1877
+ var v4 = getArrayU8FromWasm0(r0, r1).slice();
1878
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1879
+ return v4;
1880
+ } finally {
1881
+ wasm.__wbindgen_add_to_stack_pointer(16);
1882
+ }
1883
+ }
1884
+ /**
1885
+ * Plan a complete opaque polygonal PDF fill page as canonical IfcAnnotation
1886
+ * geometry. Painted strokes, curves and unsupported states refuse atomically.
1887
+ * @param {Uint8Array} source
1888
+ * @param {string} request_json
1889
+ * @returns {Uint8Array}
1890
+ */
1891
+ planPdfFillAnnotation(source, request_json) {
1892
+ try {
1893
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1894
+ const ptr0 = passArray8ToWasm0(source, wasm.__wbindgen_export);
1895
+ const len0 = WASM_VECTOR_LEN;
1896
+ const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1897
+ const len1 = WASM_VECTOR_LEN;
1898
+ wasm.ifcapi_planPdfFillAnnotation(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1);
1899
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1900
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1901
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1902
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1903
+ if (r3) {
1904
+ throw takeObject(r2);
1905
+ }
1906
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
1907
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1908
+ return v3;
1909
+ } finally {
1910
+ wasm.__wbindgen_add_to_stack_pointer(16);
1911
+ }
1912
+ }
1913
+ /**
1914
+ * Prepare bounded ordered PDF vector graphics states. No IFC entities or
1915
+ * flattened geometry are produced; unsupported content prevents qualification.
1916
+ * @param {string} request_json
1917
+ * @returns {Uint8Array}
1918
+ */
1919
+ preparePdfVectorPage(request_json) {
1920
+ try {
1921
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1922
+ const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1923
+ const len0 = WASM_VECTOR_LEN;
1924
+ wasm.ifcapi_preparePdfVectorPage(retptr, this.__wbg_ptr, ptr0, len0);
1925
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1926
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1927
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1928
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1929
+ if (r3) {
1930
+ throw takeObject(r2);
1931
+ }
1932
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
1933
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1934
+ return v2;
1935
+ } finally {
1936
+ wasm.__wbindgen_add_to_stack_pointer(16);
1937
+ }
1938
+ }
1548
1939
  /**
1549
1940
  * Process geometry for a subset of pre-scanned entities → flat
1550
1941
  * MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
1551
1942
  * Thin wrapper over [`IfcAPI::produce_batch`]; converts each produced mesh
1552
- * to MeshDataJs (the IFC Z-up→WebGL Y-up swap + winding reversal happen
1553
- * there). Output is byte-for-byte what the pre-refactor method produced.
1943
+ * to MeshDataJs (the IFC Z-up→WebGL Y-up rotation with preserved winding happens
1944
+ * there). Flat indices preserve source order through this proper rotation.
1554
1945
  * @param {Uint8Array} data
1555
1946
  * @param {Uint32Array} jobs_flat
1556
1947
  * @param {number} unit_scale
@@ -1798,6 +2189,32 @@ export class IfcAPI {
1798
2189
  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);
1799
2190
  return PartitionedBatch.__wrap(ret);
1800
2191
  }
2192
+ /**
2193
+ * Fit bounded manual correspondences in source metres -> IFC world Z-up
2194
+ * metres, reporting held-out errors separately. Does not load or move models.
2195
+ * @param {string} request_json
2196
+ * @returns {Uint8Array}
2197
+ */
2198
+ registerScanCorrespondences(request_json) {
2199
+ try {
2200
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2201
+ const ptr0 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
2202
+ const len0 = WASM_VECTOR_LEN;
2203
+ wasm.ifcapi_registerScanCorrespondences(retptr, this.__wbg_ptr, ptr0, len0);
2204
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2205
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2206
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2207
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
2208
+ if (r3) {
2209
+ throw takeObject(r2);
2210
+ }
2211
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
2212
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
2213
+ return v2;
2214
+ } finally {
2215
+ wasm.__wbindgen_add_to_stack_pointer(16);
2216
+ }
2217
+ }
1801
2218
  /**
1802
2219
  * Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
1803
2220
  * styled-item span list on this worker, against the entity index installed
@@ -1830,6 +2247,28 @@ export class IfcAPI {
1830
2247
  wasm.__wbindgen_add_to_stack_pointer(16);
1831
2248
  }
1832
2249
  }
2250
+ /**
2251
+ * Resolve styled-item spans against the installed source and entity index.
2252
+ * @param {Uint32Array} spans
2253
+ * @returns {any}
2254
+ */
2255
+ resolveStyledItemsShardFromSource(spans) {
2256
+ try {
2257
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2258
+ const ptr0 = passArray32ToWasm0(spans, wasm.__wbindgen_export);
2259
+ const len0 = WASM_VECTOR_LEN;
2260
+ wasm.ifcapi_resolveStyledItemsShardFromSource(retptr, this.__wbg_ptr, ptr0, len0);
2261
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2262
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2263
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
2264
+ if (r2) {
2265
+ throw takeObject(r1);
2266
+ }
2267
+ return takeObject(r0);
2268
+ } finally {
2269
+ wasm.__wbindgen_add_to_stack_pointer(16);
2270
+ }
2271
+ }
1833
2272
  /**
1834
2273
  * Fast entity scanning using SIMD-accelerated Rust scanner
1835
2274
  * Returns array of entity references for data model parsing
@@ -1904,6 +2343,16 @@ export class IfcAPI {
1904
2343
  const ret = wasm.ifcapi_scanEntityIndexShard(this.__wbg_ptr, ptr0, len0, range_start, range_end);
1905
2344
  return takeObject(ret);
1906
2345
  }
2346
+ /**
2347
+ * Scan a shard of the source installed by `setSourceBytes`.
2348
+ * @param {number} start
2349
+ * @param {number} end
2350
+ * @returns {any}
2351
+ */
2352
+ scanEntityIndexShardFromSource(start, end) {
2353
+ const ret = wasm.ifcapi_scanEntityIndexShardFromSource(this.__wbg_ptr, start, end);
2354
+ return takeObject(ret);
2355
+ }
1907
2356
  /**
1908
2357
  * Fast geometry-only entity scanning
1909
2358
  * Scans only entities that have geometry, skipping 99% of non-geometry entities
@@ -1944,10 +2393,10 @@ export class IfcAPI {
1944
2393
  * even though the pre-pass worker built the same index minutes
1945
2394
  * earlier.
1946
2395
  *
1947
- * Builds a compact [`ColumnarEntityIndex`] from the three input slices
2396
+ * Adopts the three binding-owned columns into a compact [`ColumnarEntityIndex`]
1948
2397
  * (sorted `u32` columns + binary search) instead of a per-worker
1949
2398
  * `FxHashMap` — ~229 MB vs ~436 MB on a 19.1 M-entity model (#1682).
1950
- * [`ColumnarEntityIndex::from_columns`] verifies the id ordering once
2399
+ * [`ColumnarEntityIndex::from_owned_columns`] verifies the id ordering once
1951
2400
  * (O(n)) and only argsorts if the producer did not emit sorted columns.
1952
2401
  *
1953
2402
  * `lengths[i]` is the byte length of entity `ids[i]`, so lookup returns
@@ -4002,6 +4451,13 @@ export class SymbolicFillArea {
4002
4451
  const ret = wasm.symbolicfillarea_fillR(this.__wbg_ptr);
4003
4452
  return ret;
4004
4453
  }
4454
+ /**
4455
+ * @returns {number | undefined}
4456
+ */
4457
+ get geometryItemId() {
4458
+ const ret = wasm.symbolicfillarea_geometryItemId(this.__wbg_ptr);
4459
+ return ret === Number.MAX_SAFE_INTEGER ? undefined : ret;
4460
+ }
4005
4461
  /**
4006
4462
  * @returns {boolean}
4007
4463
  */
Binary file