ifc-reader-2 1.2.6 → 1.2.8
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/THIRD-PARTY-LICENSES.md +17 -0
- package/dist/base-types.d.ts +35 -1
- package/dist/ifc-reader.api.d.ts +9 -11
- package/dist/index.cjs +32 -35
- package/dist/index.js +21163 -20978
- package/dist/models/relationship-extractor/relationship-extractor.d.ts +57 -0
- package/package.json +4 -3
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { IfcProperties, ViralutionRelationship } from '../../base-types';
|
|
2
|
+
import * as WEBIFC from "web-ifc";
|
|
3
|
+
/**
|
|
4
|
+
* Extracts relationships from IFC files
|
|
5
|
+
*/
|
|
6
|
+
export declare class RelationshipExtractor {
|
|
7
|
+
/**
|
|
8
|
+
* Extract all relationships from an IFC model
|
|
9
|
+
* @param webIfc - The web-ifc API instance
|
|
10
|
+
* @param modelID - The IFC model ID (usually 0)
|
|
11
|
+
* @param loadedElementIds - Set of element IDs that are already loaded (optimization)
|
|
12
|
+
* @param properties - Pre-loaded properties to avoid redundant GetLine() calls
|
|
13
|
+
* @returns Array of ViralutionRelationship objects
|
|
14
|
+
*/
|
|
15
|
+
extract(webIfc: WEBIFC.IfcAPI, modelID: number, loadedElementIds: Set<number>, properties?: IfcProperties): Promise<ViralutionRelationship[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Extract spatial containment relationships (IN_BUILDING, ON_LEVEL, IN_SPACE)
|
|
18
|
+
*/
|
|
19
|
+
private extractSpatialContainment;
|
|
20
|
+
/**
|
|
21
|
+
* Extract aggregation relationships (PART_OF)
|
|
22
|
+
* This includes spatial hierarchy: Project→Site→Building→Storey
|
|
23
|
+
*/
|
|
24
|
+
private extractAggregation;
|
|
25
|
+
/**
|
|
26
|
+
* Extract material association relationships (USES_MATERIAL)
|
|
27
|
+
*/
|
|
28
|
+
private extractMaterialAssociations;
|
|
29
|
+
/**
|
|
30
|
+
* Extract type definition relationships (OF_TYPE)
|
|
31
|
+
*/
|
|
32
|
+
private extractTypeDefinitions;
|
|
33
|
+
/**
|
|
34
|
+
* Extract void/opening relationships (HAS_OPENING)
|
|
35
|
+
*/
|
|
36
|
+
private extractVoids;
|
|
37
|
+
/**
|
|
38
|
+
* Extract fill relationships (FILLS)
|
|
39
|
+
*/
|
|
40
|
+
private extractFills;
|
|
41
|
+
/**
|
|
42
|
+
* Extract element connection relationships (CONNECTS_TO)
|
|
43
|
+
*/
|
|
44
|
+
private extractConnections;
|
|
45
|
+
/**
|
|
46
|
+
* Extract nesting relationships (NESTED_IN)
|
|
47
|
+
*/
|
|
48
|
+
private extractNesting;
|
|
49
|
+
/**
|
|
50
|
+
* Extract ID from a reference object
|
|
51
|
+
*/
|
|
52
|
+
private getIdFromRef;
|
|
53
|
+
/**
|
|
54
|
+
* Extract IDs from an array of reference objects
|
|
55
|
+
*/
|
|
56
|
+
private getIdsFromRefArray;
|
|
57
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ifc-reader-2",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist",
|
|
10
|
-
"LICENSE"
|
|
10
|
+
"LICENSE",
|
|
11
|
+
"THIRD-PARTY-LICENSES.md"
|
|
11
12
|
],
|
|
12
13
|
"scripts": {
|
|
13
14
|
"dev": "cd examples && npx vite",
|
|
@@ -27,6 +28,6 @@
|
|
|
27
28
|
},
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"three": "^0.162.0",
|
|
30
|
-
"web-ifc": "^0.0.
|
|
31
|
+
"web-ifc": "^0.0.75"
|
|
31
32
|
}
|
|
32
33
|
}
|