@ifc-lite/ifcx 1.6.1 → 1.8.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.
- package/README.md +55 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @ifc-lite/ifcx
|
|
2
|
+
|
|
3
|
+
IFC5 (IFCX) parser for IFClite. Parses JSON-based IFCX files with ECS composition, USD geometry, and federated layer support.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ifc-lite/ifcx
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { parseIfcx, detectFormat } from '@ifc-lite/ifcx';
|
|
15
|
+
|
|
16
|
+
// Detect file format
|
|
17
|
+
const format = detectFormat(buffer); // 'ifcx' | 'ifc' | 'glb' | 'unknown'
|
|
18
|
+
|
|
19
|
+
// Parse IFCX file
|
|
20
|
+
const result = await parseIfcx(buffer, {
|
|
21
|
+
onProgress: ({ phase, percent }) => console.log(`${phase}: ${percent}%`),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
console.log(`${result.entityCount} entities, ${result.meshes.length} meshes`);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- Native IFC5 (IFCX) JSON parsing
|
|
30
|
+
- ECS composition (Entity-Component-System)
|
|
31
|
+
- Pre-tessellated USD geometry extraction
|
|
32
|
+
- Federated layer support with property overlay
|
|
33
|
+
- Compatible with existing ifc-lite data pipeline
|
|
34
|
+
- Format auto-detection (IFC4 STEP vs IFC5 IFCX vs GLB)
|
|
35
|
+
- IFCX export/write support
|
|
36
|
+
|
|
37
|
+
## Federated Layers
|
|
38
|
+
|
|
39
|
+
```typescript
|
|
40
|
+
import { parseFederatedIfcx } from '@ifc-lite/ifcx';
|
|
41
|
+
|
|
42
|
+
const result = await parseFederatedIfcx([
|
|
43
|
+
{ buffer: baseBuffer, name: 'base.ifcx' },
|
|
44
|
+
{ buffer: overlayBuffer, name: 'overlay.ifcx' },
|
|
45
|
+
]);
|
|
46
|
+
// Properties from overlay take precedence over base
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## API
|
|
50
|
+
|
|
51
|
+
See the [Parsing Guide](../../docs/guide/parsing.md) and [API Reference](../../docs/api/typescript.md#ifc-liteifcx).
|
|
52
|
+
|
|
53
|
+
## License
|
|
54
|
+
|
|
55
|
+
[MPL-2.0](../../LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/ifcx",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "IFC5 (IFCX) parser for IFC-Lite",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@ifc-lite/data": "^1.
|
|
16
|
-
"@ifc-lite/mutations": "^1.
|
|
15
|
+
"@ifc-lite/data": "^1.8.0",
|
|
16
|
+
"@ifc-lite/mutations": "^1.8.0"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"typescript": "^5.3.0"
|