@thatopen/components 2.1.18 → 2.1.20

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/dist/index.mjs CHANGED
@@ -3083,7 +3083,7 @@ const Fs = class Fs {
3083
3083
  /**
3084
3084
  * The version of the @thatopen/components library.
3085
3085
  */
3086
- I(Fs, "release", "2.1.18");
3086
+ I(Fs, "release", "2.1.20");
3087
3087
  let pi = Fs;
3088
3088
  class Fr {
3089
3089
  constructor(s) {
@@ -6985,29 +6985,29 @@ const Qr = /* @__PURE__ */ new Map([
6985
6985
  [
6986
6986
  U.IFCRELAGGREGATES,
6987
6987
  {
6988
- forRelating: "IsDecomposedBy",
6989
- forRelated: "Decomposes"
6988
+ forRelated: "Decomposes",
6989
+ forRelating: "IsDecomposedBy"
6990
6990
  }
6991
6991
  ],
6992
6992
  [
6993
6993
  U.IFCRELASSOCIATESMATERIAL,
6994
6994
  {
6995
- forRelating: "AssociatedTo",
6996
- forRelated: "HasAssociations"
6995
+ forRelated: "HasAssociations",
6996
+ forRelating: "AssociatedTo"
6997
6997
  }
6998
6998
  ],
6999
6999
  [
7000
7000
  U.IFCRELASSOCIATESCLASSIFICATION,
7001
7001
  {
7002
- forRelating: "ClassificationForObjects",
7003
- forRelated: "HasAssociations"
7002
+ forRelated: "HasAssociations",
7003
+ forRelating: "ClassificationForObjects"
7004
7004
  }
7005
7005
  ],
7006
7006
  [
7007
7007
  U.IFCRELASSIGNSTOGROUP,
7008
7008
  {
7009
- forRelating: "IsGroupedBy",
7010
- forRelated: "HasAssignments"
7009
+ forRelated: "HasAssignments",
7010
+ forRelating: "IsGroupedBy"
7011
7011
  }
7012
7012
  ],
7013
7013
  [
@@ -7051,6 +7051,13 @@ const Qr = /* @__PURE__ */ new Map([
7051
7051
  forRelated: "ConnectedFrom",
7052
7052
  forRelating: "ConnectedTo"
7053
7053
  }
7054
+ ],
7055
+ [
7056
+ U.IFCRELASSIGNSTOPRODUCT,
7057
+ {
7058
+ forRelated: "HasAssignments",
7059
+ forRelating: "ReferencedBy"
7060
+ }
7054
7061
  ]
7055
7062
  ]), Ve = class Ve extends et {
7056
7063
  constructor(t) {
@@ -7096,7 +7103,8 @@ const Qr = /* @__PURE__ */ new Map([
7096
7103
  "HasControlElements",
7097
7104
  "AssignedToFlowElement",
7098
7105
  "ConnectedTo",
7099
- "ConnectedFrom"
7106
+ "ConnectedFrom",
7107
+ "ReferencedBy"
7100
7108
  ]);
7101
7109
  I(this, "_ifcRels", [
7102
7110
  U.IFCRELAGGREGATES,
@@ -7108,7 +7116,8 @@ const Qr = /* @__PURE__ */ new Map([
7108
7116
  U.IFCRELDEFINESBYTEMPLATE,
7109
7117
  U.IFCRELCONTAINEDINSPATIALSTRUCTURE,
7110
7118
  U.IFCRELFLOWCONTROLELEMENTS,
7111
- U.IFCRELCONNECTSELEMENTS
7119
+ U.IFCRELCONNECTSELEMENTS,
7120
+ U.IFCRELASSIGNSTOPRODUCT
7112
7121
  ]);
7113
7122
  I(this, "onFragmentsDisposed", (t) => {
7114
7123
  delete this.relationMaps[t.groupID];
@@ -9596,6 +9605,8 @@ class Pi {
9596
9605
  });
9597
9606
  /** List of categories that won't be converted to fragments. */
9598
9607
  I(this, "excludedCategories", /* @__PURE__ */ new Set());
9608
+ /** Exclusive list of categories that will be converted to fragments. If this contains any category, any other categories will be ignored. */
9609
+ I(this, "includedCategories", /* @__PURE__ */ new Set());
9599
9610
  /** Whether to save the absolute location of all IFC items. */
9600
9611
  I(this, "saveLocations", !1);
9601
9612
  /** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
@@ -9842,7 +9853,7 @@ const Ge = class Ge extends et {
9842
9853
  */
9843
9854
  async readIfcFile(t) {
9844
9855
  const { path: e, absolute: i, logLevel: o } = this.settings.wasm;
9845
- return this.webIfc.SetWasmPath(e, i), await this.webIfc.Init(), o && this.webIfc.SetLogLevel(o), this.webIfc.OpenModel(t, this.settings.webIfc);
9856
+ return this.webIfc.SetWasmPath(e, i), await this.webIfc.Init(this.settings.customLocateFileHandler || void 0), o && this.webIfc.SetLogLevel(o), this.webIfc.OpenModel(t, this.settings.webIfc);
9846
9857
  }
9847
9858
  /**
9848
9859
  * Cleans up the IfcLoader component by resetting the Web-IFC library,
@@ -9873,14 +9884,19 @@ const Ge = class Ge extends et {
9873
9884
  };
9874
9885
  const i = [];
9875
9886
  for (const n of t) {
9876
- if (!this.webIfc.IsIfcElement(n) && n !== U.IFCSPACE || this.settings.excludedCategories.has(n))
9887
+ if (!this.webIfc.IsIfcElement(n) && n !== U.IFCSPACE)
9877
9888
  continue;
9878
- const r = this.webIfc.GetLineIDsWithType(0, n), a = r.size();
9879
- for (let c = 0; c < a; c++) {
9880
- const h = r.get(c);
9881
- i.push(h);
9882
- const d = this._spatialTree.itemsByFloor[h] || 0;
9883
- e.data.set(h, [[], [d, n]]);
9889
+ const r = this.settings.includedCategories;
9890
+ if (r.size > 0 && !r.has(n))
9891
+ continue;
9892
+ if (this.settings.excludedCategories.has(n))
9893
+ continue;
9894
+ const a = this.webIfc.GetLineIDsWithType(0, n), c = a.size();
9895
+ for (let h = 0; h < c; h++) {
9896
+ const d = a.get(h);
9897
+ i.push(d);
9898
+ const E = this._spatialTree.itemsByFloor[d] || 0;
9899
+ e.data.set(d, [[], [E, n]]);
9884
9900
  }
9885
9901
  }
9886
9902
  this._spatialTree.cleanUp(), this.webIfc.StreamMeshes(0, i, (n) => {