@thatopen/components 2.1.5 → 2.1.7

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.
@@ -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.5";
9
+ static readonly release = "2.1.7";
10
10
  /** {@link Disposable.onDisposed} */
11
11
  readonly onDisposed: Event<void>;
12
12
  /**
@@ -108,4 +108,19 @@ export declare class FragmentsManager extends Component implements Disposable {
108
108
  * If not provided, all models are used.
109
109
  */
110
110
  coordinate(models?: FragmentsGroup[]): void;
111
+ /**
112
+ * Applies the base coordinate system to the provided object.
113
+ *
114
+ * This function takes an object and its original coordinate system as input.
115
+ * It then inverts the original coordinate system and applies the base coordinate system
116
+ * to the object. This ensures that the object's position, rotation, and scale are
117
+ * transformed to match the base coordinate system (which is taken from the first model loaded).
118
+ *
119
+ * @param object - The object to which the base coordinate system will be applied.
120
+ * This should be an instance of THREE.Object3D.
121
+ *
122
+ * @param originalCoordinateSystem - The original coordinate system of the object.
123
+ * This should be a THREE.Matrix4 representing the object's transformation matrix.
124
+ */
125
+ applyBaseCoordinateSystem(object: THREE.Object3D, originalCoordinateSystem: THREE.Matrix4): void;
111
126
  }
@@ -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 {Promise<void>} A promise that resolves when all the properties have been set.
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 {Promise<void>} A promise that resolves when all the Psets have been removed.
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 {Promise<void>} A promise that resolves when the property has been removed.
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, ...elementID: number[]): Promise<void>;
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 {Promise<void>} A promise that resolves when all the elements have been added.
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 id The expressID of the item whose children to get.
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
- getElementsChildren(model: FragmentsGroup, id: number, found?: Set<number>): Set<number>;
162
+ getEntityChildren(model: FragmentsGroup, expressID: number, found?: Set<number>): Set<number>;
151
163
  }