@pilotdev/pilot-bim-dataprovider 23.0.2 → 23.0.4
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/README.md +42 -42
- package/lib/index.d.ts +7 -7
- package/lib/index.js +6 -6
- package/lib/index.js.map +1 -1
- package/lib/src/model/BimDataElement.d.ts +26 -15
- package/lib/src/model/BimDataElement.js +23 -14
- package/lib/src/model/BimDataElement.js.map +1 -1
- package/lib/src/model/BimDataElementPropertySet.d.ts +23 -23
- package/lib/src/model/BimDataElementPropertySet.js +29 -29
- package/lib/src/model/BimDataIfcType.d.ts +1206 -1206
- package/lib/src/model/BimDataIfcType.js +1207 -1207
- package/lib/src/model/BimDataModel.d.ts +16 -16
- package/lib/src/model/BimDataModel.js +54 -54
- package/lib/src/model/BimDataModelPart.d.ts +24 -24
- package/lib/src/model/BimDataModelPart.js +37 -37
- package/lib/src/model/BimDataTessellation.d.ts +6 -6
- package/lib/src/model/BimDataTessellation.js +8 -8
- package/lib/src/model/Consts.d.ts +2 -2
- package/lib/src/model/Consts.js +2 -2
- package/lib/src/utils/ViewerTools.d.ts +13 -13
- package/lib/src/utils/ViewerTools.js +137 -116
- package/lib/src/utils/ViewerTools.js.map +1 -1
- package/lib/src/utils/WasmTools.d.ts +10 -10
- package/lib/src/utils/WasmTools.js +59 -59
- package/lib/src/wasm/index.js +2 -2
- package/lib/src/wasm/pilot_bim_dataprovider.d.ts +137 -127
- package/lib/src/wasm/pilot_bim_dataprovider.js +15 -15
- package/lib/src/wasm/pilot_bim_dataprovider.wasm +0 -0
- package/package.json +34 -31
package/README.md
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
## Installation
|
|
2
|
-
> `npm
|
|
3
|
-
|
|
4
|
-
## Summary
|
|
5
|
-
|
|
6
|
-
This package contains tools for reading and writing data from information model data container (**.bm** files).
|
|
7
|
-
This component is part of the **Pilot Cloud** service (https://pilotcloud.ascon.net/).
|
|
8
|
-
|
|
9
|
-
## How to use
|
|
10
|
-
|
|
11
|
-
Initialize and read data from information model data container (**.bm** file).
|
|
12
|
-
|
|
13
|
-
```js
|
|
14
|
-
import { BimDataBigIntMaxValue, BimDataModel } from "@pilotdev/pilot-bim-dataprovider";
|
|
15
|
-
|
|
16
|
-
// Create new instance of BimModel
|
|
17
|
-
const bimModel = new BimDataModel();
|
|
18
|
-
|
|
19
|
-
// Initialize model.
|
|
20
|
-
// Method returns Promise<void>
|
|
21
|
-
await bimModel.init();
|
|
22
|
-
|
|
23
|
-
// Read bm file and open it
|
|
24
|
-
// fileBuffer - Buffer of a .bm file
|
|
25
|
-
// uniqueId - must be unique identfier
|
|
26
|
-
const modelPart = bimModel.openModelPart("uniqueId", fileBuffer);
|
|
27
|
-
|
|
28
|
-
// Get all elements of the model-part
|
|
29
|
-
const elements = modelPart.getAllElements();
|
|
30
|
-
|
|
31
|
-
// Get latest version of properties of the element
|
|
32
|
-
const properties = modelPart.getElementProperties(elements[5].guid, BimDataBigIntMaxValue);
|
|
33
|
-
|
|
34
|
-
// Get all tessellations
|
|
35
|
-
const tesselations = modelPart.getTessellations();
|
|
36
|
-
|
|
37
|
-
// Close model part after end
|
|
38
|
-
modelPart.close();
|
|
39
|
-
|
|
40
|
-
// Dispose BimModel after all
|
|
41
|
-
bimModel.dispose();
|
|
42
|
-
|
|
1
|
+
## Installation
|
|
2
|
+
> `npm install @pilotdev/pilot-bim-dataprovider`
|
|
3
|
+
|
|
4
|
+
## Summary
|
|
5
|
+
|
|
6
|
+
This package contains tools for reading and writing data from information model data container (**.bm** files).
|
|
7
|
+
This component is part of the **Pilot Cloud** service (https://pilotcloud.ascon.net/).
|
|
8
|
+
|
|
9
|
+
## How to use
|
|
10
|
+
|
|
11
|
+
Initialize and read data from information model data container (**.bm** file).
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
import { BimDataBigIntMaxValue, BimDataModel } from "@pilotdev/pilot-bim-dataprovider";
|
|
15
|
+
|
|
16
|
+
// Create new instance of BimModel
|
|
17
|
+
const bimModel = new BimDataModel();
|
|
18
|
+
|
|
19
|
+
// Initialize model.
|
|
20
|
+
// Method returns Promise<void>
|
|
21
|
+
await bimModel.init();
|
|
22
|
+
|
|
23
|
+
// Read bm file and open it
|
|
24
|
+
// fileBuffer - Buffer of a .bm file
|
|
25
|
+
// uniqueId - must be unique identfier
|
|
26
|
+
const modelPart = bimModel.openModelPart("uniqueId", fileBuffer);
|
|
27
|
+
|
|
28
|
+
// Get all elements of the model-part
|
|
29
|
+
const elements = modelPart.getAllElements();
|
|
30
|
+
|
|
31
|
+
// Get latest version of properties of the element
|
|
32
|
+
const properties = modelPart.getElementProperties(elements[5].guid, BimDataBigIntMaxValue);
|
|
33
|
+
|
|
34
|
+
// Get all tessellations
|
|
35
|
+
const tesselations = modelPart.getTessellations();
|
|
36
|
+
|
|
37
|
+
// Close model part after end
|
|
38
|
+
modelPart.close();
|
|
39
|
+
|
|
40
|
+
// Dispose BimModel after all
|
|
41
|
+
bimModel.dispose();
|
|
42
|
+
|
|
43
43
|
```
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { BimDataModel, IBimDataModel } from "./src/model/BimDataModel.js";
|
|
2
|
-
export { IBimDataModelPart } from "./src/model/BimDataModelPart.js";
|
|
3
|
-
export { BimDataBigIntMaxValue, BimDataBigIntMinValue } from "./src/model/Consts.js";
|
|
4
|
-
export { BimDataElement, BimDataMeshProperty } from "./src/model/BimDataElement.js";
|
|
5
|
-
export { BimDataIfcType } from "./src/model/BimDataIfcType.js";
|
|
6
|
-
export { BimDataElementPropertySet, BimDataElementProperty, BimDataElementPropertyValue } from "./src/model/BimDataElementPropertySet.js";
|
|
7
|
-
export { BimDataTessellation } from "./src/model/BimDataTessellation.js";
|
|
1
|
+
export { BimDataModel, IBimDataModel } from "./src/model/BimDataModel.js";
|
|
2
|
+
export { IBimDataModelPart } from "./src/model/BimDataModelPart.js";
|
|
3
|
+
export { BimDataBigIntMaxValue, BimDataBigIntMinValue } from "./src/model/Consts.js";
|
|
4
|
+
export { BimDataElement, BimDataMeshProperty, BimDataGridObject, BimDataGridAxis } from "./src/model/BimDataElement.js";
|
|
5
|
+
export { BimDataIfcType } from "./src/model/BimDataIfcType.js";
|
|
6
|
+
export { BimDataElementPropertySet, BimDataElementProperty, BimDataElementPropertyValue } from "./src/model/BimDataElementPropertySet.js";
|
|
7
|
+
export { BimDataTessellation } from "./src/model/BimDataTessellation.js";
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { BimDataModel } from "./src/model/BimDataModel.js";
|
|
2
|
-
export { BimDataBigIntMaxValue, BimDataBigIntMinValue } from "./src/model/Consts.js";
|
|
3
|
-
export { BimDataElement, BimDataMeshProperty } from "./src/model/BimDataElement.js";
|
|
4
|
-
export { BimDataIfcType } from "./src/model/BimDataIfcType.js";
|
|
5
|
-
export { BimDataElementPropertySet, BimDataElementProperty, BimDataElementPropertyValue } from "./src/model/BimDataElementPropertySet.js";
|
|
6
|
-
export { BimDataTessellation } from "./src/model/BimDataTessellation.js";
|
|
1
|
+
export { BimDataModel } from "./src/model/BimDataModel.js";
|
|
2
|
+
export { BimDataBigIntMaxValue, BimDataBigIntMinValue } from "./src/model/Consts.js";
|
|
3
|
+
export { BimDataElement, BimDataMeshProperty, BimDataGridObject, BimDataGridAxis } from "./src/model/BimDataElement.js";
|
|
4
|
+
export { BimDataIfcType } from "./src/model/BimDataIfcType.js";
|
|
5
|
+
export { BimDataElementPropertySet, BimDataElementProperty, BimDataElementPropertyValue } from "./src/model/BimDataElementPropertySet.js";
|
|
6
|
+
export { BimDataTessellation } from "./src/model/BimDataTessellation.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACxH,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,0CAA0C,CAAC;AAC1I,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC"}
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
export declare class BimDataElement {
|
|
2
|
-
guid: string;
|
|
3
|
-
objectState: unknown;
|
|
4
|
-
revision: bigint;
|
|
5
|
-
parentGuid: string;
|
|
6
|
-
name: string;
|
|
7
|
-
type: string;
|
|
8
|
-
representationType: string;
|
|
9
|
-
representationStatus: string;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
export declare class BimDataElement {
|
|
2
|
+
guid: string;
|
|
3
|
+
objectState: unknown;
|
|
4
|
+
revision: bigint;
|
|
5
|
+
parentGuid: string;
|
|
6
|
+
name: string;
|
|
7
|
+
type: string;
|
|
8
|
+
representationType: string;
|
|
9
|
+
representationStatus: string;
|
|
10
|
+
gridObject: BimDataGridObject;
|
|
11
|
+
meshesProperties: Map<string, BimDataMeshProperty[]>;
|
|
12
|
+
}
|
|
13
|
+
export declare class BimDataMeshProperty {
|
|
14
|
+
meshColor: number;
|
|
15
|
+
meshPlacement: number[];
|
|
16
|
+
}
|
|
17
|
+
export declare class BimDataGridObject {
|
|
18
|
+
gridPlacement: number[];
|
|
19
|
+
gridAxes: BimDataGridAxis[];
|
|
20
|
+
}
|
|
21
|
+
export declare class BimDataGridAxis {
|
|
22
|
+
id: number;
|
|
23
|
+
type: number;
|
|
24
|
+
data: number[];
|
|
25
|
+
label: string;
|
|
26
|
+
}
|
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
export class BimDataElement {
|
|
2
|
-
constructor() {
|
|
3
|
-
this.revision = BigInt(0);
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export class BimDataElement {
|
|
2
|
+
constructor() {
|
|
3
|
+
this.revision = BigInt(0);
|
|
4
|
+
this.meshesProperties = new Map();
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export class BimDataMeshProperty {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.meshColor = 0;
|
|
10
|
+
this.meshPlacement = new Array();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class BimDataGridObject {
|
|
14
|
+
constructor() {
|
|
15
|
+
this.gridPlacement = new Array();
|
|
16
|
+
this.gridAxes = new Array();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export class BimDataGridAxis {
|
|
20
|
+
constructor() {
|
|
21
|
+
this.data = new Array();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
15
24
|
//# sourceMappingURL=BimDataElement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BimDataElement.js","sourceRoot":"","sources":["../../../src/model/BimDataElement.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAc;IAA3B;QAGE,aAAQ,GAAW,MAAM,CAAC,CAAC,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"BimDataElement.js","sourceRoot":"","sources":["../../../src/model/BimDataElement.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,cAAc;IAA3B;QAGE,aAAQ,GAAW,MAAM,CAAC,CAAC,CAAC,CAAC;QAQ7B,qBAAgB,GAAuC,IAAI,GAAG,EAAE,CAAC;IACnE,CAAC;CAAA;AAED,MAAM,OAAO,mBAAmB;IAAhC;QACE,cAAS,GAAW,CAAC,CAAC;QACtB,kBAAa,GAAa,IAAI,KAAK,EAAE,CAAC;IACxC,CAAC;CAAA;AAED,MAAM,OAAO,iBAAiB;IAA9B;QACE,kBAAa,GAAa,IAAI,KAAK,EAAE,CAAC;QACtC,aAAQ,GAAsB,IAAI,KAAK,EAAE,CAAC;IAC5C,CAAC;CAAA;AAED,MAAM,OAAO,eAAe;IAA5B;QAGE,SAAI,GAAa,IAAI,KAAK,EAAE,CAAC;IAE/B,CAAC;CAAA"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { BimDataIfcType } from "./BimDataIfcType";
|
|
2
|
-
export declare class BimDataElementPropertySet {
|
|
3
|
-
name: string;
|
|
4
|
-
properties: BimDataElementProperty[];
|
|
5
|
-
type: BimDataIfcType;
|
|
6
|
-
}
|
|
7
|
-
export declare class BimDataElementProperty {
|
|
8
|
-
name: string;
|
|
9
|
-
unit: number;
|
|
10
|
-
value: BimDataElementPropertyValue;
|
|
11
|
-
}
|
|
12
|
-
export declare class BimDataElementPropertyValue {
|
|
13
|
-
str_value?: string;
|
|
14
|
-
int_value?: number;
|
|
15
|
-
double_value?: number;
|
|
16
|
-
date_value?: bigint;
|
|
17
|
-
array_value: Array<string>;
|
|
18
|
-
decimal_value?: number;
|
|
19
|
-
guid_value?: string;
|
|
20
|
-
array_int_value: Array<number>;
|
|
21
|
-
bool_value?: boolean;
|
|
22
|
-
get value(): unknown;
|
|
23
|
-
}
|
|
1
|
+
import { BimDataIfcType } from "./BimDataIfcType";
|
|
2
|
+
export declare class BimDataElementPropertySet {
|
|
3
|
+
name: string;
|
|
4
|
+
properties: BimDataElementProperty[];
|
|
5
|
+
type: BimDataIfcType;
|
|
6
|
+
}
|
|
7
|
+
export declare class BimDataElementProperty {
|
|
8
|
+
name: string;
|
|
9
|
+
unit: number;
|
|
10
|
+
value: BimDataElementPropertyValue;
|
|
11
|
+
}
|
|
12
|
+
export declare class BimDataElementPropertyValue {
|
|
13
|
+
str_value?: string;
|
|
14
|
+
int_value?: number;
|
|
15
|
+
double_value?: number;
|
|
16
|
+
date_value?: bigint;
|
|
17
|
+
array_value: Array<string>;
|
|
18
|
+
decimal_value?: number;
|
|
19
|
+
guid_value?: string;
|
|
20
|
+
array_int_value: Array<number>;
|
|
21
|
+
bool_value?: boolean;
|
|
22
|
+
get value(): unknown;
|
|
23
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
export class BimDataElementPropertySet {
|
|
2
|
-
}
|
|
3
|
-
export class BimDataElementProperty {
|
|
4
|
-
constructor() {
|
|
5
|
-
this.unit = 0;
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
export class BimDataElementPropertyValue {
|
|
9
|
-
constructor() {
|
|
10
|
-
this.array_value = new Array();
|
|
11
|
-
this.array_int_value = new Array();
|
|
12
|
-
}
|
|
13
|
-
get value() {
|
|
14
|
-
if (this.str_value)
|
|
15
|
-
return this.str_value;
|
|
16
|
-
if (this.bool_value)
|
|
17
|
-
return this.bool_value;
|
|
18
|
-
if (this.date_value)
|
|
19
|
-
return this.date_value;
|
|
20
|
-
if (this.decimal_value)
|
|
21
|
-
return this.decimal_value;
|
|
22
|
-
if (this.guid_value)
|
|
23
|
-
return this.guid_value;
|
|
24
|
-
if (this.int_value)
|
|
25
|
-
return this.int_value;
|
|
26
|
-
if (this.double_value)
|
|
27
|
-
return this.double_value;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
1
|
+
export class BimDataElementPropertySet {
|
|
2
|
+
}
|
|
3
|
+
export class BimDataElementProperty {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.unit = 0;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
export class BimDataElementPropertyValue {
|
|
9
|
+
constructor() {
|
|
10
|
+
this.array_value = new Array();
|
|
11
|
+
this.array_int_value = new Array();
|
|
12
|
+
}
|
|
13
|
+
get value() {
|
|
14
|
+
if (this.str_value)
|
|
15
|
+
return this.str_value;
|
|
16
|
+
if (this.bool_value)
|
|
17
|
+
return this.bool_value;
|
|
18
|
+
if (this.date_value)
|
|
19
|
+
return this.date_value;
|
|
20
|
+
if (this.decimal_value)
|
|
21
|
+
return this.decimal_value;
|
|
22
|
+
if (this.guid_value)
|
|
23
|
+
return this.guid_value;
|
|
24
|
+
if (this.int_value)
|
|
25
|
+
return this.int_value;
|
|
26
|
+
if (this.double_value)
|
|
27
|
+
return this.double_value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
30
|
//# sourceMappingURL=BimDataElementPropertySet.js.map
|