@bldrs-ai/conway 1.536.1507 → 1.543.1513
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 +39 -5
- package/compiled/examples/cli-bundled.cjs +197 -22
- package/compiled/examples/cli-step-bundled.cjs +39 -5
- package/compiled/examples/validator-bundled.cjs +39 -5
- package/compiled/src/compat/web-ifc/geometry_shard_coordination.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/geometry_shard_coordination.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/geometry_shard_coordination.test.js +236 -0
- package/compiled/src/compat/web-ifc/ifc_api.d.ts +26 -0
- package/compiled/src/compat/web-ifc/ifc_api.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api.js +33 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts +6 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.js +264 -1
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts +116 -5
- 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 +256 -85
- package/compiled/src/compat/web-ifc/store_preview_channel.d.ts +79 -0
- package/compiled/src/compat/web-ifc/store_preview_channel.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/store_preview_channel.js +237 -14
- package/compiled/src/compat/web-ifc/store_preview_channel.test.js +270 -1
- package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts +106 -1
- package/compiled/src/compat/web-ifc/streamed_preview_channel.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/streamed_preview_channel.js +269 -17
- package/compiled/src/core/progress_log.d.ts +75 -2
- package/compiled/src/core/progress_log.d.ts.map +1 -1
- package/compiled/src/core/progress_log.js +59 -2
- package/compiled/src/core/progress_log.test.js +75 -1
- package/compiled/src/ifc/dangling_placement_error.d.ts +35 -0
- package/compiled/src/ifc/dangling_placement_error.d.ts.map +1 -0
- package/compiled/src/ifc/dangling_placement_error.js +38 -0
- package/compiled/src/ifc/geometry_dispatch.d.ts +74 -3
- package/compiled/src/ifc/geometry_dispatch.d.ts.map +1 -1
- package/compiled/src/ifc/geometry_dispatch.js +261 -5
- package/compiled/src/ifc/geometry_dispatch.test.js +147 -1
- package/compiled/src/ifc/ifc_geometry_extraction.d.ts +54 -0
- package/compiled/src/ifc/ifc_geometry_extraction.d.ts.map +1 -1
- package/compiled/src/ifc/ifc_geometry_extraction.js +153 -20
- package/compiled/src/index.d.ts +1 -1
- package/compiled/src/index.d.ts.map +1 -1
- package/compiled/src/index.js +1 -1
- package/compiled/src/step/dangling_reference_error.d.ts +34 -0
- package/compiled/src/step/dangling_reference_error.d.ts.map +1 -0
- package/compiled/src/step/dangling_reference_error.js +36 -0
- package/compiled/src/step/step_entity_base.d.ts +17 -0
- package/compiled/src/step/step_entity_base.d.ts.map +1 -1
- package/compiled/src/step/step_entity_base.js +28 -4
- 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.543.1513";
|
|
34
34
|
|
|
35
35
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
36
36
|
var wasmType = "";
|
|
@@ -11137,6 +11137,18 @@ function releaseQuietly(release) {
|
|
|
11137
11137
|
}
|
|
11138
11138
|
}
|
|
11139
11139
|
|
|
11140
|
+
// compiled/src/step/dangling_reference_error.js
|
|
11141
|
+
var DanglingReferenceError = class extends Error {
|
|
11142
|
+
/**
|
|
11143
|
+
* @param expressID The referenced record that is not in the index.
|
|
11144
|
+
*/
|
|
11145
|
+
constructor(expressID) {
|
|
11146
|
+
super(`Reference to #${expressID} is not in the index`);
|
|
11147
|
+
this.expressID = expressID;
|
|
11148
|
+
this.name = "DanglingReferenceError";
|
|
11149
|
+
}
|
|
11150
|
+
};
|
|
11151
|
+
|
|
11140
11152
|
// compiled/src/step/step_entity_base.js
|
|
11141
11153
|
var IfcTokenType;
|
|
11142
11154
|
(function(IfcTokenType2) {
|
|
@@ -11328,16 +11340,38 @@ var StepEntityBase = class {
|
|
|
11328
11340
|
}
|
|
11329
11341
|
return value;
|
|
11330
11342
|
}
|
|
11343
|
+
/**
|
|
11344
|
+
* Classify a reference field that failed to resolve.
|
|
11345
|
+
*
|
|
11346
|
+
* `getElementByExpressID` / `getTypedElementByExpressID` answer
|
|
11347
|
+
* `undefined` for two opposite causes: the record is not in the index at
|
|
11348
|
+
* all, or it is indexed but is the wrong entity type. A mid-parse prefix
|
|
11349
|
+
* reader must tell them apart — the first may resolve once more of the
|
|
11350
|
+
* file is scanned, the second never will — so the absent case gets its
|
|
11351
|
+
* own error type (see {@link DanglingReferenceError}). Called only on a
|
|
11352
|
+
* throwing path, so the extra index lookup costs nothing in the common
|
|
11353
|
+
* case.
|
|
11354
|
+
*
|
|
11355
|
+
* @param expressID The reference's target, or undefined when the field
|
|
11356
|
+
* did not hold a reference at all (an unresolved inline element).
|
|
11357
|
+
* @return {Error} The error to throw.
|
|
11358
|
+
*/
|
|
11359
|
+
unresolvedReferenceError_(expressID) {
|
|
11360
|
+
if (expressID !== void 0 && this.model.resolveExpressID(expressID) === void 0) {
|
|
11361
|
+
return new DanglingReferenceError(expressID);
|
|
11362
|
+
}
|
|
11363
|
+
return new Error("Value in STEP was incorrectly typed");
|
|
11364
|
+
}
|
|
11331
11365
|
extractReference(offset, baseOffset, depth, optional) {
|
|
11332
11366
|
const [cursor, endCursor, buffer] = this.getOffsetAndEndCursor(offset, baseOffset, depth);
|
|
11333
11367
|
const expressID = stepExtractReference(buffer, cursor, endCursor);
|
|
11334
11368
|
const value = expressID !== void 0 ? this.model.getElementByExpressID(expressID) : this.model.getInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor));
|
|
11335
11369
|
if (value === void 0) {
|
|
11336
11370
|
if (!optional) {
|
|
11337
|
-
throw
|
|
11371
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11338
11372
|
}
|
|
11339
11373
|
if (!this.model.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
11340
|
-
throw
|
|
11374
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11341
11375
|
}
|
|
11342
11376
|
return null;
|
|
11343
11377
|
}
|
|
@@ -11515,10 +11549,10 @@ var StepEntityBase = class {
|
|
|
11515
11549
|
const value = expressID !== void 0 ? model2.getTypedElementByExpressID(expressID, entityConstructor) : model2.getTypedInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor), entityConstructor);
|
|
11516
11550
|
if (value === void 0) {
|
|
11517
11551
|
if (!optional) {
|
|
11518
|
-
throw
|
|
11552
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11519
11553
|
}
|
|
11520
11554
|
if (!model2.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
11521
|
-
throw
|
|
11555
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11522
11556
|
}
|
|
11523
11557
|
return null;
|
|
11524
11558
|
}
|
|
@@ -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.543.1513";
|
|
14969
14969
|
|
|
14970
14970
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
14971
14971
|
function pThreadsAllowed() {
|
|
@@ -27074,6 +27074,18 @@ function freeAll(wasmModule, pointers) {
|
|
|
27074
27074
|
}
|
|
27075
27075
|
}
|
|
27076
27076
|
|
|
27077
|
+
// compiled/src/step/dangling_reference_error.js
|
|
27078
|
+
var DanglingReferenceError = class extends Error {
|
|
27079
|
+
/**
|
|
27080
|
+
* @param expressID The referenced record that is not in the index.
|
|
27081
|
+
*/
|
|
27082
|
+
constructor(expressID) {
|
|
27083
|
+
super(`Reference to #${expressID} is not in the index`);
|
|
27084
|
+
this.expressID = expressID;
|
|
27085
|
+
this.name = "DanglingReferenceError";
|
|
27086
|
+
}
|
|
27087
|
+
};
|
|
27088
|
+
|
|
27077
27089
|
// compiled/src/step/step_entity_base.js
|
|
27078
27090
|
var IfcTokenType;
|
|
27079
27091
|
(function(IfcTokenType2) {
|
|
@@ -27265,16 +27277,38 @@ var StepEntityBase = class {
|
|
|
27265
27277
|
}
|
|
27266
27278
|
return value;
|
|
27267
27279
|
}
|
|
27280
|
+
/**
|
|
27281
|
+
* Classify a reference field that failed to resolve.
|
|
27282
|
+
*
|
|
27283
|
+
* `getElementByExpressID` / `getTypedElementByExpressID` answer
|
|
27284
|
+
* `undefined` for two opposite causes: the record is not in the index at
|
|
27285
|
+
* all, or it is indexed but is the wrong entity type. A mid-parse prefix
|
|
27286
|
+
* reader must tell them apart — the first may resolve once more of the
|
|
27287
|
+
* file is scanned, the second never will — so the absent case gets its
|
|
27288
|
+
* own error type (see {@link DanglingReferenceError}). Called only on a
|
|
27289
|
+
* throwing path, so the extra index lookup costs nothing in the common
|
|
27290
|
+
* case.
|
|
27291
|
+
*
|
|
27292
|
+
* @param expressID The reference's target, or undefined when the field
|
|
27293
|
+
* did not hold a reference at all (an unresolved inline element).
|
|
27294
|
+
* @return {Error} The error to throw.
|
|
27295
|
+
*/
|
|
27296
|
+
unresolvedReferenceError_(expressID) {
|
|
27297
|
+
if (expressID !== void 0 && this.model.resolveExpressID(expressID) === void 0) {
|
|
27298
|
+
return new DanglingReferenceError(expressID);
|
|
27299
|
+
}
|
|
27300
|
+
return new Error("Value in STEP was incorrectly typed");
|
|
27301
|
+
}
|
|
27268
27302
|
extractReference(offset, baseOffset, depth, optional) {
|
|
27269
27303
|
const [cursor, endCursor, buffer] = this.getOffsetAndEndCursor(offset, baseOffset, depth);
|
|
27270
27304
|
const expressID = stepExtractReference(buffer, cursor, endCursor);
|
|
27271
27305
|
const value = expressID !== void 0 ? this.model.getElementByExpressID(expressID) : this.model.getInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor));
|
|
27272
27306
|
if (value === void 0) {
|
|
27273
27307
|
if (!optional) {
|
|
27274
|
-
throw
|
|
27308
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
27275
27309
|
}
|
|
27276
27310
|
if (!this.model.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
27277
|
-
throw
|
|
27311
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
27278
27312
|
}
|
|
27279
27313
|
return null;
|
|
27280
27314
|
}
|
|
@@ -27452,10 +27486,10 @@ var StepEntityBase = class {
|
|
|
27452
27486
|
const value = expressID !== void 0 ? model.getTypedElementByExpressID(expressID, entityConstructor) : model.getTypedInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor), entityConstructor);
|
|
27453
27487
|
if (value === void 0) {
|
|
27454
27488
|
if (!optional) {
|
|
27455
|
-
throw
|
|
27489
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
27456
27490
|
}
|
|
27457
27491
|
if (!model.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
27458
|
-
throw
|
|
27492
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
27459
27493
|
}
|
|
27460
27494
|
return null;
|
|
27461
27495
|
}
|
|
@@ -88505,6 +88539,20 @@ var yargs_default = Yargs;
|
|
|
88505
88539
|
// compiled/src/ifc/ifc_command_line_main.js
|
|
88506
88540
|
var import_fs = __toESM(require("fs"), 1);
|
|
88507
88541
|
|
|
88542
|
+
// compiled/src/ifc/dangling_placement_error.js
|
|
88543
|
+
var DanglingPlacementError = class extends Error {
|
|
88544
|
+
/**
|
|
88545
|
+
* @param productLocalID The product that could not be placed.
|
|
88546
|
+
* @param cause The underlying dangling-reference error.
|
|
88547
|
+
*/
|
|
88548
|
+
constructor(productLocalID, cause) {
|
|
88549
|
+
super(`product ${productLocalID} placement is not resolvable in this prefix: ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
88550
|
+
this.productLocalID = productLocalID;
|
|
88551
|
+
this.cause = cause;
|
|
88552
|
+
this.name = "DanglingPlacementError";
|
|
88553
|
+
}
|
|
88554
|
+
};
|
|
88555
|
+
|
|
88508
88556
|
// compiled/src/core/native_pool.js
|
|
88509
88557
|
var ObjectPool = class {
|
|
88510
88558
|
/**
|
|
@@ -89228,6 +89276,7 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
89228
89276
|
this.deferDanglingPlacements = false;
|
|
89229
89277
|
this.freeVectorPolygonalFaces_ = [];
|
|
89230
89278
|
this.extractionMapsPrepared_ = false;
|
|
89279
|
+
this.aggregateTargetsPaged_ = false;
|
|
89231
89280
|
this.csgMemoization = !this.lowMemoryMode;
|
|
89232
89281
|
this.quietRecoverableLogging = false;
|
|
89233
89282
|
this.materials = model.materials;
|
|
@@ -92738,6 +92787,12 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
92738
92787
|
* IFCLOCALPLACEMENT ancestors and their axis/point records included,
|
|
92739
92788
|
* since `extractPlacement` resolves them through the same layer.
|
|
92740
92789
|
*
|
|
92790
|
+
* Only an unresolved reference (`DanglingReferenceError`) is tagged as
|
|
92791
|
+
* a deferral. A placement that is malformed rather than unscanned still
|
|
92792
|
+
* throws, and still stops the product being extracted, but propagates
|
|
92793
|
+
* untagged so the preview does not queue it for a retry that can never
|
|
92794
|
+
* come good — see the catch below.
|
|
92795
|
+
*
|
|
92741
92796
|
* The throw intentionally propagates: the demand seam
|
|
92742
92797
|
* (`extractProductGeometryByLocalID` callers, the preview adapter's
|
|
92743
92798
|
* per-unit catch) already treats a throwing product as
|
|
@@ -92759,6 +92814,11 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
92759
92814
|
if (objectPlacement !== null) {
|
|
92760
92815
|
this.extractPlacement(objectPlacement);
|
|
92761
92816
|
}
|
|
92817
|
+
} catch (error) {
|
|
92818
|
+
if (error instanceof DanglingReferenceError) {
|
|
92819
|
+
throw new DanglingPlacementError(product.localID, error);
|
|
92820
|
+
}
|
|
92821
|
+
throw error;
|
|
92762
92822
|
} finally {
|
|
92763
92823
|
model.nullOnErrors = priorNullOnErrors;
|
|
92764
92824
|
}
|
|
@@ -93440,27 +93500,118 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
93440
93500
|
const targets = /* @__PURE__ */ new Set();
|
|
93441
93501
|
const productTypes = new Set(IfcProduct.query);
|
|
93442
93502
|
for (const relAggregate of this.model.types(IfcRelAggregates)) {
|
|
93503
|
+
this.addAggregateTargets_(relAggregate, targets, productTypes);
|
|
93504
|
+
}
|
|
93505
|
+
this.aggregateTargetLocalIDs_ = targets;
|
|
93506
|
+
return targets;
|
|
93507
|
+
}
|
|
93508
|
+
/**
|
|
93509
|
+
* Windowed twin of {@link aggregateTargetLocalIDs}: page each
|
|
93510
|
+
* relationship record before scanning it, so the set is COMPLETE rather
|
|
93511
|
+
* than whatever this instance's LRU happened to still hold.
|
|
93512
|
+
*
|
|
93513
|
+
* **This is a correctness fix, not a prefetch.** The sync walk reads each
|
|
93514
|
+
* `IfcRelAggregates` record's bytes, and on a windowed source those pages
|
|
93515
|
+
* are routinely gone by the first pump — the parse walked past them
|
|
93516
|
+
* hundreds of megabytes ago. The per-record catch then swallows the
|
|
93517
|
+
* non-resident read, the incomplete set is **cached for the model's
|
|
93518
|
+
* life**, and every child it failed to record stays in the per-product
|
|
93519
|
+
* worklist *as well as* in the aggregates pass. That product is then
|
|
93520
|
+
* emitted twice: once with the uncut/placeholder content the deferral
|
|
93521
|
+
* exists to suppress, and again from the aggregates pass. Measured on
|
|
93522
|
+
* `aggregate_master_voids.ifc` behind 512-byte windows: 0 targets against
|
|
93523
|
+
* a resident open's 1, and 3 demand products against 2.
|
|
93524
|
+
*
|
|
93525
|
+
* Paged in bounded waves, and the scan happens INSIDE each wave rather
|
|
93526
|
+
* than after all of them: a model with many assemblies would otherwise
|
|
93527
|
+
* need every relationship record resident at once, which is the residency
|
|
93528
|
+
* ceiling this is supposed to respect.
|
|
93529
|
+
*
|
|
93530
|
+
* A non-resident read still throws from here — after this has paged the
|
|
93531
|
+
* record, that is a defect in the paging, not a property of the file.
|
|
93532
|
+
*
|
|
93533
|
+
* @param waveSize Relationship records paged and scanned at once.
|
|
93534
|
+
* @return {Promise<Set<number>>} The same set the sync twin caches.
|
|
93535
|
+
*/
|
|
93536
|
+
async ensureAggregateTargetLocalIDs(waveSize = _IfcGeometryExtraction.AGGREGATE_TARGET_WAVE_SIZE_) {
|
|
93537
|
+
if (!this.model.isSourceExternal) {
|
|
93538
|
+
return this.aggregateTargetLocalIDs();
|
|
93539
|
+
}
|
|
93540
|
+
if (this.aggregateTargetsPaged_) {
|
|
93541
|
+
return this.aggregateTargetLocalIDs_;
|
|
93542
|
+
}
|
|
93543
|
+
const targets = /* @__PURE__ */ new Set();
|
|
93544
|
+
const productTypes = new Set(IfcProduct.query);
|
|
93545
|
+
const wave = Math.max(1, Math.floor(waveSize));
|
|
93546
|
+
let pending = [];
|
|
93547
|
+
const drain = async () => {
|
|
93548
|
+
const pinned = /* @__PURE__ */ new Set();
|
|
93443
93549
|
try {
|
|
93444
|
-
|
|
93445
|
-
|
|
93446
|
-
|
|
93447
|
-
|
|
93448
|
-
|
|
93449
|
-
|
|
93450
|
-
|
|
93451
|
-
|
|
93452
|
-
|
|
93453
|
-
|
|
93454
|
-
|
|
93455
|
-
|
|
93456
|
-
|
|
93457
|
-
|
|
93458
|
-
|
|
93550
|
+
for (const relAggregate of pending) {
|
|
93551
|
+
pinned.add(relAggregate.localID);
|
|
93552
|
+
this.model.pinByLocalID(relAggregate.localID);
|
|
93553
|
+
}
|
|
93554
|
+
await Promise.all([...pinned].map((localID) => this.model.ensureResidentByLocalID(localID)));
|
|
93555
|
+
for (const relAggregate of pending) {
|
|
93556
|
+
this.addAggregateTargets_(relAggregate, targets, productTypes, true);
|
|
93557
|
+
}
|
|
93558
|
+
} finally {
|
|
93559
|
+
this.model.releaseSourceViews(pinned);
|
|
93560
|
+
this.model.unpinLocalIDs(pinned);
|
|
93561
|
+
pending = [];
|
|
93562
|
+
}
|
|
93563
|
+
};
|
|
93564
|
+
for (const relAggregate of this.model.types(IfcRelAggregates)) {
|
|
93565
|
+
pending.push(relAggregate);
|
|
93566
|
+
if (pending.length >= wave) {
|
|
93567
|
+
await drain();
|
|
93459
93568
|
}
|
|
93460
93569
|
}
|
|
93570
|
+
if (pending.length > 0) {
|
|
93571
|
+
await drain();
|
|
93572
|
+
}
|
|
93461
93573
|
this.aggregateTargetLocalIDs_ = targets;
|
|
93574
|
+
this.aggregateTargetsPaged_ = true;
|
|
93462
93575
|
return targets;
|
|
93463
93576
|
}
|
|
93577
|
+
/**
|
|
93578
|
+
* Record one relationship's product children.
|
|
93579
|
+
*
|
|
93580
|
+
* Shared by the sync and paged walks so there is a single definition of
|
|
93581
|
+
* what an aggregate target is. Reads only this relationship's own record:
|
|
93582
|
+
* children resolve through the express map and the typeID column, so the
|
|
93583
|
+
* scan never hydrates a child product (doing so paged most of the file
|
|
93584
|
+
* during demand prep).
|
|
93585
|
+
*
|
|
93586
|
+
* @param relAggregate The relationship to scan.
|
|
93587
|
+
* @param targets Accumulator.
|
|
93588
|
+
* @param productTypes The IfcProduct type set.
|
|
93589
|
+
* @param strictResidency When set, a non-resident read propagates instead
|
|
93590
|
+
* of being tolerated — for the paged walk, which has already made the
|
|
93591
|
+
* record resident and so can only reach that error through a defect.
|
|
93592
|
+
*/
|
|
93593
|
+
addAggregateTargets_(relAggregate, targets, productTypes, strictResidency = false) {
|
|
93594
|
+
try {
|
|
93595
|
+
relAggregate.forEachReferenceInField(REL_AGGREGATES_RELATED_OFFSET, REL_AGGREGATES_RELATED_BASE, REL_AGGREGATES_RELATED_DEPTH, (expressID) => {
|
|
93596
|
+
if (expressID === void 0) {
|
|
93597
|
+
return true;
|
|
93598
|
+
}
|
|
93599
|
+
const relatedLocalID = this.model.resolveExpressID(expressID);
|
|
93600
|
+
if (relatedLocalID === void 0) {
|
|
93601
|
+
return true;
|
|
93602
|
+
}
|
|
93603
|
+
const typeID = this.model.typeIDOf(relatedLocalID);
|
|
93604
|
+
if (typeID !== void 0 && productTypes.has(typeID)) {
|
|
93605
|
+
targets.add(relatedLocalID);
|
|
93606
|
+
}
|
|
93607
|
+
return true;
|
|
93608
|
+
});
|
|
93609
|
+
} catch (error) {
|
|
93610
|
+
if (strictResidency && error instanceof StepBufferNotResidentError) {
|
|
93611
|
+
throw error;
|
|
93612
|
+
}
|
|
93613
|
+
}
|
|
93614
|
+
}
|
|
93464
93615
|
/**
|
|
93465
93616
|
* One-time extraction setup shared by the whole-model walk and the
|
|
93466
93617
|
* per-product demand path (Phase B2): linear scaling factor and the
|
|
@@ -94084,6 +94235,7 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
94084
94235
|
}
|
|
94085
94236
|
}
|
|
94086
94237
|
};
|
|
94238
|
+
IfcGeometryExtraction.AGGREGATE_TARGET_WAVE_SIZE_ = 512;
|
|
94087
94239
|
|
|
94088
94240
|
// compiled/src/ifc/ifc_property_extraction.js
|
|
94089
94241
|
var PropertyExtractResult;
|
|
@@ -94431,6 +94583,10 @@ function formatModelLine(info) {
|
|
|
94431
94583
|
const detail = parts.length > 0 ? ` \u2014 ${parts.join(", ")}` : "";
|
|
94432
94584
|
return `Model: ${name}${detail}`;
|
|
94433
94585
|
}
|
|
94586
|
+
function formatPreviewLine(preview) {
|
|
94587
|
+
const first = preview.firstMeshMs !== void 0 ? `first mesh ${formatSeconds(preview.firstMeshMs)}` : "no mesh";
|
|
94588
|
+
return `Preview: ${first}, ${preview.meshes} meshes from ${preview.emitted} units, ${preview.deferred} deferred (${preview.deferredOnPlacement} on placements), ${preview.retried} retried`;
|
|
94589
|
+
}
|
|
94434
94590
|
function heapDeltaSuffix(state) {
|
|
94435
94591
|
if (state.startHeapMb === void 0 || state.lastHeapMb === void 0) {
|
|
94436
94592
|
return "";
|
|
@@ -94465,6 +94621,21 @@ var LoadLogAccumulator = class {
|
|
|
94465
94621
|
this.modelLine_ = formatModelLine(info);
|
|
94466
94622
|
return this.modelLine_;
|
|
94467
94623
|
}
|
|
94624
|
+
/**
|
|
94625
|
+
* Record what the parse-time preview delivered — kept with the report
|
|
94626
|
+
* and rendered between the stage lines and Total.
|
|
94627
|
+
*
|
|
94628
|
+
* Not a stage: the preview runs *inside* Parsing, so feeding it through
|
|
94629
|
+
* onProgress would close the Parsing stage and reopen it, splitting one
|
|
94630
|
+
* parse across two lines.
|
|
94631
|
+
*
|
|
94632
|
+
* @param preview The channel's reported yield.
|
|
94633
|
+
* @return {string} The formatted preview line.
|
|
94634
|
+
*/
|
|
94635
|
+
setPreviewStats(preview) {
|
|
94636
|
+
this.previewLine_ = formatPreviewLine(preview);
|
|
94637
|
+
return this.previewLine_;
|
|
94638
|
+
}
|
|
94468
94639
|
/**
|
|
94469
94640
|
* Feed one progress event; returns the finished stage's line when this
|
|
94470
94641
|
* event closed a stage (so callers can mirror it to a console/log once).
|
|
@@ -94565,8 +94736,9 @@ var LoadLogAccumulator = class {
|
|
|
94565
94736
|
return `Total: ${formatSeconds(duration)}${heap}`;
|
|
94566
94737
|
}
|
|
94567
94738
|
/**
|
|
94568
|
-
* The full report: model line (if known), finished stage lines,
|
|
94569
|
-
*
|
|
94739
|
+
* The full report: model line (if known), finished stage lines, the
|
|
94740
|
+
* preview line (if reported), then the Total line. Call
|
|
94741
|
+
* closeCurrentStage() first at load end.
|
|
94570
94742
|
*
|
|
94571
94743
|
* @return {string[]} All report lines.
|
|
94572
94744
|
*/
|
|
@@ -94576,6 +94748,9 @@ var LoadLogAccumulator = class {
|
|
|
94576
94748
|
lines.push(this.modelLine_);
|
|
94577
94749
|
}
|
|
94578
94750
|
lines.push(...this.finished_);
|
|
94751
|
+
if (this.previewLine_ !== void 0) {
|
|
94752
|
+
lines.push(this.previewLine_);
|
|
94753
|
+
}
|
|
94579
94754
|
lines.push(this.totalLine());
|
|
94580
94755
|
return lines;
|
|
94581
94756
|
}
|
|
@@ -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.543.1513";
|
|
15947
15947
|
|
|
15948
15948
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
15949
15949
|
function pThreadsAllowed() {
|
|
@@ -22962,6 +22962,18 @@ function releaseQuietly(release) {
|
|
|
22962
22962
|
}
|
|
22963
22963
|
}
|
|
22964
22964
|
|
|
22965
|
+
// compiled/src/step/dangling_reference_error.js
|
|
22966
|
+
var DanglingReferenceError = class extends Error {
|
|
22967
|
+
/**
|
|
22968
|
+
* @param expressID The referenced record that is not in the index.
|
|
22969
|
+
*/
|
|
22970
|
+
constructor(expressID) {
|
|
22971
|
+
super(`Reference to #${expressID} is not in the index`);
|
|
22972
|
+
this.expressID = expressID;
|
|
22973
|
+
this.name = "DanglingReferenceError";
|
|
22974
|
+
}
|
|
22975
|
+
};
|
|
22976
|
+
|
|
22965
22977
|
// compiled/src/step/step_entity_base.js
|
|
22966
22978
|
var IfcTokenType;
|
|
22967
22979
|
(function(IfcTokenType2) {
|
|
@@ -23153,16 +23165,38 @@ var StepEntityBase = class {
|
|
|
23153
23165
|
}
|
|
23154
23166
|
return value;
|
|
23155
23167
|
}
|
|
23168
|
+
/**
|
|
23169
|
+
* Classify a reference field that failed to resolve.
|
|
23170
|
+
*
|
|
23171
|
+
* `getElementByExpressID` / `getTypedElementByExpressID` answer
|
|
23172
|
+
* `undefined` for two opposite causes: the record is not in the index at
|
|
23173
|
+
* all, or it is indexed but is the wrong entity type. A mid-parse prefix
|
|
23174
|
+
* reader must tell them apart — the first may resolve once more of the
|
|
23175
|
+
* file is scanned, the second never will — so the absent case gets its
|
|
23176
|
+
* own error type (see {@link DanglingReferenceError}). Called only on a
|
|
23177
|
+
* throwing path, so the extra index lookup costs nothing in the common
|
|
23178
|
+
* case.
|
|
23179
|
+
*
|
|
23180
|
+
* @param expressID The reference's target, or undefined when the field
|
|
23181
|
+
* did not hold a reference at all (an unresolved inline element).
|
|
23182
|
+
* @return {Error} The error to throw.
|
|
23183
|
+
*/
|
|
23184
|
+
unresolvedReferenceError_(expressID) {
|
|
23185
|
+
if (expressID !== void 0 && this.model.resolveExpressID(expressID) === void 0) {
|
|
23186
|
+
return new DanglingReferenceError(expressID);
|
|
23187
|
+
}
|
|
23188
|
+
return new Error("Value in STEP was incorrectly typed");
|
|
23189
|
+
}
|
|
23156
23190
|
extractReference(offset, baseOffset, depth, optional) {
|
|
23157
23191
|
const [cursor, endCursor, buffer] = this.getOffsetAndEndCursor(offset, baseOffset, depth);
|
|
23158
23192
|
const expressID = stepExtractReference(buffer, cursor, endCursor);
|
|
23159
23193
|
const value = expressID !== void 0 ? this.model.getElementByExpressID(expressID) : this.model.getInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor));
|
|
23160
23194
|
if (value === void 0) {
|
|
23161
23195
|
if (!optional) {
|
|
23162
|
-
throw
|
|
23196
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
23163
23197
|
}
|
|
23164
23198
|
if (!this.model.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
23165
|
-
throw
|
|
23199
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
23166
23200
|
}
|
|
23167
23201
|
return null;
|
|
23168
23202
|
}
|
|
@@ -23340,10 +23374,10 @@ var StepEntityBase = class {
|
|
|
23340
23374
|
const value = expressID !== void 0 ? model.getTypedElementByExpressID(expressID, entityConstructor) : model.getTypedInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor), entityConstructor);
|
|
23341
23375
|
if (value === void 0) {
|
|
23342
23376
|
if (!optional) {
|
|
23343
|
-
throw
|
|
23377
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
23344
23378
|
}
|
|
23345
23379
|
if (!model.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
23346
|
-
throw
|
|
23380
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
23347
23381
|
}
|
|
23348
23382
|
return null;
|
|
23349
23383
|
}
|
|
@@ -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.543.1513";
|
|
948
948
|
|
|
949
949
|
// compiled/dependencies/conway-geom/interface/conway_geometry.js
|
|
950
950
|
var wasmType = "";
|
|
@@ -11135,6 +11135,18 @@ function releaseQuietly(release) {
|
|
|
11135
11135
|
}
|
|
11136
11136
|
}
|
|
11137
11137
|
|
|
11138
|
+
// compiled/src/step/dangling_reference_error.js
|
|
11139
|
+
var DanglingReferenceError = class extends Error {
|
|
11140
|
+
/**
|
|
11141
|
+
* @param expressID The referenced record that is not in the index.
|
|
11142
|
+
*/
|
|
11143
|
+
constructor(expressID) {
|
|
11144
|
+
super(`Reference to #${expressID} is not in the index`);
|
|
11145
|
+
this.expressID = expressID;
|
|
11146
|
+
this.name = "DanglingReferenceError";
|
|
11147
|
+
}
|
|
11148
|
+
};
|
|
11149
|
+
|
|
11138
11150
|
// compiled/src/step/step_entity_base.js
|
|
11139
11151
|
var IfcTokenType;
|
|
11140
11152
|
(function(IfcTokenType2) {
|
|
@@ -11326,16 +11338,38 @@ var StepEntityBase = class {
|
|
|
11326
11338
|
}
|
|
11327
11339
|
return value;
|
|
11328
11340
|
}
|
|
11341
|
+
/**
|
|
11342
|
+
* Classify a reference field that failed to resolve.
|
|
11343
|
+
*
|
|
11344
|
+
* `getElementByExpressID` / `getTypedElementByExpressID` answer
|
|
11345
|
+
* `undefined` for two opposite causes: the record is not in the index at
|
|
11346
|
+
* all, or it is indexed but is the wrong entity type. A mid-parse prefix
|
|
11347
|
+
* reader must tell them apart — the first may resolve once more of the
|
|
11348
|
+
* file is scanned, the second never will — so the absent case gets its
|
|
11349
|
+
* own error type (see {@link DanglingReferenceError}). Called only on a
|
|
11350
|
+
* throwing path, so the extra index lookup costs nothing in the common
|
|
11351
|
+
* case.
|
|
11352
|
+
*
|
|
11353
|
+
* @param expressID The reference's target, or undefined when the field
|
|
11354
|
+
* did not hold a reference at all (an unresolved inline element).
|
|
11355
|
+
* @return {Error} The error to throw.
|
|
11356
|
+
*/
|
|
11357
|
+
unresolvedReferenceError_(expressID) {
|
|
11358
|
+
if (expressID !== void 0 && this.model.resolveExpressID(expressID) === void 0) {
|
|
11359
|
+
return new DanglingReferenceError(expressID);
|
|
11360
|
+
}
|
|
11361
|
+
return new Error("Value in STEP was incorrectly typed");
|
|
11362
|
+
}
|
|
11329
11363
|
extractReference(offset, baseOffset, depth, optional) {
|
|
11330
11364
|
const [cursor, endCursor, buffer] = this.getOffsetAndEndCursor(offset, baseOffset, depth);
|
|
11331
11365
|
const expressID = stepExtractReference(buffer, cursor, endCursor);
|
|
11332
11366
|
const value = expressID !== void 0 ? this.model.getElementByExpressID(expressID) : this.model.getInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor));
|
|
11333
11367
|
if (value === void 0) {
|
|
11334
11368
|
if (!optional) {
|
|
11335
|
-
throw
|
|
11369
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11336
11370
|
}
|
|
11337
11371
|
if (!this.model.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
11338
|
-
throw
|
|
11372
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11339
11373
|
}
|
|
11340
11374
|
return null;
|
|
11341
11375
|
}
|
|
@@ -11513,10 +11547,10 @@ var StepEntityBase = class {
|
|
|
11513
11547
|
const value = expressID !== void 0 ? model2.getTypedElementByExpressID(expressID, entityConstructor) : model2.getTypedInlineElementByAddress(extractInlineElementAddress(buffer, cursor, endCursor), entityConstructor);
|
|
11514
11548
|
if (value === void 0) {
|
|
11515
11549
|
if (!optional) {
|
|
11516
|
-
throw
|
|
11550
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11517
11551
|
}
|
|
11518
11552
|
if (!model2.nullOnErrors && stepExtractOptional(buffer, cursor, endCursor) !== null) {
|
|
11519
|
-
throw
|
|
11553
|
+
throw this.unresolvedReferenceError_(expressID);
|
|
11520
11554
|
}
|
|
11521
11555
|
return null;
|
|
11522
11556
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"geometry_shard_coordination.test.d.ts","sourceRoot":"","sources":["../../../../src/compat/web-ifc/geometry_shard_coordination.test.ts"],"names":[],"mappings":""}
|