@bldrs-ai/conway 1.538.1511 → 1.548.1514
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 +89 -7
- package/compiled/examples/cli-step-bundled.cjs +39 -5
- package/compiled/examples/validator-bundled.cjs +39 -5
- package/compiled/src/compat/web-ifc/ifc_api_preview_channel.test.js +264 -1
- 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/ifc_geometry_extraction.d.ts +6 -0
- package/compiled/src/ifc/ifc_geometry_extraction.d.ts.map +1 -1
- package/compiled/src/ifc/ifc_geometry_extraction.js +29 -0
- package/compiled/src/scripts/bless_perf_snapshot.test.d.ts +2 -0
- package/compiled/src/scripts/bless_perf_snapshot.test.d.ts.map +1 -0
- package/compiled/src/scripts/bless_perf_snapshot.test.js +278 -0
- package/compiled/src/scripts/perf_csv_quoting.test.d.ts +2 -0
- package/compiled/src/scripts/perf_csv_quoting.test.d.ts.map +1 -0
- package/compiled/src/scripts/perf_csv_quoting.test.js +300 -0
- 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.548.1514";
|
|
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.548.1514";
|
|
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
|
/**
|
|
@@ -92739,6 +92787,12 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
92739
92787
|
* IFCLOCALPLACEMENT ancestors and their axis/point records included,
|
|
92740
92788
|
* since `extractPlacement` resolves them through the same layer.
|
|
92741
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
|
+
*
|
|
92742
92796
|
* The throw intentionally propagates: the demand seam
|
|
92743
92797
|
* (`extractProductGeometryByLocalID` callers, the preview adapter's
|
|
92744
92798
|
* per-unit catch) already treats a throwing product as
|
|
@@ -92760,6 +92814,11 @@ var IfcGeometryExtraction = class _IfcGeometryExtraction {
|
|
|
92760
92814
|
if (objectPlacement !== null) {
|
|
92761
92815
|
this.extractPlacement(objectPlacement);
|
|
92762
92816
|
}
|
|
92817
|
+
} catch (error) {
|
|
92818
|
+
if (error instanceof DanglingReferenceError) {
|
|
92819
|
+
throw new DanglingPlacementError(product.localID, error);
|
|
92820
|
+
}
|
|
92821
|
+
throw error;
|
|
92763
92822
|
} finally {
|
|
92764
92823
|
model.nullOnErrors = priorNullOnErrors;
|
|
92765
92824
|
}
|
|
@@ -94524,6 +94583,10 @@ function formatModelLine(info) {
|
|
|
94524
94583
|
const detail = parts.length > 0 ? ` \u2014 ${parts.join(", ")}` : "";
|
|
94525
94584
|
return `Model: ${name}${detail}`;
|
|
94526
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
|
+
}
|
|
94527
94590
|
function heapDeltaSuffix(state) {
|
|
94528
94591
|
if (state.startHeapMb === void 0 || state.lastHeapMb === void 0) {
|
|
94529
94592
|
return "";
|
|
@@ -94558,6 +94621,21 @@ var LoadLogAccumulator = class {
|
|
|
94558
94621
|
this.modelLine_ = formatModelLine(info);
|
|
94559
94622
|
return this.modelLine_;
|
|
94560
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
|
+
}
|
|
94561
94639
|
/**
|
|
94562
94640
|
* Feed one progress event; returns the finished stage's line when this
|
|
94563
94641
|
* event closed a stage (so callers can mirror it to a console/log once).
|
|
@@ -94658,8 +94736,9 @@ var LoadLogAccumulator = class {
|
|
|
94658
94736
|
return `Total: ${formatSeconds(duration)}${heap}`;
|
|
94659
94737
|
}
|
|
94660
94738
|
/**
|
|
94661
|
-
* The full report: model line (if known), finished stage lines,
|
|
94662
|
-
*
|
|
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.
|
|
94663
94742
|
*
|
|
94664
94743
|
* @return {string[]} All report lines.
|
|
94665
94744
|
*/
|
|
@@ -94669,6 +94748,9 @@ var LoadLogAccumulator = class {
|
|
|
94669
94748
|
lines.push(this.modelLine_);
|
|
94670
94749
|
}
|
|
94671
94750
|
lines.push(...this.finished_);
|
|
94751
|
+
if (this.previewLine_ !== void 0) {
|
|
94752
|
+
lines.push(this.previewLine_);
|
|
94753
|
+
}
|
|
94672
94754
|
lines.push(this.totalLine());
|
|
94673
94755
|
return lines;
|
|
94674
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.548.1514";
|
|
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.548.1514";
|
|
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
|
}
|