@thatopen/components 2.1.5 → 2.1.6
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/IfcPropertiesManager/index.d.ts +5 -5
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +14 -2
- package/dist/index.cjs +5 -5
- package/dist/index.mjs +609 -565
- package/dist/namespace.d.ts +1482 -1470
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@ export declare class Components implements Disposable {
|
|
|
6
6
|
/**
|
|
7
7
|
* The version of the @thatopen/components library.
|
|
8
8
|
*/
|
|
9
|
-
static readonly release = "2.1.
|
|
9
|
+
static readonly release = "2.1.6";
|
|
10
10
|
/** {@link Disposable.onDisposed} */
|
|
11
11
|
readonly onDisposed: Event<void>;
|
|
12
12
|
/**
|
|
@@ -118,7 +118,7 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
|
|
|
118
118
|
* Each object must have an `expressID` property, which is the express ID of the entity in the model.
|
|
119
119
|
* The rest of the properties will be set as the properties of the entity.
|
|
120
120
|
*
|
|
121
|
-
* @returns
|
|
121
|
+
* @returns A promise that resolves when all the properties have been set.
|
|
122
122
|
*
|
|
123
123
|
* @throws Will throw an error if any of the `expressID` properties are missing in the `dataToSave` array.
|
|
124
124
|
*/
|
|
@@ -145,7 +145,7 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
|
|
|
145
145
|
* @param model - The FragmentsGroup model from which to remove the Pset.
|
|
146
146
|
* @param psetID - The express IDs of the Psets to be removed.
|
|
147
147
|
*
|
|
148
|
-
* @returns
|
|
148
|
+
* @returns A promise that resolves when all the Psets have been removed.
|
|
149
149
|
*
|
|
150
150
|
* @throws Will throw an error if any of the `expressID` properties are missing in the `psetID` array.
|
|
151
151
|
* @throws Will throw an error if the Pset to be removed is not of type `IFCPROPERTYSET`.
|
|
@@ -201,13 +201,13 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
|
|
|
201
201
|
* @param psetID - The express ID of the Pset from which to remove the property.
|
|
202
202
|
* @param propID - The express ID of the property to be removed.
|
|
203
203
|
*
|
|
204
|
-
* @returns
|
|
204
|
+
* @returns A promise that resolves when the property has been removed.
|
|
205
205
|
*
|
|
206
206
|
* @throws Will throw an error if the Pset or the property to be removed are not found in the model.
|
|
207
207
|
* @throws Will throw an error if the Pset to be removed is not of type `IFCPROPERTYSET`.
|
|
208
208
|
*/
|
|
209
209
|
removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
|
|
210
|
-
addElementToPset(model: FragmentsGroup, psetID: number, ...
|
|
210
|
+
addElementToPset(model: FragmentsGroup, psetID: number, ...expressIDs: number[]): Promise<void>;
|
|
211
211
|
/**
|
|
212
212
|
* Adds elements to a Property Set (Pset) in the given model.
|
|
213
213
|
*
|
|
@@ -215,7 +215,7 @@ export declare class IfcPropertiesManager extends Component implements Disposabl
|
|
|
215
215
|
* @param psetID - The express ID of the Pset to which to add the elements.
|
|
216
216
|
* @param elementID - The express IDs of the elements to be added.
|
|
217
217
|
*
|
|
218
|
-
* @returns
|
|
218
|
+
* @returns A promise that resolves when all the elements have been added.
|
|
219
219
|
*
|
|
220
220
|
* @throws Will throw an error if the Pset or the elements to be added are not found in the model.
|
|
221
221
|
* @throws Will throw an error if the Pset to be added to is not of type `IFCPROPERTYSET`.
|
|
@@ -43,6 +43,7 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
43
43
|
constructor(components: Components);
|
|
44
44
|
private onFragmentsDisposed;
|
|
45
45
|
private indexRelations;
|
|
46
|
+
private getAttributeIndex;
|
|
46
47
|
/**
|
|
47
48
|
* Adds a relation map to the model's relations map.
|
|
48
49
|
*
|
|
@@ -138,14 +139,25 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
138
139
|
getRelationsMapFromJSON(json: string): RelationsMap;
|
|
139
140
|
/** {@link Disposable.dispose} */
|
|
140
141
|
dispose(): void;
|
|
142
|
+
/**
|
|
143
|
+
* Adds relations between an entity and other entities in a BIM model.
|
|
144
|
+
*
|
|
145
|
+
* @param model - The BIM model to which the relations will be added.
|
|
146
|
+
* @param expressID - The expressID of the entity within the model.
|
|
147
|
+
* @param relationName - The IFC schema inverse attribute of the relation to add (e.g., "IsDefinedBy", "ContainsElements").
|
|
148
|
+
* @param relIDs - The expressIDs of the related entities within the model.
|
|
149
|
+
*
|
|
150
|
+
* @throws An error if the relation name is not a valid relation name.
|
|
151
|
+
*/
|
|
152
|
+
addEntityRelations(model: FragmentsGroup, expressID: number, relationName: InverseAttribute, ...relIDs: number[]): void;
|
|
141
153
|
/**
|
|
142
154
|
* Gets the children of the given element recursively. E.g. in a model with project - site - building - storeys - rooms, passing a storey will include all its children and the children of the rooms contained in it.
|
|
143
155
|
*
|
|
144
156
|
* @param model The BIM model whose children to get.
|
|
145
|
-
* @param
|
|
157
|
+
* @param expressID The expressID of the item whose children to get.
|
|
146
158
|
* @param found An optional parameter that includes a set of expressIDs where the found element IDs will be added.
|
|
147
159
|
*
|
|
148
160
|
* @returns A `Set` with the expressIDs of the found items.
|
|
149
161
|
*/
|
|
150
|
-
|
|
162
|
+
getEntityChildren(model: FragmentsGroup, expressID: number, found?: Set<number>): Set<number>;
|
|
151
163
|
}
|