ifc-reader-2 1.2.5 → 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.
@@ -0,0 +1,17 @@
1
+ # Third-Party Licenses
2
+
3
+ This project uses the following open-source libraries:
4
+
5
+ ## web-ifc
6
+ - **License**: Mozilla Public License 2.0 (MPL-2.0)
7
+ - **Repository**: https://github.com/ThatOpen/engine_web-ifc
8
+ - **Copyright**: Copyright (c) 2020-2024 ThatOpen
9
+ - **Description**: A blazing fast JavaScript library for reading IFC files
10
+ - **Full License**: https://github.com/ThatOpen/engine_web-ifc/blob/main/LICENSE
11
+
12
+ ## three.js
13
+ - **License**: MIT License
14
+ - **Repository**: https://github.com/mrdoob/three.js
15
+ - **Copyright**: Copyright (c) 2010-2024 three.js authors
16
+ - **Description**: JavaScript 3D library
17
+ - **Full License**: https://github.com/mrdoob/three.js/blob/dev/LICENSE
@@ -1,9 +1,22 @@
1
1
  import { Matrix4 } from 'three';
2
+ export interface LoadProgress {
3
+ stage: string;
4
+ progress: number;
5
+ message?: string;
6
+ elapsedMs?: number;
7
+ totalElapsedMs?: number;
8
+ }
9
+ export type ProgressCallback = (progress: LoadProgress) => void;
2
10
  export interface IfcProperties {
3
11
  [expressID: number]: {
4
12
  [attribute: string]: any;
5
13
  };
6
14
  }
15
+ export interface IFCElement {
16
+ type: number;
17
+ expressID: number;
18
+ [key: string]: ViralutionParameter | any;
19
+ }
7
20
  export declare class Fragment {
8
21
  normal: number[];
9
22
  position: number[];
@@ -33,8 +46,29 @@ export declare class ViralutionIFCModel {
33
46
  }
34
47
  export declare class ViralutionInformation {
35
48
  Data: {
36
- [key: number]: any;
49
+ [key: number]: {
50
+ [key: string]: ViralutionParameter | any;
51
+ };
37
52
  };
53
+ Relationships?: ViralutionRelationship[];
54
+ }
55
+ export interface ViralutionRelationship {
56
+ FromId: string;
57
+ ToId: string;
58
+ Type: string;
59
+ }
60
+ export interface ViralutionParameter {
61
+ [key: string]: any;
62
+ applicationInternalName: string;
63
+ applicationUnit: string;
64
+ applicationUnitType: string;
65
+ isReadOnly: boolean;
66
+ isShared: boolean;
67
+ isTypeParameter: boolean;
68
+ name: string;
69
+ units: string;
70
+ value: any;
71
+ type?: number;
38
72
  }
39
73
  export declare class ViralutionTrackingModel {
40
74
  Data: {
@@ -1,34 +1,32 @@
1
1
  import { IfcFragmentSettings } from './models/ifc-fragment-settings';
2
- import { ViralutionIFCModel } from './base-types';
2
+ import { ProgressCallback, ViralutionIFCModel } from './base-types';
3
3
  export declare class IFCReader {
4
4
  private _webIfc;
5
5
  settings: IfcFragmentSettings;
6
6
  private _fragments;
7
7
  private _spatialTree;
8
8
  private _propertyExporter;
9
+ private _relationshipExtractor;
9
10
  private _materials;
11
+ private _materialMap;
12
+ private _geometryCache;
13
+ private _vertexCache;
10
14
  private _customWasmPath;
11
- static readonly release = "3.1.2";
15
+ static readonly release = "0.0.75";
12
16
  constructor(autoSetWasm?: boolean, customWasmPath?: string);
13
17
  setup(): Promise<void>;
14
18
  private autoSetWasm;
15
- loadByUrl(url: string): Promise<ViralutionIFCModel>;
16
- load2(data: Uint8Array, coordinate?: boolean): Promise<ViralutionIFCModel>;
19
+ loadByUrl(url: string, onProgress?: ProgressCallback): Promise<ViralutionIFCModel>;
20
+ load2(data: Uint8Array, onProgress?: ProgressCallback, startTime?: number): Promise<ViralutionIFCModel>;
17
21
  readIfcFile(data: Uint8Array): Promise<number>;
18
22
  private getAllGeometries2;
19
23
  private _groupByGeometryId;
20
24
  private getMesh2;
21
25
  private getGeometry;
22
26
  private getAllProperties;
27
+ private getAllRelationships;
23
28
  private getWorldCoordinationMatrix;
24
29
  private _dispose;
25
- flattenObject(obj: {
26
- [key: string]: any;
27
- }, parentKey?: string, result?: {
28
- [key: string]: any;
29
- }): {
30
- [key: string]: any;
31
- };
32
30
  private generateInstancedMesh;
33
31
  private generateBoundingbox;
34
32
  }