@ifc-lite/geometry 3.5.0 → 3.7.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/dist/diagnostics.d.ts +20 -0
- package/dist/diagnostics.d.ts.map +1 -1
- package/dist/diagnostics.js +18 -0
- package/dist/diagnostics.js.map +1 -1
- package/dist/geometry-coordinate.d.ts.map +1 -1
- package/dist/geometry-coordinate.js +19 -34
- package/dist/geometry-coordinate.js.map +1 -1
- package/dist/geometry-fingerprints.d.ts +114 -0
- package/dist/geometry-fingerprints.d.ts.map +1 -0
- package/dist/geometry-fingerprints.js +114 -0
- package/dist/geometry-fingerprints.js.map +1 -0
- package/dist/geometry-native.d.ts +26 -3
- package/dist/geometry-native.d.ts.map +1 -1
- package/dist/geometry-native.js +82 -11
- package/dist/geometry-native.js.map +1 -1
- package/dist/geometry-parallel.d.ts +34 -0
- package/dist/geometry-parallel.d.ts.map +1 -1
- package/dist/geometry-parallel.js +132 -53
- package/dist/geometry-parallel.js.map +1 -1
- package/dist/geometry.worker.d.ts +19 -8
- package/dist/geometry.worker.d.ts.map +1 -1
- package/dist/geometry.worker.js +96 -61
- package/dist/geometry.worker.js.map +1 -1
- package/dist/ifc-lite-bridge.d.ts +2 -0
- package/dist/ifc-lite-bridge.d.ts.map +1 -1
- package/dist/ifc-lite-bridge.js +4 -0
- package/dist/ifc-lite-bridge.js.map +1 -1
- package/dist/index.d.ts +21 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -78
- package/dist/index.js.map +1 -1
- package/dist/native-bridge-conversion.d.ts.map +1 -1
- package/dist/native-bridge-conversion.js +42 -8
- package/dist/native-bridge-conversion.js.map +1 -1
- package/dist/packed-geometry-decoder.d.ts.map +1 -1
- package/dist/packed-geometry-decoder.js +17 -0
- package/dist/packed-geometry-decoder.js.map +1 -1
- package/dist/types.d.ts +67 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/wasm-asset-error.d.ts.map +1 -1
- package/dist/wasm-asset-error.js +6 -2
- package/dist/wasm-asset-error.js.map +1 -1
- package/dist/wasm-instance-free.d.ts +12 -0
- package/dist/wasm-instance-free.d.ts.map +1 -0
- package/dist/wasm-instance-free.js +41 -0
- package/dist/wasm-instance-free.js.map +1 -0
- package/dist/wasm-runtime-trap.d.ts.map +1 -1
- package/dist/wasm-runtime-trap.js +5 -2
- package/dist/wasm-runtime-trap.js.map +1 -1
- package/dist/wasm-shared-module.d.ts.map +1 -1
- package/dist/wasm-shared-module.js +7 -1
- package/dist/wasm-shared-module.js.map +1 -1
- package/package.json +3 -3
package/dist/diagnostics.d.ts
CHANGED
|
@@ -83,4 +83,24 @@ export interface GeometryDiagnostics {
|
|
|
83
83
|
* count, and is capped. `null` operands pass through so callers can fold a stream.
|
|
84
84
|
*/
|
|
85
85
|
export declare function mergeGeometryDiagnostics(a: GeometryDiagnostics | null | undefined, b: GeometryDiagnostics | null | undefined): GeometryDiagnostics | null;
|
|
86
|
+
/** Payload shape of the geometry worker's streaming `complete` message. */
|
|
87
|
+
export interface GeometryWorkerCompleteMessage {
|
|
88
|
+
type: 'complete';
|
|
89
|
+
totalMeshes: number;
|
|
90
|
+
/** CSG / opening diagnostics merged over this worker's batches (the
|
|
91
|
+
* GeometryDiagnostics contract). Omitted when none were recorded. */
|
|
92
|
+
diagnostics?: GeometryDiagnostics;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* Build the streaming `complete` event payload (`geometry.worker.ts`'s
|
|
96
|
+
* `emitSessionEnd`, the only caller). Extracted so it can be exercised
|
|
97
|
+
* directly by tests without importing the worker module itself, which
|
|
98
|
+
* assigns `self.onmessage` at module load time and therefore cannot be
|
|
99
|
+
* imported outside a Worker/browser-like global (see diagnostics.test.ts).
|
|
100
|
+
*
|
|
101
|
+
* `diagnostics` is omitted from the returned object entirely (not sent as
|
|
102
|
+
* `undefined`) when `null` — callers gate on presence
|
|
103
|
+
* (`if (event.diagnostics)`), not just truthy counts.
|
|
104
|
+
*/
|
|
105
|
+
export declare function buildGeometryWorkerCompleteMessage(totalMeshes: number, diagnostics: GeometryDiagnostics | null): GeometryWorkerCompleteMessage;
|
|
86
106
|
//# sourceMappingURL=diagnostics.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,qFAAqF;IACrF,gBAAgB,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oEAAoE;IACpE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,cAAc,EAAE;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,mEAAmE;IACnE,gBAAgB,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3D;;;;;;OAMG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,QAAQ,EAAE;QACR,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,eAAe,EAAE,MAAM,CAAC;QACxB,YAAY,EAAE,MAAM,CAAC;QACrB,aAAa,EAAE,MAAM,CAAC;QACtB,eAAe,EAAE,MAAM,CAAC;QACxB,iFAAiF;QACjF,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,qEAAqE;IACrE,UAAU,EAAE,KAAK,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,OAAO,EAAE,MAAM,CAAC;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73,22 @@ export function mergeGeometryDiagnostics(a, b) {
|
|
|
73
73
|
worstHosts,
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Build the streaming `complete` event payload (`geometry.worker.ts`'s
|
|
78
|
+
* `emitSessionEnd`, the only caller). Extracted so it can be exercised
|
|
79
|
+
* directly by tests without importing the worker module itself, which
|
|
80
|
+
* assigns `self.onmessage` at module load time and therefore cannot be
|
|
81
|
+
* imported outside a Worker/browser-like global (see diagnostics.test.ts).
|
|
82
|
+
*
|
|
83
|
+
* `diagnostics` is omitted from the returned object entirely (not sent as
|
|
84
|
+
* `undefined`) when `null` — callers gate on presence
|
|
85
|
+
* (`if (event.diagnostics)`), not just truthy counts.
|
|
86
|
+
*/
|
|
87
|
+
export function buildGeometryWorkerCompleteMessage(totalMeshes, diagnostics) {
|
|
88
|
+
return {
|
|
89
|
+
type: 'complete',
|
|
90
|
+
totalMeshes,
|
|
91
|
+
...(diagnostics ? { diagnostics } : {}),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
76
94
|
//# sourceMappingURL=diagnostics.js.map
|
package/dist/diagnostics.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../src/diagnostics.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AA2E/D,sFAAsF;AACtF,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CACtC,CAAyC,EACzC,CAAyC;IAEzC,IAAI,CAAC,CAAC;QAAE,OAAO,CAAC,IAAI,IAAI,CAAC;IACzB,IAAI,CAAC,CAAC;QAAE,OAAO,CAAC,CAAC;IAEjB,MAAM,aAAa,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,aAAa,IAAI,CAAC,EAAE,CAAC,CAAC,aAAa,IAAI,CAAC,CAAC,CAAC;IAE3E,MAAM,OAAO,GAAG,IAAI,GAAG,EAAkB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WAAmB,EACnB,WAAuC;IAEvC,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,WAAW;QACX,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACxC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry-coordinate.d.ts","sourceRoot":"","sources":["../src/geometry-coordinate.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"geometry-coordinate.d.ts","sourceRoot":"","sources":["../src/geometry-coordinate.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAQrD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,UAAU,EAClB,WAAW,EAAE,MAAM,GAAG,kBAAkB,GACvC,MAAM,CAeR;AAID;;;GAGG;AACH,wBAAgB,4BAA4B,CAC1C,UAAU,EAAE,OAAO,gBAAgB,EAAE,cAAc,GAClD,QAAQ,EAAE,CAiHZ;AAID;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,cAAc,EAAE,cAAc,EAC9B,gBAAgB,CAAC,EAAE,MAAM,GACxB,cAAc,CAIhB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
2
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
import { extractGeometryFingerprints, } from './geometry-fingerprints.js';
|
|
4
5
|
// ── Batch-size heuristics ──
|
|
5
6
|
/**
|
|
6
7
|
* Return a fixed or heuristic batch size for streaming, given the file
|
|
@@ -28,11 +29,12 @@ export function getStreamingBatchSize(buffer, batchConfig) {
|
|
|
28
29
|
export function convertMeshCollectionToBatch(collection) {
|
|
29
30
|
const batch = [];
|
|
30
31
|
try {
|
|
31
|
-
// Per-entity geometry hashes — only populated when hashing
|
|
32
|
-
// `IfcAPI.setComputeGeometryHashes` (
|
|
33
|
-
// arrays are empty and this Map stays empty (zero
|
|
34
|
-
// try so `collection.free()` in the finally
|
|
35
|
-
|
|
32
|
+
// Per-entity geometry hashes + world boxes — only populated when hashing
|
|
33
|
+
// was enabled via `IfcAPI.setComputeGeometryHashes` (issues #924 / #1891);
|
|
34
|
+
// otherwise the parallel arrays are empty and this Map stays empty (zero
|
|
35
|
+
// overhead). Read inside the try so `collection.free()` in the finally
|
|
36
|
+
// still runs if extraction throws.
|
|
37
|
+
const geometryFingerprints = extractGeometryFingerprints(collection);
|
|
36
38
|
for (let i = 0; i < collection.length; i++) {
|
|
37
39
|
const mesh = collection.get(i);
|
|
38
40
|
if (!mesh)
|
|
@@ -48,7 +50,7 @@ export function convertMeshCollectionToBatch(collection) {
|
|
|
48
50
|
// Read each WASM copy-to-JS getter once; indexing the getter
|
|
49
51
|
// directly would copy a fresh Float32Array out of WASM per access.
|
|
50
52
|
const color = mesh.color;
|
|
51
|
-
const
|
|
53
|
+
const fingerprint = geometryFingerprints.get(mesh.expressId);
|
|
52
54
|
// Per-element local-frame origin (world = origin + position); [0,0,0] or
|
|
53
55
|
// absent getter (older bundle) → absolute positions.
|
|
54
56
|
const originArr = mesh.origin;
|
|
@@ -107,10 +109,17 @@ export function convertMeshCollectionToBatch(collection) {
|
|
|
107
109
|
repeatT: mesh.textureRepeatT,
|
|
108
110
|
};
|
|
109
111
|
}
|
|
110
|
-
// #924: attach the per-entity geometry fingerprint
|
|
111
|
-
//
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
// #924 / #1891: attach the per-entity geometry fingerprint — hash and,
|
|
113
|
+
// when the pass produced them, the absolute world box and the proved
|
|
114
|
+
// enclosed volume (empty Map → no-op unless geometry hashing was
|
|
115
|
+
// enabled).
|
|
116
|
+
if (fingerprint) {
|
|
117
|
+
meshData.geometryHash = fingerprint.hash;
|
|
118
|
+
if (fingerprint.aabb)
|
|
119
|
+
meshData.geometryAabb = fingerprint.aabb;
|
|
120
|
+
if (fingerprint.volume !== undefined)
|
|
121
|
+
meshData.geometryVolume = fingerprint.volume;
|
|
122
|
+
}
|
|
114
123
|
batch.push(meshData);
|
|
115
124
|
}
|
|
116
125
|
finally {
|
|
@@ -123,30 +132,6 @@ export function convertMeshCollectionToBatch(collection) {
|
|
|
123
132
|
}
|
|
124
133
|
return batch;
|
|
125
134
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Read the per-entity geometry fingerprints off a WASM MeshCollection into a
|
|
128
|
-
* `Map<expressId, bigint>`. The collection exposes two parallel arrays
|
|
129
|
-
* (`geometryHashIds` ↔ `geometryHashValues`); both are empty unless hashing
|
|
130
|
-
* was enabled via `IfcAPI.setComputeGeometryHashes`. Must be called before
|
|
131
|
-
* `collection.free()`. Tolerates an older WASM build lacking the getters
|
|
132
|
-
* (returns an empty Map) so the geometry path never breaks.
|
|
133
|
-
*/
|
|
134
|
-
function extractGeometryHashes(collection) {
|
|
135
|
-
const map = new Map();
|
|
136
|
-
const c = collection;
|
|
137
|
-
const count = c.geometryHashCount ?? 0;
|
|
138
|
-
if (count === 0)
|
|
139
|
-
return map;
|
|
140
|
-
const ids = c.geometryHashIds;
|
|
141
|
-
const values = c.geometryHashValues;
|
|
142
|
-
if (!ids || !values)
|
|
143
|
-
return map;
|
|
144
|
-
const n = Math.min(ids.length, values.length);
|
|
145
|
-
for (let i = 0; i < n; i++) {
|
|
146
|
-
map.set(ids[i], values[i]);
|
|
147
|
-
}
|
|
148
|
-
return map;
|
|
149
|
-
}
|
|
150
135
|
// ── Coordinate-info helpers ──
|
|
151
136
|
/**
|
|
152
137
|
* Merge an optional building rotation value into a CoordinateInfo object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry-coordinate.js","sourceRoot":"","sources":["../src/geometry-coordinate.ts"],"names":[],"mappings":"AAAA;;+DAE+D;
|
|
1
|
+
{"version":3,"file":"geometry-coordinate.js","sourceRoot":"","sources":["../src/geometry-coordinate.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAY/D,OAAO,EACL,2BAA2B,GAE5B,MAAM,4BAA4B,CAAC;AAEpC,8BAA8B;AAE9B;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAAkB,EAClB,WAAwC;IAExC,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;QACpC,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,UAAU,GAAG,WAAW,CAAC,UAAU;QACvC,CAAC,CAAC,WAAW,CAAC,UAAU;QACxB,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAElC,OAAO,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG;QAC1B,CAAC,CAAC,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG;YACvB,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG;gBACxB,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG;oBACxB,CAAC,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI;wBACzB,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,gDAAgD;AAEhD;;;GAGG;AACH,MAAM,UAAU,4BAA4B,CAC1C,UAAmD;IAEnD,MAAM,KAAK,GAAe,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,yEAAyE;QACzE,2EAA2E;QAC3E,yEAAyE;QACzE,uEAAuE;QACvE,mCAAmC;QACnC,MAAM,oBAAoB,GAAG,2BAA2B,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AC,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC;gBACrF,CAAC;gBAED,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvB,CAAC;oBAAS,CAAC;gBACT,IAAI,CAAC,IAAI,EAAE,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;YAAS,CAAC;QACT,UAAU,CAAC,IAAI,EAAE,CAAC;IACpB,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,gCAAgC;AAEhC;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAClC,cAA8B,EAC9B,gBAAyB;IAEzB,OAAO,gBAAgB,KAAK,SAAS;QACnC,CAAC,CAAC,EAAE,GAAG,cAAc,EAAE,gBAAgB,EAAE;QACzC,CAAC,CAAC,cAAc,CAAC;AACrB,CAAC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read the per-entity geometry fingerprints off a WASM `MeshCollection`
|
|
3
|
+
* (issues #924 / #1891).
|
|
4
|
+
*
|
|
5
|
+
* ONE reader for both mesh-extraction paths — the single-threaded converter in
|
|
6
|
+
* `geometry-coordinate.ts` and the worker's `collectMeshes` — because the
|
|
7
|
+
* arrays are index-parallel and a second copy of the indexing arithmetic is a
|
|
8
|
+
* second place for the box and the hash to drift onto different entities.
|
|
9
|
+
*
|
|
10
|
+
* The wasm contract (`rust/wasm-bindings/src/zero_copy/mesh_fingerprint.rs`):
|
|
11
|
+
* `geometryHashIds[i]` ↔ `geometryHashValues[i]` ↔
|
|
12
|
+
* `geometryAabbValues[6*i .. 6*i+6)` ↔ `geometryVolumeValues[i]`. Every array is
|
|
13
|
+
* empty unless hashing was enabled via `IfcAPI.setComputeGeometryHashes`, and a
|
|
14
|
+
* build predating a getter simply omits it — both degrade to "less
|
|
15
|
+
* information", never to a throw.
|
|
16
|
+
*/
|
|
17
|
+
import type { EntityWorldAabb } from './types.js';
|
|
18
|
+
/**
|
|
19
|
+
* The fingerprint getters, structurally. Typed here rather than taken as a
|
|
20
|
+
* `MeshCollection` because the two call sites hold two different nominal types
|
|
21
|
+
* for the same wasm object, and because every field is optional on an older
|
|
22
|
+
* wasm build — which is precisely what this module is here to absorb.
|
|
23
|
+
*/
|
|
24
|
+
export interface GeometryFingerprintSource {
|
|
25
|
+
geometryHashCount?: number;
|
|
26
|
+
geometryHashIds?: Uint32Array;
|
|
27
|
+
geometryHashValues?: BigUint64Array;
|
|
28
|
+
geometryAabbValues?: Float64Array;
|
|
29
|
+
geometryVolumeValues?: Float64Array;
|
|
30
|
+
}
|
|
31
|
+
/** Everything one hashing pass learned about one entity. */
|
|
32
|
+
export interface EntityGeometryFingerprint {
|
|
33
|
+
/** The RTC-invariant whole-entity shape hash (#924). */
|
|
34
|
+
hash: bigint;
|
|
35
|
+
/**
|
|
36
|
+
* Absolute world bounding box in the renderer's Y-up frame, or `undefined`
|
|
37
|
+
* when the pass produced none. The wasm side reserves six `NaN` slots for an
|
|
38
|
+
* absent box so the arrays stay index-parallel; that sentinel is resolved to
|
|
39
|
+
* `undefined` HERE, at the boundary, so nothing downstream ever has to ask
|
|
40
|
+
* whether a box it holds is real (`@ifc-lite/diff`'s contract is that a
|
|
41
|
+
* missing box is absent, not NaN-bearing).
|
|
42
|
+
*/
|
|
43
|
+
aabb?: EntityWorldAabb;
|
|
44
|
+
/**
|
|
45
|
+
* Enclosed volume in CUBIC METRES, or `undefined` when the pass could not
|
|
46
|
+
* PROVE one (#1993). Same `NaN`-resolved-at-the-boundary treatment as
|
|
47
|
+
* {@link aabb}, and for the same reason: the diff engine's contract is that an
|
|
48
|
+
* absent volume is `undefined`, never a NaN-bearing number that would answer
|
|
49
|
+
* "different" to every comparison it entered.
|
|
50
|
+
*
|
|
51
|
+
* Absent for roughly a third of elements BY DESIGN. The kernel emits a volume
|
|
52
|
+
* only where the meshed geometry was provably a single closed, orientable,
|
|
53
|
+
* single-component solid, so an open `SurfaceModel`, a material-layered wall
|
|
54
|
+
* (open bands by construction) and any multi-item assembly correctly report
|
|
55
|
+
* nothing rather than a plausible wrong number. A missing volume therefore
|
|
56
|
+
* means "not proved", NEVER "proved to be zero" or "proved different".
|
|
57
|
+
*/
|
|
58
|
+
volume?: number;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Read entry `index` of a six-values-per-id `Float64Array` as a box, or
|
|
62
|
+
* `undefined` when the span is the absent sentinel (or the array is too short
|
|
63
|
+
* to hold it).
|
|
64
|
+
*
|
|
65
|
+
* ONE guard covers both, deliberately: any non-finite component disqualifies
|
|
66
|
+
* the whole box, and an out-of-range typed-array read yields `undefined`, which
|
|
67
|
+
* is not finite. A separate length check would be unreachable — it can never be
|
|
68
|
+
* the reason a call returns `undefined`, so nothing could ever prove it works.
|
|
69
|
+
* Half a box is not a usable box anyway: `isUsableAabb` in `@ifc-lite/diff`
|
|
70
|
+
* would reject it, so better to never build it.
|
|
71
|
+
*
|
|
72
|
+
* Exported because the same layout crosses the geometry worker boundary as
|
|
73
|
+
* `instancedGeometryAabbValues` (the entities that never reach the flat mesh
|
|
74
|
+
* array), and a consumer decoding that by hand is a second copy of this
|
|
75
|
+
* indexing arithmetic.
|
|
76
|
+
*/
|
|
77
|
+
export declare function geometryAabbAt(values: Float64Array | undefined, index: number): EntityWorldAabb | undefined;
|
|
78
|
+
/**
|
|
79
|
+
* Inverse of {@link geometryAabbAt}: write `aabb` into entry `index` of a
|
|
80
|
+
* six-values-per-id `Float64Array`.
|
|
81
|
+
*
|
|
82
|
+
* Paired with the reader here, in one module, because the worker encodes the
|
|
83
|
+
* instanced-only side-channel and the main thread decodes it: a min/max or
|
|
84
|
+
* stride disagreement between the two ends is invisible in either half alone
|
|
85
|
+
* and shows up only as boxes attributed to the wrong element.
|
|
86
|
+
*/
|
|
87
|
+
export declare function writeGeometryAabbAt(values: Float64Array, index: number, aabb: EntityWorldAabb): void;
|
|
88
|
+
/**
|
|
89
|
+
* Read entry `index` of a one-value-per-id `Float64Array` as a volume, or
|
|
90
|
+
* `undefined` when the slot is the absent sentinel (or the array is too short).
|
|
91
|
+
*
|
|
92
|
+
* The `NaN`-to-`undefined` resolution lives HERE, at the boundary, and nowhere
|
|
93
|
+
* else — same contract as {@link geometryAabbAt}. `Number.isFinite` covers both
|
|
94
|
+
* the sentinel and an out-of-range read in one test.
|
|
95
|
+
*
|
|
96
|
+
* A non-positive volume is refused as well. The producer emits a value only for
|
|
97
|
+
* a proved-closed solid, so zero or negative is not a small solid, it is a
|
|
98
|
+
* degenerate or inside-out one, and a consumer that sums volumes cannot tell
|
|
99
|
+
* those apart from real numbers. Refusing here keeps "absent means not proved"
|
|
100
|
+
* true all the way down.
|
|
101
|
+
*
|
|
102
|
+
* Exported for the same reason as {@link geometryAabbAt}: the identical layout
|
|
103
|
+
* crosses the geometry worker boundary as `instancedGeometryVolumeValues`.
|
|
104
|
+
*/
|
|
105
|
+
export declare function geometryVolumeAt(values: Float64Array | undefined, index: number): number | undefined;
|
|
106
|
+
/**
|
|
107
|
+
* Per-entity geometry fingerprints keyed by express id.
|
|
108
|
+
*
|
|
109
|
+
* Empty when hashing is off or the wasm build predates the getters. Must be
|
|
110
|
+
* called BEFORE `collection.free()`. The result holds plain JS values, so it
|
|
111
|
+
* outlives the collection and survives a structured-clone `postMessage`.
|
|
112
|
+
*/
|
|
113
|
+
export declare function extractGeometryFingerprints(source: GeometryFingerprintSource): Map<number, EntityGeometryFingerprint>;
|
|
114
|
+
//# sourceMappingURL=geometry-fingerprints.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry-fingerprints.d.ts","sourceRoot":"","sources":["../src/geometry-fingerprints.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAKlD;;;;;GAKG;AACH,MAAM,WAAW,yBAAyB;IACxC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,kBAAkB,CAAC,EAAE,cAAc,CAAC;IACpC,kBAAkB,CAAC,EAAE,YAAY,CAAC;IAClC,oBAAoB,CAAC,EAAE,YAAY,CAAC;CACrC;AAED,4DAA4D;AAC5D,MAAM,WAAW,yBAAyB;IACxC,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;;;;;;;;;;;;OAaG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,KAAK,EAAE,MAAM,GACZ,eAAe,GAAG,SAAS,CAU7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,YAAY,EACpB,KAAK,EAAE,MAAM,EACb,IAAI,EAAE,eAAe,GACpB,IAAI,CAIN;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,YAAY,GAAG,SAAS,EAChC,KAAK,EAAE,MAAM,GACZ,MAAM,GAAG,SAAS,CAIpB;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,yBAAyB,GAChC,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAgCxC"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
3
|
+
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
4
|
+
/** Number of `f64` per box in `geometryAabbValues`: min xyz then max xyz. */
|
|
5
|
+
const AABB_STRIDE = 6;
|
|
6
|
+
/**
|
|
7
|
+
* Read entry `index` of a six-values-per-id `Float64Array` as a box, or
|
|
8
|
+
* `undefined` when the span is the absent sentinel (or the array is too short
|
|
9
|
+
* to hold it).
|
|
10
|
+
*
|
|
11
|
+
* ONE guard covers both, deliberately: any non-finite component disqualifies
|
|
12
|
+
* the whole box, and an out-of-range typed-array read yields `undefined`, which
|
|
13
|
+
* is not finite. A separate length check would be unreachable — it can never be
|
|
14
|
+
* the reason a call returns `undefined`, so nothing could ever prove it works.
|
|
15
|
+
* Half a box is not a usable box anyway: `isUsableAabb` in `@ifc-lite/diff`
|
|
16
|
+
* would reject it, so better to never build it.
|
|
17
|
+
*
|
|
18
|
+
* Exported because the same layout crosses the geometry worker boundary as
|
|
19
|
+
* `instancedGeometryAabbValues` (the entities that never reach the flat mesh
|
|
20
|
+
* array), and a consumer decoding that by hand is a second copy of this
|
|
21
|
+
* indexing arithmetic.
|
|
22
|
+
*/
|
|
23
|
+
export function geometryAabbAt(values, index) {
|
|
24
|
+
if (!values)
|
|
25
|
+
return undefined;
|
|
26
|
+
const base = index * AABB_STRIDE;
|
|
27
|
+
for (let k = 0; k < AABB_STRIDE; k++) {
|
|
28
|
+
if (!Number.isFinite(values[base + k]))
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
min: [values[base], values[base + 1], values[base + 2]],
|
|
33
|
+
max: [values[base + 3], values[base + 4], values[base + 5]],
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Inverse of {@link geometryAabbAt}: write `aabb` into entry `index` of a
|
|
38
|
+
* six-values-per-id `Float64Array`.
|
|
39
|
+
*
|
|
40
|
+
* Paired with the reader here, in one module, because the worker encodes the
|
|
41
|
+
* instanced-only side-channel and the main thread decodes it: a min/max or
|
|
42
|
+
* stride disagreement between the two ends is invisible in either half alone
|
|
43
|
+
* and shows up only as boxes attributed to the wrong element.
|
|
44
|
+
*/
|
|
45
|
+
export function writeGeometryAabbAt(values, index, aabb) {
|
|
46
|
+
const base = index * AABB_STRIDE;
|
|
47
|
+
values.set(aabb.min, base);
|
|
48
|
+
values.set(aabb.max, base + 3);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Read entry `index` of a one-value-per-id `Float64Array` as a volume, or
|
|
52
|
+
* `undefined` when the slot is the absent sentinel (or the array is too short).
|
|
53
|
+
*
|
|
54
|
+
* The `NaN`-to-`undefined` resolution lives HERE, at the boundary, and nowhere
|
|
55
|
+
* else — same contract as {@link geometryAabbAt}. `Number.isFinite` covers both
|
|
56
|
+
* the sentinel and an out-of-range read in one test.
|
|
57
|
+
*
|
|
58
|
+
* A non-positive volume is refused as well. The producer emits a value only for
|
|
59
|
+
* a proved-closed solid, so zero or negative is not a small solid, it is a
|
|
60
|
+
* degenerate or inside-out one, and a consumer that sums volumes cannot tell
|
|
61
|
+
* those apart from real numbers. Refusing here keeps "absent means not proved"
|
|
62
|
+
* true all the way down.
|
|
63
|
+
*
|
|
64
|
+
* Exported for the same reason as {@link geometryAabbAt}: the identical layout
|
|
65
|
+
* crosses the geometry worker boundary as `instancedGeometryVolumeValues`.
|
|
66
|
+
*/
|
|
67
|
+
export function geometryVolumeAt(values, index) {
|
|
68
|
+
if (!values)
|
|
69
|
+
return undefined;
|
|
70
|
+
const volume = values[index];
|
|
71
|
+
return Number.isFinite(volume) && volume > 0 ? volume : undefined;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Per-entity geometry fingerprints keyed by express id.
|
|
75
|
+
*
|
|
76
|
+
* Empty when hashing is off or the wasm build predates the getters. Must be
|
|
77
|
+
* called BEFORE `collection.free()`. The result holds plain JS values, so it
|
|
78
|
+
* outlives the collection and survives a structured-clone `postMessage`.
|
|
79
|
+
*/
|
|
80
|
+
export function extractGeometryFingerprints(source) {
|
|
81
|
+
const map = new Map();
|
|
82
|
+
// Fast path, not a correctness guard: the checks below already yield an empty
|
|
83
|
+
// map when hashing is off. It is here so a load with the diff feature OFF —
|
|
84
|
+
// the default — never touches the three copy-to-JS getters at all, and those
|
|
85
|
+
// are read once per batch, thousands of times per model.
|
|
86
|
+
if ((source.geometryHashCount ?? 0) === 0)
|
|
87
|
+
return map;
|
|
88
|
+
const ids = source.geometryHashIds;
|
|
89
|
+
const values = source.geometryHashValues;
|
|
90
|
+
if (!ids || !values)
|
|
91
|
+
return map;
|
|
92
|
+
// Read the copy-to-JS getter ONCE: each access copies a fresh Float64Array
|
|
93
|
+
// out of wasm, so indexing the getter per entity would copy the whole array
|
|
94
|
+
// once per entity. Absent on a wasm build predating #1988 → no boxes, hashes
|
|
95
|
+
// still land, and the diff falls back to its documented bare `moved`.
|
|
96
|
+
const aabbValues = source.geometryAabbValues;
|
|
97
|
+
// Same once-only rule, same reason (#1993). Absent on a wasm build predating
|
|
98
|
+
// the getter → no volumes, and the split/merge detector degrades to its
|
|
99
|
+
// extent-coverage tier rather than claiming anything it cannot prove.
|
|
100
|
+
const volumeValues = source.geometryVolumeValues;
|
|
101
|
+
const n = Math.min(ids.length, values.length);
|
|
102
|
+
for (let i = 0; i < n; i++) {
|
|
103
|
+
const fingerprint = { hash: values[i] };
|
|
104
|
+
const aabb = geometryAabbAt(aabbValues, i);
|
|
105
|
+
if (aabb)
|
|
106
|
+
fingerprint.aabb = aabb;
|
|
107
|
+
const volume = geometryVolumeAt(volumeValues, i);
|
|
108
|
+
if (volume !== undefined)
|
|
109
|
+
fingerprint.volume = volume;
|
|
110
|
+
map.set(ids[i], fingerprint);
|
|
111
|
+
}
|
|
112
|
+
return map;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=geometry-fingerprints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry-fingerprints.js","sourceRoot":"","sources":["../src/geometry-fingerprints.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAqB/D,6EAA6E;AAC7E,MAAM,WAAW,GAAG,CAAC,CAAC;AA8CtB;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc,CAC5B,MAAgC,EAChC,KAAa;IAEb,IAAI,CAAC,MAAM;QAAE,OAAO,SAAS,CAAC;IAC9B,MAAM,IAA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;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
|
@@ -32,8 +32,30 @@ export declare function enqueueNativeStreamingEvent(queuedEvents: QueuedNativeSt
|
|
|
32
32
|
coalescedBatchCount: number;
|
|
33
33
|
}): void;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
36
|
-
* path-
|
|
35
|
+
* The two behavioural axes on which the buffer-based native route
|
|
36
|
+
* (`GeometryProcessor.processStreaming`) differs from the path- and
|
|
37
|
+
* cache-based ones. Everything else about the drain loop — including the
|
|
38
|
+
* failure handling this module exists to get right — is shared.
|
|
39
|
+
*/
|
|
40
|
+
export interface NativeStreamOptions {
|
|
41
|
+
/**
|
|
42
|
+
* Apply native queue back-pressure: coalesce consecutive batch events once
|
|
43
|
+
* the queue is deep, and yield to the event loop mid-drain so the main
|
|
44
|
+
* thread keeps breathing. `processStreaming`'s native branch has always used
|
|
45
|
+
* a plain push-only queue with no mid-drain yield; pass `false` there.
|
|
46
|
+
*/
|
|
47
|
+
coalesce?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* How streamed meshes are folded into the coordinate handler. Defaults to
|
|
50
|
+
* `processTrustedMeshesIncremental` (native output is already site-local, so
|
|
51
|
+
* the generic RTC/outlier scan is skipped). `processStreaming` has always
|
|
52
|
+
* used the generic `processMeshesIncremental`, so it passes that explicitly.
|
|
53
|
+
*/
|
|
54
|
+
processMeshes?: (meshes: MeshData[]) => void;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Shared native streaming generator used by every native geometry route:
|
|
58
|
+
* buffer-based (`processStreaming`), path-based and cache-based.
|
|
37
59
|
*
|
|
38
60
|
* @param startStream Callback that kicks off the native stream and
|
|
39
61
|
* returns a promise resolving when it finishes.
|
|
@@ -41,11 +63,12 @@ export declare function enqueueNativeStreamingEvent(queuedEvents: QueuedNativeSt
|
|
|
41
63
|
* @param coordinator CoordinateHandler for incremental bounds.
|
|
42
64
|
* @param setLastNativeStats Callback to persist the latest stats on
|
|
43
65
|
* the owning GeometryProcessor instance.
|
|
66
|
+
* @param options Per-route queue/coordinate behaviour; see NativeStreamOptions.
|
|
44
67
|
*/
|
|
45
68
|
export declare function streamNativeGeometry(startStream: (options: {
|
|
46
69
|
onBatch: (batch: GeometryBatch) => void;
|
|
47
70
|
onColorUpdate: (updates: Map<number, [number, number, number, number]>) => void;
|
|
48
71
|
onComplete: (stats: PlatformGeometryStats) => void;
|
|
49
72
|
onError: (error: Error) => void;
|
|
50
|
-
}) => Promise<PlatformGeometryStats>, totalEstimate: number, coordinator: CoordinateHandler, setLastNativeStats: (stats: PlatformGeometryStats) => void): AsyncGenerator<StreamingGeometryEvent>;
|
|
73
|
+
}) => Promise<PlatformGeometryStats>, totalEstimate: number, coordinator: CoordinateHandler, setLastNativeStats: (stats: PlatformGeometryStats) => void, options?: NativeStreamOptions): AsyncGenerator<StreamingGeometryEvent>;
|
|
51
74
|
//# sourceMappingURL=geometry-native.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry-native.d.ts","sourceRoot":"","sources":["../src/geometry-native.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,IAAI,qBAAqB,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACxH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAKzD,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAChD,eAAO,MAAM,8BAA8B,QAAQ,CAAC;AACpD,eAAO,MAAM,iCAAiC,IAAI,CAAC;AACnD,eAAO,MAAM,iCAAiC,OAAO,CAAC;AACtD,eAAO,MAAM,0BAA0B,KAAK,CAAC;AAI7C,MAAM,MAAM,0BAA0B,GAClC;IAAE,IAAI,EAAE,OAAO,CAAC;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