@ifc-lite/wasm 7.0.0 → 8.0.1
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 +19 -3
- package/package.json +1 -1
- package/pkg/ifc-lite.d.ts +30 -9
- package/pkg/ifc-lite.js +73 -9
- package/pkg/ifc-lite_bg.wasm +0 -0
package/README.md
CHANGED
|
@@ -157,6 +157,22 @@ for source identity, coordinate frames, budgets and host acceptance requirements
|
|
|
157
157
|
|
|
158
158
|
`IfcAPI.preparePdfVectorPage` validates bounded ordered PDF vector graphics states
|
|
159
159
|
and preserves source operator identity, calibrated transforms and paint state.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
Content the planner cannot convert (text, images, clips, transparency,
|
|
161
|
+
patterns, unqualified dashed strokes, curved/hairline strokes, unknown operators) is returned
|
|
162
|
+
as a fidelity report with counts, page extents and visibility, and an
|
|
163
|
+
`exact`/`rasterOnly` verdict; `IfcAPI.planPdfFillAnnotation` plans a partial
|
|
164
|
+
page only when the request quotes that report's digest as the user's
|
|
165
|
+
acceptance. It emits no IFC entities and makes no flattened-geometry fidelity
|
|
166
|
+
claim; see the
|
|
167
|
+
[preparation contract](../../docs/api/wasm.md#pdf-vector-graphics-state-preparation-and-fidelity-report).
|
|
168
|
+
Qualified positive dash patterns on open and closed straight subpaths preserve
|
|
169
|
+
phase, odd-array repetition, subpath reset, joins across vertices and run caps.
|
|
170
|
+
The closing edge participates in the pattern. PDF 1.0–1.7 retain caps where the
|
|
171
|
+
first and last on-dash pieces meet at the closure seam; PDF 2.0 joins them.
|
|
172
|
+
PDF.js's effective format version is bound into the page DTO; an unknown version
|
|
173
|
+
reports `dashVersion`, and a PDF 1.x dash covering the complete closed perimeter
|
|
174
|
+
reports `dashTopology`. Explicit close-path and close-and-stroke operators share
|
|
175
|
+
the versioned behavior.
|
|
176
|
+
Combined fill and dashed-stroke paints can still refuse atomically when
|
|
177
|
+
multiple run boundaries produce crossings outside the current fill-region
|
|
178
|
+
qualifier.
|
package/package.json
CHANGED
package/pkg/ifc-lite.d.ts
CHANGED
|
@@ -399,11 +399,13 @@ export class IfcAPI {
|
|
|
399
399
|
* per-mesh local). The caller passes exactly the meshes it wants emitted.
|
|
400
400
|
*
|
|
401
401
|
* Fails CLOSED: if the declared vertex/index counts run past the flattened
|
|
402
|
-
* `positions` / `indices`, there are fewer `index_counts` than meshes,
|
|
403
|
-
* is empty or too short to cover every vertex,
|
|
404
|
-
*
|
|
405
|
-
*
|
|
406
|
-
*
|
|
402
|
+
* `positions` / `indices`, there are fewer `index_counts` than meshes, `normals`
|
|
403
|
+
* is empty or too short to cover every vertex, or an index names a vertex its own
|
|
404
|
+
* mesh does not have (glTF 2.0 3.7.2.1), this throws an `Error` whose message
|
|
405
|
+
* starts with `MALFORMED_MESH_INPUT` — instead of silently emitting a GLB with
|
|
406
|
+
* those meshes dropped, or one carrying the out-of-range index straight into the
|
|
407
|
+
* BIN chunk. (The viewer always passes fully-backed, normal-covered, in-range
|
|
408
|
+
* arrays, so this only fires on a caller bug.)
|
|
407
409
|
*/
|
|
408
410
|
exportGlbFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, express_ids: Uint32Array, include_metadata: boolean, lit?: boolean | null, emissive?: boolean | null): Uint8Array;
|
|
409
411
|
/**
|
|
@@ -482,6 +484,14 @@ export class IfcAPI {
|
|
|
482
484
|
* `altitude_mode` (`"clampToGround"` default ⇒ rest on terrain, ignoring
|
|
483
485
|
* `altitude`; `"absolute"` ⇒ place at `altitude` metres MSL) selects the
|
|
484
486
|
* KML vertical placement (#1427).
|
|
487
|
+
*
|
|
488
|
+
* Fails CLOSED: when no triangle survives (an empty visible set, or meshes
|
|
489
|
+
* whose only triangles are degenerate and collapse in the vertex dedup)
|
|
490
|
+
* this throws an `Error` whose message starts with `NO_RENDER_GEOMETRY`;
|
|
491
|
+
* a declared vertex/index count running past its buffer throws
|
|
492
|
+
* `MALFORMED_MESH_INPUT`, as `exportGlbFromMeshes` does. Both used to ship
|
|
493
|
+
* as a small "successful" archive: the first around a COLLADA document
|
|
494
|
+
* the 1.4.1 schema rejects, the second with every later mesh missing.
|
|
485
495
|
*/
|
|
486
496
|
exportKmzFromMeshes(positions: Float32Array, normals: Float32Array, indices: Uint32Array, vertex_counts: Uint32Array, index_counts: Uint32Array, colors: Float32Array, origins: Float64Array, latitude: number, longitude: number, altitude: number, x_axis_abscissa: number | null | undefined, x_axis_ordinate: number | null | undefined, name: string, altitude_mode?: string | null): Uint8Array;
|
|
487
497
|
/**
|
|
@@ -667,13 +677,23 @@ export class IfcAPI {
|
|
|
667
677
|
*/
|
|
668
678
|
planPageAppearance(content: Uint8Array, request_json: string, rgba: Uint8Array): Uint8Array;
|
|
669
679
|
/**
|
|
670
|
-
* Plan
|
|
671
|
-
* geometry
|
|
680
|
+
* Plan an opaque polygonal PDF fill page as canonical IfcAnnotation
|
|
681
|
+
* geometry with a provenance property set. An exact page plans directly; a
|
|
682
|
+
* page with visible omissions needs the accepted fidelity report digest.
|
|
672
683
|
*/
|
|
673
684
|
planPdfFillAnnotation(source: Uint8Array, request_json: string): Uint8Array;
|
|
674
685
|
/**
|
|
675
|
-
*
|
|
676
|
-
*
|
|
686
|
+
* Registered RGB point-cloud observations (#4381). `request_json.source`
|
|
687
|
+
* is `{kind:'points', …}`; `positions` (3n f64, source-frame metres) and
|
|
688
|
+
* `colors` (3n RGB8) are the payload, `normals` (3n f32, oriented) and
|
|
689
|
+
* `stations` (n indices into `source.viewpoints`) are empty when absent.
|
|
690
|
+
* `rgba` carries only the target's existing rasters. Same output as
|
|
691
|
+
* `planMeshTransfer`; `transfer.source` records the orientation used.
|
|
692
|
+
*/
|
|
693
|
+
planPointTransfer(content: Uint8Array, request_json: string, rgba: Uint8Array, positions: Float64Array, colors: Uint8Array, normals: Float32Array, stations: Uint32Array): Uint8Array;
|
|
694
|
+
/**
|
|
695
|
+
* Prepare bounded ordered PDF vector graphics states and the page fidelity
|
|
696
|
+
* report (convertible paths, omissions with extent, exact/raster-only).
|
|
677
697
|
*/
|
|
678
698
|
preparePdfVectorPage(request_json: string): Uint8Array;
|
|
679
699
|
/**
|
|
@@ -2111,6 +2131,7 @@ export interface InitOutput {
|
|
|
2111
2131
|
readonly ifcapi_planMeshTransfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
2112
2132
|
readonly ifcapi_planPageAppearance: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
|
|
2113
2133
|
readonly ifcapi_planPdfFillAnnotation: (a: number, b: number, c: number, d: number, e: number, f: number) => void;
|
|
2134
|
+
readonly ifcapi_planPointTransfer: (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) => void;
|
|
2114
2135
|
readonly ifcapi_preparePdfVectorPage: (a: number, b: number, c: number, d: number) => void;
|
|
2115
2136
|
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;
|
|
2116
2137
|
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;
|
package/pkg/ifc-lite.js
CHANGED
|
@@ -1058,11 +1058,13 @@ export class IfcAPI {
|
|
|
1058
1058
|
* per-mesh local). The caller passes exactly the meshes it wants emitted.
|
|
1059
1059
|
*
|
|
1060
1060
|
* Fails CLOSED: if the declared vertex/index counts run past the flattened
|
|
1061
|
-
* `positions` / `indices`, there are fewer `index_counts` than meshes,
|
|
1062
|
-
* is empty or too short to cover every vertex,
|
|
1063
|
-
*
|
|
1064
|
-
*
|
|
1065
|
-
*
|
|
1061
|
+
* `positions` / `indices`, there are fewer `index_counts` than meshes, `normals`
|
|
1062
|
+
* is empty or too short to cover every vertex, or an index names a vertex its own
|
|
1063
|
+
* mesh does not have (glTF 2.0 3.7.2.1), this throws an `Error` whose message
|
|
1064
|
+
* starts with `MALFORMED_MESH_INPUT` — instead of silently emitting a GLB with
|
|
1065
|
+
* those meshes dropped, or one carrying the out-of-range index straight into the
|
|
1066
|
+
* BIN chunk. (The viewer always passes fully-backed, normal-covered, in-range
|
|
1067
|
+
* arrays, so this only fires on a caller bug.)
|
|
1066
1068
|
* @param {Float32Array} positions
|
|
1067
1069
|
* @param {Float32Array} normals
|
|
1068
1070
|
* @param {Uint32Array} indices
|
|
@@ -1304,6 +1306,14 @@ export class IfcAPI {
|
|
|
1304
1306
|
* `altitude_mode` (`"clampToGround"` default ⇒ rest on terrain, ignoring
|
|
1305
1307
|
* `altitude`; `"absolute"` ⇒ place at `altitude` metres MSL) selects the
|
|
1306
1308
|
* KML vertical placement (#1427).
|
|
1309
|
+
*
|
|
1310
|
+
* Fails CLOSED: when no triangle survives (an empty visible set, or meshes
|
|
1311
|
+
* whose only triangles are degenerate and collapse in the vertex dedup)
|
|
1312
|
+
* this throws an `Error` whose message starts with `NO_RENDER_GEOMETRY`;
|
|
1313
|
+
* a declared vertex/index count running past its buffer throws
|
|
1314
|
+
* `MALFORMED_MESH_INPUT`, as `exportGlbFromMeshes` does. Both used to ship
|
|
1315
|
+
* as a small "successful" archive: the first around a COLLADA document
|
|
1316
|
+
* the 1.4.1 schema rejects, the second with every later mesh missing.
|
|
1307
1317
|
* @param {Float32Array} positions
|
|
1308
1318
|
* @param {Float32Array} normals
|
|
1309
1319
|
* @param {Uint32Array} indices
|
|
@@ -1344,6 +1354,11 @@ export class IfcAPI {
|
|
|
1344
1354
|
wasm.ifcapi_exportKmzFromMeshes(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6, latitude, longitude, altitude, !isLikeNone(x_axis_abscissa), isLikeNone(x_axis_abscissa) ? 0 : x_axis_abscissa, !isLikeNone(x_axis_ordinate), isLikeNone(x_axis_ordinate) ? 0 : x_axis_ordinate, ptr7, len7, ptr8, len8);
|
|
1345
1355
|
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1346
1356
|
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1357
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1358
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1359
|
+
if (r3) {
|
|
1360
|
+
throw takeObject(r2);
|
|
1361
|
+
}
|
|
1347
1362
|
var v10 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1348
1363
|
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1349
1364
|
return v10;
|
|
@@ -1898,8 +1913,9 @@ export class IfcAPI {
|
|
|
1898
1913
|
}
|
|
1899
1914
|
}
|
|
1900
1915
|
/**
|
|
1901
|
-
* Plan
|
|
1902
|
-
* geometry
|
|
1916
|
+
* Plan an opaque polygonal PDF fill page as canonical IfcAnnotation
|
|
1917
|
+
* geometry with a provenance property set. An exact page plans directly; a
|
|
1918
|
+
* page with visible omissions needs the accepted fidelity report digest.
|
|
1903
1919
|
* @param {Uint8Array} source
|
|
1904
1920
|
* @param {string} request_json
|
|
1905
1921
|
* @returns {Uint8Array}
|
|
@@ -1927,8 +1943,56 @@ export class IfcAPI {
|
|
|
1927
1943
|
}
|
|
1928
1944
|
}
|
|
1929
1945
|
/**
|
|
1930
|
-
*
|
|
1931
|
-
*
|
|
1946
|
+
* Registered RGB point-cloud observations (#4381). `request_json.source`
|
|
1947
|
+
* is `{kind:'points', …}`; `positions` (3n f64, source-frame metres) and
|
|
1948
|
+
* `colors` (3n RGB8) are the payload, `normals` (3n f32, oriented) and
|
|
1949
|
+
* `stations` (n indices into `source.viewpoints`) are empty when absent.
|
|
1950
|
+
* `rgba` carries only the target's existing rasters. Same output as
|
|
1951
|
+
* `planMeshTransfer`; `transfer.source` records the orientation used.
|
|
1952
|
+
* @param {Uint8Array} content
|
|
1953
|
+
* @param {string} request_json
|
|
1954
|
+
* @param {Uint8Array} rgba
|
|
1955
|
+
* @param {Float64Array} positions
|
|
1956
|
+
* @param {Uint8Array} colors
|
|
1957
|
+
* @param {Float32Array} normals
|
|
1958
|
+
* @param {Uint32Array} stations
|
|
1959
|
+
* @returns {Uint8Array}
|
|
1960
|
+
*/
|
|
1961
|
+
planPointTransfer(content, request_json, rgba, positions, colors, normals, stations) {
|
|
1962
|
+
try {
|
|
1963
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1964
|
+
const ptr0 = passArray8ToWasm0(content, wasm.__wbindgen_export);
|
|
1965
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1966
|
+
const ptr1 = passStringToWasm0(request_json, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1967
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1968
|
+
const ptr2 = passArray8ToWasm0(rgba, wasm.__wbindgen_export);
|
|
1969
|
+
const len2 = WASM_VECTOR_LEN;
|
|
1970
|
+
const ptr3 = passArrayF64ToWasm0(positions, wasm.__wbindgen_export);
|
|
1971
|
+
const len3 = WASM_VECTOR_LEN;
|
|
1972
|
+
const ptr4 = passArray8ToWasm0(colors, wasm.__wbindgen_export);
|
|
1973
|
+
const len4 = WASM_VECTOR_LEN;
|
|
1974
|
+
const ptr5 = passArrayF32ToWasm0(normals, wasm.__wbindgen_export);
|
|
1975
|
+
const len5 = WASM_VECTOR_LEN;
|
|
1976
|
+
const ptr6 = passArray32ToWasm0(stations, wasm.__wbindgen_export);
|
|
1977
|
+
const len6 = WASM_VECTOR_LEN;
|
|
1978
|
+
wasm.ifcapi_planPointTransfer(retptr, this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
1979
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1980
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1981
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
1982
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
1983
|
+
if (r3) {
|
|
1984
|
+
throw takeObject(r2);
|
|
1985
|
+
}
|
|
1986
|
+
var v8 = getArrayU8FromWasm0(r0, r1).slice();
|
|
1987
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1988
|
+
return v8;
|
|
1989
|
+
} finally {
|
|
1990
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1991
|
+
}
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* Prepare bounded ordered PDF vector graphics states and the page fidelity
|
|
1995
|
+
* report (convertible paths, omissions with extent, exact/raster-only).
|
|
1932
1996
|
* @param {string} request_json
|
|
1933
1997
|
* @returns {Uint8Array}
|
|
1934
1998
|
*/
|
package/pkg/ifc-lite_bg.wasm
CHANGED
|
Binary file
|