@ifc-lite/wasm 6.4.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 +49 -0
- package/package.json +1 -1
- package/pkg/ifc-lite.d.ts +78 -6
- package/pkg/ifc-lite.js +304 -0
- package/pkg/ifc-lite_bg.wasm +0 -0
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
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -313,6 +313,18 @@ export class IfcAPI {
|
|
|
313
313
|
* Existing streaming prepass plus an exact full-source key in complete.
|
|
314
314
|
*/
|
|
315
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;
|
|
316
328
|
/**
|
|
317
329
|
* Clear the cached entity index (call between loads when reusing
|
|
318
330
|
* the same `IfcAPI` instance — e.g. the parser worker keeps one
|
|
@@ -605,6 +617,49 @@ export class IfcAPI {
|
|
|
605
617
|
* ```
|
|
606
618
|
*/
|
|
607
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;
|
|
608
663
|
/**
|
|
609
664
|
* Process geometry for a subset of pre-scanned entities → flat
|
|
610
665
|
* MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
|
|
@@ -655,6 +710,11 @@ export class IfcAPI {
|
|
|
655
710
|
* Byte-for-byte identical output — it delegates to the legacy twin.
|
|
656
711
|
*/
|
|
657
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;
|
|
658
718
|
/**
|
|
659
719
|
* Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
|
|
660
720
|
* styled-item span list on this worker, against the entity index installed
|
|
@@ -1564,6 +1624,7 @@ export class SymbolicFillArea {
|
|
|
1564
1624
|
readonly fillB: number;
|
|
1565
1625
|
readonly fillG: number;
|
|
1566
1626
|
readonly fillR: number;
|
|
1627
|
+
readonly geometryItemId: number | undefined;
|
|
1567
1628
|
readonly hasHatching: boolean;
|
|
1568
1629
|
readonly hatchAngle: number;
|
|
1569
1630
|
readonly hatchAngleSecondary: number;
|
|
@@ -1998,6 +2059,8 @@ export interface InitOutput {
|
|
|
1998
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;
|
|
1999
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;
|
|
2000
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;
|
|
2001
2064
|
readonly ifcapi_clearPrePassCache: (a: number) => void;
|
|
2002
2065
|
readonly ifcapi_diagnoseGeometry: (a: number, b: number, c: number) => number;
|
|
2003
2066
|
readonly ifcapi_exportCsv: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => void;
|
|
@@ -2026,11 +2089,19 @@ export interface InitOutput {
|
|
|
2026
2089
|
readonly ifcapi_parseGridAxes: (a: number, b: number, c: number) => number;
|
|
2027
2090
|
readonly ifcapi_parseGridLines: (a: number, b: number, c: number) => number;
|
|
2028
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;
|
|
2029
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;
|
|
2030
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;
|
|
2031
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;
|
|
2032
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;
|
|
2033
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;
|
|
2034
2105
|
readonly ifcapi_resolveStyledItemsShard: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2035
2106
|
readonly ifcapi_resolveStyledItemsShardFromSource: (a: number, b: number, c: number, d: number) => void;
|
|
2036
2107
|
readonly ifcapi_scanEntitiesFast: (a: number, b: number, c: number) => number;
|
|
@@ -2161,10 +2232,12 @@ export interface InitOutput {
|
|
|
2161
2232
|
readonly symboliccircle_repIdentifier: (a: number, b: number) => void;
|
|
2162
2233
|
readonly symboliccircle_startAngle: (a: number) => number;
|
|
2163
2234
|
readonly symboliccircle_worldY: (a: number) => number;
|
|
2235
|
+
readonly symbolicfillarea_expressId: (a: number) => number;
|
|
2164
2236
|
readonly symbolicfillarea_fillA: (a: number) => number;
|
|
2165
2237
|
readonly symbolicfillarea_fillB: (a: number) => number;
|
|
2166
2238
|
readonly symbolicfillarea_fillG: (a: number) => number;
|
|
2167
2239
|
readonly symbolicfillarea_fillR: (a: number) => number;
|
|
2240
|
+
readonly symbolicfillarea_geometryItemId: (a: number) => number;
|
|
2168
2241
|
readonly symbolicfillarea_hasHatching: (a: number) => number;
|
|
2169
2242
|
readonly symbolicfillarea_hatchAngle: (a: number) => number;
|
|
2170
2243
|
readonly symbolicfillarea_hatchAngleSecondary: (a: number) => number;
|
|
@@ -2180,6 +2253,7 @@ export interface InitOutput {
|
|
|
2180
2253
|
readonly symbolicpolyline_expressId: (a: number) => number;
|
|
2181
2254
|
readonly symbolicpolyline_ifcType: (a: number, b: number) => void;
|
|
2182
2255
|
readonly symbolicpolyline_isClosed: (a: number) => number;
|
|
2256
|
+
readonly symbolicpolyline_pointCount: (a: number) => number;
|
|
2183
2257
|
readonly symbolicpolyline_points: (a: number) => number;
|
|
2184
2258
|
readonly symbolicpolyline_repIdentifier: (a: number, b: number) => void;
|
|
2185
2259
|
readonly symbolicrepresentationcollection_circleCount: (a: number) => number;
|
|
@@ -2197,11 +2271,11 @@ export interface InitOutput {
|
|
|
2197
2271
|
readonly symbolicrepresentationcollection_truncatedLimit: (a: number) => number;
|
|
2198
2272
|
readonly symbolicrepresentationcollection_truncatedReason: (a: number, b: number) => void;
|
|
2199
2273
|
readonly symbolictext_alignment: (a: number, b: number) => void;
|
|
2200
|
-
readonly symbolictext_colorA: (a: number) => number;
|
|
2201
2274
|
readonly symbolictext_content: (a: number, b: number) => void;
|
|
2202
2275
|
readonly symbolictext_ifcType: (a: number, b: number) => void;
|
|
2203
2276
|
readonly symbolictext_repIdentifier: (a: number, b: number) => void;
|
|
2204
|
-
readonly
|
|
2277
|
+
readonly symbolictext_x: (a: number) => number;
|
|
2278
|
+
readonly symbolictext_y: (a: number) => number;
|
|
2205
2279
|
readonly union2d: (a: number, b: number) => number;
|
|
2206
2280
|
readonly version: (a: number) => void;
|
|
2207
2281
|
readonly zonepiecejs_indices: (a: number) => number;
|
|
@@ -2211,10 +2285,9 @@ export interface InitOutput {
|
|
|
2211
2285
|
readonly zonesplitjs_pieceCount: (a: number) => number;
|
|
2212
2286
|
readonly zonesplitjs_remainderFailed: (a: number) => number;
|
|
2213
2287
|
readonly meshoutlinejs_contourCount: (a: number) => number;
|
|
2214
|
-
readonly symbolicpolyline_pointCount: (a: number) => number;
|
|
2215
2288
|
readonly get_memory: () => number;
|
|
2216
|
-
readonly symbolicfillarea_expressId: (a: number) => number;
|
|
2217
2289
|
readonly symbolicpolyline_worldY: (a: number) => number;
|
|
2290
|
+
readonly symbolictext_colorA: (a: number) => number;
|
|
2218
2291
|
readonly symbolictext_colorB: (a: number) => number;
|
|
2219
2292
|
readonly symbolictext_colorG: (a: number) => number;
|
|
2220
2293
|
readonly symbolictext_colorR: (a: number) => number;
|
|
@@ -2222,9 +2295,8 @@ export interface InitOutput {
|
|
|
2222
2295
|
readonly symbolictext_dirY: (a: number) => number;
|
|
2223
2296
|
readonly symbolictext_expressId: (a: number) => number;
|
|
2224
2297
|
readonly symbolictext_height: (a: number) => number;
|
|
2298
|
+
readonly symbolictext_targetPx: (a: number) => number;
|
|
2225
2299
|
readonly symbolictext_worldY: (a: number) => number;
|
|
2226
|
-
readonly symbolictext_x: (a: number) => number;
|
|
2227
|
-
readonly symbolictext_y: (a: number) => number;
|
|
2228
2300
|
readonly zonepiecejs_volume: (a: number) => number;
|
|
2229
2301
|
readonly zonesplitjs_sumErrorRel: (a: number) => number;
|
|
2230
2302
|
readonly zonesplitjs_wholeVolume: (a: number) => number;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -840,6 +840,63 @@ export class IfcAPI {
|
|
|
840
840
|
heap[stack_pointer++] = undefined;
|
|
841
841
|
}
|
|
842
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
|
+
}
|
|
843
900
|
/**
|
|
844
901
|
* Clear the cached entity index (call between loads when reusing
|
|
845
902
|
* the same `IfcAPI` instance — e.g. the parser worker keeps one
|
|
@@ -1665,6 +1722,220 @@ export class IfcAPI {
|
|
|
1665
1722
|
const ret = wasm.ifcapi_parseSymbolicRepresentations(this.__wbg_ptr, ptr0, len0);
|
|
1666
1723
|
return SymbolicRepresentationCollection.__wrap(ret);
|
|
1667
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
|
+
}
|
|
1668
1939
|
/**
|
|
1669
1940
|
* Process geometry for a subset of pre-scanned entities → flat
|
|
1670
1941
|
* MeshCollection. Takes raw bytes + pre-pass data from buildPrePassOnce.
|
|
@@ -1918,6 +2189,32 @@ export class IfcAPI {
|
|
|
1918
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);
|
|
1919
2190
|
return PartitionedBatch.__wrap(ret);
|
|
1920
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
|
+
}
|
|
1921
2218
|
/**
|
|
1922
2219
|
* Sharded pre-pass: resolve ONE contiguous (file-ordered) slice of the
|
|
1923
2220
|
* styled-item span list on this worker, against the entity index installed
|
|
@@ -4154,6 +4451,13 @@ export class SymbolicFillArea {
|
|
|
4154
4451
|
const ret = wasm.symbolicfillarea_fillR(this.__wbg_ptr);
|
|
4155
4452
|
return ret;
|
|
4156
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
|
+
}
|
|
4157
4461
|
/**
|
|
4158
4462
|
* @returns {boolean}
|
|
4159
4463
|
*/
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|