@thatopen/components 2.4.0-alpha.9 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/core/Components/index.d.ts +1 -1
  2. package/dist/core/ConfigManager/src/configurator.d.ts +5 -3
  3. package/dist/core/ShadowedScene/index.d.ts +1 -2
  4. package/dist/core/Types/src/component-with-ui.d.ts +8 -3
  5. package/dist/core/Types/src/config-types.d.ts +5 -0
  6. package/dist/core/Types/src/data-map.d.ts +3 -1
  7. package/dist/core/Types/src/data-set.d.ts +1 -2
  8. package/dist/core/Viewpoints/src/viewpoint.d.ts +2 -2
  9. package/dist/fragments/Classifier/index.d.ts +15 -2
  10. package/dist/fragments/IfcGeometryTiler/index.d.ts +1 -0
  11. package/dist/ifc/IfcIsolator/index.d.ts +24 -0
  12. package/dist/ifc/IfcPropertiesManager/index.d.ts +7 -3
  13. package/dist/ifc/IfcRelationsIndexer/index.d.ts +8 -18
  14. package/dist/ifc/IfcRelationsIndexer/src/newVersion.d.ts +51 -0
  15. package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +16 -0
  16. package/dist/ifc/index.d.ts +1 -0
  17. package/dist/index.cjs +416 -240
  18. package/dist/index.min.cjs +3 -3
  19. package/dist/index.min.mjs +3 -3
  20. package/dist/index.mjs +417 -241
  21. package/dist/namespace.d.ts +3838 -3697
  22. package/dist/openbim/BCFTopics/index.d.ts +1 -2
  23. package/dist/openbim/BCFTopics/src/Topic.d.ts +5 -1
  24. package/dist/openbim/BCFTopics/src/bcf-topics-config.d.ts +1 -2
  25. package/dist/openbim/IDSSpecifications/index.d.ts +1 -2
  26. package/dist/openbim/IDSSpecifications/src/Specification.d.ts +4 -3
  27. package/dist/openbim/IDSSpecifications/src/facets/Attribute.d.ts +1 -0
  28. package/dist/openbim/IDSSpecifications/src/facets/Classification.d.ts +1 -0
  29. package/dist/openbim/IDSSpecifications/src/facets/Entity.d.ts +1 -0
  30. package/dist/openbim/IDSSpecifications/src/facets/Facet.d.ts +2 -1
  31. package/dist/openbim/IDSSpecifications/src/facets/Material.d.ts +1 -0
  32. package/dist/openbim/IDSSpecifications/src/facets/PartOf.d.ts +1 -0
  33. package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +3 -0
  34. package/dist/openbim/IDSSpecifications/src/types.d.ts +39 -20
  35. package/package.json +58 -58
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import * as THREE$1 from "three";
8
- import { BufferAttribute, Vector3, Vector2, Plane, Line3, Triangle, Sphere, Matrix4, Box3, BackSide, DoubleSide, FrontSide, Mesh, Ray, Raycaster, Quaternion, Object3D, Euler, MeshBasicMaterial, LineBasicMaterial, CylinderGeometry, BoxGeometry, BufferGeometry, Float32BufferAttribute, OctahedronGeometry, Line, SphereGeometry, TorusGeometry, PlaneGeometry } from "three";
8
+ import { BufferAttribute, Vector3, Plane, Line3, Vector2, Triangle, Sphere, Matrix4, Box3, BackSide, DoubleSide, FrontSide, Ray, Mesh, Object3D, MeshBasicMaterial, LineBasicMaterial, CylinderGeometry, BoxGeometry, BufferGeometry, Float32BufferAttribute, OctahedronGeometry, Line, TorusGeometry, SphereGeometry, Quaternion, Euler, PlaneGeometry, Raycaster } from "three";
9
9
  import * as FRAGS from "@thatopen/fragments";
10
10
  import { FragmentsGroup, Serializer } from "@thatopen/fragments";
11
11
  import * as WEBIFC from "web-ifc";
@@ -3808,7 +3808,9 @@ class DataMap extends Map {
3808
3808
  this.onCleared.trigger();
3809
3809
  }
3810
3810
  /**
3811
- * Sets the value for the specified key in the map and triggers the appropriate event (onItemSet or onItemUpdated).
3811
+ * Sets the value for the specified key in the map.
3812
+ * If the item is new, then onItemSet is triggered.
3813
+ * If the item is already in the map, then onItemUpdated is triggered.
3812
3814
  *
3813
3815
  * @param key - The key of the item to set.
3814
3816
  * @param value - The value of the item to set.
@@ -3858,6 +3860,97 @@ class DataMap extends Map {
3858
3860
  }
3859
3861
  class ComponentWithUI extends Component {
3860
3862
  }
3863
+ class ControlsUtils {
3864
+ static isEntry(item) {
3865
+ const types = /* @__PURE__ */ new Set([
3866
+ "Boolean",
3867
+ "Color",
3868
+ "Text",
3869
+ "Number",
3870
+ "Select",
3871
+ "Vector3",
3872
+ "TextSet",
3873
+ "None"
3874
+ ]);
3875
+ return types.has(item.type);
3876
+ }
3877
+ static copySchema(schema, copy = {}) {
3878
+ for (const name in schema) {
3879
+ const entry = schema[name];
3880
+ if (this.isEntry(entry)) {
3881
+ copy[name] = this.copyEntry(entry);
3882
+ } else {
3883
+ copy[name] = {};
3884
+ this.copySchema(entry, copy[name]);
3885
+ }
3886
+ }
3887
+ return copy;
3888
+ }
3889
+ static copyEntry(controlEntry) {
3890
+ if (controlEntry.type === "Boolean") {
3891
+ const entry = controlEntry;
3892
+ return {
3893
+ type: entry.type,
3894
+ value: entry.value
3895
+ };
3896
+ }
3897
+ if (controlEntry.type === "Color") {
3898
+ const entry = controlEntry;
3899
+ return {
3900
+ type: entry.type,
3901
+ value: entry.value.clone()
3902
+ };
3903
+ }
3904
+ if (controlEntry.type === "Text") {
3905
+ const entry = controlEntry;
3906
+ return {
3907
+ type: entry.type,
3908
+ value: entry.value
3909
+ };
3910
+ }
3911
+ if (controlEntry.type === "Number") {
3912
+ const entry = controlEntry;
3913
+ return {
3914
+ type: entry.type,
3915
+ value: entry.value,
3916
+ min: entry.min,
3917
+ max: entry.max,
3918
+ interpolable: entry.interpolable
3919
+ };
3920
+ }
3921
+ if (controlEntry.type === "Select") {
3922
+ const entry = controlEntry;
3923
+ return {
3924
+ type: entry.type,
3925
+ value: entry.value,
3926
+ multiple: entry.multiple,
3927
+ options: new Set(entry.options)
3928
+ };
3929
+ }
3930
+ if (controlEntry.type === "Vector3") {
3931
+ const entry = controlEntry;
3932
+ return {
3933
+ type: entry.type,
3934
+ value: entry.value.clone()
3935
+ };
3936
+ }
3937
+ if (controlEntry.type === "TextSet") {
3938
+ const entry = controlEntry;
3939
+ return {
3940
+ type: entry.type,
3941
+ value: new Set(entry.value)
3942
+ };
3943
+ }
3944
+ if (controlEntry.type === "None") {
3945
+ const entry = controlEntry;
3946
+ return {
3947
+ type: entry.type,
3948
+ value: entry.value
3949
+ };
3950
+ }
3951
+ throw new Error("Invalid entry!");
3952
+ }
3953
+ }
3861
3954
  class EventManager {
3862
3955
  constructor() {
3863
3956
  /**
@@ -5366,7 +5459,7 @@ const _Components = class _Components {
5366
5459
  /**
5367
5460
  * The version of the @thatopen/components library.
5368
5461
  */
5369
- __publicField(_Components, "release", "2.4.0-alpha.1");
5462
+ __publicField(_Components, "release", "2.4.0");
5370
5463
  let Components = _Components;
5371
5464
  class SimpleWorld extends Base {
5372
5465
  constructor() {
@@ -5533,76 +5626,69 @@ class Configurator {
5533
5626
  configManager.list.set(this.uuid, this);
5534
5627
  }
5535
5628
  get controls() {
5536
- const copy = {};
5537
- for (const name in this._config) {
5538
- const entry = this._config[name];
5539
- copy[name] = this.copyEntry(entry);
5540
- }
5541
- return copy;
5629
+ return ControlsUtils.copySchema(this._config);
5542
5630
  }
5543
- copyEntry(controlEntry) {
5544
- if (controlEntry.type === "Boolean") {
5545
- const entry = controlEntry;
5546
- return {
5547
- type: entry.type,
5548
- value: entry.value
5549
- };
5550
- }
5551
- if (controlEntry.type === "Color") {
5552
- const entry = controlEntry;
5553
- return {
5554
- type: entry.type,
5555
- value: entry.value.clone()
5556
- };
5557
- }
5558
- if (controlEntry.type === "Text") {
5559
- const entry = controlEntry;
5560
- return {
5561
- type: entry.type,
5562
- value: entry.value
5563
- };
5564
- }
5565
- if (controlEntry.type === "Number") {
5566
- const entry = controlEntry;
5567
- return {
5568
- type: entry.type,
5569
- value: entry.value,
5570
- min: entry.min,
5571
- max: entry.max,
5572
- interpolable: entry.interpolable
5573
- };
5574
- }
5575
- if (controlEntry.type === "Select") {
5576
- const entry = controlEntry;
5577
- return {
5578
- type: entry.type,
5579
- value: entry.value,
5580
- multiple: entry.multiple,
5581
- options: new Set(entry.options)
5582
- };
5583
- }
5584
- if (controlEntry.type === "Vector3") {
5585
- const entry = controlEntry;
5586
- return {
5587
- type: entry.type,
5588
- value: entry.value.clone()
5589
- };
5590
- }
5591
- if (controlEntry.type === "TextSet") {
5592
- const entry = controlEntry;
5593
- return {
5594
- type: entry.type,
5595
- value: new Set(entry.value)
5596
- };
5631
+ set(data) {
5632
+ for (const name in data) {
5633
+ if (name in this) {
5634
+ const key = name;
5635
+ this[key] = data[name].value;
5636
+ }
5637
+ }
5638
+ }
5639
+ export(controls = this._config, exported = {}) {
5640
+ for (const id in controls) {
5641
+ const control = controls[id];
5642
+ const isControl = ControlsUtils.isEntry(control);
5643
+ if (isControl) {
5644
+ if (control.type === "Color") {
5645
+ const { r, g, b } = control.value;
5646
+ exported[id] = { ...control, value: { r, g, b } };
5647
+ } else if (control.type === "Vector3") {
5648
+ const { x, y, z } = control.value;
5649
+ exported[id] = { ...control, value: { x, y, z } };
5650
+ } else if (control.type === "TextSet") {
5651
+ const value = Array.from(control.value);
5652
+ exported[id] = { ...control, value };
5653
+ } else if (control.type === "Select") {
5654
+ const options = Array.from(control.options);
5655
+ exported[id] = { ...control, options };
5656
+ } else {
5657
+ exported[id] = { ...control };
5658
+ }
5659
+ } else {
5660
+ exported[id] = {};
5661
+ this.export(control, exported[id]);
5662
+ }
5663
+ }
5664
+ return exported;
5665
+ }
5666
+ import(exported, imported = {}, first = true) {
5667
+ for (const id in exported) {
5668
+ const control = exported[id];
5669
+ const isControl = ControlsUtils.isEntry(control);
5670
+ if (isControl) {
5671
+ if (control.type === "Color") {
5672
+ const { r, g, b } = control.value;
5673
+ imported[id] = { ...control, value: new THREE$1.Color(r, g, b) };
5674
+ } else if (control.type === "Vector3") {
5675
+ const { x, y, z } = control.value;
5676
+ imported[id] = { ...control, value: new THREE$1.Vector3(x, y, z) };
5677
+ } else if (control.type === "TextSet") {
5678
+ imported[id] = { ...control, value: new Set(control.value) };
5679
+ } else if (control.type === "Select") {
5680
+ imported[id] = { ...control, options: new Set(control.options) };
5681
+ } else {
5682
+ imported[id] = { ...control };
5683
+ }
5684
+ } else {
5685
+ imported[id] = {};
5686
+ this.import(control, imported[id], false);
5687
+ }
5597
5688
  }
5598
- if (controlEntry.type === "None") {
5599
- const entry = controlEntry;
5600
- return {
5601
- type: entry.type,
5602
- value: entry.value
5603
- };
5689
+ if (first) {
5690
+ this.set(imported);
5604
5691
  }
5605
- throw new Error("Invalid entry!");
5606
5692
  }
5607
5693
  }
5608
5694
  const _ConfigManager = class _ConfigManager extends Component {
@@ -11070,6 +11156,9 @@ class SimplePlane {
11070
11156
  * @param {boolean} state - The new enabled state.
11071
11157
  */
11072
11158
  set enabled(state) {
11159
+ if (this.world.isDisposing) {
11160
+ return;
11161
+ }
11073
11162
  if (!this.world.renderer) {
11074
11163
  throw new Error("No renderer found for clipping plane!");
11075
11164
  }
@@ -15312,7 +15401,8 @@ const GeometryTypes = /* @__PURE__ */ new Set([
15312
15401
  3958567839,
15313
15402
  2513912981,
15314
15403
  2830218821,
15315
- 427810014
15404
+ 427810014,
15405
+ 2916149573
15316
15406
  ]);
15317
15407
  const _IfcJsonExporter = class _IfcJsonExporter extends Component {
15318
15408
  constructor(components) {
@@ -15866,7 +15956,7 @@ const _IfcPropertiesManager = class _IfcPropertiesManager extends Component {
15866
15956
  */
15867
15957
  async newPset(model, name, description) {
15868
15958
  const schema = _IfcPropertiesManager.getIFCSchema(model);
15869
- const { ownerHistoryHandle } = await this.getOwnerHistory(model);
15959
+ const { handle: ownerHistoryHandle } = await this.getOwnerHistory(model);
15870
15960
  const psetGlobalId = this.newGUID(model);
15871
15961
  const psetName = new WEBIFC[schema].IfcLabel(name);
15872
15962
  const psetDescription = description ? new WEBIFC[schema].IfcText(description) : null;
@@ -15878,18 +15968,8 @@ const _IfcPropertiesManager = class _IfcPropertiesManager extends Component {
15878
15968
  []
15879
15969
  );
15880
15970
  pset.expressID = this.getNewExpressID(model);
15881
- const relGlobalId = this.newGUID(model);
15882
- const rel = new WEBIFC[schema].IfcRelDefinesByProperties(
15883
- relGlobalId,
15884
- ownerHistoryHandle,
15885
- null,
15886
- null,
15887
- [],
15888
- new WEBIFC.Handle(pset.expressID)
15889
- );
15890
- rel.expressID = this.getNewExpressID(model);
15891
- await this.setData(model, pset, rel);
15892
- return { pset, rel };
15971
+ await this.setData(model, pset);
15972
+ return { pset };
15893
15973
  }
15894
15974
  /**
15895
15975
  * Removes a Property Set (Pset) from the given model.
@@ -16004,7 +16084,7 @@ const _IfcPropertiesManager = class _IfcPropertiesManager extends Component {
16004
16084
  indexer.addEntitiesRelation(
16005
16085
  model,
16006
16086
  psetID,
16007
- { type: WEBIFC.IFCRELDEFINESBYPROPERTIES, inv: "IsDefinedBy" },
16087
+ { type: WEBIFC.IFCRELDEFINESBYPROPERTIES, inv: "DefinesOcurrence" },
16008
16088
  ...expressIDs
16009
16089
  );
16010
16090
  }
@@ -16052,7 +16132,7 @@ const _IfcPropertiesManager = class _IfcPropertiesManager extends Component {
16052
16132
  if (!relName) {
16053
16133
  throw new Error(`IfcPropertiesManager: ${relName} is unsoported.`);
16054
16134
  }
16055
- const schema = model.ifcMetadata.schema;
16135
+ const schema = _IfcPropertiesManager.getIFCSchema(model);
16056
16136
  const attributePositions = ifcRelAttrsPosition[relName];
16057
16137
  const RelClass = WEBIFC[schema][relName];
16058
16138
  if (!(attributePositions && RelClass)) {
@@ -16103,7 +16183,9 @@ const _IfcPropertiesManager = class _IfcPropertiesManager extends Component {
16103
16183
  for (const expressID of changes) {
16104
16184
  const data = await model.getProperties(expressID);
16105
16185
  if (!data) {
16106
- ifcApi.DeleteLine(modelID, expressID);
16186
+ const existed = ifcApi.GetLine(modelID, expressID);
16187
+ if (existed)
16188
+ ifcApi.DeleteLine(modelID, expressID);
16107
16189
  } else {
16108
16190
  ifcApi.WriteLine(modelID, data);
16109
16191
  }
@@ -16200,9 +16282,9 @@ const _IfcPropertiesManager = class _IfcPropertiesManager extends Component {
16200
16282
  throw new Error("No OwnerHistory was found.");
16201
16283
  }
16202
16284
  const keys = Object.keys(ownerHistories).map((key) => parseInt(key, 10));
16203
- const ownerHistory = ownerHistories[keys[0]];
16204
- const ownerHistoryHandle = new WEBIFC.Handle(ownerHistory.expressID);
16205
- return { ownerHistory, ownerHistoryHandle };
16285
+ const entity = ownerHistories[keys[0]];
16286
+ const handle = new WEBIFC.Handle(entity.expressID);
16287
+ return { entity, handle };
16206
16288
  }
16207
16289
  registerChange(model, ...expressID) {
16208
16290
  if (!this.changeMap[model.uuid]) {
@@ -16307,7 +16389,7 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16307
16389
  __publicField(this, "onFragmentsDisposed", (data) => {
16308
16390
  delete this.relationMaps[data.groupID];
16309
16391
  });
16310
- // Use to create the corresponding IfcRelationship
16392
+ // Used to create the corresponding IfcRelationship with the IfcPropertiesManager
16311
16393
  __publicField(this, "_changeMap", {});
16312
16394
  /**
16313
16395
  * An event that is triggered when entities are related in a BIM model.
@@ -16330,43 +16412,26 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16330
16412
  return;
16331
16413
  const relatingID = relAttrs[relatingKey].value;
16332
16414
  const relatedIDs = relAttrs[relatedKey].map((el) => el.value);
16333
- const index = this.getAttributeIndex(relating);
16334
- if (index !== null) {
16335
- let currentMap = relationsMap.get(relatingID);
16336
- if (!currentMap) {
16337
- currentMap = /* @__PURE__ */ new Map();
16338
- relationsMap.set(relatingID, currentMap);
16339
- }
16340
- let indexMap = currentMap.get(index);
16341
- if (!indexMap) {
16342
- indexMap = [];
16343
- currentMap.set(index, indexMap);
16344
- }
16345
- for (const id of relatedIDs) {
16346
- indexMap.push(id);
16347
- }
16415
+ const indexMap = this.getEntityRelations(
16416
+ relationsMap,
16417
+ relatingID,
16418
+ relating
16419
+ );
16420
+ for (const id of relatedIDs) {
16421
+ indexMap.push(id);
16348
16422
  }
16349
16423
  for (const id of relatedIDs) {
16350
- const index2 = this.getAttributeIndex(related);
16351
- if (index2 === null)
16352
- continue;
16353
- let currentMap = relationsMap.get(id);
16354
- if (!currentMap) {
16355
- currentMap = /* @__PURE__ */ new Map();
16356
- relationsMap.set(id, currentMap);
16357
- }
16358
- let relations = currentMap.get(index2);
16359
- if (!relations) {
16360
- relations = [];
16361
- currentMap.set(index2, relations);
16362
- }
16424
+ const relations = this.getEntityRelations(relationsMap, id, related);
16363
16425
  relations.push(relatingID);
16364
16426
  }
16365
16427
  }
16366
16428
  getAttributeIndex(inverseAttribute) {
16367
16429
  const index = this._inverseAttributes.indexOf(inverseAttribute);
16368
- if (index === -1)
16369
- return null;
16430
+ if (index === -1) {
16431
+ throw new Error(
16432
+ `IfcRelationsIndexer: ${inverseAttribute} is not a valid IFC Inverse Attribute name or its not supported yet by this component.`
16433
+ );
16434
+ }
16370
16435
  return index;
16371
16436
  }
16372
16437
  /**
@@ -16400,28 +16465,27 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16400
16465
  * representation of the relations indexed by entity expressIDs and relation types.
16401
16466
  * @throws An error if the model does not have properties loaded.
16402
16467
  */
16403
- async process(model) {
16468
+ async process(model, config) {
16404
16469
  if (!model.hasProperties)
16405
16470
  throw new Error("FragmentsGroup properties not found");
16406
16471
  let relationsMap = this.relationMaps[model.uuid];
16407
- if (relationsMap) {
16408
- return relationsMap;
16472
+ if (!relationsMap) {
16473
+ relationsMap = /* @__PURE__ */ new Map();
16474
+ this.relationMaps[model.uuid] = relationsMap;
16409
16475
  }
16410
- relationsMap = /* @__PURE__ */ new Map();
16411
- for (const relType of this._ifcRels) {
16412
- const relsAttrs = await model.getAllPropertiesOfType(relType);
16413
- if (!relsAttrs) {
16476
+ const entities = model.getLocalProperties();
16477
+ if (!entities)
16478
+ return relationsMap;
16479
+ const relationsToProcess = (config == null ? void 0 : config.relationsToProcess) ?? this._ifcRels;
16480
+ for (const [_, entity] of Object.entries(entities)) {
16481
+ if (!relationsToProcess.includes(entity.type))
16414
16482
  continue;
16415
- }
16416
- const relInverseAttributes = this._relToAttributesMap.get(relType);
16483
+ const relInverseAttributes = this._relToAttributesMap.get(entity.type);
16417
16484
  if (!relInverseAttributes) {
16418
16485
  continue;
16419
16486
  }
16420
16487
  const { forRelated: related, forRelating: relating } = relInverseAttributes;
16421
- for (const expressID in relsAttrs) {
16422
- const relAttrs = relsAttrs[expressID];
16423
- this.indexRelations(relationsMap, relAttrs, related, relating);
16424
- }
16488
+ this.indexRelations(relationsMap, entity, related, relating);
16425
16489
  }
16426
16490
  this.setRelationMap(model, relationsMap);
16427
16491
  return relationsMap;
@@ -16463,26 +16527,33 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16463
16527
  *
16464
16528
  * @param model The `FragmentsGroup` model containing the entity, or its UUID.
16465
16529
  * @param expressID The unique identifier of the entity within the model.
16466
- * @param relationName The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
16467
- * @returns An array of express IDs representing the related entities, or `null` if no relations are found
16468
- * or the specified relation name is not indexed.
16469
- */
16470
- getEntityRelations(model, expressID, relationName) {
16471
- const id = model instanceof FragmentsGroup ? model.uuid : model;
16472
- const indexMap = this.relationMaps[id];
16473
- if (!indexMap) {
16474
- throw new Error(
16475
- `IfcRelationsIndexer: model ${id} has no relations indexed.`
16476
- );
16530
+ * @param attribute The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
16531
+ * @returns An array of express IDs representing the related entities. If the array is empty, no relations were found.
16532
+ */
16533
+ getEntityRelations(model, expressID, attribute) {
16534
+ const index = this.getAttributeIndex(attribute);
16535
+ let relationsMap;
16536
+ if (model instanceof FragmentsGroup) {
16537
+ relationsMap = this.relationMaps[model.uuid];
16538
+ } else if (typeof model === "string") {
16539
+ relationsMap = this.relationMaps[model];
16540
+ } else {
16541
+ relationsMap = model;
16477
16542
  }
16478
- const entityRelations = indexMap.get(expressID);
16479
- const attributeIndex = this.getAttributeIndex(relationName);
16480
- if (entityRelations === void 0 || attributeIndex === null) {
16481
- return null;
16543
+ if (!relationsMap && (model instanceof FragmentsGroup || typeof model === "string")) {
16544
+ relationsMap = /* @__PURE__ */ new Map();
16545
+ const id = model instanceof FragmentsGroup ? model.uuid : model;
16546
+ this.relationMaps[id] = relationsMap;
16547
+ }
16548
+ let entityRelations = relationsMap.get(expressID);
16549
+ if (!entityRelations) {
16550
+ entityRelations = /* @__PURE__ */ new Map();
16551
+ relationsMap.set(expressID, entityRelations);
16482
16552
  }
16483
- const relations = entityRelations.get(attributeIndex);
16553
+ let relations = entityRelations.get(index);
16484
16554
  if (!relations) {
16485
- return null;
16555
+ relations = [];
16556
+ entityRelations.set(index, relations);
16486
16557
  }
16487
16558
  return relations;
16488
16559
  }
@@ -16603,8 +16674,6 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16603
16674
  const set = /* @__PURE__ */ new Set();
16604
16675
  for (const [id, map] of relations) {
16605
16676
  const index = this.getAttributeIndex(inv);
16606
- if (index === null)
16607
- throw new Error("IfcRelationsIndexer: invalid inverse attribute name");
16608
16677
  const rels = map.get(index);
16609
16678
  if (rels && rels.includes(expressID))
16610
16679
  set.add(id);
@@ -16630,28 +16699,17 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16630
16699
  );
16631
16700
  if (!existingRelations) {
16632
16701
  const attributeIndex = this.getAttributeIndex(relationName);
16633
- if (!attributeIndex) {
16634
- throw new Error(
16635
- `IfcRelationsIndexer: ${relationName} is not a valid relation name.`
16636
- );
16637
- }
16638
16702
  const entityRelations = this.relationMaps[model.uuid].get(expressID);
16639
16703
  entityRelations == null ? void 0 : entityRelations.set(attributeIndex, relIDs);
16640
16704
  } else {
16641
16705
  existingRelations.push(...relIDs);
16642
16706
  }
16643
16707
  }
16644
- // removeEntitiesRelation(
16645
- // model: FragmentsGroup,
16646
- // relatingID: number,
16647
- // relationName: InverseAttribute,
16648
- // ...relatedIDs: number[]
16649
- // ) {}
16650
16708
  /**
16651
16709
  * Converts the relations made into actual IFC data.
16652
16710
  *
16653
16711
  * @remarks This function iterates through the changes made to the relations and applies them to the corresponding BIM model.
16654
- * It only make sense to use if the relations need to be write in the IFC file.
16712
+ * It only make sense to use it if the relations need to be write in the IFC file.
16655
16713
  *
16656
16714
  * @returns A promise that resolves when all the relation changes have been applied.
16657
16715
  */
@@ -16695,9 +16753,11 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16695
16753
  }
16696
16754
  addEntitiesRelation(model, relatingID, rel, ...relatedIDs) {
16697
16755
  const { type, inv } = rel;
16698
- const relationsMap = this.relationMaps[model.uuid];
16699
- if (!relationsMap)
16700
- return;
16756
+ let relationsMap = this.relationMaps[model.uuid];
16757
+ if (!relationsMap) {
16758
+ relationsMap = /* @__PURE__ */ new Map();
16759
+ this.relationMaps[model.uuid] = relationsMap;
16760
+ }
16701
16761
  if (!this._ifcRels.includes(type))
16702
16762
  return;
16703
16763
  const relInvAttrs = relToAttributesMap.get(type);
@@ -16743,35 +16803,11 @@ const _IfcRelationsIndexer = class _IfcRelationsIndexer extends Component {
16743
16803
  relatingData.related.add(...relatedExpressID);
16744
16804
  }
16745
16805
  for (const id of relatingExpressID) {
16746
- let currentMap = relationsMap.get(id);
16747
- if (!currentMap) {
16748
- currentMap = /* @__PURE__ */ new Map();
16749
- relationsMap.set(id, currentMap);
16750
- }
16751
- const index = this.getAttributeIndex(relating);
16752
- if (index !== null) {
16753
- let indexMap = currentMap.get(index);
16754
- if (!indexMap) {
16755
- indexMap = [];
16756
- currentMap.set(index, indexMap);
16757
- }
16758
- indexMap.push(...relatedExpressID);
16759
- }
16806
+ const indexMap = this.getEntityRelations(model, id, relating);
16807
+ indexMap.push(...relatedExpressID);
16760
16808
  }
16761
16809
  for (const id of relatedExpressID) {
16762
- let currentMap = relationsMap.get(id);
16763
- if (!currentMap) {
16764
- currentMap = /* @__PURE__ */ new Map();
16765
- relationsMap.set(id, currentMap);
16766
- }
16767
- const index = this.getAttributeIndex(related);
16768
- if (index === null)
16769
- continue;
16770
- let relations = currentMap.get(index);
16771
- if (!relations) {
16772
- relations = [];
16773
- currentMap.set(index, relations);
16774
- }
16810
+ const relations = this.getEntityRelations(model, id, related);
16775
16811
  relations.push(...relatingExpressID);
16776
16812
  }
16777
16813
  }
@@ -21520,9 +21556,9 @@ const _Topic = class _Topic {
21520
21556
  __publicField(this, "_type", _Topic.default.type);
21521
21557
  __publicField(this, "_status", _Topic.default.status);
21522
21558
  __publicField(this, "_priority", _Topic.default.priority);
21523
- __publicField(this, "_stage", _Topic.default.priority);
21559
+ __publicField(this, "_stage", _Topic.default.stage);
21524
21560
  __publicField(this, "_assignedTo", _Topic.default.assignedTo);
21525
- __publicField(this, "_labels", _Topic.default.labels);
21561
+ __publicField(this, "_labels", _Topic.default.labels ?? /* @__PURE__ */ new Set());
21526
21562
  __publicField(this, "_components");
21527
21563
  this._components = components;
21528
21564
  const manager = components.get(BCFTopics);
@@ -21848,8 +21884,7 @@ ${tags}
21848
21884
  __publicField(_Topic, "default", {
21849
21885
  title: "BCF Topic",
21850
21886
  type: "Issue",
21851
- status: "Active",
21852
- labels: /* @__PURE__ */ new Set()
21887
+ status: "Active"
21853
21888
  });
21854
21889
  let Topic = _Topic;
21855
21890
  const extensionsImporter = (manager, extensionsXML) => {
@@ -22109,8 +22144,9 @@ const _BCFTopics = class _BCFTopics extends Component {
22109
22144
  if (data) {
22110
22145
  topic.guid = data.guid ?? topic.guid;
22111
22146
  topic.set(data);
22147
+ } else {
22148
+ this.list.set(topic.guid, topic);
22112
22149
  }
22113
- this.list.set(topic.guid, topic);
22114
22150
  return topic;
22115
22151
  }
22116
22152
  /**
@@ -23000,6 +23036,84 @@ const _BoundingBoxer = class _BoundingBoxer extends Component {
23000
23036
  };
23001
23037
  __publicField(_BoundingBoxer, "uuid", "d1444724-dba6-4cdd-a0c7-68ee1450d166");
23002
23038
  let BoundingBoxer = _BoundingBoxer;
23039
+ const _IfcIsolator = class _IfcIsolator extends Component {
23040
+ constructor(components) {
23041
+ super(components);
23042
+ /** {@link Component.enabled} */
23043
+ __publicField(this, "enabled", true);
23044
+ components.add(_IfcIsolator.uuid, this);
23045
+ }
23046
+ async getIsolatedElements(webIfc, modelID, elementIDs) {
23047
+ const isolatedElementIDs = /* @__PURE__ */ new Set();
23048
+ function addElementAndReferences(elementID) {
23049
+ if (isolatedElementIDs.has(elementID))
23050
+ return;
23051
+ const element = webIfc.GetLine(modelID, elementID);
23052
+ if (!element)
23053
+ return;
23054
+ isolatedElementIDs.add(elementID);
23055
+ for (const prop in element) {
23056
+ const value = element[prop];
23057
+ if (value && value.constructor.name === "Handle" && value.value > 0) {
23058
+ addElementAndReferences(value.value);
23059
+ } else if (Array.isArray(value)) {
23060
+ value.forEach((refID) => {
23061
+ if (refID && refID.constructor.name === "Handle" && refID.value > 0) {
23062
+ addElementAndReferences(refID.value);
23063
+ }
23064
+ });
23065
+ }
23066
+ }
23067
+ }
23068
+ for (const elementID of elementIDs) {
23069
+ addElementAndReferences(elementID);
23070
+ }
23071
+ const arr = [];
23072
+ for (const elementID of isolatedElementIDs) {
23073
+ arr.push(elementID);
23074
+ }
23075
+ arr.sort((a, b) => {
23076
+ return a - b;
23077
+ });
23078
+ const isolatedElements = [];
23079
+ arr.forEach((elementID) => {
23080
+ const element = webIfc.GetLine(modelID, elementID);
23081
+ isolatedElements.push(element);
23082
+ });
23083
+ return isolatedElements;
23084
+ }
23085
+ /**
23086
+ * Exports isolated elements to the new model.
23087
+ * @param webIfc The instance of [web-ifc](https://github.com/ThatOpen/engine_web-ifc) to use.
23088
+ * @param modelID ID of the new IFC model.
23089
+ * @param isolatedElements The array of isolated elements
23090
+ */
23091
+ async export(webIfc, modelID, isolatedElements) {
23092
+ isolatedElements.forEach((element) => {
23093
+ webIfc.WriteLine(modelID, element);
23094
+ });
23095
+ const data = webIfc.SaveModel(modelID);
23096
+ return data;
23097
+ }
23098
+ async splitIfc(webIfc, ifcFile, idsToExtract) {
23099
+ const ifcBuffer = new Uint8Array(ifcFile);
23100
+ const modelID = webIfc.OpenModel(ifcBuffer);
23101
+ const isolated = await this.getIsolatedElements(
23102
+ webIfc,
23103
+ modelID,
23104
+ idsToExtract
23105
+ );
23106
+ const newModelID = webIfc.CreateModel({ schema: WEBIFC.Schemas.IFC2X3 });
23107
+ const data = await this.export(webIfc, newModelID, isolated);
23108
+ return data;
23109
+ }
23110
+ };
23111
+ /**
23112
+ * A unique identifier for the component.
23113
+ * This UUID is used to register the component within the Components system.
23114
+ */
23115
+ __publicField(_IfcIsolator, "uuid", "6eb0ba2f-71c0-464e-bcec-2d7c335186b2");
23116
+ let IfcIsolator = _IfcIsolator;
23003
23117
  const _IfcFinderQuery = class _IfcFinderQuery {
23004
23118
  constructor(components) {
23005
23119
  /**
@@ -23966,7 +24080,7 @@ const _Classifier = class _Classifier extends Component {
23966
24080
  `Classifier: model relations of ${model.name || model.uuid} have to exists to group by spatial structure.`
23967
24081
  );
23968
24082
  }
23969
- const systemName = "spatialStructures";
24083
+ const systemName = config.systemName ?? "spatialStructures";
23970
24084
  const noProps = config.useProperties === void 0;
23971
24085
  const useProperties = noProps || config.useProperties;
23972
24086
  for (const [expressID] of modelRelations) {
@@ -24091,19 +24205,18 @@ const _Classifier = class _Classifier extends Component {
24091
24205
  };
24092
24206
  }
24093
24207
  }
24094
- return JSON.stringify(exported);
24208
+ return exported;
24095
24209
  }
24096
24210
  /**
24097
24211
  * Imports a classification previously exported with .export().
24098
24212
  * @param data the serialized classification to import.
24099
24213
  */
24100
24214
  import(data) {
24101
- const imported = JSON.parse(data);
24102
- for (const systemName in imported) {
24215
+ for (const systemName in data) {
24103
24216
  if (!this.list[systemName]) {
24104
24217
  this.list[systemName] = {};
24105
24218
  }
24106
- const system = imported[systemName];
24219
+ const system = data[systemName];
24107
24220
  for (const groupName in system) {
24108
24221
  const group = system[groupName];
24109
24222
  this.list[systemName][groupName] = {
@@ -24667,16 +24780,27 @@ const _IfcGeometryTiler = class _IfcGeometryTiler extends Component {
24667
24780
  this._assets = [];
24668
24781
  }
24669
24782
  async streamGeometries() {
24670
- let buffer = this._streamSerializer.export(this._geometries);
24783
+ const exportMap = /* @__PURE__ */ new Map();
24784
+ for (const [id, value] of this._geometries) {
24785
+ exportMap.set(id, value);
24786
+ if (exportMap.size > this.settings.minGeometrySize) {
24787
+ await this.outputGeometries(exportMap);
24788
+ }
24789
+ }
24790
+ await this.outputGeometries(exportMap);
24791
+ this._geometries.clear();
24792
+ this._geometryCount = 0;
24793
+ }
24794
+ async outputGeometries(exportMap) {
24795
+ let buffer = this._streamSerializer.export(exportMap);
24671
24796
  let data = {};
24672
- for (const [id, { boundingBox: boundingBox2, hasHoles }] of this._geometries) {
24797
+ for (const [id, { boundingBox: boundingBox2, hasHoles }] of exportMap) {
24673
24798
  data[id] = { boundingBox: boundingBox2, hasHoles };
24674
24799
  }
24675
24800
  await this.onGeometryStreamed.trigger({ data, buffer });
24676
24801
  data = null;
24677
24802
  buffer = null;
24678
- this._geometries.clear();
24679
- this._geometryCount = 0;
24803
+ exportMap.clear();
24680
24804
  }
24681
24805
  registerGeometryData(group, itemID, geometry, asset, geometryID, transpGeometryID) {
24682
24806
  const geometryData = this._visitedGeometries.get(transpGeometryID);
@@ -25106,8 +25230,8 @@ class Viewpoint {
25106
25230
  *
25107
25231
  * @returns A Promise that resolves when the camera has been set.
25108
25232
  */
25109
- async go(transition = true) {
25110
- const { camera } = this.world;
25233
+ async go(world, transition = true) {
25234
+ const { camera } = world ?? this.world;
25111
25235
  if (!camera.hasCameraControls()) {
25112
25236
  throw new Error(
25113
25237
  "Viewpoint: the world's camera need controls to set the viewpoint."
@@ -25171,8 +25295,8 @@ class Viewpoint {
25171
25295
  * @throws An error if the world's camera does not have camera controls.
25172
25296
  * @throws An error if the world's renderer is not available.
25173
25297
  */
25174
- updateCamera() {
25175
- const { camera, renderer } = this.world;
25298
+ updateCamera(world) {
25299
+ const { camera, renderer } = world ?? this.world;
25176
25300
  if (!renderer) {
25177
25301
  throw new Error("Viewpoint: the world needs to have a renderer!");
25178
25302
  }
@@ -26249,21 +26373,17 @@ class IDSFacet {
26249
26373
  this.addCheckResult(checkLog, checks);
26250
26374
  let pass = false;
26251
26375
  if (facetParameter.type === "simple") {
26252
- const parameter2 = facetParameter.parameter;
26253
- pass = value === parameter2;
26376
+ pass = value === facetParameter.parameter;
26254
26377
  }
26255
26378
  if (facetParameter.type === "enumeration") {
26256
- const parameter2 = facetParameter.parameter;
26257
- pass = parameter2.includes(value);
26379
+ pass = facetParameter.parameter.includes(value);
26258
26380
  }
26259
26381
  if (facetParameter.type === "pattern") {
26260
- const parameter2 = facetParameter.parameter;
26261
- const regex = new RegExp(parameter2);
26382
+ const regex = new RegExp(facetParameter.parameter);
26262
26383
  pass = regex.test(String(value));
26263
26384
  }
26264
26385
  if (facetParameter.type === "length") {
26265
- const parameter2 = facetParameter.parameter;
26266
- const { min, length, max } = parameter2;
26386
+ const { min, length, max } = facetParameter.parameter;
26267
26387
  if (length !== void 0) {
26268
26388
  pass = String(value).length === length;
26269
26389
  }
@@ -26347,6 +26467,7 @@ const getParameterXML = (name, parameter) => {
26347
26467
  class IDSAttribute extends IDSFacet {
26348
26468
  constructor(components, name) {
26349
26469
  super(components);
26470
+ __publicField(this, "facetType", "Attribute");
26350
26471
  __publicField(this, "name");
26351
26472
  __publicField(this, "value");
26352
26473
  this.name = name;
@@ -26483,6 +26604,7 @@ class IDSAttribute extends IDSFacet {
26483
26604
  class IDSClassification extends IDSFacet {
26484
26605
  constructor(components, system) {
26485
26606
  super(components);
26607
+ __publicField(this, "facetType", "Classification");
26486
26608
  __publicField(this, "system");
26487
26609
  __publicField(this, "value");
26488
26610
  __publicField(this, "uri");
@@ -26765,6 +26887,7 @@ class IDSClassification extends IDSFacet {
26765
26887
  class IDSEntity extends IDSFacet {
26766
26888
  constructor(components, name) {
26767
26889
  super(components);
26890
+ __publicField(this, "facetType", "Entity");
26768
26891
  __publicField(this, "name");
26769
26892
  __publicField(this, "predefinedType");
26770
26893
  this.name = name;
@@ -26893,11 +27016,13 @@ class IDSEntity extends IDSFacet {
26893
27016
  class IDSProperty extends IDSFacet {
26894
27017
  constructor(components, propertySet, baseName) {
26895
27018
  super(components);
27019
+ __publicField(this, "facetType", "Property");
26896
27020
  __publicField(this, "propertySet");
26897
27021
  __publicField(this, "baseName");
26898
27022
  __publicField(this, "value");
26899
27023
  __publicField(this, "dataType");
26900
27024
  __publicField(this, "uri");
27025
+ // These are defined by the IDS specification
26901
27026
  __publicField(this, "_unsupportedTypes", [
26902
27027
  WEBIFC.IFCCOMPLEXPROPERTY,
26903
27028
  WEBIFC.IFCPHYSICALCOMPLEXQUANTITY
@@ -27093,10 +27218,43 @@ class IDSProperty extends IDSFacet {
27093
27218
  (name) => name.endsWith("Value") || name.endsWith("Values")
27094
27219
  );
27095
27220
  }
27096
- // IFCPROPERTYSET from type must be get as well
27097
- async getPsets(model, expressID) {
27221
+ async getPsetProps(model, attrs, propsListName) {
27222
+ const attrsClone = structuredClone(attrs);
27223
+ const props = [];
27224
+ const list = attrsClone[propsListName];
27225
+ if (!list)
27226
+ return props;
27227
+ for (const { value } of list) {
27228
+ const propAttrs = await model.getProperties(value);
27229
+ if (propAttrs)
27230
+ props.push(propAttrs);
27231
+ }
27232
+ attrsClone[propsListName] = props;
27233
+ return attrsClone;
27234
+ }
27235
+ async getTypePsets(model, expressID) {
27098
27236
  const sets = [];
27099
27237
  const indexer = this.components.get(IfcRelationsIndexer);
27238
+ const types = indexer.getEntityRelations(model, expressID, "IsTypedBy");
27239
+ if (!(types && types[0]))
27240
+ return sets;
27241
+ const typeAttrs = await model.getProperties(types[0]);
27242
+ if (!(typeAttrs && "HasPropertySets" in typeAttrs && Array.isArray(typeAttrs.HasPropertySets))) {
27243
+ return sets;
27244
+ }
27245
+ for (const { value } of typeAttrs.HasPropertySets) {
27246
+ const psetAttrs = await model.getProperties(value);
27247
+ if (!(psetAttrs && "HasProperties" in psetAttrs && Array.isArray(psetAttrs.HasProperties))) {
27248
+ continue;
27249
+ }
27250
+ const pset = await this.getPsetProps(model, psetAttrs, "HasProperties");
27251
+ sets.push(pset);
27252
+ }
27253
+ return sets;
27254
+ }
27255
+ async getPsets(model, expressID) {
27256
+ const sets = await this.getTypePsets(model, expressID);
27257
+ const indexer = this.components.get(IfcRelationsIndexer);
27100
27258
  const definitions = indexer.getEntityRelations(
27101
27259
  model,
27102
27260
  expressID,
@@ -27111,15 +27269,8 @@ class IDSProperty extends IDSFacet {
27111
27269
  const propsListName = this.getItemsAttrName(attrs.type);
27112
27270
  if (!propsListName)
27113
27271
  continue;
27114
- const attrsClone = structuredClone(attrs);
27115
- const props = [];
27116
- for (const { value } of attrsClone[propsListName]) {
27117
- const propAttrs = await model.getProperties(value);
27118
- if (propAttrs)
27119
- props.push(propAttrs);
27120
- }
27121
- attrsClone[propsListName] = props;
27122
- sets.push(attrsClone);
27272
+ const pset = await this.getPsetProps(model, attrs, propsListName);
27273
+ sets.push(pset);
27123
27274
  }
27124
27275
  return sets;
27125
27276
  }
@@ -27128,8 +27279,9 @@ class IDSProperty extends IDSFacet {
27128
27279
  // Work must to be done to convert numerical value units to IDS-nominated standard units https://github.com/buildingSMART/IDS/blob/development/Documentation/UserManual/units.md
27129
27280
  evalValue(attrs, checks) {
27130
27281
  const valueKey = this.getValueKey(attrs);
27282
+ const valueAttr = attrs[valueKey];
27131
27283
  if (this.value) {
27132
- if (!valueKey) {
27284
+ if (!valueAttr) {
27133
27285
  checks == null ? void 0 : checks.push({
27134
27286
  parameter: "Value",
27135
27287
  currentValue: null,
@@ -27138,17 +27290,16 @@ class IDSProperty extends IDSFacet {
27138
27290
  });
27139
27291
  return false;
27140
27292
  }
27141
- const valueAttr = attrs[valueKey];
27142
27293
  const facetValue = structuredClone(this.value);
27143
27294
  if (valueAttr.name === "IFCLABEL" && facetValue.type === "simple") {
27144
27295
  facetValue.parameter = String(facetValue.parameter);
27145
27296
  }
27146
27297
  if ((attrs.type === WEBIFC.IFCPROPERTYLISTVALUE || attrs.type === WEBIFC.IFCPROPERTYENUMERATEDVALUE) && Array.isArray(valueAttr)) {
27147
- const values = valueAttr.map((value2) => value2.value);
27148
- const matchingValue = valueAttr.find((value2) => {
27298
+ const values = valueAttr.map((value) => value.value);
27299
+ const matchingValue = valueAttr.find((value) => {
27149
27300
  if (!facetValue)
27150
27301
  return false;
27151
- return this.evalRequirement(value2.value, facetValue, "Value");
27302
+ return this.evalRequirement(value.value, facetValue, "Value");
27152
27303
  });
27153
27304
  checks == null ? void 0 : checks.push({
27154
27305
  currentValue: values,
@@ -27168,8 +27319,7 @@ class IDSProperty extends IDSFacet {
27168
27319
  }
27169
27320
  if (!valueKey)
27170
27321
  return true;
27171
- const value = attrs[valueKey];
27172
- if (value.type === 3 && value.value === 2) {
27322
+ if (valueAttr.type === 3 && valueAttr.value === 2) {
27173
27323
  checks == null ? void 0 : checks.push({
27174
27324
  parameter: "Value",
27175
27325
  currentValue: null,
@@ -27178,7 +27328,7 @@ class IDSProperty extends IDSFacet {
27178
27328
  });
27179
27329
  return false;
27180
27330
  }
27181
- if (value.type === 1 && value.value.trim() === "") {
27331
+ if (valueAttr.type === 1 && valueAttr.value.trim() === "") {
27182
27332
  checks == null ? void 0 : checks.push({
27183
27333
  parameter: "Value",
27184
27334
  currentValue: "",
@@ -27194,6 +27344,15 @@ class IDSProperty extends IDSFacet {
27194
27344
  return true;
27195
27345
  const valueKey = this.getValueKey(attrs);
27196
27346
  const valueAttr = attrs[valueKey];
27347
+ if (!valueAttr) {
27348
+ checks == null ? void 0 : checks.push({
27349
+ parameter: "DataType",
27350
+ currentValue: null,
27351
+ pass: false,
27352
+ requiredValue: this.dataType
27353
+ });
27354
+ return false;
27355
+ }
27197
27356
  if ((attrs.type === WEBIFC.IFCPROPERTYLISTVALUE || attrs.type === WEBIFC.IFCPROPERTYENUMERATEDVALUE) && Array.isArray(valueAttr) && valueAttr[0]) {
27198
27357
  const valueType = valueAttr[0].name;
27199
27358
  const result2 = this.evalRequirement(
@@ -27239,6 +27398,20 @@ class IDSSpecification {
27239
27398
  this.ifcVersion.add(version);
27240
27399
  }
27241
27400
  }
27401
+ set(data) {
27402
+ const _data = data;
27403
+ const _this = this;
27404
+ for (const key in data) {
27405
+ if (key === "identifier")
27406
+ continue;
27407
+ const value = _data[key];
27408
+ if (key in this)
27409
+ _this[key] = value;
27410
+ }
27411
+ const manager = this.components.get(IDSSpecifications);
27412
+ manager.list.set(this.identifier, this);
27413
+ return this;
27414
+ }
27242
27415
  /**
27243
27416
  * Tests the model to test against the specification's requirements.
27244
27417
  *
@@ -27284,8 +27457,9 @@ class IDSSpecification {
27284
27457
  const getParameterValue = (property) => {
27285
27458
  if (!property)
27286
27459
  return void 0;
27287
- const result = { type: "simple" };
27460
+ const result = {};
27288
27461
  if ("simpleValue" in property) {
27462
+ result.type = "simple";
27289
27463
  result.parameter = property.simpleValue;
27290
27464
  }
27291
27465
  if ("restriction" in property) {
@@ -27577,6 +27751,7 @@ export {
27577
27751
  Components,
27578
27752
  ConfigManager,
27579
27753
  Configurator,
27754
+ ControlsUtils,
27580
27755
  CullerRenderer,
27581
27756
  Cullers,
27582
27757
  DataMap,
@@ -27605,6 +27780,7 @@ export {
27605
27780
  IfcFinderQuery,
27606
27781
  IfcFragmentSettings,
27607
27782
  IfcGeometryTiler,
27783
+ IfcIsolator,
27608
27784
  IfcJsonExporter,
27609
27785
  IfcLoader,
27610
27786
  IfcPropertiesManager,