@ifc-lite/sdk 1.21.0 → 1.21.1
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 +48 -0
- package/package.json +13 -13
package/README.md
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# @ifc-lite/sdk
|
|
2
|
+
|
|
3
|
+
The scripting SDK for ifc-lite: a single `bim.*` API for BIM automation. One context object exposes querying, properties, mutations, viewer control, exports (CSV, glTF, STEP, HBJSON), IDS validation, BCF collaboration, clash detection, 2D drawings, schedules, lists, lenses, and element creation. The same API runs embedded in the viewer, connected across tabs, in Node scripts via the CLI (`ifc-lite eval` / `ifc-lite run`), and inside the QuickJS sandbox.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @ifc-lite/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { createBimContext } from '@ifc-lite/sdk';
|
|
15
|
+
|
|
16
|
+
// Embedded mode (local backend)
|
|
17
|
+
const bim = createBimContext({ backend: myLocalBackend });
|
|
18
|
+
|
|
19
|
+
// Connected mode (cross-tab)
|
|
20
|
+
import { BroadcastTransport } from '@ifc-lite/sdk';
|
|
21
|
+
const transport = new BroadcastTransport('ifc-lite');
|
|
22
|
+
const remote = createBimContext({ transport });
|
|
23
|
+
|
|
24
|
+
// Use the API
|
|
25
|
+
const walls = bim.query().byType('IfcWall').toArray();
|
|
26
|
+
bim.viewer.colorize(walls.map(w => w.ref), '#ff0000');
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Namespaces
|
|
30
|
+
|
|
31
|
+
- `bim.query()` - fluent entity queries by type, property, quantity
|
|
32
|
+
- `bim.model` / `bim.mutate` / `bim.store` - model info, edits, raw store access
|
|
33
|
+
- `bim.viewer` - selection, visibility, colorization, camera, sections
|
|
34
|
+
- `bim.export` - CSV, glTF, STEP, HBJSON
|
|
35
|
+
- `bim.ids` / `bim.bcf` / `bim.clash` - validation, collaboration, interference checks
|
|
36
|
+
- `bim.drawing` / `bim.list` / `bim.lens` - section cuts and SVG, schedules, rule-based coloring
|
|
37
|
+
- `bim.create` / `bim.spaces` / `bim.spatial` / `bim.schedule` / `bim.files` / `bim.events` / `bim.bsdd` / `bim.sandbox`
|
|
38
|
+
|
|
39
|
+
Also exported: `BimHost` (viewer side), `RemoteBackend`, `MessagePortTransport`, and the full `IfcCreator` API re-exported from `@ifc-lite/create`.
|
|
40
|
+
|
|
41
|
+
## Links
|
|
42
|
+
|
|
43
|
+
- Docs: https://ltplus-ag.github.io/ifc-lite/
|
|
44
|
+
- Source: https://github.com/LTplus-AG/ifc-lite
|
|
45
|
+
|
|
46
|
+
## License
|
|
47
|
+
|
|
48
|
+
MPL-2.0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ifc-lite/sdk",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.1",
|
|
4
4
|
"description": "Scripting SDK for ifc-lite — the bim.* API for BIM automation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -13,20 +13,20 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@ifc-lite/bcf": "^1.16.
|
|
17
|
-
"@ifc-lite/clash": "^1.6.
|
|
18
|
-
"@ifc-lite/create": "^1.16.
|
|
19
|
-
"@ifc-lite/data": "^2.
|
|
16
|
+
"@ifc-lite/bcf": "^1.16.1",
|
|
17
|
+
"@ifc-lite/clash": "^1.6.1",
|
|
18
|
+
"@ifc-lite/create": "^1.16.3",
|
|
19
|
+
"@ifc-lite/data": "^2.5.1",
|
|
20
20
|
"@ifc-lite/drawing-2d": "^1.18.5",
|
|
21
|
-
"@ifc-lite/encoding": "^1.14.
|
|
22
|
-
"@ifc-lite/export": "^2.5.
|
|
23
|
-
"@ifc-lite/
|
|
24
|
-
"@ifc-lite/
|
|
25
|
-
"@ifc-lite/
|
|
21
|
+
"@ifc-lite/encoding": "^1.14.9",
|
|
22
|
+
"@ifc-lite/export": "^2.5.1",
|
|
23
|
+
"@ifc-lite/ids": "^1.15.26",
|
|
24
|
+
"@ifc-lite/lens": "^1.17.1",
|
|
25
|
+
"@ifc-lite/lists": "^1.18.2",
|
|
26
26
|
"@ifc-lite/mutations": "^1.18.0",
|
|
27
|
-
"@ifc-lite/parser": "^3.
|
|
28
|
-
"@ifc-lite/query": "^1.14.
|
|
29
|
-
"@ifc-lite/spatial": "^1.14.
|
|
27
|
+
"@ifc-lite/parser": "^3.8.1",
|
|
28
|
+
"@ifc-lite/query": "^1.14.12",
|
|
29
|
+
"@ifc-lite/spatial": "^1.14.11"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"typescript": "^6.0.3",
|