@thatopen/components 2.1.1 → 2.1.3
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/Clipper/index.d.ts +7 -3
- package/dist/core/Clipper/src/simple-plane.d.ts +2 -0
- package/dist/core/Components/index.d.ts +1 -1
- package/dist/fragments/Classifier/index.d.ts +12 -5
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +10 -0
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +403 -359
- package/dist/namespace.d.ts +1364 -1341
- package/package.json +3 -3
|
@@ -94,7 +94,7 @@ export declare class Clipper extends Component implements Createable, Disposable
|
|
|
94
94
|
/** {@link Disposable.dispose} */
|
|
95
95
|
dispose(): void;
|
|
96
96
|
/** {@link Createable.create} */
|
|
97
|
-
create(world: World):
|
|
97
|
+
create(world: World): SimplePlane | null;
|
|
98
98
|
/**
|
|
99
99
|
* Creates a plane in a certain place and with a certain orientation,
|
|
100
100
|
* without the need of the mouse.
|
|
@@ -113,8 +113,12 @@ export declare class Clipper extends Component implements Createable, Disposable
|
|
|
113
113
|
* found under the cursor will be deleted.
|
|
114
114
|
*/
|
|
115
115
|
delete(world: World, plane?: SimplePlane): void;
|
|
116
|
-
/**
|
|
117
|
-
|
|
116
|
+
/**
|
|
117
|
+
* Deletes all the existing clipping planes.
|
|
118
|
+
*
|
|
119
|
+
* @param types - the types of planes to be deleted. If not provided, all planes will be deleted.
|
|
120
|
+
*/
|
|
121
|
+
deleteAll(types?: Set<string>): void;
|
|
118
122
|
private deletePlane;
|
|
119
123
|
private pickPlane;
|
|
120
124
|
private getAllPlaneMeshes;
|
|
@@ -27,6 +27,8 @@ export declare class SimplePlane implements Disposable, Hideable {
|
|
|
27
27
|
components: Components;
|
|
28
28
|
/** The world instance to which this plane belongs. */
|
|
29
29
|
world: World;
|
|
30
|
+
/** A custom string to identify what this plane is used for. */
|
|
31
|
+
type: string;
|
|
30
32
|
protected readonly _helper: THREE.Object3D;
|
|
31
33
|
protected _visible: boolean;
|
|
32
34
|
protected _enabled: boolean;
|
|
@@ -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.3";
|
|
10
10
|
/** {@link Disposable.onDisposed} */
|
|
11
11
|
readonly onDisposed: Event<void>;
|
|
12
12
|
/**
|
|
@@ -2,7 +2,7 @@ import * as THREE from "three";
|
|
|
2
2
|
import * as FRAGS from "@thatopen/fragments";
|
|
3
3
|
import { Disposable, Component, Event, Components } from "../../core";
|
|
4
4
|
/**
|
|
5
|
-
* Interface representing a classification system. The classification is organized by system and class name, and each class contains a map of fragment IDs
|
|
5
|
+
* Interface representing a classification system. The classification is organized by system and class name, and each class contains a map of fragment IDs with extra information.
|
|
6
6
|
*/
|
|
7
7
|
export interface Classification {
|
|
8
8
|
/**
|
|
@@ -12,9 +12,13 @@ export interface Classification {
|
|
|
12
12
|
[system: string]: {
|
|
13
13
|
/**
|
|
14
14
|
* A class within the system.
|
|
15
|
-
* The key is the class name, and the value is a map of fragment IDs
|
|
15
|
+
* The key is the class name, and the value is an object containing a map of fragment IDs with extra information.
|
|
16
16
|
*/
|
|
17
|
-
[className: string]:
|
|
17
|
+
[className: string]: {
|
|
18
|
+
map: FRAGS.FragmentIdMap;
|
|
19
|
+
name: string;
|
|
20
|
+
id: number | null;
|
|
21
|
+
};
|
|
18
22
|
};
|
|
19
23
|
}
|
|
20
24
|
/**
|
|
@@ -124,6 +128,7 @@ export declare class Classifier extends Component implements Disposable {
|
|
|
124
128
|
* Classifies fragments based on their spatial structure in the IFC model.
|
|
125
129
|
*
|
|
126
130
|
* @param model - The FragmentsGroup containing the fragments to be classified.
|
|
131
|
+
* @param config - The configuration for the classifier. It includes "useProperties" (if false, the classification will use the expressIDs instead of the names)
|
|
127
132
|
*
|
|
128
133
|
* @remarks
|
|
129
134
|
* This method iterates through the relations of the fragments in the provided group,
|
|
@@ -133,7 +138,9 @@ export declare class Classifier extends Component implements Disposable {
|
|
|
133
138
|
*
|
|
134
139
|
* @throws Will throw an error if the fragment ID is not found or if the model relations do not exist.
|
|
135
140
|
*/
|
|
136
|
-
bySpatialStructure(model: FRAGS.FragmentsGroup
|
|
141
|
+
bySpatialStructure(model: FRAGS.FragmentsGroup, config?: {
|
|
142
|
+
useProperties: boolean;
|
|
143
|
+
}): Promise<void>;
|
|
137
144
|
/**
|
|
138
145
|
* Sets the color of the specified fragments.
|
|
139
146
|
*
|
|
@@ -160,5 +167,5 @@ export declare class Classifier extends Component implements Disposable {
|
|
|
160
167
|
* @throws Will throw an error if the fragment with the specified ID is not found.
|
|
161
168
|
*/
|
|
162
169
|
resetColor(items: FRAGS.FragmentIdMap): void;
|
|
163
|
-
protected saveItem(group: FRAGS.FragmentsGroup, systemName: string, className: string, expressID: number): void;
|
|
170
|
+
protected saveItem(group: FRAGS.FragmentsGroup, systemName: string, className: string, expressID: number, parentID?: number | null): void;
|
|
164
171
|
}
|
|
@@ -138,4 +138,14 @@ export declare class IfcRelationsIndexer extends Component implements Disposable
|
|
|
138
138
|
getRelationsMapFromJSON(json: string): RelationsMap;
|
|
139
139
|
/** {@link Disposable.dispose} */
|
|
140
140
|
dispose(): void;
|
|
141
|
+
/**
|
|
142
|
+
* 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
|
+
*
|
|
144
|
+
* @param model The BIM model whose children to get.
|
|
145
|
+
* @param id The expressID of the item whose children to get.
|
|
146
|
+
* @param found An optional parameter that includes a set of expressIDs where the found element IDs will be added.
|
|
147
|
+
*
|
|
148
|
+
* @returns A `Set` with the expressIDs of the found items.
|
|
149
|
+
*/
|
|
150
|
+
getElementsChildren(model: FragmentsGroup, id: number, found?: Set<number>): Set<number>;
|
|
141
151
|
}
|