@bldrs-ai/conway 1.369.1178 → 1.373.1180
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 +95 -33
- package/compiled/examples/cli-bundled.cjs +95 -33
- package/compiled/examples/cli-step-bundled.cjs +95 -33
- package/compiled/examples/validator-bundled.cjs +95 -33
- package/compiled/src/compat/web-ifc/ap214_properties.d.ts +2 -2
- package/compiled/src/compat/web-ifc/ap214_properties.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ap214_properties.js +6 -1
- package/compiled/src/compat/web-ifc/ifc_api.d.ts +11 -0
- package/compiled/src/compat/web-ifc/ifc_api.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api.js +18 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts +5 -0
- package/compiled/src/compat/web-ifc/ifc_api_model_passthrough.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.d.ts +6 -0
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ap214.js +8 -0
- package/compiled/src/compat/web-ifc/ifc_api_proxy_ifc.d.ts +27 -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 +48 -0
- package/compiled/src/compat/web-ifc/ifc_properties.d.ts +2 -2
- package/compiled/src/compat/web-ifc/ifc_properties.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/ifc_properties.js +9 -1
- package/compiled/src/compat/web-ifc/ifc_properties_names_mode.test.d.ts +2 -0
- package/compiled/src/compat/web-ifc/ifc_properties_names_mode.test.d.ts.map +1 -0
- package/compiled/src/compat/web-ifc/ifc_properties_names_mode.test.js +97 -0
- package/compiled/src/compat/web-ifc/properties.d.ts +2 -1
- package/compiled/src/compat/web-ifc/properties.d.ts.map +1 -1
- package/compiled/src/compat/web-ifc/properties_passthrough.d.ts +22 -1
- package/compiled/src/compat/web-ifc/properties_passthrough.d.ts.map +1 -1
- package/compiled/src/step/step_model_base.d.ts +26 -1
- package/compiled/src/step/step_model_base.d.ts.map +1 -1
- package/compiled/src/step/step_model_base.js +108 -38
- package/compiled/src/version/version.js +1 -1
- package/compiled/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -4072,6 +4072,7 @@ var StepModelBase = class {
|
|
|
4072
4072
|
this.schema = schema;
|
|
4073
4073
|
this.buffer_ = buffer_;
|
|
4074
4074
|
this.vtableBuilder_ = new StepVtableBuilder();
|
|
4075
|
+
this.descriptorCache_ = [];
|
|
4075
4076
|
this.elementMemoization = true;
|
|
4076
4077
|
this.nullOnErrors = true;
|
|
4077
4078
|
const localElementIndex = elementIndex;
|
|
@@ -4109,7 +4110,68 @@ var StepModelBase = class {
|
|
|
4109
4110
|
}
|
|
4110
4111
|
const expressIDMap = new InterpolationSearchTable32(expressIdTable, expressIdsAlreadySorted);
|
|
4111
4112
|
this.expressIDMap_ = expressIDMap;
|
|
4112
|
-
|
|
4113
|
+
const count = inlineElementEnd;
|
|
4114
|
+
const address = new Uint32Array(count);
|
|
4115
|
+
const lengths = new Uint32Array(count);
|
|
4116
|
+
const typeIDs = new Int32Array(count);
|
|
4117
|
+
const expressIDs = new Uint32Array(firstInlineElement);
|
|
4118
|
+
let complexEntries = void 0;
|
|
4119
|
+
for (let localID = 0; localID < count; ++localID) {
|
|
4120
|
+
const element = localElementIndex[localID];
|
|
4121
|
+
address[localID] = element.address;
|
|
4122
|
+
lengths[localID] = element.length;
|
|
4123
|
+
typeIDs[localID] = element.typeID === void 0 ? -1 : element.typeID;
|
|
4124
|
+
if (localID < firstInlineElement) {
|
|
4125
|
+
expressIDs[localID] = element.expressID;
|
|
4126
|
+
}
|
|
4127
|
+
if (element.multiMapping !== void 0) {
|
|
4128
|
+
(complexEntries ??= /* @__PURE__ */ new Map()).set(localID, element);
|
|
4129
|
+
}
|
|
4130
|
+
}
|
|
4131
|
+
this.address_ = address;
|
|
4132
|
+
this.length_ = lengths;
|
|
4133
|
+
this.typeID_ = typeIDs;
|
|
4134
|
+
this.expressID_ = expressIDs;
|
|
4135
|
+
this.count_ = count;
|
|
4136
|
+
this.firstInlineElement_ = firstInlineElement;
|
|
4137
|
+
this.complexEntries_ = complexEntries;
|
|
4138
|
+
}
|
|
4139
|
+
/**
|
|
4140
|
+
* Materialise the descriptor object for a local ID from the columns. Only the
|
|
4141
|
+
* persistent scalars are set; lazy fields (vtable, buffer, entity) are filled
|
|
4142
|
+
* in on demand by populateVtableEntry / entity construction.
|
|
4143
|
+
*
|
|
4144
|
+
* @param localID The local ID to build a descriptor for.
|
|
4145
|
+
* @return {StepEntityInternalReferencePrivate} The descriptor.
|
|
4146
|
+
*/
|
|
4147
|
+
makeDescriptor(localID) {
|
|
4148
|
+
const typeID = this.typeID_[localID];
|
|
4149
|
+
return {
|
|
4150
|
+
address: this.address_[localID],
|
|
4151
|
+
length: this.length_[localID],
|
|
4152
|
+
typeID: typeID === -1 ? void 0 : typeID,
|
|
4153
|
+
expressID: localID < this.firstInlineElement_ ? this.expressID_[localID] : void 0
|
|
4154
|
+
};
|
|
4155
|
+
}
|
|
4156
|
+
/**
|
|
4157
|
+
* Get the (cached or freshly materialised) descriptor for a local ID. The
|
|
4158
|
+
* same object is returned for repeated calls until invalidate(), so entities
|
|
4159
|
+
* built on it and populateVtableEntry() mutations agree.
|
|
4160
|
+
*
|
|
4161
|
+
* @param localID The local ID to get a descriptor for.
|
|
4162
|
+
* @return {StepEntityInternalReferencePrivate} The descriptor.
|
|
4163
|
+
*/
|
|
4164
|
+
entry(localID) {
|
|
4165
|
+
const complex = this.complexEntries_?.get(localID);
|
|
4166
|
+
if (complex !== void 0) {
|
|
4167
|
+
return complex;
|
|
4168
|
+
}
|
|
4169
|
+
let descriptor = this.descriptorCache_[localID];
|
|
4170
|
+
if (descriptor === void 0) {
|
|
4171
|
+
descriptor = this.makeDescriptor(localID);
|
|
4172
|
+
this.descriptorCache_[localID] = descriptor;
|
|
4173
|
+
}
|
|
4174
|
+
return descriptor;
|
|
4113
4175
|
}
|
|
4114
4176
|
/**
|
|
4115
4177
|
* Invalidate the cache store for this, so new items will be created.
|
|
@@ -4120,26 +4182,26 @@ var StepModelBase = class {
|
|
|
4120
4182
|
invalidate(dropVtable = false) {
|
|
4121
4183
|
if (dropVtable) {
|
|
4122
4184
|
this.vtableBuilder_.clear(true);
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
}
|
|
4132
|
-
continue;
|
|
4185
|
+
this.descriptorCache_ = [];
|
|
4186
|
+
if (this.complexEntries_ !== void 0) {
|
|
4187
|
+
for (const item of this.complexEntries_.values()) {
|
|
4188
|
+
item.buffer = void 0;
|
|
4189
|
+
item.entity = void 0;
|
|
4190
|
+
item.vtable = void 0;
|
|
4191
|
+
item.vtableCount = void 0;
|
|
4192
|
+
item.vtableIndex = void 0;
|
|
4133
4193
|
}
|
|
4134
|
-
item.buffer = void 0;
|
|
4135
|
-
item.entity = void 0;
|
|
4136
|
-
item.vtable = void 0;
|
|
4137
|
-
item.vtableCount = void 0;
|
|
4138
|
-
item.vtableIndex = void 0;
|
|
4139
4194
|
}
|
|
4140
4195
|
} else {
|
|
4141
|
-
for (const item of this.
|
|
4142
|
-
item
|
|
4196
|
+
for (const item of this.descriptorCache_) {
|
|
4197
|
+
if (item !== void 0) {
|
|
4198
|
+
item.entity = void 0;
|
|
4199
|
+
}
|
|
4200
|
+
}
|
|
4201
|
+
if (this.complexEntries_ !== void 0) {
|
|
4202
|
+
for (const item of this.complexEntries_.values()) {
|
|
4203
|
+
item.entity = void 0;
|
|
4204
|
+
}
|
|
4143
4205
|
}
|
|
4144
4206
|
}
|
|
4145
4207
|
}
|
|
@@ -4173,10 +4235,10 @@ var StepModelBase = class {
|
|
|
4173
4235
|
* @return {boolean} Did the vtable entry populate correctly?
|
|
4174
4236
|
*/
|
|
4175
4237
|
populateVtableEntry(localID) {
|
|
4176
|
-
if (localID
|
|
4238
|
+
if (localID >= this.count_) {
|
|
4177
4239
|
throw new Error(`Invalid localID ${localID}`);
|
|
4178
4240
|
}
|
|
4179
|
-
const element = this.
|
|
4241
|
+
const element = this.entry(localID);
|
|
4180
4242
|
if (element.vtableIndex !== void 0 || element.typeID === 0) {
|
|
4181
4243
|
return true;
|
|
4182
4244
|
}
|
|
@@ -4198,10 +4260,10 @@ var StepModelBase = class {
|
|
|
4198
4260
|
* @throws {Error} Throws an error if the ID is invalid.
|
|
4199
4261
|
*/
|
|
4200
4262
|
populateBufferEntry(localID) {
|
|
4201
|
-
if (localID
|
|
4263
|
+
if (localID >= this.count_) {
|
|
4202
4264
|
throw new Error(`Invalid localID ${localID}`);
|
|
4203
4265
|
}
|
|
4204
|
-
const element = this.
|
|
4266
|
+
const element = this.entry(localID);
|
|
4205
4267
|
element.buffer = this.buffer_;
|
|
4206
4268
|
}
|
|
4207
4269
|
/**
|
|
@@ -4218,7 +4280,7 @@ var StepModelBase = class {
|
|
|
4218
4280
|
* @return {number} The number of elements.
|
|
4219
4281
|
*/
|
|
4220
4282
|
get size() {
|
|
4221
|
-
return this.
|
|
4283
|
+
return this.count_;
|
|
4222
4284
|
}
|
|
4223
4285
|
/**
|
|
4224
4286
|
* Get an inline element by address.
|
|
@@ -4294,10 +4356,10 @@ var StepModelBase = class {
|
|
|
4294
4356
|
* if none exists.
|
|
4295
4357
|
*/
|
|
4296
4358
|
getTypedElementByLocalID(localID, type) {
|
|
4297
|
-
if (localID
|
|
4359
|
+
if (localID >= this.count_) {
|
|
4298
4360
|
return;
|
|
4299
4361
|
}
|
|
4300
|
-
const element = this.
|
|
4362
|
+
const element = this.entry(localID);
|
|
4301
4363
|
const multiMapping = element.multiMapping;
|
|
4302
4364
|
if (multiMapping !== void 0) {
|
|
4303
4365
|
let multiElements = element.multiEntity;
|
|
@@ -4346,8 +4408,9 @@ var StepModelBase = class {
|
|
|
4346
4408
|
* @return {Uint32Array} express ID array
|
|
4347
4409
|
*/
|
|
4348
4410
|
mapLocalIDsToExpressIDs(from) {
|
|
4349
|
-
const
|
|
4350
|
-
|
|
4411
|
+
const firstInlineElement = this.firstInlineElement_;
|
|
4412
|
+
const expressIDs = this.expressID_;
|
|
4413
|
+
return from.map((value) => value < firstInlineElement ? expressIDs[value] : TriangleElementMap.NO_ELEMENT);
|
|
4351
4414
|
}
|
|
4352
4415
|
/**
|
|
4353
4416
|
* Given an express ID, return the matching element if one exists.
|
|
@@ -4357,8 +4420,7 @@ var StepModelBase = class {
|
|
|
4357
4420
|
* otherwise undefined.
|
|
4358
4421
|
*/
|
|
4359
4422
|
getExpressIDByLocalID(localID) {
|
|
4360
|
-
|
|
4361
|
-
return index[localID]?.expressID;
|
|
4423
|
+
return localID < this.firstInlineElement_ ? this.expressID_[localID] : void 0;
|
|
4362
4424
|
}
|
|
4363
4425
|
/**
|
|
4364
4426
|
* Given a local ID (i.e. dense index/reference), return the matching element if one
|
|
@@ -4369,10 +4431,10 @@ var StepModelBase = class {
|
|
|
4369
4431
|
* if none exists.
|
|
4370
4432
|
*/
|
|
4371
4433
|
getElementByLocalID(localID) {
|
|
4372
|
-
if (localID
|
|
4434
|
+
if (localID >= this.count_) {
|
|
4373
4435
|
return;
|
|
4374
4436
|
}
|
|
4375
|
-
const element = this.
|
|
4437
|
+
const element = this.entry(localID);
|
|
4376
4438
|
let entity = element.entity;
|
|
4377
4439
|
const multiMapping = element.multiMapping;
|
|
4378
4440
|
if (multiMapping !== void 0) {
|
|
@@ -4517,7 +4579,7 @@ var StepModelBase = class {
|
|
|
4517
4579
|
* @yields An element per iteration for all the elements in this.
|
|
4518
4580
|
*/
|
|
4519
4581
|
*[Symbol.iterator]() {
|
|
4520
|
-
for (let localID = 0, endID = this.
|
|
4582
|
+
for (let localID = 0, endID = this.count_; localID < endID; ++localID) {
|
|
4521
4583
|
const foundElement = this.getElementByLocalID(localID);
|
|
4522
4584
|
if (foundElement !== void 0) {
|
|
4523
4585
|
yield foundElement;
|
|
@@ -69652,7 +69714,7 @@ IfcStepParser.Instance = new IfcStepParser();
|
|
|
69652
69714
|
var ifc_step_parser_default = IfcStepParser;
|
|
69653
69715
|
|
|
69654
69716
|
// compiled/src/version/version.js
|
|
69655
|
-
var versionString = "Conway Web-Ifc Shim v1.
|
|
69717
|
+
var versionString = "Conway Web-Ifc Shim v1.373.1180";
|
|
69656
69718
|
|
|
69657
69719
|
// compiled/src/statistics/statistics.js
|
|
69658
69720
|
var Statistics = class {
|
|
@@ -19007,6 +19007,7 @@ var StepModelBase = class {
|
|
|
19007
19007
|
this.schema = schema;
|
|
19008
19008
|
this.buffer_ = buffer_;
|
|
19009
19009
|
this.vtableBuilder_ = new StepVtableBuilder();
|
|
19010
|
+
this.descriptorCache_ = [];
|
|
19010
19011
|
this.elementMemoization = true;
|
|
19011
19012
|
this.nullOnErrors = true;
|
|
19012
19013
|
const localElementIndex = elementIndex;
|
|
@@ -19044,7 +19045,68 @@ var StepModelBase = class {
|
|
|
19044
19045
|
}
|
|
19045
19046
|
const expressIDMap = new InterpolationSearchTable32(expressIdTable, expressIdsAlreadySorted);
|
|
19046
19047
|
this.expressIDMap_ = expressIDMap;
|
|
19047
|
-
|
|
19048
|
+
const count = inlineElementEnd;
|
|
19049
|
+
const address = new Uint32Array(count);
|
|
19050
|
+
const lengths = new Uint32Array(count);
|
|
19051
|
+
const typeIDs = new Int32Array(count);
|
|
19052
|
+
const expressIDs = new Uint32Array(firstInlineElement);
|
|
19053
|
+
let complexEntries = void 0;
|
|
19054
|
+
for (let localID = 0; localID < count; ++localID) {
|
|
19055
|
+
const element = localElementIndex[localID];
|
|
19056
|
+
address[localID] = element.address;
|
|
19057
|
+
lengths[localID] = element.length;
|
|
19058
|
+
typeIDs[localID] = element.typeID === void 0 ? -1 : element.typeID;
|
|
19059
|
+
if (localID < firstInlineElement) {
|
|
19060
|
+
expressIDs[localID] = element.expressID;
|
|
19061
|
+
}
|
|
19062
|
+
if (element.multiMapping !== void 0) {
|
|
19063
|
+
(complexEntries ??= /* @__PURE__ */ new Map()).set(localID, element);
|
|
19064
|
+
}
|
|
19065
|
+
}
|
|
19066
|
+
this.address_ = address;
|
|
19067
|
+
this.length_ = lengths;
|
|
19068
|
+
this.typeID_ = typeIDs;
|
|
19069
|
+
this.expressID_ = expressIDs;
|
|
19070
|
+
this.count_ = count;
|
|
19071
|
+
this.firstInlineElement_ = firstInlineElement;
|
|
19072
|
+
this.complexEntries_ = complexEntries;
|
|
19073
|
+
}
|
|
19074
|
+
/**
|
|
19075
|
+
* Materialise the descriptor object for a local ID from the columns. Only the
|
|
19076
|
+
* persistent scalars are set; lazy fields (vtable, buffer, entity) are filled
|
|
19077
|
+
* in on demand by populateVtableEntry / entity construction.
|
|
19078
|
+
*
|
|
19079
|
+
* @param localID The local ID to build a descriptor for.
|
|
19080
|
+
* @return {StepEntityInternalReferencePrivate} The descriptor.
|
|
19081
|
+
*/
|
|
19082
|
+
makeDescriptor(localID) {
|
|
19083
|
+
const typeID = this.typeID_[localID];
|
|
19084
|
+
return {
|
|
19085
|
+
address: this.address_[localID],
|
|
19086
|
+
length: this.length_[localID],
|
|
19087
|
+
typeID: typeID === -1 ? void 0 : typeID,
|
|
19088
|
+
expressID: localID < this.firstInlineElement_ ? this.expressID_[localID] : void 0
|
|
19089
|
+
};
|
|
19090
|
+
}
|
|
19091
|
+
/**
|
|
19092
|
+
* Get the (cached or freshly materialised) descriptor for a local ID. The
|
|
19093
|
+
* same object is returned for repeated calls until invalidate(), so entities
|
|
19094
|
+
* built on it and populateVtableEntry() mutations agree.
|
|
19095
|
+
*
|
|
19096
|
+
* @param localID The local ID to get a descriptor for.
|
|
19097
|
+
* @return {StepEntityInternalReferencePrivate} The descriptor.
|
|
19098
|
+
*/
|
|
19099
|
+
entry(localID) {
|
|
19100
|
+
const complex = this.complexEntries_?.get(localID);
|
|
19101
|
+
if (complex !== void 0) {
|
|
19102
|
+
return complex;
|
|
19103
|
+
}
|
|
19104
|
+
let descriptor = this.descriptorCache_[localID];
|
|
19105
|
+
if (descriptor === void 0) {
|
|
19106
|
+
descriptor = this.makeDescriptor(localID);
|
|
19107
|
+
this.descriptorCache_[localID] = descriptor;
|
|
19108
|
+
}
|
|
19109
|
+
return descriptor;
|
|
19048
19110
|
}
|
|
19049
19111
|
/**
|
|
19050
19112
|
* Invalidate the cache store for this, so new items will be created.
|
|
@@ -19055,26 +19117,26 @@ var StepModelBase = class {
|
|
|
19055
19117
|
invalidate(dropVtable = false) {
|
|
19056
19118
|
if (dropVtable) {
|
|
19057
19119
|
this.vtableBuilder_.clear(true);
|
|
19058
|
-
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19064
|
-
|
|
19065
|
-
|
|
19066
|
-
}
|
|
19067
|
-
continue;
|
|
19120
|
+
this.descriptorCache_ = [];
|
|
19121
|
+
if (this.complexEntries_ !== void 0) {
|
|
19122
|
+
for (const item of this.complexEntries_.values()) {
|
|
19123
|
+
item.buffer = void 0;
|
|
19124
|
+
item.entity = void 0;
|
|
19125
|
+
item.vtable = void 0;
|
|
19126
|
+
item.vtableCount = void 0;
|
|
19127
|
+
item.vtableIndex = void 0;
|
|
19068
19128
|
}
|
|
19069
|
-
item.buffer = void 0;
|
|
19070
|
-
item.entity = void 0;
|
|
19071
|
-
item.vtable = void 0;
|
|
19072
|
-
item.vtableCount = void 0;
|
|
19073
|
-
item.vtableIndex = void 0;
|
|
19074
19129
|
}
|
|
19075
19130
|
} else {
|
|
19076
|
-
for (const item of this.
|
|
19077
|
-
item
|
|
19131
|
+
for (const item of this.descriptorCache_) {
|
|
19132
|
+
if (item !== void 0) {
|
|
19133
|
+
item.entity = void 0;
|
|
19134
|
+
}
|
|
19135
|
+
}
|
|
19136
|
+
if (this.complexEntries_ !== void 0) {
|
|
19137
|
+
for (const item of this.complexEntries_.values()) {
|
|
19138
|
+
item.entity = void 0;
|
|
19139
|
+
}
|
|
19078
19140
|
}
|
|
19079
19141
|
}
|
|
19080
19142
|
}
|
|
@@ -19108,10 +19170,10 @@ var StepModelBase = class {
|
|
|
19108
19170
|
* @return {boolean} Did the vtable entry populate correctly?
|
|
19109
19171
|
*/
|
|
19110
19172
|
populateVtableEntry(localID) {
|
|
19111
|
-
if (localID
|
|
19173
|
+
if (localID >= this.count_) {
|
|
19112
19174
|
throw new Error(`Invalid localID ${localID}`);
|
|
19113
19175
|
}
|
|
19114
|
-
const element = this.
|
|
19176
|
+
const element = this.entry(localID);
|
|
19115
19177
|
if (element.vtableIndex !== void 0 || element.typeID === 0) {
|
|
19116
19178
|
return true;
|
|
19117
19179
|
}
|
|
@@ -19133,10 +19195,10 @@ var StepModelBase = class {
|
|
|
19133
19195
|
* @throws {Error} Throws an error if the ID is invalid.
|
|
19134
19196
|
*/
|
|
19135
19197
|
populateBufferEntry(localID) {
|
|
19136
|
-
if (localID
|
|
19198
|
+
if (localID >= this.count_) {
|
|
19137
19199
|
throw new Error(`Invalid localID ${localID}`);
|
|
19138
19200
|
}
|
|
19139
|
-
const element = this.
|
|
19201
|
+
const element = this.entry(localID);
|
|
19140
19202
|
element.buffer = this.buffer_;
|
|
19141
19203
|
}
|
|
19142
19204
|
/**
|
|
@@ -19153,7 +19215,7 @@ var StepModelBase = class {
|
|
|
19153
19215
|
* @return {number} The number of elements.
|
|
19154
19216
|
*/
|
|
19155
19217
|
get size() {
|
|
19156
|
-
return this.
|
|
19218
|
+
return this.count_;
|
|
19157
19219
|
}
|
|
19158
19220
|
/**
|
|
19159
19221
|
* Get an inline element by address.
|
|
@@ -19229,10 +19291,10 @@ var StepModelBase = class {
|
|
|
19229
19291
|
* if none exists.
|
|
19230
19292
|
*/
|
|
19231
19293
|
getTypedElementByLocalID(localID, type) {
|
|
19232
|
-
if (localID
|
|
19294
|
+
if (localID >= this.count_) {
|
|
19233
19295
|
return;
|
|
19234
19296
|
}
|
|
19235
|
-
const element = this.
|
|
19297
|
+
const element = this.entry(localID);
|
|
19236
19298
|
const multiMapping = element.multiMapping;
|
|
19237
19299
|
if (multiMapping !== void 0) {
|
|
19238
19300
|
let multiElements = element.multiEntity;
|
|
@@ -19281,8 +19343,9 @@ var StepModelBase = class {
|
|
|
19281
19343
|
* @return {Uint32Array} express ID array
|
|
19282
19344
|
*/
|
|
19283
19345
|
mapLocalIDsToExpressIDs(from) {
|
|
19284
|
-
const
|
|
19285
|
-
|
|
19346
|
+
const firstInlineElement = this.firstInlineElement_;
|
|
19347
|
+
const expressIDs = this.expressID_;
|
|
19348
|
+
return from.map((value) => value < firstInlineElement ? expressIDs[value] : TriangleElementMap.NO_ELEMENT);
|
|
19286
19349
|
}
|
|
19287
19350
|
/**
|
|
19288
19351
|
* Given an express ID, return the matching element if one exists.
|
|
@@ -19292,8 +19355,7 @@ var StepModelBase = class {
|
|
|
19292
19355
|
* otherwise undefined.
|
|
19293
19356
|
*/
|
|
19294
19357
|
getExpressIDByLocalID(localID) {
|
|
19295
|
-
|
|
19296
|
-
return index[localID]?.expressID;
|
|
19358
|
+
return localID < this.firstInlineElement_ ? this.expressID_[localID] : void 0;
|
|
19297
19359
|
}
|
|
19298
19360
|
/**
|
|
19299
19361
|
* Given a local ID (i.e. dense index/reference), return the matching element if one
|
|
@@ -19304,10 +19366,10 @@ var StepModelBase = class {
|
|
|
19304
19366
|
* if none exists.
|
|
19305
19367
|
*/
|
|
19306
19368
|
getElementByLocalID(localID) {
|
|
19307
|
-
if (localID
|
|
19369
|
+
if (localID >= this.count_) {
|
|
19308
19370
|
return;
|
|
19309
19371
|
}
|
|
19310
|
-
const element = this.
|
|
19372
|
+
const element = this.entry(localID);
|
|
19311
19373
|
let entity = element.entity;
|
|
19312
19374
|
const multiMapping = element.multiMapping;
|
|
19313
19375
|
if (multiMapping !== void 0) {
|
|
@@ -19452,7 +19514,7 @@ var StepModelBase = class {
|
|
|
19452
19514
|
* @yields An element per iteration for all the elements in this.
|
|
19453
19515
|
*/
|
|
19454
19516
|
*[Symbol.iterator]() {
|
|
19455
|
-
for (let localID = 0, endID = this.
|
|
19517
|
+
for (let localID = 0, endID = this.count_; localID < endID; ++localID) {
|
|
19456
19518
|
const foundElement = this.getElementByLocalID(localID);
|
|
19457
19519
|
if (foundElement !== void 0) {
|
|
19458
19520
|
yield foundElement;
|
|
@@ -85893,7 +85955,7 @@ var IfcSceneBuilder = class {
|
|
|
85893
85955
|
};
|
|
85894
85956
|
|
|
85895
85957
|
// compiled/src/version/version.js
|
|
85896
|
-
var versionString = "Conway Web-Ifc Shim v1.
|
|
85958
|
+
var versionString = "Conway Web-Ifc Shim v1.373.1180";
|
|
85897
85959
|
|
|
85898
85960
|
// compiled/src/statistics/statistics.js
|
|
85899
85961
|
var Statistics = class {
|
|
@@ -18887,6 +18887,7 @@ var StepModelBase = class {
|
|
|
18887
18887
|
this.schema = schema;
|
|
18888
18888
|
this.buffer_ = buffer_;
|
|
18889
18889
|
this.vtableBuilder_ = new StepVtableBuilder();
|
|
18890
|
+
this.descriptorCache_ = [];
|
|
18890
18891
|
this.elementMemoization = true;
|
|
18891
18892
|
this.nullOnErrors = true;
|
|
18892
18893
|
const localElementIndex = elementIndex;
|
|
@@ -18924,7 +18925,68 @@ var StepModelBase = class {
|
|
|
18924
18925
|
}
|
|
18925
18926
|
const expressIDMap = new InterpolationSearchTable32(expressIdTable, expressIdsAlreadySorted);
|
|
18926
18927
|
this.expressIDMap_ = expressIDMap;
|
|
18927
|
-
|
|
18928
|
+
const count = inlineElementEnd;
|
|
18929
|
+
const address2 = new Uint32Array(count);
|
|
18930
|
+
const lengths = new Uint32Array(count);
|
|
18931
|
+
const typeIDs = new Int32Array(count);
|
|
18932
|
+
const expressIDs = new Uint32Array(firstInlineElement);
|
|
18933
|
+
let complexEntries = void 0;
|
|
18934
|
+
for (let localID = 0; localID < count; ++localID) {
|
|
18935
|
+
const element = localElementIndex[localID];
|
|
18936
|
+
address2[localID] = element.address;
|
|
18937
|
+
lengths[localID] = element.length;
|
|
18938
|
+
typeIDs[localID] = element.typeID === void 0 ? -1 : element.typeID;
|
|
18939
|
+
if (localID < firstInlineElement) {
|
|
18940
|
+
expressIDs[localID] = element.expressID;
|
|
18941
|
+
}
|
|
18942
|
+
if (element.multiMapping !== void 0) {
|
|
18943
|
+
(complexEntries ??= /* @__PURE__ */ new Map()).set(localID, element);
|
|
18944
|
+
}
|
|
18945
|
+
}
|
|
18946
|
+
this.address_ = address2;
|
|
18947
|
+
this.length_ = lengths;
|
|
18948
|
+
this.typeID_ = typeIDs;
|
|
18949
|
+
this.expressID_ = expressIDs;
|
|
18950
|
+
this.count_ = count;
|
|
18951
|
+
this.firstInlineElement_ = firstInlineElement;
|
|
18952
|
+
this.complexEntries_ = complexEntries;
|
|
18953
|
+
}
|
|
18954
|
+
/**
|
|
18955
|
+
* Materialise the descriptor object for a local ID from the columns. Only the
|
|
18956
|
+
* persistent scalars are set; lazy fields (vtable, buffer, entity) are filled
|
|
18957
|
+
* in on demand by populateVtableEntry / entity construction.
|
|
18958
|
+
*
|
|
18959
|
+
* @param localID The local ID to build a descriptor for.
|
|
18960
|
+
* @return {StepEntityInternalReferencePrivate} The descriptor.
|
|
18961
|
+
*/
|
|
18962
|
+
makeDescriptor(localID) {
|
|
18963
|
+
const typeID = this.typeID_[localID];
|
|
18964
|
+
return {
|
|
18965
|
+
address: this.address_[localID],
|
|
18966
|
+
length: this.length_[localID],
|
|
18967
|
+
typeID: typeID === -1 ? void 0 : typeID,
|
|
18968
|
+
expressID: localID < this.firstInlineElement_ ? this.expressID_[localID] : void 0
|
|
18969
|
+
};
|
|
18970
|
+
}
|
|
18971
|
+
/**
|
|
18972
|
+
* Get the (cached or freshly materialised) descriptor for a local ID. The
|
|
18973
|
+
* same object is returned for repeated calls until invalidate(), so entities
|
|
18974
|
+
* built on it and populateVtableEntry() mutations agree.
|
|
18975
|
+
*
|
|
18976
|
+
* @param localID The local ID to get a descriptor for.
|
|
18977
|
+
* @return {StepEntityInternalReferencePrivate} The descriptor.
|
|
18978
|
+
*/
|
|
18979
|
+
entry(localID) {
|
|
18980
|
+
const complex = this.complexEntries_?.get(localID);
|
|
18981
|
+
if (complex !== void 0) {
|
|
18982
|
+
return complex;
|
|
18983
|
+
}
|
|
18984
|
+
let descriptor = this.descriptorCache_[localID];
|
|
18985
|
+
if (descriptor === void 0) {
|
|
18986
|
+
descriptor = this.makeDescriptor(localID);
|
|
18987
|
+
this.descriptorCache_[localID] = descriptor;
|
|
18988
|
+
}
|
|
18989
|
+
return descriptor;
|
|
18928
18990
|
}
|
|
18929
18991
|
/**
|
|
18930
18992
|
* Invalidate the cache store for this, so new items will be created.
|
|
@@ -18935,26 +18997,26 @@ var StepModelBase = class {
|
|
|
18935
18997
|
invalidate(dropVtable = false) {
|
|
18936
18998
|
if (dropVtable) {
|
|
18937
18999
|
this.vtableBuilder_.clear(true);
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
}
|
|
18947
|
-
continue;
|
|
19000
|
+
this.descriptorCache_ = [];
|
|
19001
|
+
if (this.complexEntries_ !== void 0) {
|
|
19002
|
+
for (const item of this.complexEntries_.values()) {
|
|
19003
|
+
item.buffer = void 0;
|
|
19004
|
+
item.entity = void 0;
|
|
19005
|
+
item.vtable = void 0;
|
|
19006
|
+
item.vtableCount = void 0;
|
|
19007
|
+
item.vtableIndex = void 0;
|
|
18948
19008
|
}
|
|
18949
|
-
item.buffer = void 0;
|
|
18950
|
-
item.entity = void 0;
|
|
18951
|
-
item.vtable = void 0;
|
|
18952
|
-
item.vtableCount = void 0;
|
|
18953
|
-
item.vtableIndex = void 0;
|
|
18954
19009
|
}
|
|
18955
19010
|
} else {
|
|
18956
|
-
for (const item of this.
|
|
18957
|
-
item
|
|
19011
|
+
for (const item of this.descriptorCache_) {
|
|
19012
|
+
if (item !== void 0) {
|
|
19013
|
+
item.entity = void 0;
|
|
19014
|
+
}
|
|
19015
|
+
}
|
|
19016
|
+
if (this.complexEntries_ !== void 0) {
|
|
19017
|
+
for (const item of this.complexEntries_.values()) {
|
|
19018
|
+
item.entity = void 0;
|
|
19019
|
+
}
|
|
18958
19020
|
}
|
|
18959
19021
|
}
|
|
18960
19022
|
}
|
|
@@ -18988,10 +19050,10 @@ var StepModelBase = class {
|
|
|
18988
19050
|
* @return {boolean} Did the vtable entry populate correctly?
|
|
18989
19051
|
*/
|
|
18990
19052
|
populateVtableEntry(localID) {
|
|
18991
|
-
if (localID
|
|
19053
|
+
if (localID >= this.count_) {
|
|
18992
19054
|
throw new Error(`Invalid localID ${localID}`);
|
|
18993
19055
|
}
|
|
18994
|
-
const element = this.
|
|
19056
|
+
const element = this.entry(localID);
|
|
18995
19057
|
if (element.vtableIndex !== void 0 || element.typeID === 0) {
|
|
18996
19058
|
return true;
|
|
18997
19059
|
}
|
|
@@ -19013,10 +19075,10 @@ var StepModelBase = class {
|
|
|
19013
19075
|
* @throws {Error} Throws an error if the ID is invalid.
|
|
19014
19076
|
*/
|
|
19015
19077
|
populateBufferEntry(localID) {
|
|
19016
|
-
if (localID
|
|
19078
|
+
if (localID >= this.count_) {
|
|
19017
19079
|
throw new Error(`Invalid localID ${localID}`);
|
|
19018
19080
|
}
|
|
19019
|
-
const element = this.
|
|
19081
|
+
const element = this.entry(localID);
|
|
19020
19082
|
element.buffer = this.buffer_;
|
|
19021
19083
|
}
|
|
19022
19084
|
/**
|
|
@@ -19033,7 +19095,7 @@ var StepModelBase = class {
|
|
|
19033
19095
|
* @return {number} The number of elements.
|
|
19034
19096
|
*/
|
|
19035
19097
|
get size() {
|
|
19036
|
-
return this.
|
|
19098
|
+
return this.count_;
|
|
19037
19099
|
}
|
|
19038
19100
|
/**
|
|
19039
19101
|
* Get an inline element by address.
|
|
@@ -19109,10 +19171,10 @@ var StepModelBase = class {
|
|
|
19109
19171
|
* if none exists.
|
|
19110
19172
|
*/
|
|
19111
19173
|
getTypedElementByLocalID(localID, type) {
|
|
19112
|
-
if (localID
|
|
19174
|
+
if (localID >= this.count_) {
|
|
19113
19175
|
return;
|
|
19114
19176
|
}
|
|
19115
|
-
const element = this.
|
|
19177
|
+
const element = this.entry(localID);
|
|
19116
19178
|
const multiMapping = element.multiMapping;
|
|
19117
19179
|
if (multiMapping !== void 0) {
|
|
19118
19180
|
let multiElements = element.multiEntity;
|
|
@@ -19161,8 +19223,9 @@ var StepModelBase = class {
|
|
|
19161
19223
|
* @return {Uint32Array} express ID array
|
|
19162
19224
|
*/
|
|
19163
19225
|
mapLocalIDsToExpressIDs(from) {
|
|
19164
|
-
const
|
|
19165
|
-
|
|
19226
|
+
const firstInlineElement = this.firstInlineElement_;
|
|
19227
|
+
const expressIDs = this.expressID_;
|
|
19228
|
+
return from.map((value) => value < firstInlineElement ? expressIDs[value] : TriangleElementMap.NO_ELEMENT);
|
|
19166
19229
|
}
|
|
19167
19230
|
/**
|
|
19168
19231
|
* Given an express ID, return the matching element if one exists.
|
|
@@ -19172,8 +19235,7 @@ var StepModelBase = class {
|
|
|
19172
19235
|
* otherwise undefined.
|
|
19173
19236
|
*/
|
|
19174
19237
|
getExpressIDByLocalID(localID) {
|
|
19175
|
-
|
|
19176
|
-
return index[localID]?.expressID;
|
|
19238
|
+
return localID < this.firstInlineElement_ ? this.expressID_[localID] : void 0;
|
|
19177
19239
|
}
|
|
19178
19240
|
/**
|
|
19179
19241
|
* Given a local ID (i.e. dense index/reference), return the matching element if one
|
|
@@ -19184,10 +19246,10 @@ var StepModelBase = class {
|
|
|
19184
19246
|
* if none exists.
|
|
19185
19247
|
*/
|
|
19186
19248
|
getElementByLocalID(localID) {
|
|
19187
|
-
if (localID
|
|
19249
|
+
if (localID >= this.count_) {
|
|
19188
19250
|
return;
|
|
19189
19251
|
}
|
|
19190
|
-
const element = this.
|
|
19252
|
+
const element = this.entry(localID);
|
|
19191
19253
|
let entity = element.entity;
|
|
19192
19254
|
const multiMapping = element.multiMapping;
|
|
19193
19255
|
if (multiMapping !== void 0) {
|
|
@@ -19332,7 +19394,7 @@ var StepModelBase = class {
|
|
|
19332
19394
|
* @yields An element per iteration for all the elements in this.
|
|
19333
19395
|
*/
|
|
19334
19396
|
*[Symbol.iterator]() {
|
|
19335
|
-
for (let localID = 0, endID = this.
|
|
19397
|
+
for (let localID = 0, endID = this.count_; localID < endID; ++localID) {
|
|
19336
19398
|
const foundElement = this.getElementByLocalID(localID);
|
|
19337
19399
|
if (foundElement !== void 0) {
|
|
19338
19400
|
yield foundElement;
|
|
@@ -79344,7 +79406,7 @@ var ExtractResult;
|
|
|
79344
79406
|
})(ExtractResult || (ExtractResult = {}));
|
|
79345
79407
|
|
|
79346
79408
|
// compiled/src/version/version.js
|
|
79347
|
-
var versionString = "Conway Web-Ifc Shim v1.
|
|
79409
|
+
var versionString = "Conway Web-Ifc Shim v1.373.1180";
|
|
79348
79410
|
|
|
79349
79411
|
// compiled/src/statistics/statistics.js
|
|
79350
79412
|
var Statistics = class {
|