@ifc-lite/ifcx 4.3.0 → 4.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.
Files changed (63) hide show
  1. package/README.md +12 -0
  2. package/dist/detect-format.d.ts +5 -0
  3. package/dist/detect-format.d.ts.map +1 -0
  4. package/dist/detect-format.js +33 -0
  5. package/dist/detect-format.js.map +1 -0
  6. package/dist/generated/imported-geometry-static.js +17116 -0
  7. package/dist/generated/imported-geometry.d.ts +2 -0
  8. package/dist/generated/imported-geometry.d.ts.map +1 -0
  9. package/dist/generated/imported-geometry.js +13 -0
  10. package/dist/generated/imported-geometry.js.map +1 -0
  11. package/dist/geometry-extractor.d.ts +2 -16
  12. package/dist/geometry-extractor.d.ts.map +1 -1
  13. package/dist/geometry-extractor.js +3 -299
  14. package/dist/geometry-extractor.js.map +1 -1
  15. package/dist/georeference.d.ts +17 -0
  16. package/dist/georeference.d.ts.map +1 -0
  17. package/dist/georeference.js +44 -0
  18. package/dist/georeference.js.map +1 -0
  19. package/dist/imported-graph-source.d.ts +13 -0
  20. package/dist/imported-graph-source.d.ts.map +1 -0
  21. package/dist/imported-graph-source.js +53 -0
  22. package/dist/imported-graph-source.js.map +1 -0
  23. package/dist/imported-graph.d.ts +13 -0
  24. package/dist/imported-graph.d.ts.map +1 -0
  25. package/dist/imported-graph.js +154 -0
  26. package/dist/imported-graph.js.map +1 -0
  27. package/dist/imported-kernel.d.ts +33 -0
  28. package/dist/imported-kernel.d.ts.map +1 -0
  29. package/dist/imported-kernel.js +172 -0
  30. package/dist/imported-kernel.js.map +1 -0
  31. package/dist/imported-scene.d.ts +7 -0
  32. package/dist/imported-scene.d.ts.map +1 -0
  33. package/dist/imported-scene.js +6 -0
  34. package/dist/imported-scene.js.map +1 -0
  35. package/dist/imported-snapshot.d.ts +3 -0
  36. package/dist/imported-snapshot.d.ts.map +1 -0
  37. package/dist/imported-snapshot.js +53 -0
  38. package/dist/imported-snapshot.js.map +1 -0
  39. package/dist/imported-source.d.ts +59 -0
  40. package/dist/imported-source.d.ts.map +1 -0
  41. package/dist/imported-source.js +96 -0
  42. package/dist/imported-source.js.map +1 -0
  43. package/dist/imported-wire.d.ts +35 -0
  44. package/dist/imported-wire.d.ts.map +1 -0
  45. package/dist/imported-wire.js +108 -0
  46. package/dist/imported-wire.js.map +1 -0
  47. package/dist/index.d.ts +3 -49
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +36 -51
  50. package/dist/index.js.map +1 -1
  51. package/dist/parse-result.d.ts +48 -0
  52. package/dist/parse-result.d.ts.map +1 -0
  53. package/dist/parse-result.js +5 -0
  54. package/dist/parse-result.js.map +1 -0
  55. package/dist/pointcloud-extractor.d.ts +14 -0
  56. package/dist/pointcloud-extractor.d.ts.map +1 -1
  57. package/dist/pointcloud-extractor.js +3 -176
  58. package/dist/pointcloud-extractor.js.map +1 -1
  59. package/package.json +6 -5
  60. package/dist/geometry-normals.d.ts +0 -29
  61. package/dist/geometry-normals.d.ts.map +0 -1
  62. package/dist/geometry-normals.js +0 -91
  63. package/dist/geometry-normals.js.map +0 -1
@@ -0,0 +1,154 @@
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
+ import { decodeIfcxPointSource } from '@ifc-lite/pointcloud';
5
+ import { ATTR } from './types.js';
6
+ import { appendSourceTransform, ImportedSourceDocument, retainImportedSource } from './imported-source.js';
7
+ import { stageUvs } from './imported-kernel.js';
8
+ import { ImportWriter } from './imported-wire.js';
9
+ import { sourceGraph, writeNodeSource, resolveImportedColor } from './imported-graph-source.js';
10
+ import { IFCX_APPEARANCE, IFCX_IMAGE, createIfcxImageDecoder, decodeIfcxAppearance } from './appearance-wire.js';
11
+ /**
12
+ * The host supplies reached source/asset replies. Rust owns traversal, pass
13
+ * ordering, eligibility, occurrence identity, deduplication, numerical operations
14
+ * and completion. No host geometry walker or precomputed operation list exists.
15
+ */
16
+ export function executeImportedGraph(composed, pathToId, mode) {
17
+ const { nodes, indices } = sourceGraph(composed);
18
+ const source = new ImportedSourceDocument();
19
+ const open = new ImportWriter(100).u64(source.store).u64(source.revision).u32(mode).u32(composed.size).u32(nodes.length);
20
+ for (const node of nodes) {
21
+ open.identityString(node.path).u32(node.children.size);
22
+ for (const [edge, child] of node.children) {
23
+ const index = indices.get(child);
24
+ if (index === undefined)
25
+ throw new Error('Imported geometry: source graph changed during admission');
26
+ open.identityString(edge).u32(index);
27
+ }
28
+ }
29
+ const handle = open.run().u32();
30
+ const meshes = [];
31
+ const pointClouds = [];
32
+ const decodeImage = createIfcxImageDecoder();
33
+ let frame = null;
34
+ let transforms = [];
35
+ try {
36
+ for (;;) {
37
+ const event = new ImportWriter(101).u32(handle).run();
38
+ const kind = event.u32();
39
+ if (kind === 0)
40
+ break;
41
+ const sequence = event.u32();
42
+ const occurrence = event.u64();
43
+ const nodeIndex = event.u32();
44
+ const node = nodes[nodeIndex];
45
+ if (!node)
46
+ throw new Error('Imported geometry: invalid reached source identity');
47
+ if (kind === 1) {
48
+ ({ frame, transforms } = readFrame(event, nodes));
49
+ const reply = new ImportWriter(102).u32(handle).u32(sequence);
50
+ writeNodeSource(reply, node, pathToId);
51
+ reply.run();
52
+ continue;
53
+ }
54
+ const contextIndex = event.u32();
55
+ const contextNode = nodes[contextIndex];
56
+ if (!contextNode || !frame || frame.node !== node)
57
+ throw new Error('Imported geometry: stale reached occurrence');
58
+ const expressId = pathToId.get(contextNode.path);
59
+ if (expressId === undefined)
60
+ throw new Error('Imported geometry: context changed during admission');
61
+ const ifcType = contextNode.attributes.get(ATTR.CLASS)?.code;
62
+ const identity = { store: source.store, revision: source.revision, definition: nodeIndex + 1, occurrence };
63
+ if (kind === 2) {
64
+ const transform = event.floats();
65
+ readColor(event); // Rust's resolved numeric opinion; wire identity is JS-authoritative.
66
+ const color = resolveImportedColor(frame);
67
+ const key = [node.path, expressId, transform.length ? transform.join(',') : 'identity', color ? color.join(',') : 'default'].join('|');
68
+ new ImportWriter(103).u32(handle).u32(sequence).identityString(key).run();
69
+ }
70
+ else if (kind === 3) {
71
+ const raw = node.attributes.get(ATTR.MESH);
72
+ const admitted = source.admitMesh(frame, transforms, raw, identity);
73
+ const reply = new ImportWriter(104).u32(handle).u32(sequence);
74
+ // A mesh authored without `faceVertexIndices` has always presented empty
75
+ // indices (the old `new Uint32Array(undefined)`); it must not abort the import.
76
+ reply.rows(admitted.definition.points).values(admitted.definition.faceVertexIndices ?? [])
77
+ .u32(admitted.definition.faceVertexCounts ? 1 : 0);
78
+ if (admitted.definition.faceVertexCounts)
79
+ reply.values(admitted.definition.faceVertexCounts);
80
+ reply.u32(admitted.definition.normals ? 1 : 0);
81
+ if (admitted.definition.normals)
82
+ reply.rows(admitted.definition.normals);
83
+ reply.run();
84
+ }
85
+ else if (kind === 4) {
86
+ const points = source.pointDefinitions.get(node.path) ?? decodeIfcxPointSource(node.attributes);
87
+ const reply = new ImportWriter(105).u32(handle).u32(sequence).u32(points ? 1 : 0);
88
+ if (points) {
89
+ source.admitPoints(frame, transforms, points, identity);
90
+ reply.values(points.positions).u32(points.colors ? 1 : 0);
91
+ if (points.colors)
92
+ reply.values(points.colors);
93
+ reply.f64(points.pointCount).string(points.sourcePrecision).string(points.sourceEncoding);
94
+ }
95
+ reply.run();
96
+ }
97
+ else if (kind === 5) {
98
+ readColor(event);
99
+ const mesh = { expressId, ifcType, positions: event.floats(), normals: event.floats(),
100
+ indices: event.indices(), color: resolveImportedColor(frame) ?? [0.8, 0.8, 0.8, 1] };
101
+ const wire = node.attributes.get(IFCX_APPEARANCE);
102
+ if (wire !== undefined) {
103
+ const appearance = decodeIfcxAppearance(wire, mesh.positions.length / 3);
104
+ const pixels = decodeImage(appearance.image.ref, composed.get(appearance.image.ref)?.attributes.get(IFCX_IMAGE));
105
+ mesh.uvs = stageUvs(appearance.uvs);
106
+ mesh.texture = { ...pixels, repeatS: appearance.repeatS, repeatT: appearance.repeatT };
107
+ }
108
+ retainImportedSource(mesh, source);
109
+ retainImportedSource(mesh.positions, source);
110
+ meshes.push(mesh);
111
+ new ImportWriter(106).u32(handle).u32(sequence).run();
112
+ }
113
+ else if (kind === 6) {
114
+ const positions = event.floats();
115
+ const colors = event.u32() ? event.floats() : undefined;
116
+ const cloud = { expressId, ifcType, positions, colors, pointCount: event.f64(),
117
+ bbox: { min: event.triple(), max: event.triple() } };
118
+ retainImportedSource(cloud, source);
119
+ retainImportedSource(positions, source);
120
+ pointClouds.push(cloud);
121
+ new ImportWriter(106).u32(handle).u32(sequence).run();
122
+ }
123
+ else {
124
+ throw new Error(`Imported geometry: invalid operation ${kind}`);
125
+ }
126
+ }
127
+ retainImportedSource(meshes, source);
128
+ retainImportedSource(pointClouds, source);
129
+ return { meshes, pointClouds };
130
+ }
131
+ finally {
132
+ new ImportWriter(107).u32(handle).run();
133
+ }
134
+ }
135
+ function readColor(event) {
136
+ return event.u32() ? [event.f64(), event.f64(), event.f64(), event.f64()] : null;
137
+ }
138
+ function readFrame(event, nodes) {
139
+ let frame = null;
140
+ let transforms = [];
141
+ const count = event.u32();
142
+ for (let index = 0; index < count; index++) {
143
+ const node = nodes[event.u32()];
144
+ const edgeName = event.optionalIdentityString() ?? null;
145
+ if (!node)
146
+ throw new Error('Imported geometry: invalid source lineage');
147
+ frame = { node, parent: frame, edgeName, depth: index };
148
+ transforms = appendSourceTransform(node, transforms);
149
+ }
150
+ if (!frame)
151
+ throw new Error('Imported geometry: empty source lineage');
152
+ return { frame, transforms };
153
+ }
154
+ //# sourceMappingURL=imported-graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-graph.js","sourceRoot":"","sources":["../src/imported-graph.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,IAAI,EAAmC,MAAM,YAAY,CAAC;AAInE,OAAO,EAA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AAC;IACxC,IAAI,UAAU,GAAmB,EAAE,CAAC;IACpC,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;IAC1B,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC;QAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;QAChC,MAAM,QAAQ,GAAG,KAAK,CAAC,sBAAsB,EAAE,IAAI,IAAI,CAAC;QACxD,IAAI,CAAC,IAAI;YAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QACxE,KAAK,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;QACxD,UAAU,GAAG,qBAAqB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACvD,CAAC;IACD,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IACvE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,33 @@
1
+ export interface ImportedOperationIdentity {
2
+ store: number;
3
+ revision: number;
4
+ definition: number;
5
+ occurrence: number;
6
+ }
7
+ export type TransformStack = readonly (readonly (readonly number[])[])[];
8
+ export interface ImportedMeshSource {
9
+ points: readonly (readonly number[])[];
10
+ faceVertexIndices: readonly number[];
11
+ faceVertexCounts?: readonly number[];
12
+ normals?: readonly (readonly number[])[];
13
+ }
14
+ /** Execute any versioned numeric or graph-control packet. Returns the complete
15
+ * length/status/payload packet, throwing its UTF-8 error when status is nonzero. */
16
+ export declare function runImportedPacket(input: Uint8Array): Uint8Array;
17
+ export declare function stageTransform(stack: TransformStack): Float32Array | null;
18
+ export declare function executeMesh(source: ImportedMeshSource, stack: TransformStack, identity?: ImportedOperationIdentity): {
19
+ positions: Float32Array;
20
+ normals: Float32Array;
21
+ indices: Uint32Array;
22
+ };
23
+ export declare function executePoints(source: Float32Array | Float64Array | readonly (readonly number[])[], stack: TransformStack, identity?: ImportedOperationIdentity): {
24
+ positions: Float32Array;
25
+ bbox: {
26
+ min: [number, number, number];
27
+ max: [number, number, number];
28
+ };
29
+ };
30
+ export declare function stageUvs(values: ArrayLike<number>): Float32Array;
31
+ export declare function computeNormalMatrix(matrix: Float32Array): Float32Array | null;
32
+ export declare function computeNormals(positions: Float32Array, indices: Uint32Array): Float32Array;
33
+ //# sourceMappingURL=imported-kernel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-kernel.d.ts","sourceRoot":"","sources":["../src/imported-kernel.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,yBAAyB;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,MAAM,cAAc,GAAG,SAAS,CAAC,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AACzE,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;IACvC,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,gBAAgB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,OAAO,CAAC,EAAE,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC;CAC1C;AAgDD;oFACoF;AACpF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAgB/D;AA0BD,wBAAgB,cAAc,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,GAAG,IAAI,CAEzE;AACD,wBAAgB,WAAW,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,yBAAyB,GAAG;IAAE,SAAS,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,YAAY,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,CAK7L;AACD,wBAAgB,aAAa,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,GAAG,SAAS,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,CAAC,EAAE,yBAAyB,GAAG;IAAE,SAAS,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE;QAAE,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;QAAC,GAAG,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAA;KAAE,CAAA;CAAE,CAIpQ;AACD,wBAAgB,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,GAAG,YAAY,CAEhE;AACD,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,YAAY,GAAG,YAAY,GAAG,IAAI,CAE7E;AACD,wBAAgB,cAAc,CAAC,SAAS,EAAE,YAAY,EAAE,OAAO,EAAE,WAAW,GAAG,YAAY,CAG1F"}
@@ -0,0 +1,172 @@
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
+ import { createImportedGeometryKernel } from './generated/imported-geometry-static.js';
5
+ let cachedKernel;
6
+ function instance() { return cachedKernel ??= createImportedGeometryKernel(); }
7
+ class Packet {
8
+ bytes = new Uint8Array(1024);
9
+ view = new DataView(this.bytes.buffer);
10
+ offset = 0;
11
+ constructor(kind) { this.u32(1); this.u32(kind); }
12
+ reserve(length) {
13
+ const needed = this.offset + length;
14
+ if (!Number.isSafeInteger(needed) || needed > 0xffffffff)
15
+ throw new RangeError('Imported geometry packet exceeds u32 address space');
16
+ if (needed <= this.bytes.length)
17
+ return;
18
+ let capacity = this.bytes.length;
19
+ while (capacity < needed)
20
+ capacity = Math.min(0xffffffff, capacity * 2);
21
+ const next = new Uint8Array(capacity);
22
+ next.set(this.bytes.subarray(0, this.offset));
23
+ this.bytes = next;
24
+ this.view = new DataView(next.buffer);
25
+ }
26
+ u32(value) {
27
+ if (!Number.isSafeInteger(value) || value < 0 || value > 0xffffffff)
28
+ throw new RangeError('Imported geometry packet u32 overflow');
29
+ this.reserve(4);
30
+ this.view.setUint32(this.offset, value, true);
31
+ this.offset += 4;
32
+ }
33
+ identity(identity) {
34
+ const values = identity ? [identity.store, identity.revision, identity.definition, identity.occurrence] : [1, 1, 1, nextOccurrence++];
35
+ this.reserve(32);
36
+ for (const value of values) {
37
+ if (!Number.isSafeInteger(value) || value < 0)
38
+ throw new RangeError('Imported geometry identity must be a nonnegative safe integer');
39
+ this.view.setBigUint64(this.offset, BigInt(value), true);
40
+ this.offset += 8;
41
+ }
42
+ }
43
+ values(values) {
44
+ this.u32(values.length);
45
+ this.reserve(values.length * 8);
46
+ for (let i = 0; i < values.length; i++) {
47
+ this.view.setFloat64(this.offset, values[i], true);
48
+ this.offset += 8;
49
+ }
50
+ }
51
+ indices(values) {
52
+ this.u32(values.length);
53
+ this.reserve(values.length * 4);
54
+ for (const value of values) {
55
+ this.view.setUint32(this.offset, value, true);
56
+ this.offset += 4;
57
+ }
58
+ }
59
+ rows(rows) { this.u32(rows.length); for (const row of rows)
60
+ this.values(row); }
61
+ stack(stack) { this.u32(stack.length); for (const matrix of stack)
62
+ this.rows(matrix); }
63
+ run() { return new ResultPacket(runImportedPacket(this.bytes.subarray(0, this.offset))); }
64
+ }
65
+ /** Execute any versioned numeric or graph-control packet. Returns the complete
66
+ * length/status/payload packet, throwing its UTF-8 error when status is nonzero. */
67
+ export function runImportedPacket(input) {
68
+ if (input.length > 0xffffffff)
69
+ throw new RangeError('Imported geometry packet exceeds u32 address space');
70
+ const k = instance();
71
+ const pointer = k.imported_alloc(input.length) >>> 0;
72
+ let output = 0;
73
+ let outputLength = 0;
74
+ try {
75
+ new Uint8Array(k.memory.buffer, pointer, input.length).set(input);
76
+ output = k.imported_run(pointer, input.length) >>> 0;
77
+ outputLength = new DataView(k.memory.buffer).getUint32(output, true);
78
+ const bytes = new Uint8Array(k.memory.buffer, output, outputLength).slice();
79
+ const status = new DataView(bytes.buffer).getUint32(4, true);
80
+ if (status)
81
+ throw new Error(new TextDecoder().decode(bytes.subarray(8)));
82
+ return bytes;
83
+ }
84
+ finally {
85
+ k.imported_free(pointer, input.length);
86
+ if (output)
87
+ k.imported_free(output, outputLength);
88
+ }
89
+ }
90
+ let nextOccurrence = 1;
91
+ class ResultPacket {
92
+ offset = 8;
93
+ view;
94
+ constructor(bytes) { this.view = new DataView(bytes.buffer); }
95
+ floats() {
96
+ const n = this.view.getUint32(this.offset, true);
97
+ this.offset += 4;
98
+ const out = new Float32Array(n);
99
+ // Copy bits, including NaN and negative zero, without a JSON conversion.
100
+ const bits = new Uint32Array(out.buffer);
101
+ for (let i = 0; i < n; i++) {
102
+ bits[i] = this.view.getUint32(this.offset, true);
103
+ this.offset += 4;
104
+ }
105
+ return out;
106
+ }
107
+ indices() {
108
+ const n = this.view.getUint32(this.offset, true);
109
+ this.offset += 4;
110
+ const out = new Uint32Array(n);
111
+ for (let i = 0; i < n; i++) {
112
+ out[i] = this.view.getUint32(this.offset, true);
113
+ this.offset += 4;
114
+ }
115
+ return out;
116
+ }
117
+ triple() {
118
+ const out = [0, 0, 0];
119
+ for (let i = 0; i < 3; i++) {
120
+ out[i] = this.view.getFloat64(this.offset, true);
121
+ this.offset += 8;
122
+ }
123
+ return out;
124
+ }
125
+ }
126
+ export function stageTransform(stack) {
127
+ const p = new Packet(1);
128
+ p.stack(stack);
129
+ const values = p.run().floats();
130
+ return values.length ? values : null;
131
+ }
132
+ export function executeMesh(source, stack, identity) {
133
+ const p = new Packet(2);
134
+ p.identity(identity);
135
+ p.stack(stack);
136
+ p.rows(source.points);
137
+ p.values(source.faceVertexIndices ?? []);
138
+ p.u32(source.faceVertexCounts ? 1 : 0);
139
+ if (source.faceVertexCounts)
140
+ p.values(source.faceVertexCounts);
141
+ p.u32(source.normals ? 1 : 0);
142
+ if (source.normals)
143
+ p.rows(source.normals);
144
+ const result = p.run();
145
+ return { positions: result.floats(), normals: result.floats(), indices: result.indices() };
146
+ }
147
+ export function executePoints(source, stack, identity) {
148
+ const p = new Packet(3);
149
+ p.identity(identity);
150
+ p.stack(stack);
151
+ p.values(source instanceof Float32Array || source instanceof Float64Array ? source : source.flatMap(row => [...row]));
152
+ const result = p.run();
153
+ return { positions: result.floats(), bbox: { min: result.triple(), max: result.triple() } };
154
+ }
155
+ export function stageUvs(values) {
156
+ const p = new Packet(4);
157
+ p.values(values);
158
+ return p.run().floats();
159
+ }
160
+ export function computeNormalMatrix(matrix) {
161
+ const p = new Packet(5);
162
+ p.values(matrix);
163
+ const out = p.run().floats();
164
+ return out.length ? out : null;
165
+ }
166
+ export function computeNormals(positions, indices) {
167
+ const p = new Packet(6);
168
+ p.values(positions);
169
+ p.indices(indices);
170
+ return p.run().floats();
171
+ }
172
+ //# sourceMappingURL=imported-kernel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-kernel.js","sourceRoot":"","sources":["../src/imported-kernel.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AAqBvF,IAAI,YAAuC,CAAC;AAC5C,SAAS,QAAQ,KAAoB,OAAO,YAAY,KAAK,4BAA4B,EAAE,CAAC,CAAC,CAAC;AAC9F,MAAM,MAAM;IACF,KAAK,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;IAC7B,IAAI,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,GAAG,CAAC,CAAC;IACnB,YAAY,IAAY,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI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AAC;IAAC,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AAC1G,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,SAAuB,EAAE,OAAoB;IAC1E,MAAM,CAAC,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;IAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC;AAC1B,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { ComposedNode } from './types.js';
2
+ /** Both parser entries consume the same Rust mesh-then-point program. */
3
+ export declare function extractImportedScene(composed: Map<string, ComposedNode>, pathToId: Map<string, number>): {
4
+ meshes: import("./geometry-extractor.js").MeshData[];
5
+ pointClouds: import("./pointcloud-extractor.js").PointCloudExtraction[];
6
+ };
7
+ //# sourceMappingURL=imported-scene.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-scene.d.ts","sourceRoot":"","sources":["../src/imported-scene.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG/C,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EAAE,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC;;;EAEtG"}
@@ -0,0 +1,6 @@
1
+ import { executeImportedGraph } from './imported-graph.js';
2
+ /** Both parser entries consume the same Rust mesh-then-point program. */
3
+ export function extractImportedScene(composed, pathToId) {
4
+ return executeImportedGraph(composed, pathToId, 3);
5
+ }
6
+ //# sourceMappingURL=imported-scene.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-scene.js","sourceRoot":"","sources":["../src/imported-scene.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,yEAAyE;AACzE,MAAM,UAAU,oBAAoB,CAAC,QAAmC,EAAE,QAA6B;IACrG,OAAO,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Own composed JSON facts without invoking accessors on uninterpreted values. */
2
+ export declare function snapshotAttribute(value: unknown, seen?: WeakMap<object, unknown>): unknown;
3
+ //# sourceMappingURL=imported-snapshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-snapshot.d.ts","sourceRoot":"","sources":["../src/imported-snapshot.ts"],"names":[],"mappings":"AAIA,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,2BAAiC,GAAG,OAAO,CA+BhG"}
@@ -0,0 +1,53 @@
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
+ /** Own composed JSON facts without invoking accessors on uninterpreted values. */
5
+ export function snapshotAttribute(value, seen = new WeakMap()) {
6
+ if (value === null || typeof value !== 'object')
7
+ return value;
8
+ if (seen.has(value))
9
+ return seen.get(value);
10
+ if (value instanceof ArrayBuffer) {
11
+ const copy = value.slice(0);
12
+ seen.set(value, copy);
13
+ return copy;
14
+ }
15
+ if (ArrayBuffer.isView(value)) {
16
+ const buffer = new Uint8Array(value.buffer, value.byteOffset, value.byteLength).slice().buffer;
17
+ const Constructor = value.constructor;
18
+ const copy = new Constructor(buffer);
19
+ seen.set(value, copy);
20
+ return copy;
21
+ }
22
+ if (value instanceof Date) {
23
+ const copy = new Date(value.getTime());
24
+ seen.set(value, copy);
25
+ return copy;
26
+ }
27
+ if (value instanceof Map) {
28
+ const copy = new Map();
29
+ seen.set(value, copy);
30
+ for (const [key, item] of value)
31
+ copy.set(snapshotAttribute(key, seen), snapshotAttribute(item, seen));
32
+ return copy;
33
+ }
34
+ if (value instanceof Set) {
35
+ const copy = new Set();
36
+ seen.set(value, copy);
37
+ for (const item of value)
38
+ copy.add(snapshotAttribute(item, seen));
39
+ return copy;
40
+ }
41
+ const copy = Array.isArray(value) ? [] : Object.create(Object.getPrototypeOf(value));
42
+ seen.set(value, copy);
43
+ for (const key of Reflect.ownKeys(value)) {
44
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
45
+ if (!descriptor)
46
+ continue;
47
+ if ('value' in descriptor)
48
+ descriptor.value = snapshotAttribute(descriptor.value, seen);
49
+ Object.defineProperty(copy, key, descriptor);
50
+ }
51
+ return copy;
52
+ }
53
+ //# sourceMappingURL=imported-snapshot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-snapshot.js","sourceRoot":"","sources":["../src/imported-snapshot.ts"],"names":[],"mappings":"AAAA;;+DAE+D;AAE/D,kFAAkF;AAClF,MAAM,UAAU,iBAAiB,CAAC,KAAc,EAAE,OAAO,IAAI,OAAO,EAAmB;IACrF,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC9D,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC5C,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;QACjC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAAC,OAAO,IAAI,CAAC;IAClE,CAAC;IACD,IAAI,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,C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,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7F,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACtB,KAAK,MAAM,GAAG,IAAI,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC/D,IAAI,CAAC,UAAU;YAAE,SAAS;QAC1B,IAAI,OAAO,IAAI,UAAU;YAAE,UAAU,CAAC,KAAK,GAAG,iBAAiB,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACxF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,EAAE,UAAU,CAAC,CAAC;IAC/C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,59 @@
1
+ import { type ComposedNode, type UsdMesh } from './types.js';
2
+ import { type TraversalFrame } from './traversal.js';
3
+ import type { IfcxPointSource } from '@ifc-lite/pointcloud';
4
+ import type { TransformStack, ImportedOperationIdentity } from './imported-kernel.js';
5
+ /** Authored JSON numbers, before the compatibility display staging in Rust. */
6
+ export declare function appendSourceTransform(node: ComposedNode, parent: TransformStack): TransformStack;
7
+ export interface ImportedNodeSource {
8
+ readonly attributes: ReadonlyMap<string, unknown>;
9
+ readonly attributeSources?: ReadonlyMap<string, unknown>;
10
+ readonly contributingLayers?: ReadonlySet<string>;
11
+ }
12
+ export interface ImportedOccurrence {
13
+ readonly identity: ImportedOperationIdentity;
14
+ readonly ordinal: number;
15
+ readonly path: string;
16
+ readonly lineage: readonly {
17
+ path: string;
18
+ edgeName: string | null;
19
+ }[];
20
+ readonly transforms: TransformStack;
21
+ readonly definition: UsdMesh;
22
+ }
23
+ /**
24
+ * Import-local source authority. Definitions are copied once per composed node,
25
+ * not reconstructed from presented buffers. Occurrences retain traversal edges
26
+ * separately from entity ids (which are importer ids, never STEP references).
27
+ * Composition and asset objects remain owned by the existing format composer.
28
+ */
29
+ export interface ImportedPointOccurrence {
30
+ readonly identity: ImportedOperationIdentity;
31
+ readonly ordinal: number;
32
+ readonly path: string;
33
+ readonly lineage: readonly {
34
+ path: string;
35
+ edgeName: string | null;
36
+ }[];
37
+ readonly transforms: TransformStack;
38
+ readonly definition: IfcxPointSource;
39
+ }
40
+ export declare class ImportedSourceDocument {
41
+ readonly store: number;
42
+ readonly revision = 1;
43
+ private nextDefinition;
44
+ private nextOccurrence;
45
+ private definitionIds;
46
+ private snapshots;
47
+ readonly definitions: Map<string, UsdMesh>;
48
+ readonly nodes: Map<string, ImportedNodeSource>;
49
+ readonly pointDefinitions: Map<string, IfcxPointSource>;
50
+ readonly pointOccurrences: ImportedPointOccurrence[];
51
+ admitPoints(frame: TraversalFrame, transforms: TransformStack, definition: IfcxPointSource, identity?: ImportedOperationIdentity): ImportedPointOccurrence;
52
+ readonly occurrences: ImportedOccurrence[];
53
+ private identity;
54
+ private rememberLineage;
55
+ admitMesh(frame: TraversalFrame, transforms: TransformStack, source: UsdMesh, identity?: ImportedOperationIdentity): ImportedOccurrence;
56
+ }
57
+ export declare function retainImportedSource(owner: object, source: ImportedSourceDocument): void;
58
+ export declare function importedSourceFor(owner: object): ImportedSourceDocument | undefined;
59
+ //# sourceMappingURL=imported-source.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imported-source.d.ts","sourceRoot":"","sources":["../src/imported-source.ts"],"names":[],"mappings":"AAKA,OAAO,EAAQ,KAAK,YAAY,EAAE,KAAK,OAAO,EAAqB,MAAM,YAAY,CAAC;AACtF,OAAO,EAAmB,KAAK,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAEtF,+EAA+E;AAC/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