@thatopen/components 2.4.11 → 3.1.0

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.
Files changed (162) hide show
  1. package/README.md +92 -92
  2. package/dist/index.cjs +18440 -25937
  3. package/dist/index.d.ts +4537 -6
  4. package/dist/index.min.cjs +3 -3
  5. package/dist/index.min.mjs +3 -3
  6. package/dist/index.mjs +18442 -25939
  7. package/package.json +58 -60
  8. package/dist/core/Clipper/index.d.ts +0 -142
  9. package/dist/core/Clipper/src/clipper-config.d.ts +0 -33
  10. package/dist/core/Clipper/src/index.d.ts +0 -1
  11. package/dist/core/Clipper/src/simple-plane.d.ts +0 -99
  12. package/dist/core/Components/index.d.ts +0 -93
  13. package/dist/core/ConfigManager/index.d.ts +0 -21
  14. package/dist/core/ConfigManager/src/configurator.d.ts +0 -13
  15. package/dist/core/ConfigManager/src/index.d.ts +0 -1
  16. package/dist/core/Cullers/index.d.ts +0 -56
  17. package/dist/core/Cullers/src/culler-renderer-config.d.ts +0 -74
  18. package/dist/core/Cullers/src/culler-renderer.d.ts +0 -76
  19. package/dist/core/Cullers/src/index.d.ts +0 -3
  20. package/dist/core/Cullers/src/mesh-culler-renderer.d.ts +0 -59
  21. package/dist/core/Cullers/src/screen-culler-helper.d.ts +0 -1
  22. package/dist/core/Disposer/index.d.ts +0 -45
  23. package/dist/core/Grids/index.d.ts +0 -46
  24. package/dist/core/Grids/src/index.d.ts +0 -2
  25. package/dist/core/Grids/src/simple-grid-config.d.ts +0 -80
  26. package/dist/core/Grids/src/simple-grid.d.ts +0 -48
  27. package/dist/core/MiniMap/index.d.ts +0 -50
  28. package/dist/core/MiniMap/src/index.d.ts +0 -2
  29. package/dist/core/MiniMap/src/mini-map-config.d.ts +0 -112
  30. package/dist/core/MiniMap/src/mini-map.d.ts +0 -100
  31. package/dist/core/OrthoPerspectiveCamera/index.d.ts +0 -65
  32. package/dist/core/OrthoPerspectiveCamera/src/first-person-mode.d.ts +0 -16
  33. package/dist/core/OrthoPerspectiveCamera/src/index.d.ts +0 -5
  34. package/dist/core/OrthoPerspectiveCamera/src/orbit-mode.d.ts +0 -16
  35. package/dist/core/OrthoPerspectiveCamera/src/plan-mode.d.ts +0 -20
  36. package/dist/core/OrthoPerspectiveCamera/src/projections.d.ts +0 -45
  37. package/dist/core/OrthoPerspectiveCamera/src/types.d.ts +0 -26
  38. package/dist/core/Raycasters/index.d.ts +0 -43
  39. package/dist/core/Raycasters/src/index.d.ts +0 -2
  40. package/dist/core/Raycasters/src/mouse.d.ts +0 -24
  41. package/dist/core/Raycasters/src/simple-raycaster.d.ts +0 -54
  42. package/dist/core/ShadowedScene/index.d.ts +0 -57
  43. package/dist/core/ShadowedScene/src/distance-renderer.d.ts +0 -67
  44. package/dist/core/ShadowedScene/src/index.d.ts +0 -1
  45. package/dist/core/Types/index.d.ts +0 -1
  46. package/dist/core/Types/src/async-event.d.ts +0 -32
  47. package/dist/core/Types/src/base-camera.d.ts +0 -28
  48. package/dist/core/Types/src/base-renderer.d.ts +0 -65
  49. package/dist/core/Types/src/base-scene.d.ts +0 -25
  50. package/dist/core/Types/src/base-world-item.d.ts +0 -23
  51. package/dist/core/Types/src/base.d.ts +0 -19
  52. package/dist/core/Types/src/component-with-ui.d.ts +0 -18
  53. package/dist/core/Types/src/component.d.ts +0 -13
  54. package/dist/core/Types/src/config-types.d.ts +0 -47
  55. package/dist/core/Types/src/data-map.d.ts +0 -73
  56. package/dist/core/Types/src/data-set.d.ts +0 -58
  57. package/dist/core/Types/src/event-manager.d.ts +0 -30
  58. package/dist/core/Types/src/event.d.ts +0 -32
  59. package/dist/core/Types/src/index.d.ts +0 -15
  60. package/dist/core/Types/src/interfaces.d.ts +0 -117
  61. package/dist/core/Types/src/world.d.ts +0 -34
  62. package/dist/core/Viewpoints/index.d.ts +0 -38
  63. package/dist/core/Viewpoints/src/index.d.ts +0 -2
  64. package/dist/core/Viewpoints/src/types.d.ts +0 -36
  65. package/dist/core/Viewpoints/src/viewpoint.d.ts +0 -197
  66. package/dist/core/Viewpoints/src/viewpoints-config.d.ts +0 -23
  67. package/dist/core/Worlds/index.d.ts +0 -54
  68. package/dist/core/Worlds/src/index.d.ts +0 -5
  69. package/dist/core/Worlds/src/simple-camera.d.ts +0 -62
  70. package/dist/core/Worlds/src/simple-renderer.d.ts +0 -54
  71. package/dist/core/Worlds/src/simple-scene-config.d.ts +0 -59
  72. package/dist/core/Worlds/src/simple-scene.d.ts +0 -25
  73. package/dist/core/Worlds/src/simple-world.d.ts +0 -79
  74. package/dist/core/index.d.ts +0 -13
  75. package/dist/fragments/BoundingBoxer/index.d.ts +0 -208
  76. package/dist/fragments/Classifier/index.d.ts +0 -197
  77. package/dist/fragments/Exploder/index.d.ts +0 -50
  78. package/dist/fragments/FragmentsManager/index.d.ts +0 -152
  79. package/dist/fragments/Hider/index.d.ts +0 -38
  80. package/dist/fragments/IfcGeometryTiler/index.d.ts +0 -103
  81. package/dist/fragments/IfcGeometryTiler/src/base-types.d.ts +0 -29
  82. package/dist/fragments/IfcGeometryTiler/src/index.d.ts +0 -2
  83. package/dist/fragments/IfcGeometryTiler/src/streaming-settings.d.ts +0 -20
  84. package/dist/fragments/IfcLoader/index.d.ts +0 -116
  85. package/dist/fragments/IfcLoader/src/civil-reader.d.ts +0 -15
  86. package/dist/fragments/IfcLoader/src/ifc-fragment-settings.d.ts +0 -41
  87. package/dist/fragments/IfcLoader/src/ifc-metadata-reader.d.ts +0 -5
  88. package/dist/fragments/IfcLoader/src/index.d.ts +0 -5
  89. package/dist/fragments/IfcLoader/src/spatial-ids-finder.d.ts +0 -5
  90. package/dist/fragments/IfcLoader/src/spatial-structure.d.ts +0 -8
  91. package/dist/fragments/IfcLoader/src/transform-helper.d.ts +0 -5
  92. package/dist/fragments/IfcLoader/src/units.d.ts +0 -10
  93. package/dist/fragments/IfcPropertiesTiler/index.d.ts +0 -66
  94. package/dist/fragments/IfcPropertiesTiler/src/index.d.ts +0 -1
  95. package/dist/fragments/IfcPropertiesTiler/src/streaming-settings.d.ts +0 -11
  96. package/dist/fragments/index.d.ts +0 -8
  97. package/dist/ifc/IfcFinder/index.d.ts +0 -50
  98. package/dist/ifc/IfcFinder/src/ifc-basic-query.d.ts +0 -35
  99. package/dist/ifc/IfcFinder/src/ifc-finder-query.d.ts +0 -96
  100. package/dist/ifc/IfcFinder/src/ifc-property-query.d.ts +0 -36
  101. package/dist/ifc/IfcFinder/src/ifc-query-group.d.ts +0 -69
  102. package/dist/ifc/IfcFinder/src/index.d.ts +0 -4
  103. package/dist/ifc/IfcFinder/src/types.d.ts +0 -84
  104. package/dist/ifc/IfcIsolator/index.d.ts +0 -24
  105. package/dist/ifc/IfcJsonExporter/index.d.ts +0 -26
  106. package/dist/ifc/IfcJsonExporter/src/ifc-geometry-types.d.ts +0 -4
  107. package/dist/ifc/IfcJsonExporter/src/index.d.ts +0 -1
  108. package/dist/ifc/IfcPropertiesManager/index.d.ts +0 -289
  109. package/dist/ifc/IfcPropertiesManager/src/index.d.ts +0 -3
  110. package/dist/ifc/IfcPropertiesManager/src/rel-attrs.d.ts +0 -7
  111. package/dist/ifc/IfcPropertiesManager/src/rel-names.d.ts +0 -3
  112. package/dist/ifc/IfcPropertiesManager/src/types.d.ts +0 -18
  113. package/dist/ifc/IfcRelationsIndexer/index.d.ts +0 -195
  114. package/dist/ifc/IfcRelationsIndexer/src/index.d.ts +0 -2
  115. package/dist/ifc/IfcRelationsIndexer/src/newVersion.d.ts +0 -51
  116. package/dist/ifc/IfcRelationsIndexer/src/relToAttributesMap.d.ts +0 -5
  117. package/dist/ifc/IfcRelationsIndexer/src/types.d.ts +0 -73
  118. package/dist/ifc/Utils/ifc-categories.d.ts +0 -7
  119. package/dist/ifc/Utils/ifc-category-case.d.ts +0 -3
  120. package/dist/ifc/Utils/ifc-category-map.d.ts +0 -6
  121. package/dist/ifc/Utils/ifc-elements-map.d.ts +0 -11
  122. package/dist/ifc/Utils/index.d.ts +0 -5
  123. package/dist/ifc/Utils/properties-utils.d.ts +0 -25
  124. package/dist/ifc/index.d.ts +0 -6
  125. package/dist/measurement/MeasurementUtils/index.d.ts +0 -105
  126. package/dist/measurement/index.d.ts +0 -1
  127. package/dist/namespace.d.ts +0 -6018
  128. package/dist/openbim/BCFTopics/index.d.ts +0 -114
  129. package/dist/openbim/BCFTopics/src/Comment.d.ts +0 -40
  130. package/dist/openbim/BCFTopics/src/Topic.d.ts +0 -127
  131. package/dist/openbim/BCFTopics/src/bcf-topics-config.d.ts +0 -121
  132. package/dist/openbim/BCFTopics/src/importers/extensions.d.ts +0 -2
  133. package/dist/openbim/BCFTopics/src/importers/index.d.ts +0 -1
  134. package/dist/openbim/BCFTopics/src/index.d.ts +0 -5
  135. package/dist/openbim/BCFTopics/src/types.d.ts +0 -19
  136. package/dist/openbim/IDSSpecifications/index.d.ts +0 -60
  137. package/dist/openbim/IDSSpecifications/src/Specification.d.ts +0 -40
  138. package/dist/openbim/IDSSpecifications/src/exporters/parameter.d.ts +0 -2
  139. package/dist/openbim/IDSSpecifications/src/facets/Attribute.d.ts +0 -13
  140. package/dist/openbim/IDSSpecifications/src/facets/Classification.d.ts +0 -21
  141. package/dist/openbim/IDSSpecifications/src/facets/Entity.d.ts +0 -15
  142. package/dist/openbim/IDSSpecifications/src/facets/Facet.d.ts +0 -26
  143. package/dist/openbim/IDSSpecifications/src/facets/Material.d.ts +0 -10
  144. package/dist/openbim/IDSSpecifications/src/facets/PartOf.d.ts +0 -26
  145. package/dist/openbim/IDSSpecifications/src/facets/Property.d.ts +0 -25
  146. package/dist/openbim/IDSSpecifications/src/facets/index.d.ts +0 -5
  147. package/dist/openbim/IDSSpecifications/src/importers/attribute.d.ts +0 -3
  148. package/dist/openbim/IDSSpecifications/src/importers/classification.d.ts +0 -3
  149. package/dist/openbim/IDSSpecifications/src/importers/entity.d.ts +0 -3
  150. package/dist/openbim/IDSSpecifications/src/importers/index.d.ts +0 -3
  151. package/dist/openbim/IDSSpecifications/src/importers/parameter.d.ts +0 -2
  152. package/dist/openbim/IDSSpecifications/src/importers/property.d.ts +0 -3
  153. package/dist/openbim/IDSSpecifications/src/index.d.ts +0 -3
  154. package/dist/openbim/IDSSpecifications/src/types.d.ts +0 -70
  155. package/dist/openbim/index.d.ts +0 -2
  156. package/dist/utils/bbox.d.ts +0 -7
  157. package/dist/utils/geometry.d.ts +0 -1
  158. package/dist/utils/index.d.ts +0 -6
  159. package/dist/utils/materials.d.ts +0 -4
  160. package/dist/utils/section-generator.d.ts +0 -31
  161. package/dist/utils/uuid.d.ts +0 -6
  162. package/dist/utils/vertex-picker.d.ts +0 -116
@@ -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
- }
@@ -1,4 +0,0 @@
1
- export * from "./types";
2
- export * from "./ifc-finder-query";
3
- export * from "./ifc-basic-query";
4
- export * from "./ifc-property-query";
@@ -1,84 +0,0 @@
1
- /**
2
- * A rule for the {@link IfcFinder} to search items based on their category.
3
- */
4
- export interface IfcCategoryRule {
5
- /**
6
- * The type of this rule. All rules have a fixed type.
7
- */
8
- type: "category";
9
- /**
10
- * The category value. It's a regular expression, so you can make complex queries and use ".*" to match all categories.
11
- */
12
- value: RegExp;
13
- }
14
- /**
15
- * A rule for the {@link IfcFinder} to search items based on the properties defined in their property sets.
16
- */
17
- export interface IfcPropertyRule {
18
- /**
19
- * The type of this rule. All rules have a fixed type.
20
- */
21
- type: "property";
22
- /**
23
- * The name of the property. It's a regular expression, so you can make complex queries and use ".*" to match all names.
24
- */
25
- name: RegExp;
26
- /**
27
- * The value of the property. It's a regular expression, so you can make complex queries and use ".*" to match all values.
28
- */
29
- value: RegExp;
30
- }
31
- /**
32
- * A rule for the {@link IfcFinder} to search items based on the value of a numeric property defined in their property sets.
33
- */
34
- export interface IfcOperatorRule {
35
- /**
36
- * The type of this rule. All rules have a fixed type.
37
- */
38
- type: "operator";
39
- /**
40
- * The name of the property. It's a regular expression, so you can make complex queries and use ".*" to match all names.
41
- */
42
- name: RegExp;
43
- /**
44
- * The value of the property.
45
- */
46
- value: number;
47
- /**
48
- * The operator to apply to the numeric value.
49
- */
50
- operator: "<" | ">" | "=" | "<=" | ">=";
51
- }
52
- /**
53
- * The type of rules that can be used in the queries of the {@link IfcFinder}.
54
- */
55
- export type IfcFinderRule = IfcCategoryRule | IfcPropertyRule | IfcOperatorRule;
56
- /**
57
- * The data type used when the queries of the {@link IfcFinder} export or import query data to persist it.
58
- */
59
- export type SerializedQuery = {
60
- /**
61
- * {@link IfcFinderQuery.name}
62
- */
63
- name: string;
64
- /**
65
- * {@link IfcFinderQuery.inclusive}
66
- */
67
- inclusive: boolean;
68
- /**
69
- * The type of query.
70
- */
71
- type: string;
72
- /**
73
- * {@link IfcFinderQuery.ids}
74
- */
75
- ids: {
76
- [modelID: string]: number[];
77
- };
78
- /**
79
- * {@link IfcFinderQuery.rules}
80
- */
81
- rules: {
82
- [key: string]: any;
83
- }[];
84
- };
@@ -1,24 +0,0 @@
1
- import * as WEBIFC from "web-ifc";
2
- import { Component, Components } from "../../core";
3
- /**
4
- * Component to isolate certain elements from an IFC and export to another IFC. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/IfcIsolator). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/IfcIsolator).
5
- */
6
- export declare class IfcIsolator extends Component {
7
- /**
8
- * A unique identifier for the component.
9
- * This UUID is used to register the component within the Components system.
10
- */
11
- static readonly uuid: "6eb0ba2f-71c0-464e-bcec-2d7c335186b2";
12
- /** {@link Component.enabled} */
13
- enabled: boolean;
14
- constructor(components: Components);
15
- getIsolatedElements(webIfc: WEBIFC.IfcAPI, modelID: number, elementIDs: Array<number>): Promise<any[]>;
16
- /**
17
- * Exports isolated elements to the new model.
18
- * @param webIfc The instance of [web-ifc](https://github.com/ThatOpen/engine_web-ifc) to use.
19
- * @param modelID ID of the new IFC model.
20
- * @param isolatedElements The array of isolated elements
21
- */
22
- export(webIfc: WEBIFC.IfcAPI, modelID: number, isolatedElements: Array<any>): Promise<Uint8Array>;
23
- splitIfc(webIfc: WEBIFC.IfcAPI, ifcFile: ArrayBuffer, idsToExtract: Array<number>): Promise<Uint8Array>;
24
- }
@@ -1,26 +0,0 @@
1
- import * as WEBIFC from "web-ifc";
2
- import * as FRAG from "@thatopen/fragments";
3
- import { Component, Components } from "../../core";
4
- export * from "./src";
5
- /**
6
- * Component to export all the properties from an IFC to a JS object. 📕 [Tutorial](https://docs.thatopen.com/Tutorials/Components/Core/IfcJsonExporter). 📘 [API](https://docs.thatopen.com/api/@thatopen/components/classes/IfcJsonExporter).
7
- */
8
- export declare class IfcJsonExporter 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: "b32c4332-cd67-436e-ba7f-196646c7a635";
14
- /** {@link Component.enabled} */
15
- enabled: boolean;
16
- constructor(components: Components);
17
- /**
18
- * Exports all the properties of an IFC into an array of JS objects.
19
- * @param webIfc The instance of [web-ifc](https://github.com/ThatOpen/engine_web-ifc) to use.
20
- * @param modelID ID of the IFC model whose properties to extract.
21
- * @param indirect whether to get the indirect relationships as well.
22
- * @param recursiveSpatial whether to get the properties of spatial items recursively
23
- * to make the location data available (e.g. absolute position of building).
24
- */
25
- export(webIfc: WEBIFC.IfcAPI, modelID: number, indirect?: boolean, recursiveSpatial?: boolean): Promise<FRAG.IfcProperties>;
26
- }
@@ -1,4 +0,0 @@
1
- /**
2
- * A Set of unique numbers representing different types of IFC geometries.
3
- */
4
- export declare const GeometryTypes: Set<number>;
@@ -1 +0,0 @@
1
- export * from "./ifc-geometry-types";
@@ -1,289 +0,0 @@
1
- import * as WEBIFC from "web-ifc";
2
- import { FragmentsGroup } from "@thatopen/fragments";
3
- import { Component, Disposable, Event, Components } from "../../core";
4
- import { IfcRelation } from "../IfcRelationsIndexer";
5
- /**
6
- * Types for boolean properties in IFC schema.
7
- */
8
- export type BooleanPropTypes = "IfcBoolean" | "IfcLogical";
9
- /**
10
- * Types for string properties in IFC schema.
11
- */
12
- export type StringPropTypes = "IfcText" | "IfcLabel" | "IfcIdentifier";
13
- /**
14
- * Types for numeric properties in IFC schema.
15
- */
16
- export type NumericPropTypes = "IfcInteger" | "IfcReal";
17
- /**
18
- * Interface representing a map of changed entities in a model. The keys are model UUIDs, and the values are sets of express IDs of changed entities.
19
- */
20
- export interface ChangeMap {
21
- [modelID: string]: Set<number>;
22
- }
23
- /**
24
- * Interface representing a map of attribute listeners. The keys are model UUIDs, and the values are objects with express IDs as keys, and objects with attribute names as keys, and Event objects as values.
25
- */
26
- export interface AttributeListener {
27
- [modelID: string]: {
28
- [expressID: number]: {
29
- [attributeName: string]: Event<String | Boolean | Number>;
30
- };
31
- };
32
- }
33
- /**
34
- * Component to manage and edit properties and Psets in IFC files.
35
- */
36
- export declare class IfcPropertiesManager extends Component implements Disposable {
37
- /**
38
- * A unique identifier for the component.
39
- * This UUID is used to register the component within the Components system.
40
- */
41
- static readonly uuid: "58c2d9f0-183c-48d6-a402-dfcf5b9a34df";
42
- /** {@link Disposable.onDisposed} */
43
- readonly onDisposed: Event<string>;
44
- /**
45
- * Event triggered when a file is requested for export.
46
- */
47
- readonly onRequestFile: Event<unknown>;
48
- /**
49
- * ArrayBuffer containing the IFC data to be exported.
50
- */
51
- ifcToExport: ArrayBuffer | null;
52
- /**
53
- * Event triggered when an element is added to a Pset.
54
- */
55
- readonly onElementToPset: Event<{
56
- model: FragmentsGroup;
57
- psetID: number;
58
- elementID: number;
59
- }>;
60
- /**
61
- * Event triggered when a property is added to a Pset.
62
- */
63
- readonly onPropToPset: Event<{
64
- model: FragmentsGroup;
65
- psetID: number;
66
- propID: number;
67
- }>;
68
- /**
69
- * Event triggered when a Pset is removed.
70
- */
71
- readonly onPsetRemoved: Event<{
72
- model: FragmentsGroup;
73
- psetID: number;
74
- }>;
75
- /**
76
- * Event triggered when data in the model changes.
77
- */
78
- readonly onDataChanged: Event<{
79
- model: FragmentsGroup;
80
- expressID: number;
81
- }>;
82
- /**
83
- * Configuration for the WebAssembly module.
84
- */
85
- wasm: {
86
- path: string;
87
- absolute: boolean;
88
- };
89
- /** {@link Component.enabled} */
90
- enabled: boolean;
91
- /**
92
- * Map of attribute listeners.
93
- */
94
- attributeListeners: AttributeListener;
95
- /**
96
- * The currently selected model.
97
- */
98
- selectedModel?: FragmentsGroup;
99
- /**
100
- * Map of changed entities in the model.
101
- */
102
- changeMap: ChangeMap;
103
- constructor(components: Components);
104
- /** {@link Disposable.dispose} */
105
- dispose(): void;
106
- /**
107
- * Static method to retrieve the IFC schema from a given model.
108
- *
109
- * @param model - The FragmentsGroup model from which to retrieve the IFC schema.
110
- * @throws Will throw an error if the IFC schema is not found in the model.
111
- * @returns The IFC schema associated with the given model.
112
- */
113
- static getIFCSchema(model: FragmentsGroup): import("@thatopen/fragments").IfcSchema;
114
- /**
115
- * Method to add or update entity attributes in the model.
116
- *
117
- * @param model - The FragmentsGroup model in which to set the properties.
118
- * @param dataToSave - An array of objects representing the properties to be saved.
119
- * Each object must have an `expressID` property, which is the express ID of the entity in the model.
120
- * The rest of the properties will be set as the properties of the entity.
121
- *
122
- * @returns A promise that resolves when all the properties have been set.
123
- *
124
- * @throws Will throw an error if any of the `expressID` properties are missing in the `dataToSave` array.
125
- */
126
- setData(model: FragmentsGroup, ...dataToSave: Record<string, any>[]): Promise<void>;
127
- /**
128
- * Creates a new Property Set (Pset) in the given model.
129
- *
130
- * @param model - The FragmentsGroup model in which to create the Pset.
131
- * @param name - The name of the Pset.
132
- * @param description - (Optional) The description of the Pset.
133
- *
134
- * @returns A promise that resolves with an object containing the newly created Pset and its relation.
135
- *
136
- * @throws Will throw an error if the IFC schema is not found in the model.
137
- * @throws Will throw an error if no OwnerHistory is found in the model.
138
- */
139
- newPset(model: FragmentsGroup, name: string, description?: string): Promise<{
140
- pset: WEBIFC.IFC4.IfcPropertySet | WEBIFC.IFC2X3.IfcPropertySet | WEBIFC.IFC4X3.IfcPropertySet;
141
- }>;
142
- /**
143
- * Removes a Property Set (Pset) from the given model.
144
- *
145
- * @param model - The FragmentsGroup model from which to remove the Pset.
146
- * @param psetID - The express IDs of the Psets to be removed.
147
- *
148
- * @returns A promise that resolves when all the Psets have been removed.
149
- *
150
- * @throws Will throw an error if any of the `expressID` properties are missing in the `psetID` array.
151
- * @throws Will throw an error if the Pset to be removed is not of type `IFCPROPERTYSET`.
152
- * @throws Will throw an error if no relation is found between the Pset and the model.
153
- */
154
- removePset(model: FragmentsGroup, ...psetID: number[]): Promise<void>;
155
- /**
156
- * Creates a new single-value property of type string in the given model.
157
- *
158
- * @param model - The FragmentsGroup model in which to create the property.
159
- * @param type - The type of the property value. Must be a string property type.
160
- * @param name - The name of the property.
161
- * @param value - The value of the property. Must be a string.
162
- *
163
- * @returns The newly created single-value property.
164
- *
165
- * @throws Will throw an error if the IFC schema is not found in the model.
166
- * @throws Will throw an error if no OwnerHistory is found in the model.
167
- */
168
- newSingleStringProperty(model: FragmentsGroup, type: StringPropTypes, name: string, value: string): Promise<WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
169
- /**
170
- * Creates a new single-value property of type numeric in the given model.
171
- *
172
- * @param model - The FragmentsGroup model in which to create the property.
173
- * @param type - The type of the property value. Must be a numeric property type.
174
- * @param name - The name of the property.
175
- * @param value - The value of the property. Must be a number.
176
- *
177
- * @returns The newly created single-value property.
178
- *
179
- * @throws Will throw an error if the IFC schema is not found in the model.
180
- * @throws Will throw an error if no OwnerHistory is found in the model.
181
- */
182
- newSingleNumericProperty(model: FragmentsGroup, type: NumericPropTypes, name: string, value: number): Promise<WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
183
- /**
184
- * Creates a new single-value property of type boolean in the given model.
185
- *
186
- * @param model - The FragmentsGroup model in which to create the property.
187
- * @param type - The type of the property value. Must be a boolean property type.
188
- * @param name - The name of the property.
189
- * @param value - The value of the property. Must be a boolean.
190
- *
191
- * @returns The newly created single-value property.
192
- *
193
- * @throws Will throw an error if the IFC schema is not found in the model.
194
- * @throws Will throw an error if no OwnerHistory is found in the model.
195
- */
196
- newSingleBooleanProperty(model: FragmentsGroup, type: BooleanPropTypes, name: string, value: boolean): Promise<WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
197
- /**
198
- * Removes a property from a Property Set (Pset) in the given model.
199
- *
200
- * @param model - The FragmentsGroup model from which to remove the property.
201
- * @param psetID - The express ID of the Pset from which to remove the property.
202
- * @param propID - The express ID of the property to be removed.
203
- *
204
- * @returns A promise that resolves when the property has been removed.
205
- *
206
- * @throws Will throw an error if the Pset or the property to be removed are not found in the model.
207
- * @throws Will throw an error if the Pset to be removed is not of type `IFCPROPERTYSET`.
208
- */
209
- removePsetProp(model: FragmentsGroup, psetID: number, propID: number): Promise<void>;
210
- /**
211
- * @deprecated Use indexer.addEntitiesRelation instead. This will be removed in future releases.
212
- */
213
- addElementToPset(model: FragmentsGroup, psetID: number, ...expressIDs: number[]): void;
214
- /**
215
- * Adds elements to a Property Set (Pset) in the given model.
216
- *
217
- * @param model - The FragmentsGroup model in which to add the elements.
218
- * @param psetID - The express ID of the Pset to which to add the elements.
219
- * @param elementID - The express IDs of the elements to be added.
220
- *
221
- * @returns A promise that resolves when all the elements have been added.
222
- *
223
- * @throws Will throw an error if the Pset or the elements to be added are not found in the model.
224
- * @throws Will throw an error if the Pset to be added to is not of type `IFCPROPERTYSET`.
225
- * @throws Will throw an error if no relation is found between the Pset and the model.
226
- */
227
- addPropToPset(model: FragmentsGroup, psetID: number, ...propID: number[]): Promise<void>;
228
- /**
229
- * Creates a new instance of a relationship between entities in the IFC model.
230
- *
231
- * @param model - The FragmentsGroup model in which to create the relationship.
232
- * @param type - The type of the relationship to create.
233
- * @param relatingID - The express ID of the entity that is related to the other entities.
234
- * @param relatedIDs - The express IDs of the entities that are related to the relating entity.
235
- *
236
- * @returns A promise that resolves with the newly created relationship.
237
- *
238
- * @throws Will throw an error if the relationship type is unsupported.
239
- */
240
- createIfcRel(model: FragmentsGroup, type: IfcRelation, relatingID: number, relatedIDs: number[]): Promise<any>;
241
- /**
242
- * Saves the changes made to the model to a new IFC file.
243
- *
244
- * @param model - The FragmentsGroup model from which to save the changes.
245
- * @param ifcToSaveOn - The Uint8Array representing the original IFC file.
246
- *
247
- * @returns A promise that resolves with the modified IFC data as a Uint8Array.
248
- *
249
- * @throws Will throw an error if any issues occur during the saving process.
250
- */
251
- saveToIfc(model: FragmentsGroup, ifcToSaveOn: Uint8Array): Promise<Uint8Array>;
252
- /**
253
- * Retrieves all the entities of a specific type from the model and returns their express IDs wrapped in Handles.
254
- * This is used to make references of an entity inside another entity attributes.
255
- *
256
- * @param model - The FragmentsGroup model from which to retrieve the entities.
257
- * @param type - The type of the entities to retrieve. This should be the express ID of the IFC type.
258
- *
259
- * @returns A promise that resolves with an array of Handles, each containing the express ID of an entity of the specified type.
260
- * @returns null if the model doesn't have any entity of that type
261
- */
262
- getEntityRef(model: FragmentsGroup, type: number): Promise<WEBIFC.Handle<unknown>[] | null>;
263
- /**
264
- * Sets an attribute listener for a specific attribute of an entity in the model.
265
- * The listener will trigger an event whenever the attribute's value changes.
266
- *
267
- * @param model - The FragmentsGroup model in which to set the attribute listener.
268
- * @param expressID - The express ID of the entity for which to set the listener.
269
- * @param attributeName - The name of the attribute for which to set the listener.
270
- *
271
- * @returns The event that will be triggered when the attribute's value changes.
272
- *
273
- * @throws Will throw an error if the entity with the given expressID doesn't exist.
274
- * @throws Will throw an error if the attribute is an array or null, and it can't have a listener.
275
- * @throws Will throw an error if the attribute has a badly defined handle.
276
- */
277
- setAttributeListener(model: FragmentsGroup, expressID: number, attributeName: string): Promise<Event<String | Number | Boolean>>;
278
- private getNewExpressID;
279
- private newGUID;
280
- getOwnerHistory(model: FragmentsGroup): Promise<{
281
- entity: {
282
- [attribute: string]: any;
283
- };
284
- handle: WEBIFC.Handle<unknown>;
285
- }>;
286
- registerChange(model: FragmentsGroup, ...expressID: number[]): void;
287
- newSingleProperty(model: FragmentsGroup, type: string, name: string, value: string | number | boolean): Promise<WEBIFC.IFC4.IfcPropertySingleValue | WEBIFC.IFC2X3.IfcPropertySingleValue | WEBIFC.IFC4X3.IfcPropertySingleValue>;
288
- }
289
- export * from "./src";
@@ -1,3 +0,0 @@
1
- export * from "./rel-attrs";
2
- export * from "./rel-names";
3
- export * from "./types";
@@ -1,7 +0,0 @@
1
- import { IfcRelName } from "./types";
2
- type IfcRelAttributePosition = {
3
- related: number;
4
- relating: number;
5
- };
6
- export declare const ifcRelAttrsPosition: Record<IfcRelName, IfcRelAttributePosition>;
7
- export {};
@@ -1,3 +0,0 @@
1
- import { IfcRelName } from "./types";
2
- import { IfcRelation } from "../../IfcRelationsIndexer";
3
- export declare const ifcRelClassNames: Record<IfcRelation, IfcRelName>;
@@ -1,18 +0,0 @@
1
- export type IfcRelationNames = [
2
- "IfcRelAssignsToControl",
3
- "IfcRelAssignsToGroup",
4
- "IfcRelAssignsToProduct",
5
- "IfcRelAssociatesClassification",
6
- "IfcRelAssociatesMaterial",
7
- "IfcRelAssociatesDocument",
8
- "IfcRelContainedInSpatialStructure",
9
- "IfcRelFlowControlElements",
10
- "IfcRelConnectsElements",
11
- "IfcRelDeclares",
12
- "IfcRelAggregates",
13
- "IfcRelNests",
14
- "IfcRelDefinesByProperties",
15
- "IfcRelDefinesByType",
16
- "IfcRelDefinesByTemplate"
17
- ];
18
- export type IfcRelName = IfcRelationNames[number];