@thatopen/components 2.4.11 → 3.1.1
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.cjs +18440 -25937
- package/dist/index.d.ts +4530 -6
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.mjs +3 -3
- package/dist/index.mjs +18442 -25939
- package/package.json +8 -10
- package/dist/core/Clipper/index.d.ts +0 -142
- package/dist/core/Clipper/src/clipper-config.d.ts +0 -33
- package/dist/core/Clipper/src/index.d.ts +0 -1
- package/dist/core/Clipper/src/simple-plane.d.ts +0 -99
- package/dist/core/Components/index.d.ts +0 -93
- package/dist/core/ConfigManager/index.d.ts +0 -21
- package/dist/core/ConfigManager/src/configurator.d.ts +0 -13
- package/dist/core/ConfigManager/src/index.d.ts +0 -1
- package/dist/core/Cullers/index.d.ts +0 -56
- package/dist/core/Cullers/src/culler-renderer-config.d.ts +0 -74
- package/dist/core/Cullers/src/culler-renderer.d.ts +0 -76
- package/dist/core/Cullers/src/index.d.ts +0 -3
- package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +0 -59
- package/dist/core/Cullers/src/screen-culler-helper.d.ts +0 -1
- package/dist/core/Disposer/index.d.ts +0 -45
- package/dist/core/Grids/index.d.ts +0 -46
- package/dist/core/Grids/src/index.d.ts +0 -2
- package/dist/core/Grids/src/simple-grid-config.d.ts +0 -80
- package/dist/core/Grids/src/simple-grid.d.ts +0 -48
- package/dist/core/MiniMap/index.d.ts +0 -50
- package/dist/core/MiniMap/src/index.d.ts +0 -2
- package/dist/core/MiniMap/src/mini-map-config.d.ts +0 -112
- package/dist/core/MiniMap/src/mini-map.d.ts +0 -100
- package/dist/core/OrthoPerspectiveCamera/index.d.ts +0 -65
- package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +0 -16
- package/dist/core/OrthoPerspectiveCamera/src/index.d.ts +0 -5
- package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +0 -16
- package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +0 -20
- package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +0 -45
- package/dist/core/OrthoPerspectiveCamera/src/types.d.ts +0 -26
- package/dist/core/Raycasters/index.d.ts +0 -43
- package/dist/core/Raycasters/src/index.d.ts +0 -2
- package/dist/core/Raycasters/src/mouse.d.ts +0 -24
- package/dist/core/Raycasters/src/simple-raycaster.d.ts +0 -54
- package/dist/core/ShadowedScene/index.d.ts +0 -57
- package/dist/core/ShadowedScene/src/distance-renderer.d.ts +0 -67
- package/dist/core/ShadowedScene/src/index.d.ts +0 -1
- package/dist/core/Types/index.d.ts +0 -1
- package/dist/core/Types/src/async-event.d.ts +0 -32
- package/dist/core/Types/src/base-camera.d.ts +0 -28
- package/dist/core/Types/src/base-renderer.d.ts +0 -65
- package/dist/core/Types/src/base-scene.d.ts +0 -25
- package/dist/core/Types/src/base-world-item.d.ts +0 -23
- package/dist/core/Types/src/base.d.ts +0 -19
- package/dist/core/Types/src/component-with-ui.d.ts +0 -18
- package/dist/core/Types/src/component.d.ts +0 -13
- package/dist/core/Types/src/config-types.d.ts +0 -47
- package/dist/core/Types/src/data-map.d.ts +0 -73
- package/dist/core/Types/src/data-set.d.ts +0 -58
- package/dist/core/Types/src/event-manager.d.ts +0 -30
- package/dist/core/Types/src/event.d.ts +0 -32
- package/dist/core/Types/src/index.d.ts +0 -15
- package/dist/core/Types/src/interfaces.d.ts +0 -117
- package/dist/core/Types/src/world.d.ts +0 -34
- package/dist/core/Viewpoints/index.d.ts +0 -38
- package/dist/core/Viewpoints/src/index.d.ts +0 -2
- package/dist/core/Viewpoints/src/types.d.ts +0 -36
- package/dist/core/Viewpoints/src/viewpoint.d.ts +0 -197
- package/dist/core/Viewpoints/src/viewpoints-config.d.ts +0 -23
- package/dist/core/Worlds/index.d.ts +0 -54
- package/dist/core/Worlds/src/index.d.ts +0 -5
- package/dist/core/Worlds/src/simple-camera.d.ts +0 -62
- package/dist/core/Worlds/src/simple-renderer.d.ts +0 -54
- package/dist/core/Worlds/src/simple-scene-config.d.ts +0 -59
- package/dist/core/Worlds/src/simple-scene.d.ts +0 -25
- package/dist/core/Worlds/src/simple-world.d.ts +0 -79
- package/dist/core/index.d.ts +0 -13
- package/dist/fragments/BoundingBoxer/index.d.ts +0 -208
- package/dist/fragments/Classifier/index.d.ts +0 -197
- package/dist/fragments/Exploder/index.d.ts +0 -50
- package/dist/fragments/FragmentsManager/index.d.ts +0 -152
- package/dist/fragments/Hider/index.d.ts +0 -38
- package/dist/fragments/IfcGeometryTiler/index.d.ts +0 -103
- package/dist/fragments/IfcGeometryTiler/src/base-types.d.ts +0 -29
- package/dist/fragments/IfcGeometryTiler/src/index.d.ts +0 -2
- package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +0 -20
- package/dist/fragments/IfcLoader/index.d.ts +0 -116
- package/dist/fragments/IfcLoader/src/civil-reader.d.ts +0 -15
- package/dist/fragments/IfcLoader/src/ifc-fragment-settings.d.ts +0 -41
- package/dist/fragments/IfcLoader/src/ifc-metadata-reader.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/index.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/spatial-ids-finder.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/spatial-structure.d.ts +0 -8
- package/dist/fragments/IfcLoader/src/transform-helper.d.ts +0 -5
- package/dist/fragments/IfcLoader/src/units.d.ts +0 -10
- package/dist/fragments/IfcPropertiesTiler/index.d.ts +0 -66
- package/dist/fragments/IfcPropertiesTiler/src/index.d.ts +0 -1
- package/dist/fragments/IfcPropertiesTiler/src/streaming-settings.d.ts +0 -11
- package/dist/fragments/index.d.ts +0 -8
- package/dist/ifc/IfcFinder/index.d.ts +0 -50
- package/dist/ifc/IfcFinder/src/ifc-basic-query.d.ts +0 -35
- package/dist/ifc/IfcFinder/src/ifc-finder-query.d.ts +0 -96
- package/dist/ifc/IfcFinder/src/ifc-property-query.d.ts +0 -36
- package/dist/ifc/IfcFinder/src/ifc-query-group.d.ts +0 -69
- package/dist/ifc/IfcFinder/src/index.d.ts +0 -4
- package/dist/ifc/IfcFinder/src/types.d.ts +0 -84
- package/dist/ifc/IfcIsolator/index.d.ts +0 -24
- package/dist/ifc/IfcJsonExporter/index.d.ts +0 -26
- package/dist/ifc/IfcJsonExporter/src/ifc-geometry-types.d.ts +0 -4
- package/dist/ifc/IfcJsonExporter/src/index.d.ts +0 -1
- package/dist/ifc/IfcPropertiesManager/index.d.ts +0 -289
- package/dist/ifc/IfcPropertiesManager/src/index.d.ts +0 -3
- package/dist/ifc/IfcPropertiesManager/src/rel-attrs.d.ts +0 -7
- package/dist/ifc/IfcPropertiesManager/src/rel-names.d.ts +0 -3
- package/dist/ifc/IfcPropertiesManager/src/types.d.ts +0 -18
- package/dist/ifc/IfcRelationsIndexer/index.d.ts +0 -195
- package/dist/ifc/IfcRelationsIndexer/src/index.d.ts +0 -2
- package/dist/ifc/IfcRelationsIndexer/src/newVersion.d.ts +0 -51
- package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +0 -5
- package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +0 -73
- package/dist/ifc/Utils/ifc-categories.d.ts +0 -7
- package/dist/ifc/Utils/ifc-category-case.d.ts +0 -3
- package/dist/ifc/Utils/ifc-category-map.d.ts +0 -6
- package/dist/ifc/Utils/ifc-elements-map.d.ts +0 -11
- package/dist/ifc/Utils/index.d.ts +0 -5
- package/dist/ifc/Utils/properties-utils.d.ts +0 -25
- package/dist/ifc/index.d.ts +0 -6
- package/dist/measurement/MeasurementUtils/index.d.ts +0 -105
- package/dist/measurement/index.d.ts +0 -1
- package/dist/namespace.d.ts +0 -6018
- package/dist/openbim/BCFTopics/index.d.ts +0 -114
- package/dist/openbim/BCFTopics/src/Comment.d.ts +0 -40
- package/dist/openbim/BCFTopics/src/Topic.d.ts +0 -127
- package/dist/openbim/BCFTopics/src/bcf-topics-config.d.ts +0 -121
- package/dist/openbim/BCFTopics/src/importers/extensions.d.ts +0 -2
- package/dist/openbim/BCFTopics/src/importers/index.d.ts +0 -1
- package/dist/openbim/BCFTopics/src/index.d.ts +0 -5
- package/dist/openbim/BCFTopics/src/types.d.ts +0 -19
- package/dist/openbim/IDSSpecifications/index.d.ts +0 -60
- package/dist/openbim/IDSSpecifications/src/Specification.d.ts +0 -40
- package/dist/openbim/IDSSpecifications/src/exporters/parameter.d.ts +0 -2
- package/dist/openbim/IDSSpecifications/src/facets/Attribute.d.ts +0 -13
- package/dist/openbim/IDSSpecifications/src/facets/Classification.d.ts +0 -21
- package/dist/openbim/IDSSpecifications/src/facets/Entity.d.ts +0 -15
- package/dist/openbim/IDSSpecifications/src/facets/Facet.d.ts +0 -26
- package/dist/openbim/IDSSpecifications/src/facets/Material.d.ts +0 -10
- package/dist/openbim/IDSSpecifications/src/facets/PartOf.d.ts +0 -26
- package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +0 -25
- package/dist/openbim/IDSSpecifications/src/facets/index.d.ts +0 -5
- package/dist/openbim/IDSSpecifications/src/importers/attribute.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/classification.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/entity.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/index.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/importers/parameter.d.ts +0 -2
- package/dist/openbim/IDSSpecifications/src/importers/property.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/index.d.ts +0 -3
- package/dist/openbim/IDSSpecifications/src/types.d.ts +0 -70
- package/dist/openbim/index.d.ts +0 -2
- package/dist/utils/bbox.d.ts +0 -7
- package/dist/utils/geometry.d.ts +0 -1
- package/dist/utils/index.d.ts +0 -6
- package/dist/utils/materials.d.ts +0 -4
- package/dist/utils/section-generator.d.ts +0 -31
- package/dist/utils/uuid.d.ts +0 -6
- package/dist/utils/vertex-picker.d.ts +0 -116
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
import * as WEBIFC from "web-ifc";
|
|
2
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
3
|
-
import { IfcFragmentSettings } from "./src";
|
|
4
|
-
import { Component, Components, Event, Disposable } from "../../core";
|
|
5
|
-
export * from "./src/ifc-fragment-settings";
|
|
6
|
-
/**
|
|
7
|
-
* The IfcLoader component is responsible for loading and processing IFC files. It utilizes the Web-IFC library to handle the IFC data and the Three.js library for 3D rendering. The class provides methods for setting up, loading, and cleaning up IFC files. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/IfcLoader). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/IfcLoader).
|
|
8
|
-
*/
|
|
9
|
-
export declare class IfcLoader extends Component implements Disposable {
|
|
10
|
-
/**
|
|
11
|
-
* A unique identifier for the component.
|
|
12
|
-
* This UUID is used to register the component within the Components system.
|
|
13
|
-
*/
|
|
14
|
-
static readonly uuid: "a659add7-1418-4771-a0d6-7d4d438e4624";
|
|
15
|
-
/** {@link Disposable.onDisposed} */
|
|
16
|
-
readonly onDisposed: Event<string>;
|
|
17
|
-
/**
|
|
18
|
-
* An event triggered when the IFC file starts loading.
|
|
19
|
-
*/
|
|
20
|
-
readonly onIfcStartedLoading: Event<void>;
|
|
21
|
-
/**
|
|
22
|
-
* An event triggered when the setup process is completed.
|
|
23
|
-
*/
|
|
24
|
-
readonly onSetup: Event<void>;
|
|
25
|
-
/**
|
|
26
|
-
* The settings for the IfcLoader.
|
|
27
|
-
* It includes options for excluding categories, setting WASM paths, and more.
|
|
28
|
-
*/
|
|
29
|
-
settings: IfcFragmentSettings;
|
|
30
|
-
/**
|
|
31
|
-
* The instance of the Web-IFC library used for handling IFC data.
|
|
32
|
-
*/
|
|
33
|
-
webIfc: WEBIFC.IfcAPI;
|
|
34
|
-
/** {@link Component.enabled} */
|
|
35
|
-
enabled: boolean;
|
|
36
|
-
private _material;
|
|
37
|
-
private _spatialTree;
|
|
38
|
-
private _metaData;
|
|
39
|
-
private _fragmentInstances;
|
|
40
|
-
private _civil;
|
|
41
|
-
private _visitedFragments;
|
|
42
|
-
private _materialT;
|
|
43
|
-
constructor(components: Components);
|
|
44
|
-
/** {@link Disposable.dispose} */
|
|
45
|
-
dispose(): void;
|
|
46
|
-
/**
|
|
47
|
-
* Sets up the IfcLoader component with the provided configuration.
|
|
48
|
-
*
|
|
49
|
-
* @param config - Optional configuration settings for the IfcLoader.
|
|
50
|
-
* If not provided, the existing settings will be used.
|
|
51
|
-
*
|
|
52
|
-
* @returns A Promise that resolves when the setup process is completed.
|
|
53
|
-
*
|
|
54
|
-
* @remarks
|
|
55
|
-
* If the `autoSetWasm` option is enabled in the configuration,
|
|
56
|
-
* the method will automatically set the WASM paths for the Web-IFC library.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```typescript
|
|
60
|
-
* const ifcLoader = new IfcLoader(components);
|
|
61
|
-
* await ifcLoader.setup({ autoSetWasm: true });
|
|
62
|
-
* ```
|
|
63
|
-
*/
|
|
64
|
-
setup(config?: Partial<IfcFragmentSettings>): Promise<void>;
|
|
65
|
-
/**
|
|
66
|
-
* Loads an IFC file and processes it for 3D visualization.
|
|
67
|
-
*
|
|
68
|
-
* @param data - The Uint8Array containing the IFC file data.
|
|
69
|
-
* @param coordinate - Optional boolean indicating whether to coordinate the loaded IFC data. Default is true.
|
|
70
|
-
*
|
|
71
|
-
* @returns A Promise that resolves to the FragmentsGroup containing the loaded and processed IFC data.
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* ```typescript
|
|
75
|
-
* const ifcLoader = components.get(IfcLoader);
|
|
76
|
-
* const group = await ifcLoader.load(ifcData);
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
load(data: Uint8Array, coordinate?: boolean, name?: string): Promise<FRAGS.FragmentsGroup>;
|
|
80
|
-
/**
|
|
81
|
-
* Reads an IFC file and initializes the Web-IFC library.
|
|
82
|
-
*
|
|
83
|
-
* @param data - The Uint8Array containing the IFC file data.
|
|
84
|
-
*
|
|
85
|
-
* @returns A Promise that resolves when the IFC file is opened and initialized.
|
|
86
|
-
*
|
|
87
|
-
* @remarks
|
|
88
|
-
* This method sets the WASM path and initializes the Web-IFC library based on the provided settings.
|
|
89
|
-
* It also opens the IFC model using the provided data and settings.
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```typescript
|
|
93
|
-
* const ifcLoader = components.get(IfcLoader);
|
|
94
|
-
* await ifcLoader.readIfcFile(ifcData);
|
|
95
|
-
* ```
|
|
96
|
-
*/
|
|
97
|
-
readIfcFile(data: Uint8Array): Promise<number>;
|
|
98
|
-
/**
|
|
99
|
-
* Cleans up the IfcLoader component by resetting the Web-IFC library,
|
|
100
|
-
* clearing the visited fragments and fragment instances maps, and creating a new instance of the Web-IFC library.
|
|
101
|
-
*
|
|
102
|
-
* @remarks
|
|
103
|
-
* This method is called automatically after using the .load() method, so usually you don't need to use it manually.
|
|
104
|
-
*
|
|
105
|
-
* @example
|
|
106
|
-
* ```typescript
|
|
107
|
-
* const ifcLoader = components.get(IfcLoader);
|
|
108
|
-
* ifcLoader.cleanUp();
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
cleanUp(): void;
|
|
112
|
-
private getAllGeometries;
|
|
113
|
-
private getMesh;
|
|
114
|
-
private getGeometry;
|
|
115
|
-
private autoSetWasm;
|
|
116
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as THREE from "three";
|
|
2
|
-
import * as WEBIFC from "web-ifc";
|
|
3
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
4
|
-
export declare class CivilReader {
|
|
5
|
-
defLineMat: THREE.LineBasicMaterial;
|
|
6
|
-
read(webIfc: WEBIFC.IfcAPI): {
|
|
7
|
-
alignments: Map<number, FRAGS.AlignmentObject>;
|
|
8
|
-
coordinationMatrix: THREE.Matrix4;
|
|
9
|
-
} | undefined;
|
|
10
|
-
get(civilItems: any): {
|
|
11
|
-
alignments: Map<number, FRAGS.AlignmentObject>;
|
|
12
|
-
coordinationMatrix: THREE.Matrix4;
|
|
13
|
-
} | undefined;
|
|
14
|
-
private getCurves;
|
|
15
|
-
}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import * as WEBIFC from "web-ifc";
|
|
2
|
-
/** Configuration of the IFC-fragment conversion. */
|
|
3
|
-
export declare class IfcFragmentSettings {
|
|
4
|
-
/** Whether to extract the IFC properties into a JSON. */
|
|
5
|
-
includeProperties: boolean;
|
|
6
|
-
/**
|
|
7
|
-
* Generate the geometry for categories that are not included by default,
|
|
8
|
-
* like IFCSPACE.
|
|
9
|
-
*/
|
|
10
|
-
optionalCategories: number[];
|
|
11
|
-
/** Path of the WASM for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
12
|
-
wasm: {
|
|
13
|
-
path: string;
|
|
14
|
-
absolute: boolean;
|
|
15
|
-
logLevel?: WEBIFC.LogLevel;
|
|
16
|
-
};
|
|
17
|
-
/** List of categories that won't be converted to fragments. */
|
|
18
|
-
excludedCategories: Set<number>;
|
|
19
|
-
/** Exclusive list of categories that will be converted to fragments. If this contains any category, any other categories will be ignored. */
|
|
20
|
-
includedCategories: Set<number>;
|
|
21
|
-
/** Whether to save the absolute location of all IFC items. */
|
|
22
|
-
saveLocations: boolean;
|
|
23
|
-
/** Loader settings for [web-ifc](https://github.com/ThatOpen/engine_web-ifc). */
|
|
24
|
-
webIfc: WEBIFC.LoaderSettings;
|
|
25
|
-
/**
|
|
26
|
-
* Whether to automatically set the path to the WASM file for [web-ifc](https://github.com/ThatOpen/engine_web-ifc).
|
|
27
|
-
* If set to true, the path will be set to the default path of the WASM file.
|
|
28
|
-
* If set to false, the path must be provided manually in the `wasm.path` property.
|
|
29
|
-
* Default value is true.
|
|
30
|
-
*/
|
|
31
|
-
autoSetWasm: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Custom function to handle the file location for [web-ifc](https://github.com/ThatOpen/engine_web-ifc).
|
|
34
|
-
* This function will be called when [web-ifc](https://github.com/ThatOpen/engine_web-ifc) needs to locate a file.
|
|
35
|
-
* If set to null, the default file location handler will be used.
|
|
36
|
-
*
|
|
37
|
-
* @param url - The URL of the file to locate.
|
|
38
|
-
* @returns The absolute path of the file.
|
|
39
|
-
*/
|
|
40
|
-
customLocateFileHandler: WEBIFC.LocateFileHandlerFn | null;
|
|
41
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as WEBIFC from "web-ifc";
|
|
2
|
-
import * as THREE from "three";
|
|
3
|
-
export declare class Units {
|
|
4
|
-
factor: number;
|
|
5
|
-
complement: number;
|
|
6
|
-
apply(matrix: THREE.Matrix4): void;
|
|
7
|
-
setUp(webIfc: WEBIFC.IfcAPI): void;
|
|
8
|
-
private getLengthUnits;
|
|
9
|
-
private getScaleMatrix;
|
|
10
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import * as WEBIFC from "web-ifc";
|
|
2
|
-
import { AsyncEvent, Component, Disposable, Event } from "../../core";
|
|
3
|
-
import { PropertiesStreamingSettings } from "./src";
|
|
4
|
-
export * from "./src";
|
|
5
|
-
/**
|
|
6
|
-
* A component that converts the properties of an IFC file to tiles. It uses the Web-IFC library to read and process the IFC data. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/IfcPropertiesTiler). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/IfcPropertiesTiler).
|
|
7
|
-
*/
|
|
8
|
-
export declare class IfcPropertiesTiler extends Component implements Disposable {
|
|
9
|
-
/**
|
|
10
|
-
* A unique identifier for the component.
|
|
11
|
-
* This UUID is used to register the component within the Components system.
|
|
12
|
-
*/
|
|
13
|
-
static readonly uuid: "88d2c89c-ce32-47d7-8cb6-d51e4b311a0b";
|
|
14
|
-
/**
|
|
15
|
-
* An event that is triggered when properties are streamed from the IFC file.
|
|
16
|
-
* The event provides the type of the IFC entity and the corresponding data.
|
|
17
|
-
*/
|
|
18
|
-
readonly onPropertiesStreamed: AsyncEvent<{
|
|
19
|
-
type: number;
|
|
20
|
-
data: {
|
|
21
|
-
[id: number]: any;
|
|
22
|
-
};
|
|
23
|
-
}>;
|
|
24
|
-
/**
|
|
25
|
-
* An event that is triggered to indicate the progress of the streaming process.
|
|
26
|
-
* The event provides a number between 0 and 1 representing the progress percentage.
|
|
27
|
-
*/
|
|
28
|
-
readonly onProgress: AsyncEvent<number>;
|
|
29
|
-
/**
|
|
30
|
-
* An event that is triggered when indices are streamed from the IFC file.
|
|
31
|
-
* The event provides a map of indices, where the key is the entity type and the value is another map of indices.
|
|
32
|
-
*/
|
|
33
|
-
readonly onIndicesStreamed: AsyncEvent<Map<number, Map<number, number[]>>>;
|
|
34
|
-
/** {@link Disposable.onDisposed} */
|
|
35
|
-
readonly onDisposed: Event<string>;
|
|
36
|
-
/** {@link Component.enabled} */
|
|
37
|
-
enabled: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* An instance of the PropertiesStreamingSettings class, which holds the settings for the streaming process.
|
|
40
|
-
*/
|
|
41
|
-
settings: PropertiesStreamingSettings;
|
|
42
|
-
/**
|
|
43
|
-
* An instance of the IfcAPI class from the Web-IFC library, which provides methods for reading and processing IFC data.
|
|
44
|
-
*/
|
|
45
|
-
webIfc: WEBIFC.IfcAPI;
|
|
46
|
-
/** {@link Disposable.dispose} */
|
|
47
|
-
dispose(): Promise<void>;
|
|
48
|
-
/**
|
|
49
|
-
* This method converts properties from an IFC file to tiles given its data as a Uint8Array.
|
|
50
|
-
*
|
|
51
|
-
* @param data - The Uint8Array containing the IFC file data.
|
|
52
|
-
* @returns A Promise that resolves when the streaming process is complete.
|
|
53
|
-
*/
|
|
54
|
-
streamFromBuffer(data: Uint8Array): Promise<void>;
|
|
55
|
-
/**
|
|
56
|
-
* This method converts properties from an IFC file to tiles using a given callback function to read the file.
|
|
57
|
-
*
|
|
58
|
-
* @param loadCallback - A callback function that loads the IFC file data.
|
|
59
|
-
* @returns A Promise that resolves when the streaming process is complete.
|
|
60
|
-
*/
|
|
61
|
-
streamFromCallBack(loadCallback: WEBIFC.ModelLoadCallback): Promise<void>;
|
|
62
|
-
private readIfcFile;
|
|
63
|
-
private streamIfcFile;
|
|
64
|
-
private streamAllProperties;
|
|
65
|
-
private cleanUp;
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./streaming-settings";
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IfcFragmentSettings } from "../../IfcLoader/src";
|
|
2
|
-
/**
|
|
3
|
-
* Settings for streaming properties. Extends {@link IfcFragmentSettings} to inherit common settings.
|
|
4
|
-
*/
|
|
5
|
-
export declare class PropertiesStreamingSettings extends IfcFragmentSettings {
|
|
6
|
-
/**
|
|
7
|
-
* Amount of properties to be streamed.
|
|
8
|
-
* Defaults to 100 properties.
|
|
9
|
-
*/
|
|
10
|
-
propertiesSize: number;
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./BoundingBoxer";
|
|
2
|
-
export * from "./Classifier";
|
|
3
|
-
export * from "./Exploder";
|
|
4
|
-
export * from "./Hider";
|
|
5
|
-
export * from "./IfcLoader";
|
|
6
|
-
export * from "./FragmentsManager";
|
|
7
|
-
export * from "./IfcGeometryTiler";
|
|
8
|
-
export * from "./IfcPropertiesTiler";
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { Component, Components } from "../../core";
|
|
2
|
-
import { IfcQueryGroup } from "./src/ifc-query-group";
|
|
3
|
-
import { IfcFinderQuery } from "./src";
|
|
4
|
-
export * from "./src";
|
|
5
|
-
/**
|
|
6
|
-
* Component to make text queries in the IFC.
|
|
7
|
-
*/
|
|
8
|
-
export declare class IfcFinder extends Component {
|
|
9
|
-
/**
|
|
10
|
-
* A unique identifier for the component.
|
|
11
|
-
* This UUID is used to register the component within the Components system.
|
|
12
|
-
*/
|
|
13
|
-
static readonly uuid: "0da7ad77-f734-42ca-942f-a074adfd1e3a";
|
|
14
|
-
/** {@link Component.enabled} */
|
|
15
|
-
enabled: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* List of all created {@link IfcQueryGroup} instances.
|
|
18
|
-
*/
|
|
19
|
-
list: Map<string, IfcQueryGroup>;
|
|
20
|
-
/**
|
|
21
|
-
* List of all queries from all created {@link IfcQueryGroup} instances.
|
|
22
|
-
*/
|
|
23
|
-
get queries(): Set<IfcFinderQuery>;
|
|
24
|
-
constructor(components: Components);
|
|
25
|
-
/**
|
|
26
|
-
* Imports all the query groups provided in the given data. You can generate this data to save the result of queries and persist it over time.
|
|
27
|
-
* @param data The data containing the serialized query groups to import.
|
|
28
|
-
*/
|
|
29
|
-
import(data: {
|
|
30
|
-
[groupID: string]: any;
|
|
31
|
-
}): void;
|
|
32
|
-
/**
|
|
33
|
-
* Exports all the query groups created. You can then import this data back using the import method.
|
|
34
|
-
*/
|
|
35
|
-
export(): {
|
|
36
|
-
[groupID: string]: any;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Creates a new {@link IfcQueryGroup}.
|
|
40
|
-
*/
|
|
41
|
-
create(): IfcQueryGroup;
|
|
42
|
-
/**
|
|
43
|
-
* Creates the {@link IfcQueryGroup} with the given ID.
|
|
44
|
-
*/
|
|
45
|
-
delete(id: string): void;
|
|
46
|
-
/**
|
|
47
|
-
* Deletes all {@link IfcQueryGroup} instances.
|
|
48
|
-
*/
|
|
49
|
-
clear(): void;
|
|
50
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
2
|
-
import { IfcFinderRule, SerializedQuery } from "./types";
|
|
3
|
-
import { IfcFinderQuery } from "./ifc-finder-query";
|
|
4
|
-
import { Components } from "../../../core";
|
|
5
|
-
/**
|
|
6
|
-
* A query that checks the direct attributes of IFC items.
|
|
7
|
-
*/
|
|
8
|
-
export declare class IfcBasicQuery extends IfcFinderQuery {
|
|
9
|
-
/**
|
|
10
|
-
* {@link IfcFinderQuery.name}
|
|
11
|
-
*/
|
|
12
|
-
name: string;
|
|
13
|
-
/**
|
|
14
|
-
* The type of this query.
|
|
15
|
-
*/
|
|
16
|
-
static type: "IfcBasicQuery";
|
|
17
|
-
/**
|
|
18
|
-
* {@link IfcFinderQuery.items}
|
|
19
|
-
*/
|
|
20
|
-
get items(): FRAGS.FragmentIdMap;
|
|
21
|
-
constructor(components: Components, data: {
|
|
22
|
-
name: string;
|
|
23
|
-
rules: IfcFinderRule[];
|
|
24
|
-
inclusive: boolean;
|
|
25
|
-
});
|
|
26
|
-
/**
|
|
27
|
-
* {@link IfcFinderQuery.export}
|
|
28
|
-
*/
|
|
29
|
-
export(): SerializedQuery;
|
|
30
|
-
/**
|
|
31
|
-
* {@link IfcFinderQuery.update}
|
|
32
|
-
*/
|
|
33
|
-
update(modelID: string, file: File): Promise<void>;
|
|
34
|
-
protected findInLines(modelID: string, lines: string[]): void;
|
|
35
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
2
|
-
import { IfcFinderRule, SerializedQuery } from "./types";
|
|
3
|
-
import { Components, Event } from "../../../core";
|
|
4
|
-
/**
|
|
5
|
-
* The base class for all queries used by the {@link IfcFinder}.
|
|
6
|
-
*/
|
|
7
|
-
export declare abstract class IfcFinderQuery {
|
|
8
|
-
/**
|
|
9
|
-
* The list of functions to import the queries. If you create your own custom query, you should add its importer here. See the other queries provided by the library for reference.
|
|
10
|
-
*/
|
|
11
|
-
static importers: Map<string, (components: Components, data: any) => IfcFinderQuery>;
|
|
12
|
-
/**
|
|
13
|
-
* Event used to notify the progress when performing a query on an IFC file.
|
|
14
|
-
*/
|
|
15
|
-
readonly onProgress: Event<number>;
|
|
16
|
-
/**
|
|
17
|
-
* A name given to the instance of the query to identify it.
|
|
18
|
-
*/
|
|
19
|
-
abstract name: string;
|
|
20
|
-
/**
|
|
21
|
-
* The list of IFC items that this query found across all models.
|
|
22
|
-
*/
|
|
23
|
-
abstract items: FRAGS.FragmentIdMap;
|
|
24
|
-
/**
|
|
25
|
-
* If false, ALL rules of the query must comply to make a match. If true, ANY rule will be enough to make a match.
|
|
26
|
-
*/
|
|
27
|
-
inclusive: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* The list of rules to be applied by this query.
|
|
30
|
-
*/
|
|
31
|
-
rules: IfcFinderRule[];
|
|
32
|
-
/**
|
|
33
|
-
* The IDs of the match items per model.
|
|
34
|
-
*/
|
|
35
|
-
ids: {
|
|
36
|
-
[modelID: string]: Set<number>;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Whether this query is up to date or not per file. If not, when updating the group where it belongs, it will re-process the given file.
|
|
40
|
-
*/
|
|
41
|
-
needsUpdate: Map<string, boolean>;
|
|
42
|
-
/**
|
|
43
|
-
* Export the current data of this query in a serializable object to persist it over time.
|
|
44
|
-
*/
|
|
45
|
-
abstract export(): {
|
|
46
|
-
[key: string]: any;
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* Perform the search in the given file and save the result.
|
|
50
|
-
*/
|
|
51
|
-
abstract update(modelID: string, file: File): Promise<void>;
|
|
52
|
-
protected components: Components;
|
|
53
|
-
protected abstract findInLines(modelID: string, lines: string[]): void;
|
|
54
|
-
protected constructor(components: Components);
|
|
55
|
-
/**
|
|
56
|
-
* Imports a query given its data. This data can be generating using its {@link IfcFinderQuery.export} method.
|
|
57
|
-
*
|
|
58
|
-
* @param components the instance of {@link Components} used by this app.
|
|
59
|
-
* @param data the data of the query to import as a serializable object.
|
|
60
|
-
*/
|
|
61
|
-
static import(components: Components, data: {
|
|
62
|
-
[id: string]: any;
|
|
63
|
-
}): IfcFinderQuery | null;
|
|
64
|
-
/**
|
|
65
|
-
* Imports the given serialized rules. Only use this when writing your own custom query. See the other queries provided by the library for reference.
|
|
66
|
-
*
|
|
67
|
-
* @param serializedRules the rules to be parsed.
|
|
68
|
-
*/
|
|
69
|
-
static importRules(serializedRules: {
|
|
70
|
-
[key: string]: any;
|
|
71
|
-
}[]): IfcFinderRule[];
|
|
72
|
-
/**
|
|
73
|
-
* Imports the given IDs. Only use this when writing your own custom query. See the other queries provided by the library for reference.
|
|
74
|
-
*
|
|
75
|
-
* @param data the serialized object representing the query whose IDs to parse.
|
|
76
|
-
*/
|
|
77
|
-
static importIds(data: SerializedQuery): {
|
|
78
|
-
[modelID: string]: Set<number>;
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Clears the data of the given model. If not specified, clears all the data.
|
|
82
|
-
*
|
|
83
|
-
* @param modelID ID of the model whose data to clear.
|
|
84
|
-
*/
|
|
85
|
-
clear(modelID?: string): void;
|
|
86
|
-
protected addID(modelID: string, id: number): void;
|
|
87
|
-
protected getData(): SerializedQuery;
|
|
88
|
-
protected exportRules(): {
|
|
89
|
-
[key: string]: any;
|
|
90
|
-
}[];
|
|
91
|
-
protected findInFile(modelID: string, file: File): Promise<void>;
|
|
92
|
-
protected getIdFromLine(line: string): number;
|
|
93
|
-
protected testRules(line: string): boolean;
|
|
94
|
-
protected getCategoryFromLine(line: string): string | null;
|
|
95
|
-
protected getAttributesFromLine(line: string): string[] | null;
|
|
96
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
2
|
-
import { IfcFinderQuery } from "./ifc-finder-query";
|
|
3
|
-
import { IfcOperatorRule, IfcPropertyRule, SerializedQuery } from "./types";
|
|
4
|
-
import { Components } from "../../../core";
|
|
5
|
-
/**
|
|
6
|
-
* A query that checks the properties in the property sets assigned to IFC items.
|
|
7
|
-
*/
|
|
8
|
-
export declare class IfcPropertyQuery extends IfcFinderQuery {
|
|
9
|
-
/**
|
|
10
|
-
* {@link IfcFinderQuery.name}
|
|
11
|
-
*/
|
|
12
|
-
name: string;
|
|
13
|
-
/**
|
|
14
|
-
* The type of this query.
|
|
15
|
-
*/
|
|
16
|
-
static type: "IfcPropertyQuery";
|
|
17
|
-
private psets;
|
|
18
|
-
/**
|
|
19
|
-
* {@link IfcFinderQuery.items}
|
|
20
|
-
*/
|
|
21
|
-
get items(): FRAGS.FragmentIdMap;
|
|
22
|
-
constructor(components: Components, data: {
|
|
23
|
-
name: string;
|
|
24
|
-
inclusive: boolean;
|
|
25
|
-
rules: (IfcPropertyRule | IfcOperatorRule)[];
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* {@link IfcFinderQuery.export}
|
|
29
|
-
*/
|
|
30
|
-
export(): SerializedQuery;
|
|
31
|
-
/**
|
|
32
|
-
* {@link IfcFinderQuery.update}
|
|
33
|
-
*/
|
|
34
|
-
update(modelID: string, file: File): Promise<void>;
|
|
35
|
-
protected findInLines(modelID: string, lines: string[]): void;
|
|
36
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import * as FRAGS from "@thatopen/fragments";
|
|
2
|
-
import { IfcFinderQuery } from "./ifc-finder-query";
|
|
3
|
-
import { Components } from "../../../core";
|
|
4
|
-
/**
|
|
5
|
-
* A group of queries to perform searches in one or many IFC files.
|
|
6
|
-
*/
|
|
7
|
-
export declare class IfcQueryGroup {
|
|
8
|
-
/**
|
|
9
|
-
* The list of queries contained in this group.
|
|
10
|
-
*/
|
|
11
|
-
list: Map<string, IfcFinderQuery>;
|
|
12
|
-
/**
|
|
13
|
-
* A unique string to identify this group instance.
|
|
14
|
-
*/
|
|
15
|
-
id: string;
|
|
16
|
-
/**
|
|
17
|
-
* The way this group works when retrieving items.
|
|
18
|
-
* - Combine: returns the sum of all items of all queries.
|
|
19
|
-
* - Intersect: returns only the common elements of all queries.
|
|
20
|
-
*/
|
|
21
|
-
mode: "combine" | "intersect";
|
|
22
|
-
private _components;
|
|
23
|
-
/**
|
|
24
|
-
* The list of unique queries contained in this group.
|
|
25
|
-
*/
|
|
26
|
-
get queries(): Set<IfcFinderQuery>;
|
|
27
|
-
/**
|
|
28
|
-
* The items of all the queries contained in this group. The returned data depends on {@link IfcQueryGroup.mode}.
|
|
29
|
-
*/
|
|
30
|
-
get items(): FRAGS.FragmentIdMap;
|
|
31
|
-
constructor(components: Components);
|
|
32
|
-
/**
|
|
33
|
-
* Adds a new query to this group.
|
|
34
|
-
* @param query the query to add.
|
|
35
|
-
*/
|
|
36
|
-
add(query: IfcFinderQuery): void;
|
|
37
|
-
/**
|
|
38
|
-
* Clears the data of the given modelID of all queries contained in this group. If no modelID is provided, clears all data.
|
|
39
|
-
* @param modelID the model whose data to remove.
|
|
40
|
-
*/
|
|
41
|
-
clear(modelID?: string): void;
|
|
42
|
-
/**
|
|
43
|
-
* Imports data that has been previously exported through {@link IfcQueryGroup.export}.
|
|
44
|
-
* @param data the serializable object used to persist a group's data.
|
|
45
|
-
*/
|
|
46
|
-
import(data: {
|
|
47
|
-
mode: "combine" | "intersect";
|
|
48
|
-
id: string;
|
|
49
|
-
queries: {
|
|
50
|
-
[guid: string]: any;
|
|
51
|
-
};
|
|
52
|
-
}): void;
|
|
53
|
-
/**
|
|
54
|
-
* Exports all the data of this group, so that it can be persisted and imported later using {@link IfcQueryGroup.import}.
|
|
55
|
-
*/
|
|
56
|
-
export(): {
|
|
57
|
-
mode: "combine" | "intersect";
|
|
58
|
-
id: string;
|
|
59
|
-
queries: {
|
|
60
|
-
[guid: string]: any;
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
/**
|
|
64
|
-
* Updates all the queries contained in this group that need an update for the given file. It will skip those where {@link IfcFinderQuery.needsUpdate} is false.
|
|
65
|
-
* @param modelID the identifier used to refer to the given file.
|
|
66
|
-
* @param file the file to process.
|
|
67
|
-
*/
|
|
68
|
-
update(modelID: string, file: File): Promise<void>;
|
|
69
|
-
}
|