@bldrs-ai/conway 1.416.1260 → 1.418.1264
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/compiled/examples/browser-bundled.cjs +1 -1
- package/compiled/examples/cli-bundled.cjs +1 -1
- package/compiled/examples/cli-step-bundled.cjs +1 -1
- package/compiled/examples/validator-bundled.cjs +1 -1
- package/compiled/src/compat/web-ifc/ifc_api.d.ts +20 -0
- package/compiled/src/compat/web-ifc/ifc_api.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api.js +29 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.d.ts +16 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough_factory.js +29 -0
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts +40 -0
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.js +106 -0
- package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/ifc_api_streamed_open.test.js +100 -0
- package/compiled/src/version/version.js +1 -1
- package/compiled/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -30,7 +30,7 @@ var import_node_process = require("node:process");
|
|
|
30
30
|
var readline = __toESM(require("node:readline"), 1);
|
|
31
31
|
|
|
32
32
|
// compiled/src/version/version.js
|
|
33
|
-
var versionString = "Conway v1.
|
|
33
|
+
var versionString = "Conway v1.418.1264";
|
|
34
34
|
|
|
35
35
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
36
36
|
var wasmType = "";
|
|
@@ -14965,7 +14965,7 @@ ${t5.join("\n")}` : "";
|
|
|
14965
14965
|
var import_process = require("process");
|
|
14966
14966
|
|
|
14967
14967
|
// compiled/src/version/version.js
|
|
14968
|
-
var versionString = "Conway v1.
|
|
14968
|
+
var versionString = "Conway v1.418.1264";
|
|
14969
14969
|
|
|
14970
14970
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
14971
14971
|
function pThreadsAllowed() {
|
|
@@ -15943,7 +15943,7 @@ var ParsingBuffer = class {
|
|
|
15943
15943
|
};
|
|
15944
15944
|
|
|
15945
15945
|
// compiled/src/version/version.js
|
|
15946
|
-
var versionString = "Conway v1.
|
|
15946
|
+
var versionString = "Conway v1.418.1264";
|
|
15947
15947
|
|
|
15948
15948
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
15949
15949
|
function pThreadsAllowed() {
|
|
@@ -944,7 +944,7 @@ var EntityTypesIfcCount = 909;
|
|
|
944
944
|
var entity_types_ifc_gen_default = EntityTypesIfc;
|
|
945
945
|
|
|
946
946
|
// compiled/src/version/version.js
|
|
947
|
-
var versionString = "Conway v1.
|
|
947
|
+
var versionString = "Conway v1.418.1264";
|
|
948
948
|
|
|
949
949
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
950
950
|
var wasmType = "";
|
|
@@ -145,6 +145,26 @@ export declare class IfcAPI {
|
|
|
145
145
|
* @return {Promise<number>} model ID
|
|
146
146
|
*/
|
|
147
147
|
OpenModelAsync(data: Uint8Array, settings?: Loadersettings): Promise<number>;
|
|
148
|
+
/**
|
|
149
|
+
* Streamed-open variant of OpenModelAsync (conway extension;
|
|
150
|
+
* feature-detect with typeof api.OpenModelStreamed === 'function').
|
|
151
|
+
* IFC input parses through the streaming columnar indexer, so the
|
|
152
|
+
* model's record index is columnar from birth and the classic
|
|
153
|
+
* per-record object phase — the dominant JS-heap cost of parsing
|
|
154
|
+
* large models — never exists. Everything downstream is identical to
|
|
155
|
+
* OpenModelAsync: same cooperative geometry extraction, same
|
|
156
|
+
* meshes/properties surface, and SpillModelSource works afterwards
|
|
157
|
+
* as usual.
|
|
158
|
+
*
|
|
159
|
+
* Never does worse than OpenModelAsync: non-IFC formats and any
|
|
160
|
+
* streamed-parse failure fall back to the classic path internally,
|
|
161
|
+
* so -1 here means the classic open would have failed too.
|
|
162
|
+
*
|
|
163
|
+
* @param data containing IFC data (bytes)
|
|
164
|
+
* @param settings settings for loading the model
|
|
165
|
+
* @return {Promise<number>} model ID
|
|
166
|
+
*/
|
|
167
|
+
OpenModelStreamed(data: Uint8Array, settings?: Loadersettings): Promise<number>;
|
|
148
168
|
/**
|
|
149
169
|
* Set conway's console-echo log threshold, web-ifc compatible surface
|
|
150
170
|
* (numeric LogLevel enum). Embedders (e.g. Share) use this to quiet a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifc_api.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,mBAAmB,IAAI,mBAAmB,EACjE,MAAM,aAAa,CAAA;AAGrB,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAEnD,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAEpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAGzC,cAAc,UAAU,CAAA;AAGxB,eAAO,MAAM,OAAO,IAAI,CAAA;AACxB,eAAO,MAAM,MAAM,IAAI,CAAA;AACvB,eAAO,MAAM,KAAK,IAAI,CAAA;AACtB,eAAO,MAAM,IAAI,IAAI,CAAA;AACrB,eAAO,MAAM,IAAI,IAAI,CAAA;AACrB,eAAO,MAAM,GAAG,IAAI,CAAA;AACpB,eAAO,MAAM,KAAK,IAAI,CAAA;AACtB,eAAO,MAAM,SAAS,IAAI,CAAA;AAC1B,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;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,UAAQ;IAM1C,sDAAsD;IACtD,gBAAgB,IAAI,MAAM;IAI1B,2FAA2F;IAC3F,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,GAAG;CAGpC"}
|
|
@@ -144,6 +144,35 @@ export class IfcAPI {
|
|
|
144
144
|
this.models.set(modelIdResult, result);
|
|
145
145
|
return modelIdResult;
|
|
146
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Streamed-open variant of OpenModelAsync (conway extension;
|
|
149
|
+
* feature-detect with typeof api.OpenModelStreamed === 'function').
|
|
150
|
+
* IFC input parses through the streaming columnar indexer, so the
|
|
151
|
+
* model's record index is columnar from birth and the classic
|
|
152
|
+
* per-record object phase — the dominant JS-heap cost of parsing
|
|
153
|
+
* large models — never exists. Everything downstream is identical to
|
|
154
|
+
* OpenModelAsync: same cooperative geometry extraction, same
|
|
155
|
+
* meshes/properties surface, and SpillModelSource works afterwards
|
|
156
|
+
* as usual.
|
|
157
|
+
*
|
|
158
|
+
* Never does worse than OpenModelAsync: non-IFC formats and any
|
|
159
|
+
* streamed-parse failure fall back to the classic path internally,
|
|
160
|
+
* so -1 here means the classic open would have failed too.
|
|
161
|
+
*
|
|
162
|
+
* @param data containing IFC data (bytes)
|
|
163
|
+
* @param settings settings for loading the model
|
|
164
|
+
* @return {Promise<number>} model ID
|
|
165
|
+
*/
|
|
166
|
+
async OpenModelStreamed(data, settings) {
|
|
167
|
+
// Reserve the ID before the first await — see OpenModelAsync.
|
|
168
|
+
const modelIdResult = this.globalModelIDCounter++;
|
|
169
|
+
const result = await IfcApiModelPassthroughFactory.fromStreamed(modelIdResult, data, this.wasmModule, settings);
|
|
170
|
+
if (result === void 0) {
|
|
171
|
+
return -1;
|
|
172
|
+
}
|
|
173
|
+
this.models.set(modelIdResult, result);
|
|
174
|
+
return modelIdResult;
|
|
175
|
+
}
|
|
147
176
|
/**
|
|
148
177
|
* Set conway's console-echo log threshold, web-ifc compatible surface
|
|
149
178
|
* (numeric LogLevel enum). Embedders (e.g. Share) use this to quiet a
|
|
@@ -13,6 +13,22 @@ export declare class IfcApiModelPassthroughFactory {
|
|
|
13
13
|
* @return {IfcApiModelPassthrough | undefined}
|
|
14
14
|
*/
|
|
15
15
|
static from(modelID: number, data: Uint8Array, wasmModule: any, settings?: Loadersettings): IfcApiModelPassthrough | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Streamed-open twin of fromAsync (used by OpenModelStreamed): IFC
|
|
18
|
+
* models parse through the streaming columnar indexer (no per-record
|
|
19
|
+
* object phase — see IfcApiProxyIfc.createStreamed); everything else
|
|
20
|
+
* behaves like fromAsync. Non-IFC formats and any streamed-open
|
|
21
|
+
* failure fall back to the classic cooperative path, so this never
|
|
22
|
+
* does worse than fromAsync — the safety net behind embedder
|
|
23
|
+
* feature flags.
|
|
24
|
+
*
|
|
25
|
+
* @param modelID
|
|
26
|
+
* @param data
|
|
27
|
+
* @param wasmModule
|
|
28
|
+
* @param settings
|
|
29
|
+
* @return {Promise<IfcApiModelPassthrough | undefined>}
|
|
30
|
+
*/
|
|
31
|
+
static fromStreamed(modelID: number, data: Uint8Array, wasmModule: any, settings?: Loadersettings): Promise<IfcApiModelPassthrough | undefined>;
|
|
16
32
|
/**
|
|
17
33
|
* Cooperative twin of from() (used by OpenModelAsync): the data parse
|
|
18
34
|
* runs with periodic event-loop yields so progress UI can repaint
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifc_api_model_passthrough_factory.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_model_passthrough_factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAKpE;;GAEG;AACH,qBAAa,6BAA6B;IAExC;;;;;;;OAOG;WACW,IAAI,CACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,sBAAsB,GAAG,SAAS;IA2EnE;;;;;;;;;;;;OAYG;WACiB,SAAS,CACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;CA+C7E"}
|
|
1
|
+
{"version":3,"file":"ifc_api_model_passthrough_factory.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_model_passthrough_factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AAKpE;;GAEG;AACH,qBAAa,6BAA6B;IAExC;;;;;;;OAOG;WACW,IAAI,CACd,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,sBAAsB,GAAG,SAAS;IA2EnE;;;;;;;;;;;;;;OAcG;WACiB,YAAY,CAC5B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;IAuB5E;;;;;;;;;;;;OAYG;WACiB,SAAS,CACzB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,GAAG,EACf,QAAQ,CAAC,EAAE,cAAc,GAAI,OAAO,CAAC,sBAAsB,GAAG,SAAS,CAAC;CA+C7E"}
|
|
@@ -66,6 +66,35 @@ export class IfcApiModelPassthroughFactory {
|
|
|
66
66
|
Logger.error("No type detected when constructing model");
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Streamed-open twin of fromAsync (used by OpenModelStreamed): IFC
|
|
71
|
+
* models parse through the streaming columnar indexer (no per-record
|
|
72
|
+
* object phase — see IfcApiProxyIfc.createStreamed); everything else
|
|
73
|
+
* behaves like fromAsync. Non-IFC formats and any streamed-open
|
|
74
|
+
* failure fall back to the classic cooperative path, so this never
|
|
75
|
+
* does worse than fromAsync — the safety net behind embedder
|
|
76
|
+
* feature flags.
|
|
77
|
+
*
|
|
78
|
+
* @param modelID
|
|
79
|
+
* @param data
|
|
80
|
+
* @param wasmModule
|
|
81
|
+
* @param settings
|
|
82
|
+
* @return {Promise<IfcApiModelPassthrough | undefined>}
|
|
83
|
+
*/
|
|
84
|
+
static async fromStreamed(modelID, data, wasmModule, settings) {
|
|
85
|
+
const modelFormat = ModelFormatDetector.detect(new ParsingBuffer(data));
|
|
86
|
+
if (modelFormat === ModelFormatType.IFC) {
|
|
87
|
+
try {
|
|
88
|
+
return await IfcApiProxyIfc.createStreamed(modelID, data, wasmModule, settings);
|
|
89
|
+
}
|
|
90
|
+
catch (e) {
|
|
91
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
92
|
+
Logger.warning(`Streamed open failed for model ${modelID}, ` +
|
|
93
|
+
`falling back to classic open: ${message}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return IfcApiModelPassthroughFactory.fromAsync(modelID, data, wasmModule, settings);
|
|
97
|
+
}
|
|
69
98
|
/**
|
|
70
99
|
* Cooperative twin of from() (used by OpenModelAsync): the data parse
|
|
71
100
|
* runs with periodic event-loop yields so progress UI can repaint
|
|
@@ -75,6 +75,23 @@ export declare class IfcApiProxyIfc implements IfcApiModelPassthrough {
|
|
|
75
75
|
* @return {Promise<IfcApiProxyIfc>} The constructed proxy.
|
|
76
76
|
*/
|
|
77
77
|
static createAsync(modelID: number, data: Uint8Array, wasmModule: any, settings?: Loadersettings): Promise<IfcApiProxyIfc>;
|
|
78
|
+
/**
|
|
79
|
+
* Streamed-open construction (conway extension, used by
|
|
80
|
+
* OpenModelStreamed): the parse runs through the streaming columnar
|
|
81
|
+
* indexer, so the model's index is columnar from birth and the
|
|
82
|
+
* per-record object phase — the dominant JS-heap cost of the classic
|
|
83
|
+
* parse on large models — never exists. Geometry extraction is the
|
|
84
|
+
* same cooperative path OpenModelAsync uses, and everything
|
|
85
|
+
* downstream (meshes, properties, SpillModelSource) behaves
|
|
86
|
+
* identically to a classic open.
|
|
87
|
+
*
|
|
88
|
+
* @param modelID The model ID being opened.
|
|
89
|
+
* @param data The IFC data buffer.
|
|
90
|
+
* @param wasmModule The wasm module.
|
|
91
|
+
* @param settings Loader settings (ON_PROGRESS is honored).
|
|
92
|
+
* @return {Promise<IfcApiProxyIfc>} The constructed proxy.
|
|
93
|
+
*/
|
|
94
|
+
static createStreamed(modelID: number, data: Uint8Array, wasmModule: any, settings?: Loadersettings): Promise<IfcApiProxyIfc>;
|
|
78
95
|
/**
|
|
79
96
|
* Log + record the header parse result on the model statistics.
|
|
80
97
|
*
|
|
@@ -112,6 +129,29 @@ export declare class IfcApiProxyIfc implements IfcApiModelPassthrough {
|
|
|
112
129
|
* @return {Promise<IfcProxyLoadState>} Everything the constructor tail needs.
|
|
113
130
|
*/
|
|
114
131
|
private static parseAndExtractAsync;
|
|
132
|
+
/**
|
|
133
|
+
* Streamed twin of parseAndExtractAsync: the data parse runs through
|
|
134
|
+
* the streaming columnar indexer over a moving window instead of the
|
|
135
|
+
* per-record object parse, so the index is columnar from birth (no
|
|
136
|
+
* object phase). The source buffer stays resident behind the model —
|
|
137
|
+
* extraction and synchronous property reads behave exactly like a
|
|
138
|
+
* classic open, and `spillSourceToExternalStore` works afterwards as
|
|
139
|
+
* usual.
|
|
140
|
+
*
|
|
141
|
+
* The columnar build is a single synchronous pass (no mid-parse
|
|
142
|
+
* yields yet), so the 'dataParse' progress phase reports its
|
|
143
|
+
* boundaries without intermediate ticks; extraction remains
|
|
144
|
+
* cooperative. Throws when the streamed parse is anything but
|
|
145
|
+
* COMPLETE — the caller (OpenModelStreamed) falls back to the
|
|
146
|
+
* classic path, which tolerates recoverable parses.
|
|
147
|
+
*
|
|
148
|
+
* @param modelID The model ID being opened.
|
|
149
|
+
* @param data The IFC data buffer.
|
|
150
|
+
* @param conwaywasm The conway geometry wasm wrapper.
|
|
151
|
+
* @param settings Loader settings (ON_PROGRESS is honored).
|
|
152
|
+
* @return {Promise<IfcProxyLoadState>} Everything the constructor tail needs.
|
|
153
|
+
*/
|
|
154
|
+
private static parseColumnarAndExtractAsync;
|
|
115
155
|
/**
|
|
116
156
|
*
|
|
117
157
|
* @param input - FILE_HEADER from step header
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ifc_api_proxy_ifc.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_proxy_ifc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACf,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAC7D,OAAO,YAAY,MAAM,0BAA0B,CAAA;AACnD,OAAO,EACL,QAAQ,EACR,WAAW,EACX,WAAW,EACX,cAAc,EACd,cAAc,EACd,WAAW,EACX,MAAM,EACP,MAAM,WAAW,CAAA;AAClB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAA;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAA;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"ifc_api_proxy_ifc.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_proxy_ifc.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,cAAc,EACf,MA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W,IAAI,MAAM,CAAC,MAAM,CAAC;IA0C7B;;;;OAIG;IACH,yBAAyB,CAAC,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC;IAU7D;;;;OAIG;IACH,qBAAqB,IAAI,KAAK,CAAC,MAAM,CAAC;IActC;;;;;OAKG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,YAAY;IAIvD;;;;;OAKG;IACH,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,WAAW;IAIrD;;;;;;OAMG;IACH,WAAW,CAAC,IAAI,EAAE,YAAY,GAAG,WAAW,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAC/E,YAAY,GAAG,WAAW;IAK5B;;;;OAIG;IACH,UAAU;IAIV;;;;OAIG;IACH,eAAe,CAAE,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;IA2NvD;;;;;OAKG;IACH,wBAAwB,CACpB,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EACpB,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI;IA+O1C;;;;OAIG;IACH,eAAe,IAAI,MAAM,CAAC,QAAQ,CAAC;IA0RnC;;;;;OAKG;IACH,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ;IAqDxC;;;;;OAKG;IACH,4BAA4B,IAAI,IAAI;CAwBrC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConwayGeometry, } from "../../index.js";
|
|
2
|
+
import IfcStepModel from "../../ifc/ifc_step_model.js";
|
|
2
3
|
import * as glmatrix from "gl-matrix";
|
|
3
4
|
import { IfcProperties } from "./ifc_properties.js";
|
|
4
5
|
import Logger from "../../logging/logger.js";
|
|
@@ -7,6 +8,8 @@ import { formatModelLine } from "../../core/progress_log.js";
|
|
|
7
8
|
import { extractModelInfo } from "../../loaders/loading_utilities.js";
|
|
8
9
|
import IfcStepParser from "../../ifc/ifc_step_parser.js";
|
|
9
10
|
import ParsingBuffer from "../../parsing/parsing_buffer.js";
|
|
11
|
+
import { BufferByteSource } from "../../step/parsing/byte_source.js";
|
|
12
|
+
import { buildColumnarIndexStreaming, } from "../../step/parsing/streaming_index_builder.js";
|
|
10
13
|
import { ExtractResult } from "../../index.js";
|
|
11
14
|
import { IfcGeometryExtraction } from "../../ifc/ifc_geometry_extraction.js";
|
|
12
15
|
import { ParseResult } from "../../index.js";
|
|
@@ -16,6 +19,11 @@ import { shimIfcEntityMap, shimIfcEntityReverseMap } from "./shim_schema_mapping
|
|
|
16
19
|
import { EntityTypesIfcCount } from "../../ifc/ifc4_gen/entity_types_ifc.gen.js";
|
|
17
20
|
import { IfcProduct, IfcRoot } from "../../ifc/ifc4_gen/index.js";
|
|
18
21
|
import { CanonicalMeshType } from "../../index.js";
|
|
22
|
+
/* Moving-window size for the streamed columnar parse (matches the
|
|
23
|
+
* ifc_stream_open default; the window bounds parse-time scratch, not
|
|
24
|
+
* the source buffer, which the model keeps resident here). */
|
|
25
|
+
// eslint-disable-next-line no-magic-numbers
|
|
26
|
+
const STREAMED_PARSE_POOL_BYTES = 1024 * 1024;
|
|
19
27
|
/**
|
|
20
28
|
* The proxy for IFC from the shim.
|
|
21
29
|
*/
|
|
@@ -167,6 +175,26 @@ export class IfcApiProxyIfc {
|
|
|
167
175
|
const loadState = await IfcApiProxyIfc.parseAndExtractAsync(modelID, data, new ConwayGeometry(wasmModule), settings);
|
|
168
176
|
return new IfcApiProxyIfc(modelID, data, wasmModule, settings, loadState);
|
|
169
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Streamed-open construction (conway extension, used by
|
|
180
|
+
* OpenModelStreamed): the parse runs through the streaming columnar
|
|
181
|
+
* indexer, so the model's index is columnar from birth and the
|
|
182
|
+
* per-record object phase — the dominant JS-heap cost of the classic
|
|
183
|
+
* parse on large models — never exists. Geometry extraction is the
|
|
184
|
+
* same cooperative path OpenModelAsync uses, and everything
|
|
185
|
+
* downstream (meshes, properties, SpillModelSource) behaves
|
|
186
|
+
* identically to a classic open.
|
|
187
|
+
*
|
|
188
|
+
* @param modelID The model ID being opened.
|
|
189
|
+
* @param data The IFC data buffer.
|
|
190
|
+
* @param wasmModule The wasm module.
|
|
191
|
+
* @param settings Loader settings (ON_PROGRESS is honored).
|
|
192
|
+
* @return {Promise<IfcApiProxyIfc>} The constructed proxy.
|
|
193
|
+
*/
|
|
194
|
+
static async createStreamed(modelID, data, wasmModule, settings) {
|
|
195
|
+
const loadState = await IfcApiProxyIfc.parseColumnarAndExtractAsync(modelID, data, new ConwayGeometry(wasmModule), settings);
|
|
196
|
+
return new IfcApiProxyIfc(modelID, data, wasmModule, settings, loadState);
|
|
197
|
+
}
|
|
170
198
|
/**
|
|
171
199
|
* Log + record the header parse result on the model statistics.
|
|
172
200
|
*
|
|
@@ -342,6 +370,84 @@ export class IfcApiProxyIfc {
|
|
|
342
370
|
geometryTimeInMs: endTime - startTime,
|
|
343
371
|
};
|
|
344
372
|
}
|
|
373
|
+
/**
|
|
374
|
+
* Streamed twin of parseAndExtractAsync: the data parse runs through
|
|
375
|
+
* the streaming columnar indexer over a moving window instead of the
|
|
376
|
+
* per-record object parse, so the index is columnar from birth (no
|
|
377
|
+
* object phase). The source buffer stays resident behind the model —
|
|
378
|
+
* extraction and synchronous property reads behave exactly like a
|
|
379
|
+
* classic open, and `spillSourceToExternalStore` works afterwards as
|
|
380
|
+
* usual.
|
|
381
|
+
*
|
|
382
|
+
* The columnar build is a single synchronous pass (no mid-parse
|
|
383
|
+
* yields yet), so the 'dataParse' progress phase reports its
|
|
384
|
+
* boundaries without intermediate ticks; extraction remains
|
|
385
|
+
* cooperative. Throws when the streamed parse is anything but
|
|
386
|
+
* COMPLETE — the caller (OpenModelStreamed) falls back to the
|
|
387
|
+
* classic path, which tolerates recoverable parses.
|
|
388
|
+
*
|
|
389
|
+
* @param modelID The model ID being opened.
|
|
390
|
+
* @param data The IFC data buffer.
|
|
391
|
+
* @param conwaywasm The conway geometry wasm wrapper.
|
|
392
|
+
* @param settings Loader settings (ON_PROGRESS is honored).
|
|
393
|
+
* @return {Promise<IfcProxyLoadState>} Everything the constructor tail needs.
|
|
394
|
+
*/
|
|
395
|
+
static async parseColumnarAndExtractAsync(modelID, data, conwaywasm, settings) {
|
|
396
|
+
const tracker = IfcApiProxyIfc.makeTracker(settings);
|
|
397
|
+
const allTimeStart = Date.now();
|
|
398
|
+
const parser = IfcStepParser.Instance;
|
|
399
|
+
const bufferInput = new ParsingBuffer(data);
|
|
400
|
+
tracker?.beginPhase("headerParse", "bytes", data.length);
|
|
401
|
+
// Header parsed standalone first so the model line fires before the
|
|
402
|
+
// full parse, exactly like the classic path (the columnar build
|
|
403
|
+
// re-reads the tiny header internally; the cost is negligible).
|
|
404
|
+
const [stepHeader, result0] = parser.parseHeader(bufferInput);
|
|
405
|
+
Logger.createStatistics(modelID);
|
|
406
|
+
const statistics = Logger.getStatistics(modelID);
|
|
407
|
+
IfcApiProxyIfc.reportHeaderParseResult(result0, bufferInput, modelID);
|
|
408
|
+
const modelInfo = extractModelInfo(stepHeader, data.length);
|
|
409
|
+
Logger.info(formatModelLine(modelInfo));
|
|
410
|
+
settings?.ON_MODEL_INFO?.(modelInfo);
|
|
411
|
+
tracker?.beginPhase("dataParse", "bytes", data.length);
|
|
412
|
+
const parseStartTime = Date.now();
|
|
413
|
+
const { columns, result } = buildColumnarIndexStreaming(new BufferByteSource(data), parser, STREAMED_PARSE_POOL_BYTES);
|
|
414
|
+
const parseEndTime = Date.now();
|
|
415
|
+
tracker?.endPhase(data.length);
|
|
416
|
+
if (result !== ParseResult.COMPLETE) {
|
|
417
|
+
Logger.warning(`[OpenModelStreamed]: streamed parse result ${result}`);
|
|
418
|
+
statistics?.setLoadStatus("PARSE_FAIL");
|
|
419
|
+
throw new Error("Streamed parse did not complete");
|
|
420
|
+
}
|
|
421
|
+
const model = new IfcStepModel(data, columns);
|
|
422
|
+
statistics?.setParseTime(parseEndTime - parseStartTime);
|
|
423
|
+
const conwayGeometry = new IfcGeometryExtraction(conwaywasm, model);
|
|
424
|
+
tracker?.beginPhase("geometry", "products");
|
|
425
|
+
const geometryTick = tracker !== void 0 ?
|
|
426
|
+
(completed, total) => {
|
|
427
|
+
tracker.setPhaseTotal(total);
|
|
428
|
+
tracker.update(completed);
|
|
429
|
+
} : void 0;
|
|
430
|
+
const startTime = Date.now();
|
|
431
|
+
const [extractionResult, scene] = await conwayGeometry.extractIFCGeometryDataAsync(geometryTick);
|
|
432
|
+
const endTime = Date.now();
|
|
433
|
+
tracker?.endPhase();
|
|
434
|
+
if (extractionResult !== ExtractResult.COMPLETE) {
|
|
435
|
+
Logger.error("[OpenModelStreamed]: Error extracting geometry, exiting...");
|
|
436
|
+
statistics?.setLoadStatus("FAIL");
|
|
437
|
+
throw new Error("Couldn't extract model");
|
|
438
|
+
}
|
|
439
|
+
statistics?.setProductCount(model.typeCount(IfcProduct));
|
|
440
|
+
statistics?.setGeometryTypeCounts(conwayGeometry.geometryTypeCounts);
|
|
441
|
+
return {
|
|
442
|
+
conwaywasm,
|
|
443
|
+
allTimeStart,
|
|
444
|
+
stepHeader,
|
|
445
|
+
model,
|
|
446
|
+
scene,
|
|
447
|
+
conwayGeometry,
|
|
448
|
+
geometryTimeInMs: endTime - startTime,
|
|
449
|
+
};
|
|
450
|
+
}
|
|
345
451
|
/**
|
|
346
452
|
*
|
|
347
453
|
* @param input - FILE_HEADER from step header
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ifc_api_streamed_open.test.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/ifc_api_streamed_open.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/* eslint-disable no-magic-numbers */
|
|
2
|
+
// Integration tests for OpenModelStreamed (streamed columnar open).
|
|
3
|
+
//
|
|
4
|
+
// Parity requirement: a model opened through the streaming columnar
|
|
5
|
+
// indexer must be indistinguishable downstream from a classic
|
|
6
|
+
// OpenModel — same meshes (ids, placements, colors), same property
|
|
7
|
+
// reads, same spatial structure — and SpillModelSource must work
|
|
8
|
+
// afterwards exactly as it does on a classic open. The fallback
|
|
9
|
+
// contract (never worse than OpenModelAsync) is pinned via a factory
|
|
10
|
+
// spy: a successful streamed open must not have silently taken the
|
|
11
|
+
// classic path.
|
|
12
|
+
import * as fs from "fs";
|
|
13
|
+
import { beforeAll, describe, expect, jest, test } from "@jest/globals";
|
|
14
|
+
import { InMemoryStepByteStore } from "../../step/step_buffer_provider.js";
|
|
15
|
+
import { IfcAPI } from "./ifc_api.js";
|
|
16
|
+
import { IfcApiModelPassthroughFactory } from "./ifc_api_model_passthrough_factory.js";
|
|
17
|
+
const SETTINGS = { COORDINATE_TO_ORIGIN: true, USE_FAST_BOOLS: true };
|
|
18
|
+
let api;
|
|
19
|
+
let buffer;
|
|
20
|
+
/**
|
|
21
|
+
* Capture StreamAllMeshes output as plain comparable objects.
|
|
22
|
+
*
|
|
23
|
+
* @param modelID The model to stream.
|
|
24
|
+
* @return {object[]} One entry per mesh with its placed geometries.
|
|
25
|
+
*/
|
|
26
|
+
function captureMeshes(modelID) {
|
|
27
|
+
const captured = [];
|
|
28
|
+
api.StreamAllMeshes(modelID, (mesh) => {
|
|
29
|
+
const geometries = [];
|
|
30
|
+
for (let where = 0; where < mesh.geometries.size(); ++where) {
|
|
31
|
+
const placed = mesh.geometries.get(where);
|
|
32
|
+
geometries.push({
|
|
33
|
+
color: placed.color,
|
|
34
|
+
geometryExpressID: placed.geometryExpressID,
|
|
35
|
+
flatTransformation: [...placed.flatTransformation],
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
captured.push({ expressID: mesh.expressID, geometries });
|
|
39
|
+
});
|
|
40
|
+
return captured;
|
|
41
|
+
}
|
|
42
|
+
beforeAll(async () => {
|
|
43
|
+
api = new IfcAPI();
|
|
44
|
+
await api.Init();
|
|
45
|
+
buffer = new Uint8Array(fs.readFileSync("data/index.ifc"));
|
|
46
|
+
}, 120000);
|
|
47
|
+
describe("OpenModelStreamed", () => {
|
|
48
|
+
test("meshes and properties match a classic OpenModel exactly", async () => {
|
|
49
|
+
const fallback = jest.spyOn(IfcApiModelPassthroughFactory, "fromAsync");
|
|
50
|
+
const streamedID = await api.OpenModelStreamed(buffer, SETTINGS);
|
|
51
|
+
// A successful streamed open must be the streamed path, not a
|
|
52
|
+
// silent fallback (which would make the parity below vacuous).
|
|
53
|
+
expect(streamedID).toBeGreaterThanOrEqual(0);
|
|
54
|
+
expect(fallback).not.toHaveBeenCalled();
|
|
55
|
+
fallback.mockRestore();
|
|
56
|
+
const classicID = api.OpenModel(buffer, SETTINGS);
|
|
57
|
+
expect(classicID).toBeGreaterThanOrEqual(0);
|
|
58
|
+
// Mesh parity: ids, placements, colors.
|
|
59
|
+
expect(captureMeshes(streamedID)).toEqual(captureMeshes(classicID));
|
|
60
|
+
// Property parity across every record.
|
|
61
|
+
const classicPassthrough = api.getPassthrough(classicID);
|
|
62
|
+
const lineIDs = classicPassthrough.getAllLines();
|
|
63
|
+
expect(lineIDs.size()).toBeGreaterThan(10);
|
|
64
|
+
expect(api.getPassthrough(streamedID).getAllLines().size())
|
|
65
|
+
.toBe(lineIDs.size());
|
|
66
|
+
for (let where = 0; where < lineIDs.size(); ++where) {
|
|
67
|
+
const expressID = lineIDs.get(where);
|
|
68
|
+
expect(await api.properties.getItemProperties(streamedID, expressID))
|
|
69
|
+
.toEqual(await api.properties.getItemProperties(classicID, expressID));
|
|
70
|
+
}
|
|
71
|
+
// Spatial structure parity (names mode — Share's consumption).
|
|
72
|
+
expect(await api.properties.getSpatialStructure(streamedID, "names"))
|
|
73
|
+
.toEqual(await api.properties.getSpatialStructure(classicID, "names"));
|
|
74
|
+
api.CloseModel(streamedID);
|
|
75
|
+
api.CloseModel(classicID);
|
|
76
|
+
}, 240000);
|
|
77
|
+
test("SpillModelSource works after a streamed open", async () => {
|
|
78
|
+
const modelID = await api.OpenModelStreamed(buffer, SETTINGS);
|
|
79
|
+
const passthrough = api.getPassthrough(modelID);
|
|
80
|
+
// Snapshot a spread of records through the resident path.
|
|
81
|
+
const lineIDs = passthrough.getAllLines();
|
|
82
|
+
const sampled = new Map();
|
|
83
|
+
for (let where = 0; where < lineIDs.size(); where += 7) {
|
|
84
|
+
const expressID = lineIDs.get(where);
|
|
85
|
+
sampled.set(expressID, await api.properties.getItemProperties(modelID, expressID));
|
|
86
|
+
}
|
|
87
|
+
// Tiny windows force straddles + LRU eviction on the fixture.
|
|
88
|
+
const spilled = api.SpillModelSource(modelID, new InMemoryStepByteStore(buffer), 512, 3);
|
|
89
|
+
expect(spilled).toBe(true);
|
|
90
|
+
for (const [expressID, expected] of sampled) {
|
|
91
|
+
expect(await api.properties.getItemProperties(modelID, expressID))
|
|
92
|
+
.toEqual(expected);
|
|
93
|
+
}
|
|
94
|
+
api.CloseModel(modelID);
|
|
95
|
+
}, 240000);
|
|
96
|
+
test("unparseable input returns -1 (streamed and fallback both refuse)", async () => {
|
|
97
|
+
const garbage = new Uint8Array([0, 1, 2, 3, 42, 255, 254, 253]);
|
|
98
|
+
expect(await api.OpenModelStreamed(garbage, SETTINGS)).toBe(-1);
|
|
99
|
+
}, 120000);
|
|
100
|
+
});
|
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
// only the first segment (major) is meaningful and is the one CI carries forward.
|
|
6
6
|
// Must stay in `vN.N.N` shape: the CI stamp regex, scripts/updateVersion.mjs, and
|
|
7
7
|
// statistics.ts all match `v\d+\.\d+\.\d+`.
|
|
8
|
-
const versionString = 'Conway v1.
|
|
8
|
+
const versionString = 'Conway v1.418.1264';
|
|
9
9
|
export { versionString };
|