@thatopen/components 2.1.26 → 2.1.27
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/core/Components/index.d.ts +1 -1
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +12 -0
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +28 -1
- package/dist/namespace.d.ts +1482 -1470
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3091,7 +3091,7 @@ const As = class As {
|
|
|
3091
3091
|
/**
|
|
3092
3092
|
* The version of the @thatopen/components library.
|
|
3093
3093
|
*/
|
|
3094
|
-
u(As, "release", "2.1.
|
|
3094
|
+
u(As, "release", "2.1.27");
|
|
3095
3095
|
let pi = As;
|
|
3096
3096
|
class gr extends _i {
|
|
3097
3097
|
constructor() {
|
|
@@ -7666,6 +7666,33 @@ const qr = /* @__PURE__ */ new Map([
|
|
|
7666
7666
|
dispose() {
|
|
7667
7667
|
this.relationMaps = {}, this.components.get(ht).onFragmentsDisposed.remove(this.onFragmentsDisposed), this.onDisposed.trigger(Ve.uuid), this.onDisposed.reset();
|
|
7668
7668
|
}
|
|
7669
|
+
/**
|
|
7670
|
+
* Retrieves the entities within a given model that have a specific relation with a given entity.
|
|
7671
|
+
*
|
|
7672
|
+
* @param model - The BIM model to search for related entities.
|
|
7673
|
+
* @param inv - The IFC schema inverse attribute of the relation to search for (e.g., "IsDefinedBy", "ContainsElements").
|
|
7674
|
+
* @param expressID - The expressID of the entity within the model.
|
|
7675
|
+
*
|
|
7676
|
+
* @returns A `Set` with the expressIDs of the entities that have the specified relation with the given entity.
|
|
7677
|
+
*
|
|
7678
|
+
* @throws An error if the model relations are not indexed or if the inverse attribute name is invalid.
|
|
7679
|
+
*/
|
|
7680
|
+
getEntitiesWithRelation(t, e, i) {
|
|
7681
|
+
const o = this.relationMaps[t.uuid];
|
|
7682
|
+
if (!o)
|
|
7683
|
+
throw new Error(
|
|
7684
|
+
"IfcRelationsIndexer: the model relations are not indexed!"
|
|
7685
|
+
);
|
|
7686
|
+
const n = /* @__PURE__ */ new Set();
|
|
7687
|
+
for (const [r, a] of o) {
|
|
7688
|
+
const c = this.getAttributeIndex(e);
|
|
7689
|
+
if (c === null)
|
|
7690
|
+
throw new Error("IfcRelationsIndexer: invalid inverse attribute name");
|
|
7691
|
+
const h = a.get(c);
|
|
7692
|
+
h && h.includes(i) && n.add(r);
|
|
7693
|
+
}
|
|
7694
|
+
return n;
|
|
7695
|
+
}
|
|
7669
7696
|
/**
|
|
7670
7697
|
* Adds relations between an entity and other entities in a BIM model.
|
|
7671
7698
|
*
|