@bitbybit-dev/ifc 0.0.0-stage → 1.5.0-rc.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/LICENSE +21 -0
- package/NOTICE +42 -0
- package/README.md +92 -2
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/lib/api/dto-registry.d.ts +8 -0
- package/lib/api/dto-registry.js +109 -0
- package/lib/api/ifc-service.d.ts +109 -0
- package/lib/api/ifc-service.js +55 -0
- package/lib/api/inputs/base-inputs.d.ts +5 -0
- package/lib/api/inputs/base-inputs.js +5 -0
- package/lib/api/inputs/ifc-inputs.d.ts +2727 -0
- package/lib/api/inputs/ifc-inputs.js +2498 -0
- package/lib/api/inputs/index.d.ts +3 -0
- package/lib/api/inputs/index.js +3 -0
- package/lib/api/resolved-inputs/index.d.ts +70 -0
- package/lib/api/resolved-inputs/index.js +1 -0
- package/lib/api/services/assemblies.d.ts +28 -0
- package/lib/api/services/assemblies.js +49 -0
- package/lib/api/services/beams.d.ts +33 -0
- package/lib/api/services/beams.js +59 -0
- package/lib/api/services/columns.d.ts +26 -0
- package/lib/api/services/columns.js +56 -0
- package/lib/api/services/defaults.constants.d.ts +44 -0
- package/lib/api/services/defaults.constants.js +44 -0
- package/lib/api/services/doors.d.ts +45 -0
- package/lib/api/services/doors.js +94 -0
- package/lib/api/services/geometry.d.ts +51 -0
- package/lib/api/services/geometry.js +87 -0
- package/lib/api/services/index.d.ts +17 -0
- package/lib/api/services/index.js +17 -0
- package/lib/api/services/materials.d.ts +46 -0
- package/lib/api/services/materials.js +86 -0
- package/lib/api/services/member-support.d.ts +7 -0
- package/lib/api/services/member-support.js +29 -0
- package/lib/api/services/members.d.ts +24 -0
- package/lib/api/services/members.js +51 -0
- package/lib/api/services/model.d.ts +244 -0
- package/lib/api/services/model.js +409 -0
- package/lib/api/services/openings.d.ts +57 -0
- package/lib/api/services/openings.js +102 -0
- package/lib/api/services/properties.d.ts +89 -0
- package/lib/api/services/properties.js +142 -0
- package/lib/api/services/quantities.d.ts +38 -0
- package/lib/api/services/quantities.js +51 -0
- package/lib/api/services/roofs.d.ts +24 -0
- package/lib/api/services/roofs.js +52 -0
- package/lib/api/services/service-support.d.ts +8 -0
- package/lib/api/services/service-support.js +37 -0
- package/lib/api/services/service-types.d.ts +3 -0
- package/lib/api/services/service-types.js +1 -0
- package/lib/api/services/site.d.ts +37 -0
- package/lib/api/services/site.js +80 -0
- package/lib/api/services/slabs.d.ts +31 -0
- package/lib/api/services/slabs.js +59 -0
- package/lib/api/services/spaces.d.ts +36 -0
- package/lib/api/services/spaces.js +64 -0
- package/lib/api/services/spatial.d.ts +54 -0
- package/lib/api/services/spatial.js +75 -0
- package/lib/api/services/walls.d.ts +140 -0
- package/lib/api/services/walls.js +268 -0
- package/lib/api/services/windows.d.ts +46 -0
- package/lib/api/services/windows.js +76 -0
- package/lib/build/assemblies.d.ts +4 -0
- package/lib/build/assemblies.js +45 -0
- package/lib/build/build-types.d.ts +345 -0
- package/lib/build/build-types.js +1 -0
- package/lib/build/checks.d.ts +6 -0
- package/lib/build/checks.js +32 -0
- package/lib/build/constants.d.ts +27 -0
- package/lib/build/constants.js +43 -0
- package/lib/build/contexts.d.ts +9 -0
- package/lib/build/contexts.js +52 -0
- package/lib/build/curves.d.ts +3 -0
- package/lib/build/curves.js +23 -0
- package/lib/build/entity-writer.d.ts +23 -0
- package/lib/build/entity-writer.js +97 -0
- package/lib/build/fillings.d.ts +7 -0
- package/lib/build/fillings.js +182 -0
- package/lib/build/georeference.d.ts +5 -0
- package/lib/build/georeference.js +44 -0
- package/lib/build/materials.d.ts +18 -0
- package/lib/build/materials.js +166 -0
- package/lib/build/math.d.ts +10 -0
- package/lib/build/math.js +47 -0
- package/lib/build/measure.d.ts +9 -0
- package/lib/build/measure.js +195 -0
- package/lib/build/moving.d.ts +4 -0
- package/lib/build/moving.js +61 -0
- package/lib/build/openings.d.ts +12 -0
- package/lib/build/openings.js +156 -0
- package/lib/build/outlines.d.ts +4 -0
- package/lib/build/outlines.js +40 -0
- package/lib/build/placement.d.ts +16 -0
- package/lib/build/placement.js +106 -0
- package/lib/build/profiles.d.ts +4 -0
- package/lib/build/profiles.js +35 -0
- package/lib/build/project.d.ts +11 -0
- package/lib/build/project.js +134 -0
- package/lib/build/properties.d.ts +10 -0
- package/lib/build/properties.js +182 -0
- package/lib/build/quantities.d.ts +7 -0
- package/lib/build/quantities.js +262 -0
- package/lib/build/relationships.d.ts +9 -0
- package/lib/build/relationships.js +67 -0
- package/lib/build/removal.d.ts +3 -0
- package/lib/build/removal.js +106 -0
- package/lib/build/representations.d.ts +6 -0
- package/lib/build/representations.js +46 -0
- package/lib/build/roof-clipping.d.ts +5 -0
- package/lib/build/roof-clipping.js +79 -0
- package/lib/build/roofs.d.ts +4 -0
- package/lib/build/roofs.js +131 -0
- package/lib/build/site.d.ts +7 -0
- package/lib/build/site.js +112 -0
- package/lib/build/slab-openings.d.ts +4 -0
- package/lib/build/slab-openings.js +71 -0
- package/lib/build/slabs-columns-beams.d.ts +8 -0
- package/lib/build/slabs-columns-beams.js +73 -0
- package/lib/build/solids.d.ts +5 -0
- package/lib/build/solids.js +33 -0
- package/lib/build/spaces.d.ts +6 -0
- package/lib/build/spaces.js +55 -0
- package/lib/build/spatial.d.ts +17 -0
- package/lib/build/spatial.js +111 -0
- package/lib/build/type-objects.d.ts +4 -0
- package/lib/build/type-objects.js +9 -0
- package/lib/build/wall-edits.d.ts +5 -0
- package/lib/build/wall-edits.js +138 -0
- package/lib/build/wall-geometry.d.ts +15 -0
- package/lib/build/wall-geometry.js +159 -0
- package/lib/build/wall-parameters.d.ts +3 -0
- package/lib/build/wall-parameters.js +47 -0
- package/lib/build/walls.d.ts +12 -0
- package/lib/build/walls.js +238 -0
- package/lib/geometry/advanced.d.ts +27 -0
- package/lib/geometry/advanced.js +292 -0
- package/lib/geometry/colours.d.ts +3 -0
- package/lib/geometry/colours.js +109 -0
- package/lib/geometry/curves.d.ts +32 -0
- package/lib/geometry/curves.js +370 -0
- package/lib/geometry/edges.constants.d.ts +5 -0
- package/lib/geometry/edges.constants.js +5 -0
- package/lib/geometry/edges.d.ts +21 -0
- package/lib/geometry/edges.js +164 -0
- package/lib/geometry/elements.d.ts +3 -0
- package/lib/geometry/elements.js +152 -0
- package/lib/geometry/errors.d.ts +3 -0
- package/lib/geometry/errors.js +6 -0
- package/lib/geometry/faceted.d.ts +31 -0
- package/lib/geometry/faceted.js +214 -0
- package/lib/geometry/geometry-types.d.ts +103 -0
- package/lib/geometry/geometry-types.js +1 -0
- package/lib/geometry/groups.d.ts +21 -0
- package/lib/geometry/groups.js +106 -0
- package/lib/geometry/items.d.ts +34 -0
- package/lib/geometry/items.js +313 -0
- package/lib/geometry/operators.d.ts +3 -0
- package/lib/geometry/operators.js +65 -0
- package/lib/geometry/profiles.d.ts +4 -0
- package/lib/geometry/profiles.js +277 -0
- package/lib/geometry/recipe-builder.d.ts +14 -0
- package/lib/geometry/recipe-builder.js +48 -0
- package/lib/geometry/references.d.ts +4 -0
- package/lib/geometry/references.js +17 -0
- package/lib/geometry/regions.d.ts +4 -0
- package/lib/geometry/regions.js +26 -0
- package/lib/geometry/surfaces.constants.d.ts +17 -0
- package/lib/geometry/surfaces.constants.js +17 -0
- package/lib/geometry/surfaces.d.ts +6 -0
- package/lib/geometry/surfaces.js +306 -0
- package/lib/geometry/swept-solids.constants.d.ts +7 -0
- package/lib/geometry/swept-solids.constants.js +6 -0
- package/lib/geometry/swept-solids.d.ts +25 -0
- package/lib/geometry/swept-solids.js +243 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +6 -0
- package/lib/model/constants.d.ts +30 -0
- package/lib/model/constants.js +30 -0
- package/lib/model/entity-lookup.d.ts +9 -0
- package/lib/model/entity-lookup.js +20 -0
- package/lib/model/guid.d.ts +7 -0
- package/lib/model/guid.js +60 -0
- package/lib/model/id-map.d.ts +10 -0
- package/lib/model/id-map.js +80 -0
- package/lib/model/index.d.ts +4 -0
- package/lib/model/index.js +2 -0
- package/lib/model/io.d.ts +6 -0
- package/lib/model/io.js +136 -0
- package/lib/model/is-model.d.ts +9 -0
- package/lib/model/is-model.js +11 -0
- package/lib/model/model-types.d.ts +111 -0
- package/lib/model/model-types.js +1 -0
- package/lib/model/overlay-indexes.d.ts +17 -0
- package/lib/model/overlay-indexes.js +69 -0
- package/lib/model/references.d.ts +2 -0
- package/lib/model/references.js +51 -0
- package/lib/model/rows-by-id.d.ts +8 -0
- package/lib/model/rows-by-id.js +39 -0
- package/lib/model/snapshot.d.ts +36 -0
- package/lib/model/snapshot.js +144 -0
- package/lib/model/source.d.ts +29 -0
- package/lib/model/source.js +172 -0
- package/lib/model/transaction.d.ts +39 -0
- package/lib/model/transaction.js +250 -0
- package/lib/model/upgrade.d.ts +2 -0
- package/lib/model/upgrade.js +78 -0
- package/lib/schema/constants.d.ts +3 -0
- package/lib/schema/constants.js +3 -0
- package/lib/schema/generated/ifc4.d.ts +2 -0
- package/lib/schema/generated/ifc4.js +1204 -0
- package/lib/schema/generated/ifc4x3.d.ts +2 -0
- package/lib/schema/generated/ifc4x3.js +1325 -0
- package/lib/schema/registry.d.ts +7 -0
- package/lib/schema/registry.js +37 -0
- package/lib/schema/schema-types.d.ts +45 -0
- package/lib/schema/schema-types.js +1 -0
- package/lib/schema/schema.d.ts +23 -0
- package/lib/schema/schema.js +136 -0
- package/lib/step/constants.d.ts +48 -0
- package/lib/step/constants.js +48 -0
- package/lib/step/encoder.d.ts +21 -0
- package/lib/step/encoder.js +321 -0
- package/lib/step/errors.d.ts +39 -0
- package/lib/step/errors.js +45 -0
- package/lib/step/file-index.d.ts +2 -0
- package/lib/step/file-index.js +221 -0
- package/lib/step/header.d.ts +4 -0
- package/lib/step/header.js +52 -0
- package/lib/step/numbers.d.ts +3 -0
- package/lib/step/numbers.js +73 -0
- package/lib/step/reader.d.ts +2 -0
- package/lib/step/reader.js +160 -0
- package/lib/step/scanner.d.ts +13 -0
- package/lib/step/scanner.js +203 -0
- package/lib/step/step-types.d.ts +170 -0
- package/lib/step/step-types.js +1 -0
- package/lib/step/strings.d.ts +2 -0
- package/lib/step/strings.js +150 -0
- package/lib/step/values.d.ts +13 -0
- package/lib/step/values.js +51 -0
- package/package.json +51 -5
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Bit by bit developers
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
NOTICE - third-party material in @bitbybit-dev/ifc
|
|
2
|
+
==================================================
|
|
3
|
+
|
|
4
|
+
The TypeScript and JavaScript in this package are MIT-licensed (see LICENSE), with two exceptions
|
|
5
|
+
described below: the generated schema tables.
|
|
6
|
+
|
|
7
|
+
1. The IFC4 ADD2 TC1 schema
|
|
8
|
+
Author: buildingSMART International Limited
|
|
9
|
+
Source: the EXPRESS schema IFC4_ADD2_TC1.exp, published by buildingSMART International
|
|
10
|
+
(https://github.com/buildingSMART/IFC4.x-development, reference_schemas/)
|
|
11
|
+
Usage: translated into a TypeScript table (lib/schema/generated/ifc4.js) that names every
|
|
12
|
+
type and entity of the schema with its attributes. The translation is generated, and
|
|
13
|
+
the schema itself is not changed.
|
|
14
|
+
Notice: "Any technical documentation made available by buildingSMART International Limited
|
|
15
|
+
is the copyrighted work of buildingSMART International Limited and is owned by the
|
|
16
|
+
buildingSMART International Limited. It may be photocopied, used in software
|
|
17
|
+
development, or translated into another computer language without prior written
|
|
18
|
+
consent from buildingSMART International Limited provided that full attribution is
|
|
19
|
+
given. Prior written consent is required if changes are made to the technical
|
|
20
|
+
specification."
|
|
21
|
+
|
|
22
|
+
2. The IFC4X3 ADD2 schema (IFC 4.3.2.0)
|
|
23
|
+
Author: buildingSMART International Limited
|
|
24
|
+
Source: the EXPRESS schema IFC4X3_ADD2.exp of the official IFC 4.3.2.0 publication
|
|
25
|
+
(https://standards.buildingsmart.org/IFC/RELEASE/IFC4_3/), kept unchanged in the
|
|
26
|
+
repository's packages/dev/ifc/schema/
|
|
27
|
+
Licence: Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0),
|
|
28
|
+
https://creativecommons.org/licenses/by-nd/4.0/
|
|
29
|
+
Usage: translated into a TypeScript table (lib/schema/generated/ifc4x3.js) that names every
|
|
30
|
+
type and entity of the schema with its attributes. buildingSMART's copyright notice
|
|
31
|
+
(https://github.com/buildingSMART/IFC4.x-development/blob/ifc4.3-main/LICENSE.md)
|
|
32
|
+
lets its technical documentation be "translated into another computer language
|
|
33
|
+
without prior written consent from buildingSMART International Limited provided that
|
|
34
|
+
full attribution is given". The schema itself is not changed.
|
|
35
|
+
Notice: "Copyright © 1996-2023 buildingSMART International Limited. Some rights reserved. Any
|
|
36
|
+
technical documentation made available by buildingSMART International Limited is the
|
|
37
|
+
copyrighted work of buildingSMART International Limited and is owned by
|
|
38
|
+
buildingSMART International Limited. The Industry Foundation Classes are published
|
|
39
|
+
under Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)."
|
|
40
|
+
|
|
41
|
+
IFC and Industry Foundation Classes are names of buildingSMART International. This package is
|
|
42
|
+
not certified by, endorsed by or affiliated with buildingSMART International.
|
package/README.md
CHANGED
|
@@ -1,3 +1,93 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @bitbybit-dev/ifc
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Write, read and author [IFC](https://technical.buildingsmart.org/standards/ifc/) building models in TypeScript, with no WebAssembly and no geometry kernel: walls joined at their corners, slabs, openings, doors and windows from types, columns, beams, materials, layer sets and property sets, written as IFC4 files that BIM tools open and edit.
|
|
4
|
+
|
|
5
|
+
<img src="https://bitbybit.dev/files/site/git-cover.png" alt="Picture showing bitbybit.dev platform">
|
|
6
|
+
|
|
7
|
+
> **Beta.** The API's names and inputs may still change before the first stable version.
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
IFC (Industry Foundation Classes, ISO 16739) is the open exchange format for building information models. This package reads and writes IFC's text encoding (ISO 10303-21) itself, against a table generated from buildingSMART's IFC4 ADD2 TC1 schema, and builds standard elements the way IFC defines them: a wall is an axis, a material layer set and a height, written as a parametric extrusion; a door cuts its own opening and shares its type's geometry.
|
|
12
|
+
|
|
13
|
+
Works in **Node.js** and in the **browser**. It depends only on [@bitbybit-dev/base](https://www.npmjs.com/package/@bitbybit-dev/base).
|
|
14
|
+
|
|
15
|
+
See it build a whole two-storey family house, drawn live in the browser with its source to read: **[A Family House in IFC](https://learn.bitbybit.dev/learn/code/common/ifc/family-house)**.
|
|
16
|
+
|
|
17
|
+
## Quick start
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @bitbybit-dev/ifc
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
import { writeFileSync } from "node:fs";
|
|
25
|
+
import { Base, IFC, IFCService } from "@bitbybit-dev/ifc";
|
|
26
|
+
|
|
27
|
+
const ifc = new IFCService();
|
|
28
|
+
let model = ifc.model.create({ name: "House", seed: "house-1" });
|
|
29
|
+
model = ifc.spatial.addStorey({ model, id: "ground", name: "Ground floor", elevation: 0 });
|
|
30
|
+
|
|
31
|
+
const corners: Base.Point2[] = [[0, 0], [10000, 0], [10000, 8000], [0, 8000]];
|
|
32
|
+
for (let i = 0; i < 4; i++) {
|
|
33
|
+
model = ifc.walls.add({
|
|
34
|
+
model, storey: "ground", id: `wall-${i}`,
|
|
35
|
+
start: corners[i], end: corners[(i + 1) % 4],
|
|
36
|
+
height: 3000, thickness: 250, alignment: IFC.wallAlignmentEnum.right,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
for (let i = 0; i < 4; i++) {
|
|
40
|
+
model = ifc.walls.connect({ model, wall: `wall-${i}`, other: `wall-${(i + 1) % 4}` });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
model = ifc.doors.addType({ model, id: "door-90", name: "Door 900", width: 900, height: 2100 });
|
|
44
|
+
model = ifc.doors.add({ model, wall: "wall-0", doorType: "door-90", offset: 2000 });
|
|
45
|
+
model = ifc.slabs.add({ model, storey: "ground", outline: corners, thickness: 250 });
|
|
46
|
+
|
|
47
|
+
writeFileSync("house.ifc", ifc.model.writeBytes({ model, fileName: "house.ifc" }));
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Run it with `npx tsx house.ts`. Compiled to JavaScript, run it as `node --import=extensionless/register house.js` with the [extensionless](https://www.npmjs.com/package/extensionless) package installed: the package's own imports leave out file extensions, which plain `node` does not resolve.
|
|
51
|
+
|
|
52
|
+
## How it works
|
|
53
|
+
|
|
54
|
+
- **A model is a value.** Every method that changes a model returns a new one and leaves the one it was given as it was, so keep the result and pass it on. Earlier models stay valid, which is undo for free.
|
|
55
|
+
- **Ids of your own.** Give an element an `id` such as `"north-wall"` and refer to it by that id later; the model derives the element's GlobalId from it and the project's GlobalId, so it is unique to the model. Wherever an existing object is named, its 22-character GlobalId works as well as its id. With a `seed` on `model.create` and a fixed `timeStamp` on `model.write`, the same calls always write the same file.
|
|
56
|
+
- **Units and axes.** Lengths are in the model's unit: millimetres unless the model was created with another `lengthUnit`. A length left out takes its default in that unit, so a wall is 3000 mm high in a model in millimetres and 3 m high in one in metres. Positions on a storey are given in its plan, `[x, y]`, with Z up from the storey's floor, as IFC has it.
|
|
57
|
+
- **Standard elements.** Walls keep their axis (`Plan/Axis`), layer set usage and a swept-solid body, and joins are recorded as `IfcRelConnectsPathElements`, so tools that edit IFC walls edit them as walls. Joins and roof clippings are worked out again from those whenever a wall changes.
|
|
58
|
+
- **Reading and writing.** `model.read` takes the file's text, a `Uint8Array` or an `ArrayBuffer`, indexes it without decoding it and decodes an entity only when asked, so a file of hundreds of megabytes opens in seconds. Entities left unchanged are written back as they were, with the line breaks and comments between them: `model.writeBytes` copies them byte for byte at any size, and `model.write` gives the same file as text, up to the length one JavaScript string holds. A file that breaks the encoding, holds an entity id twice or names a type or schema this library does not read fails with a `StepSyntaxError` naming the byte offset, when the broken part is first read. A value given to a model that its schema does not accept fails at once with an `IfcValueError` naming the entity and the attribute.
|
|
59
|
+
- **Geometry as data.** `geometry.recipe` describes the elements' solids as a recipe (`Base.Recipe`): polygons, extrusions, cuts by planes, openings and shared type geometry, every number resolved. `manifold.recipes.build` in [@bitbybit-dev/manifold](https://www.npmjs.com/package/@bitbybit-dev/manifold) builds it into one solid per element, which the renderer packages draw, and `occt.recipes.build` in [@bitbybit-dev/occt](https://www.npmjs.com/package/@bitbybit-dev/occt) builds it exactly, to measure or export to STEP; `geometry.unsupported` says which elements it could not describe, and why. In a browser, [@bitbybit-dev/ifc-worker](https://www.npmjs.com/package/@bitbybit-dev/ifc-worker) runs this library in a web worker.
|
|
60
|
+
|
|
61
|
+
## What version 1 covers
|
|
62
|
+
|
|
63
|
+
| Area | Supported |
|
|
64
|
+
|---|---|
|
|
65
|
+
| Schema | IFC4 ADD2 TC1, read and written; IFC2X3 files read through IFC4 to show and query, and upgraded to IFC4 to edit |
|
|
66
|
+
| Spatial structure | project, site, one building, storeys raised or lowered with everything on them, spaces with their areas |
|
|
67
|
+
| Site | terrain with holes where the building and paving meet it, and trees with a trunk and crown in their own materials, as geographic elements of the site |
|
|
68
|
+
| Walls | straight walls from an axis, by thickness, layer set or wall type; centred, left or right aligned; L joins (mitred) and T joins (butt); clipping by planes and under roofs; read back as parameters and edited, also when another tool wrote them |
|
|
69
|
+
| Openings, doors, windows | rectangular openings in walls, moved or resized; any outline through a slab; door and window types with a lining or frame and one panel or pane, each part in its own material, doors with lever or pull-bar handles, placed many times through mapped geometry |
|
|
70
|
+
| Slabs and roofs | outlines with holes, by thickness or layer set; flat, mono-pitch, gable and hip roofs over a rectangle |
|
|
71
|
+
| Columns, beams and members | rectangle, circle and I sections; braces, rafters, studs, mullions and other members |
|
|
72
|
+
| Editing | removing elements with what only they use, moving and turning them |
|
|
73
|
+
| Data | materials with colours, layer sets, property sets on elements and types set and removed value by value, any attribute read and any simple one set |
|
|
74
|
+
| Quantities | the base quantity sets of walls, slabs, columns, beams, members, doors, windows, openings, spaces and roofs, measured from their geometry |
|
|
75
|
+
| Geometry recipes | extrusions of arbitrary, rectangle, circle and I profiles, outlines of polylines, arcs and composite curves, half-space clippings (polygonal bounded ones too), boolean differences, mapped items (mirrored and scaled too), triangulated and polygonal face sets, faceted breps, surface models, openings |
|
|
76
|
+
|
|
77
|
+
## Use It With an AI Agent
|
|
78
|
+
|
|
79
|
+
The free **[Bitbybit CAD MCP](https://learn.bitbybit.dev/learn/using-ai-with-bitbybit/mcp/bitbybit-mcp)** server lets your agent look up the exact signatures, defaults and examples of this package for the version you have installed.
|
|
80
|
+
|
|
81
|
+
## Licence
|
|
82
|
+
|
|
83
|
+
The package is MIT-licensed. Its schema table is a translation of buildingSMART International's IFC4 ADD2 TC1 EXPRESS schema, used with attribution under the notice the schema carries; see `NOTICE`. IFC and Industry Foundation Classes are names of buildingSMART International; this package is not certified by or affiliated with it.
|
|
84
|
+
|
|
85
|
+
## Links
|
|
86
|
+
|
|
87
|
+
| Resource | URL |
|
|
88
|
+
|----------|-----|
|
|
89
|
+
| **GitHub** | https://github.com/bitbybit-dev/bitbybit/tree/master/packages/dev/ifc |
|
|
90
|
+
| **Monorepo** | https://github.com/bitbybit-dev/bitbybit |
|
|
91
|
+
| **NPM** | https://www.npmjs.com/package/@bitbybit-dev/ifc |
|
|
92
|
+
| **Documentation** | https://learn.bitbybit.dev/learn/npm-packages/ifc |
|
|
93
|
+
| **Example** | https://learn.bitbybit.dev/learn/code/common/ifc/family-house |
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./lib";
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./lib";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DtoRegistry } from "@bitbybit-dev/base";
|
|
2
|
+
/**
|
|
3
|
+
* Every public operation of the IFC kernel by its dotted path, the inputs DTO it
|
|
4
|
+
* takes, and what each property of that DTO accepts. `resolveInputs` from the base package reads
|
|
5
|
+
* it to lay a caller's properties over that DTO's defaults before the kernel runs, and
|
|
6
|
+
* `validateInputs` to check what the call was given.
|
|
7
|
+
*/
|
|
8
|
+
export declare const ifcDtoRegistry: DtoRegistry;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// GENERATED by scripts/gen-dto-meta.mjs from the IFCService surface - do not edit; regenerate with `npm run gen:dto-meta`.
|
|
2
|
+
import { constraintKinds as k } from "@bitbybit-dev/base";
|
|
3
|
+
import * as Inputs from "./inputs";
|
|
4
|
+
const IFC_AddAssemblyDto = { model: k.required(k.opaque), parts: k.required(k.list(k.string)), id: k.string, name: k.string, predefinedType: k.oneOf(["ACCESSORY_ASSEMBLY", "ARCH", "BEAM_GRID", "BRACED_FRAME", "GIRDER", "REINFORCEMENT_UNIT", "RIGID_FRAME", "SLAB_FIELD", "TRUSS", "USERDEFINED", "NOTDEFINED"]), objectType: k.string };
|
|
5
|
+
const IFC_AddBeamDto = { start: k.required(k.point3), end: k.required(k.point3), model: k.required(k.opaque), storey: k.required(k.string), id: k.string, name: k.string, profile: k.oneOf(["rectangle", "circle", "iShape"]), width: k.between(k.number, { min: 0, exclusiveMin: true }), depth: k.between(k.number, { min: 0, exclusiveMin: true }), radius: k.between(k.number, { min: 0, exclusiveMin: true }), webThickness: k.between(k.number, { min: 0, exclusiveMin: true }), flangeThickness: k.between(k.number, { min: 0, exclusiveMin: true }), rotation: k.number, material: k.string };
|
|
6
|
+
const IFC_AddColumnDto = { position: k.point2, height: k.between(k.number, { min: 0, exclusiveMin: true }), baseOffset: k.number, model: k.required(k.opaque), storey: k.required(k.string), id: k.string, name: k.string, profile: k.oneOf(["rectangle", "circle", "iShape"]), width: k.between(k.number, { min: 0, exclusiveMin: true }), depth: k.between(k.number, { min: 0, exclusiveMin: true }), radius: k.between(k.number, { min: 0, exclusiveMin: true }), webThickness: k.between(k.number, { min: 0, exclusiveMin: true }), flangeThickness: k.between(k.number, { min: 0, exclusiveMin: true }), rotation: k.number, material: k.string };
|
|
7
|
+
const IFC_AddDoorDto = { model: k.required(k.opaque), wall: k.required(k.string), doorType: k.required(k.string), id: k.string, name: k.string, offset: k.between(k.number, { min: 0 }), sill: k.number };
|
|
8
|
+
const IFC_AddDoorTypeDto = { model: k.required(k.opaque), id: k.string, name: k.string, width: k.between(k.number, { min: 0, exclusiveMin: true }), height: k.between(k.number, { min: 0, exclusiveMin: true }), liningThickness: k.between(k.number, { min: 0, exclusiveMin: true }), liningDepth: k.between(k.number, { min: 0, exclusiveMin: true }), panelThickness: k.between(k.number, { min: 0, exclusiveMin: true }), operation: k.oneOf(["SINGLE_SWING_LEFT", "SINGLE_SWING_RIGHT", "DOUBLE_SWING_LEFT", "DOUBLE_SWING_RIGHT", "SLIDING_TO_LEFT", "SLIDING_TO_RIGHT", "FOLDING_TO_LEFT", "FOLDING_TO_RIGHT", "REVOLVING", "ROLLINGUP", "NOTDEFINED"]), liningMaterial: k.string, panelMaterial: k.string, handle: k.oneOf(["none", "lever", "pullBar"]), handleMaterial: k.string };
|
|
9
|
+
const IFC_AddLayerSetDto = { model: k.required(k.opaque), name: k.string, layers: k.required(k.list(k.opaque)) };
|
|
10
|
+
const IFC_AddMaterialDto = { model: k.required(k.opaque), name: k.string, category: k.string, color: k.string, transparency: k.between(k.number, { min: 0, max: 1 }) };
|
|
11
|
+
const IFC_AddMemberDto = { start: k.required(k.point3), end: k.required(k.point3), predefinedType: k.oneOf(["BRACE", "CHORD", "COLLAR", "MEMBER", "MULLION", "PLATE", "POST", "PURLIN", "RAFTER", "STRINGER", "STRUT", "STUD", "NOTDEFINED"]), model: k.required(k.opaque), storey: k.required(k.string), id: k.string, name: k.string, profile: k.oneOf(["rectangle", "circle", "iShape"]), width: k.between(k.number, { min: 0, exclusiveMin: true }), depth: k.between(k.number, { min: 0, exclusiveMin: true }), radius: k.between(k.number, { min: 0, exclusiveMin: true }), webThickness: k.between(k.number, { min: 0, exclusiveMin: true }), flangeThickness: k.between(k.number, { min: 0, exclusiveMin: true }), rotation: k.number, material: k.string };
|
|
12
|
+
const IFC_AddOpeningDto = { model: k.required(k.opaque), wall: k.required(k.string), id: k.string, name: k.string, offset: k.between(k.number, { min: 0 }), sill: k.number, width: k.between(k.number, { min: 0, exclusiveMin: true }), height: k.between(k.number, { min: 0, exclusiveMin: true }) };
|
|
13
|
+
const IFC_AddPropertySetDto = { model: k.required(k.opaque), elements: k.required(k.list(k.string)), name: k.string, properties: k.required(k.list(k.opaque)) };
|
|
14
|
+
const IFC_AddRoofDto = { model: k.required(k.opaque), storey: k.required(k.string), id: k.string, name: k.string, outline: k.required(k.list(k.point2)), kind: k.oneOf(["flat", "monoPitch", "gable", "hip"]), pitch: k.between(k.number, { min: 0, max: 89 }), thickness: k.between(k.number, { min: 0, exclusiveMin: true }), layerSet: k.string, overhang: k.between(k.number, { min: 0 }), baseOffset: k.number };
|
|
15
|
+
const IFC_AddSlabDto = { model: k.required(k.opaque), storey: k.required(k.string), id: k.string, name: k.string, outline: k.required(k.list(k.point2)), holes: k.list(k.list(k.point2)), thickness: k.between(k.number, { min: 0, exclusiveMin: true }), layerSet: k.string, topOffset: k.number, predefinedType: k.oneOf(["FLOOR", "ROOF", "LANDING", "BASESLAB", "NOTDEFINED"]) };
|
|
16
|
+
const IFC_AddSlabOpeningDto = { model: k.required(k.opaque), slab: k.required(k.string), id: k.string, name: k.string, outline: k.required(k.list(k.point2)) };
|
|
17
|
+
const IFC_AddSpaceDto = { model: k.required(k.opaque), storey: k.required(k.string), id: k.string, name: k.string, longName: k.string, outline: k.required(k.list(k.point2)), height: k.between(k.number, { min: 0, exclusiveMin: true }), baseOffset: k.number, predefinedType: k.oneOf(["SPACE", "PARKING", "GFA", "INTERNAL", "EXTERNAL", "NOTDEFINED"]) };
|
|
18
|
+
const IFC_AddStoreyDto = { model: k.required(k.opaque), id: k.string, name: k.string, elevation: k.number };
|
|
19
|
+
const IFC_AddTerrainDto = { model: k.required(k.opaque), id: k.string, name: k.string, outline: k.required(k.list(k.point2)), holes: k.list(k.list(k.point2)), depth: k.between(k.number, { min: 0, exclusiveMin: true }), elevation: k.number, material: k.string };
|
|
20
|
+
const IFC_AddTreeDto = { model: k.required(k.opaque), id: k.string, name: k.string, species: k.string, position: k.point2, elevation: k.number, height: k.between(k.number, { min: 0, exclusiveMin: true }), crownRadius: k.between(k.number, { min: 0, exclusiveMin: true }), trunkRadius: k.between(k.number, { min: 0, exclusiveMin: true }), crownMaterial: k.string, trunkMaterial: k.string };
|
|
21
|
+
const IFC_AddWallDto = { model: k.required(k.opaque), storey: k.required(k.string), id: k.string, name: k.string, start: k.required(k.point2), end: k.required(k.point2), height: k.between(k.number, { min: 0, exclusiveMin: true }), thickness: k.between(k.number, { min: 0, exclusiveMin: true }), layerSet: k.string, alignment: k.oneOf(["center", "left", "right"]), baseOffset: k.number, wallType: k.string, predefinedType: k.oneOf(["STANDARD", "SOLIDWALL", "PARTITIONING", "SHEAR", "PARAPET", "MOVABLE", "PLUMBINGWALL", "NOTDEFINED"]) };
|
|
22
|
+
const IFC_AddWallTypeDto = { model: k.required(k.opaque), id: k.string, name: k.string, layerSet: k.required(k.string), predefinedType: k.oneOf(["STANDARD", "SOLIDWALL", "PARTITIONING", "SHEAR", "PARAPET", "MOVABLE", "PLUMBINGWALL", "NOTDEFINED"]) };
|
|
23
|
+
const IFC_AddWindowDto = { model: k.required(k.opaque), wall: k.required(k.string), windowType: k.required(k.string), id: k.string, name: k.string, offset: k.between(k.number, { min: 0 }), sill: k.number };
|
|
24
|
+
const IFC_AddWindowTypeDto = { model: k.required(k.opaque), id: k.string, name: k.string, width: k.between(k.number, { min: 0, exclusiveMin: true }), height: k.between(k.number, { min: 0, exclusiveMin: true }), frameThickness: k.between(k.number, { min: 0, exclusiveMin: true }), frameDepth: k.between(k.number, { min: 0, exclusiveMin: true }), glassThickness: k.between(k.number, { min: 0, exclusiveMin: true }), frameMaterial: k.string, glassMaterial: k.string };
|
|
25
|
+
const IFC_ClipWallByRoofDto = { model: k.required(k.opaque), wall: k.required(k.string), roof: k.required(k.string) };
|
|
26
|
+
const IFC_ClipWallDto = { model: k.required(k.opaque), wall: k.required(k.string), origin: k.required(k.point3), normal: k.vector3 };
|
|
27
|
+
const IFC_ComputeQuantitiesDto = { model: k.required(k.opaque), elements: k.list(k.string) };
|
|
28
|
+
const IFC_ConnectWallsDto = { model: k.required(k.opaque), wall: k.required(k.string), other: k.required(k.string) };
|
|
29
|
+
const IFC_CreateModelDto = { name: k.string, siteName: k.string, buildingName: k.string, lengthUnit: k.oneOf(["millimetre", "centimetre", "metre"]), seed: k.string, author: k.string, organization: k.string };
|
|
30
|
+
const IFC_EditOpeningDto = { model: k.required(k.opaque), opening: k.required(k.string), offset: k.between(k.number, { min: 0 }), sill: k.number, width: k.between(k.number, { min: 0, exclusiveMin: true }), height: k.between(k.number, { min: 0, exclusiveMin: true }) };
|
|
31
|
+
const IFC_EditWallDto = { model: k.required(k.opaque), wall: k.required(k.string), start: k.point2, end: k.point2, height: k.between(k.number, { min: 0, exclusiveMin: true }), baseOffset: k.number, thickness: k.between(k.number, { min: 0, exclusiveMin: true }), layerSet: k.string, alignment: k.oneOf(["center", "left", "right"]) };
|
|
32
|
+
const IFC_ElementDto = { model: k.required(k.opaque), element: k.required(k.string) };
|
|
33
|
+
const IFC_ElementsDto = { model: k.required(k.opaque), type: k.string, storey: k.string };
|
|
34
|
+
const IFC_GeometryDto = { model: k.required(k.opaque), elements: k.list(k.string), groupByClass: k.boolean };
|
|
35
|
+
const IFC_GeometryElementsDto = { model: k.required(k.opaque), elements: k.list(k.string) };
|
|
36
|
+
const IFC_GetAttributeDto = { model: k.required(k.opaque), element: k.required(k.string), attribute: k.string };
|
|
37
|
+
const IFC_GlobalIdOfDto = { model: k.required(k.opaque), id: k.required(k.string) };
|
|
38
|
+
const IFC_ModelDto = { model: k.required(k.opaque) };
|
|
39
|
+
const IFC_MoveElementDto = { model: k.required(k.opaque), element: k.required(k.string), translation: k.vector3, rotation: k.number };
|
|
40
|
+
const IFC_ReadModelDto = { data: k.required(k.opaque) };
|
|
41
|
+
const IFC_RemovePropertySetDto = { model: k.required(k.opaque), element: k.required(k.string), name: k.string };
|
|
42
|
+
const IFC_RemovePropertyValuesDto = { model: k.required(k.opaque), element: k.required(k.string), name: k.string, names: k.required(k.list(k.string)) };
|
|
43
|
+
const IFC_SetAttributeDto = { model: k.required(k.opaque), element: k.required(k.string), attribute: k.string, value: k.required(k.opaque) };
|
|
44
|
+
const IFC_SetPropertyValuesDto = { model: k.required(k.opaque), element: k.required(k.string), name: k.string, properties: k.required(k.list(k.opaque)) };
|
|
45
|
+
const IFC_SetStoreyElevationDto = { model: k.required(k.opaque), storey: k.required(k.string), elevation: k.number };
|
|
46
|
+
const IFC_SpacesDto = { model: k.required(k.opaque), storey: k.string };
|
|
47
|
+
const IFC_WallDto = { model: k.required(k.opaque), wall: k.required(k.string) };
|
|
48
|
+
const IFC_WriteModelDto = { model: k.required(k.opaque), fileName: k.string, timeStamp: k.string };
|
|
49
|
+
/**
|
|
50
|
+
* Every public operation of the IFC kernel by its dotted path, the inputs DTO it
|
|
51
|
+
* takes, and what each property of that DTO accepts. `resolveInputs` from the base package reads
|
|
52
|
+
* it to lay a caller's properties over that DTO's defaults before the kernel runs, and
|
|
53
|
+
* `validateInputs` to check what the call was given.
|
|
54
|
+
*/
|
|
55
|
+
export const ifcDtoRegistry = {
|
|
56
|
+
"assemblies.add": { dto: Inputs.IFC.AddAssemblyDto, constraints: IFC_AddAssemblyDto },
|
|
57
|
+
"beams.add": { dto: Inputs.IFC.AddBeamDto, constraints: IFC_AddBeamDto },
|
|
58
|
+
"columns.add": { dto: Inputs.IFC.AddColumnDto, constraints: IFC_AddColumnDto },
|
|
59
|
+
"doors.add": { dto: Inputs.IFC.AddDoorDto, constraints: IFC_AddDoorDto },
|
|
60
|
+
"doors.addType": { dto: Inputs.IFC.AddDoorTypeDto, constraints: IFC_AddDoorTypeDto },
|
|
61
|
+
"geometry.recipe": { dto: Inputs.IFC.GeometryDto, constraints: IFC_GeometryDto },
|
|
62
|
+
"geometry.unsupported": { dto: Inputs.IFC.GeometryElementsDto, constraints: IFC_GeometryElementsDto },
|
|
63
|
+
"materials.add": { dto: Inputs.IFC.AddMaterialDto, constraints: IFC_AddMaterialDto },
|
|
64
|
+
"materials.addLayerSet": { dto: Inputs.IFC.AddLayerSetDto, constraints: IFC_AddLayerSetDto },
|
|
65
|
+
"members.add": { dto: Inputs.IFC.AddMemberDto, constraints: IFC_AddMemberDto },
|
|
66
|
+
"model.create": { dto: Inputs.IFC.CreateModelDto, constraints: IFC_CreateModelDto },
|
|
67
|
+
"model.element": { dto: Inputs.IFC.ElementDto, constraints: IFC_ElementDto },
|
|
68
|
+
"model.elements": { dto: Inputs.IFC.ElementsDto, constraints: IFC_ElementsDto },
|
|
69
|
+
"model.georeference": { dto: Inputs.IFC.ModelDto, constraints: IFC_ModelDto },
|
|
70
|
+
"model.getAttribute": { dto: Inputs.IFC.GetAttributeDto, constraints: IFC_GetAttributeDto },
|
|
71
|
+
"model.globalIdOf": { dto: Inputs.IFC.GlobalIdOfDto, constraints: IFC_GlobalIdOfDto },
|
|
72
|
+
"model.move": { dto: Inputs.IFC.MoveElementDto, constraints: IFC_MoveElementDto },
|
|
73
|
+
"model.read": { dto: Inputs.IFC.ReadModelDto, constraints: IFC_ReadModelDto },
|
|
74
|
+
"model.remove": { dto: Inputs.IFC.ElementDto, constraints: IFC_ElementDto },
|
|
75
|
+
"model.setAttribute": { dto: Inputs.IFC.SetAttributeDto, constraints: IFC_SetAttributeDto },
|
|
76
|
+
"model.summary": { dto: Inputs.IFC.ModelDto, constraints: IFC_ModelDto },
|
|
77
|
+
"model.upgradeToIfc4": { dto: Inputs.IFC.ModelDto, constraints: IFC_ModelDto },
|
|
78
|
+
"model.write": { dto: Inputs.IFC.WriteModelDto, constraints: IFC_WriteModelDto },
|
|
79
|
+
"model.writeBytes": { dto: Inputs.IFC.WriteModelDto, constraints: IFC_WriteModelDto },
|
|
80
|
+
"openings.add": { dto: Inputs.IFC.AddOpeningDto, constraints: IFC_AddOpeningDto },
|
|
81
|
+
"openings.addInSlab": { dto: Inputs.IFC.AddSlabOpeningDto, constraints: IFC_AddSlabOpeningDto },
|
|
82
|
+
"openings.edit": { dto: Inputs.IFC.EditOpeningDto, constraints: IFC_EditOpeningDto },
|
|
83
|
+
"properties.addSet": { dto: Inputs.IFC.AddPropertySetDto, constraints: IFC_AddPropertySetDto },
|
|
84
|
+
"properties.getSets": { dto: Inputs.IFC.ElementDto, constraints: IFC_ElementDto },
|
|
85
|
+
"properties.removeSet": { dto: Inputs.IFC.RemovePropertySetDto, constraints: IFC_RemovePropertySetDto },
|
|
86
|
+
"properties.removeValues": { dto: Inputs.IFC.RemovePropertyValuesDto, constraints: IFC_RemovePropertyValuesDto },
|
|
87
|
+
"properties.setValues": { dto: Inputs.IFC.SetPropertyValuesDto, constraints: IFC_SetPropertyValuesDto },
|
|
88
|
+
"quantities.compute": { dto: Inputs.IFC.ComputeQuantitiesDto, constraints: IFC_ComputeQuantitiesDto },
|
|
89
|
+
"quantities.get": { dto: Inputs.IFC.ElementDto, constraints: IFC_ElementDto },
|
|
90
|
+
"roofs.add": { dto: Inputs.IFC.AddRoofDto, constraints: IFC_AddRoofDto },
|
|
91
|
+
"site.addTerrain": { dto: Inputs.IFC.AddTerrainDto, constraints: IFC_AddTerrainDto },
|
|
92
|
+
"site.addTree": { dto: Inputs.IFC.AddTreeDto, constraints: IFC_AddTreeDto },
|
|
93
|
+
"slabs.add": { dto: Inputs.IFC.AddSlabDto, constraints: IFC_AddSlabDto },
|
|
94
|
+
"spaces.add": { dto: Inputs.IFC.AddSpaceDto, constraints: IFC_AddSpaceDto },
|
|
95
|
+
"spaces.list": { dto: Inputs.IFC.SpacesDto, constraints: IFC_SpacesDto },
|
|
96
|
+
"spatial.addStorey": { dto: Inputs.IFC.AddStoreyDto, constraints: IFC_AddStoreyDto },
|
|
97
|
+
"spatial.setElevation": { dto: Inputs.IFC.SetStoreyElevationDto, constraints: IFC_SetStoreyElevationDto },
|
|
98
|
+
"spatial.storeys": { dto: Inputs.IFC.ModelDto, constraints: IFC_ModelDto },
|
|
99
|
+
"walls.add": { dto: Inputs.IFC.AddWallDto, constraints: IFC_AddWallDto },
|
|
100
|
+
"walls.addType": { dto: Inputs.IFC.AddWallTypeDto, constraints: IFC_AddWallTypeDto },
|
|
101
|
+
"walls.clipByPlane": { dto: Inputs.IFC.ClipWallDto, constraints: IFC_ClipWallDto },
|
|
102
|
+
"walls.clipByRoof": { dto: Inputs.IFC.ClipWallByRoofDto, constraints: IFC_ClipWallByRoofDto },
|
|
103
|
+
"walls.connect": { dto: Inputs.IFC.ConnectWallsDto, constraints: IFC_ConnectWallsDto },
|
|
104
|
+
"walls.disconnect": { dto: Inputs.IFC.ConnectWallsDto, constraints: IFC_ConnectWallsDto },
|
|
105
|
+
"walls.edit": { dto: Inputs.IFC.EditWallDto, constraints: IFC_EditWallDto },
|
|
106
|
+
"walls.parameters": { dto: Inputs.IFC.WallDto, constraints: IFC_WallDto },
|
|
107
|
+
"windows.add": { dto: Inputs.IFC.AddWindowDto, constraints: IFC_AddWindowDto },
|
|
108
|
+
"windows.addType": { dto: Inputs.IFC.AddWindowTypeDto, constraints: IFC_AddWindowTypeDto },
|
|
109
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { IFCAssemblies } from "./services/assemblies";
|
|
2
|
+
import { IFCBeams } from "./services/beams";
|
|
3
|
+
import { IFCColumns } from "./services/columns";
|
|
4
|
+
import { IFCDoors } from "./services/doors";
|
|
5
|
+
import { IFCGeometry } from "./services/geometry";
|
|
6
|
+
import { IFCMaterials } from "./services/materials";
|
|
7
|
+
import { IFCMembers } from "./services/members";
|
|
8
|
+
import { IFCModels } from "./services/model";
|
|
9
|
+
import { IFCOpenings } from "./services/openings";
|
|
10
|
+
import { IFCProperties } from "./services/properties";
|
|
11
|
+
import { IFCQuantities } from "./services/quantities";
|
|
12
|
+
import { IFCRoofs } from "./services/roofs";
|
|
13
|
+
import { IFCSite } from "./services/site";
|
|
14
|
+
import { IFCSlabs } from "./services/slabs";
|
|
15
|
+
import { IFCSpaces } from "./services/spaces";
|
|
16
|
+
import { IFCSpatial } from "./services/spatial";
|
|
17
|
+
import { IFCWalls } from "./services/walls";
|
|
18
|
+
import { IFCWindows } from "./services/windows";
|
|
19
|
+
/**
|
|
20
|
+
* The entry point to IFC, the open BIM exchange format: `model` creates, reads, writes and edits
|
|
21
|
+
* models; `spatial`, `spaces`, `materials` and `site` add storeys, rooms, materials and the terrain;
|
|
22
|
+
* `walls`, `openings`, `doors`, `windows`, `slabs`, `roofs`, `columns`, `beams` and `members` add
|
|
23
|
+
* elements, `assemblies` groups them; `properties` attaches property sets, `quantities` measures, and `geometry` describes
|
|
24
|
+
* elements as a recipe a kernel builds.
|
|
25
|
+
*
|
|
26
|
+
* A model is a value: every method that changes one returns a new model and leaves the one it was
|
|
27
|
+
* given as it was. Elements are parametric IFC4 that other BIM tools edit as walls, slabs and doors.
|
|
28
|
+
* Experimental: names and inputs may still change before the first stable version.
|
|
29
|
+
* @beta
|
|
30
|
+
*/
|
|
31
|
+
export declare class IFCService {
|
|
32
|
+
/**
|
|
33
|
+
* Creates, reads, writes and summarizes models, reads and sets single attributes, and moves and
|
|
34
|
+
* removes objects.
|
|
35
|
+
*/
|
|
36
|
+
readonly model: IFCModels;
|
|
37
|
+
/**
|
|
38
|
+
* Adds storeys to a model's building, raises or lowers them, and lists them.
|
|
39
|
+
*/
|
|
40
|
+
readonly spatial: IFCSpatial;
|
|
41
|
+
/**
|
|
42
|
+
* Adds rooms and areas to storeys and lists them with their areas.
|
|
43
|
+
*/
|
|
44
|
+
readonly spaces: IFCSpaces;
|
|
45
|
+
/**
|
|
46
|
+
* Adds materials with their colours, and layer sets that walls and slabs are made of.
|
|
47
|
+
*/
|
|
48
|
+
readonly materials: IFCMaterials;
|
|
49
|
+
/**
|
|
50
|
+
* Adds walls, joins them at their corners and clips them under roofs.
|
|
51
|
+
*/
|
|
52
|
+
readonly walls: IFCWalls;
|
|
53
|
+
/**
|
|
54
|
+
* Cuts openings through walls and slabs, and moves them along their walls.
|
|
55
|
+
*/
|
|
56
|
+
readonly openings: IFCOpenings;
|
|
57
|
+
/**
|
|
58
|
+
* Adds door types and doors placed in walls.
|
|
59
|
+
*/
|
|
60
|
+
readonly doors: IFCDoors;
|
|
61
|
+
/**
|
|
62
|
+
* Adds window types and windows placed in walls.
|
|
63
|
+
*/
|
|
64
|
+
readonly windows: IFCWindows;
|
|
65
|
+
/**
|
|
66
|
+
* Adds floors, roofs and landings.
|
|
67
|
+
*/
|
|
68
|
+
readonly slabs: IFCSlabs;
|
|
69
|
+
/**
|
|
70
|
+
* Adds flat, mono-pitch, gable and hip roofs over rectangles.
|
|
71
|
+
*/
|
|
72
|
+
readonly roofs: IFCRoofs;
|
|
73
|
+
/**
|
|
74
|
+
* Adds the site's terrain and trees.
|
|
75
|
+
*/
|
|
76
|
+
readonly site: IFCSite;
|
|
77
|
+
/**
|
|
78
|
+
* Adds columns standing on a storey.
|
|
79
|
+
*/
|
|
80
|
+
readonly columns: IFCColumns;
|
|
81
|
+
/**
|
|
82
|
+
* Adds beams between two points.
|
|
83
|
+
*/
|
|
84
|
+
readonly beams: IFCBeams;
|
|
85
|
+
/**
|
|
86
|
+
* Adds braces, rafters, studs, mullions and other members between two points.
|
|
87
|
+
*/
|
|
88
|
+
readonly members: IFCMembers;
|
|
89
|
+
/**
|
|
90
|
+
* Makes elements of the model the parts of an assembly, such as a facade's cladding boards.
|
|
91
|
+
*/
|
|
92
|
+
readonly assemblies: IFCAssemblies;
|
|
93
|
+
/**
|
|
94
|
+
* Attaches property sets to objects and types, sets and removes their values, and reads them back.
|
|
95
|
+
*/
|
|
96
|
+
readonly properties: IFCProperties;
|
|
97
|
+
/**
|
|
98
|
+
* Measures elements and writes and reads their base quantity sets.
|
|
99
|
+
*/
|
|
100
|
+
readonly quantities: IFCQuantities;
|
|
101
|
+
/**
|
|
102
|
+
* Describes elements as a recipe a geometry kernel builds into solids.
|
|
103
|
+
*/
|
|
104
|
+
readonly geometry: IFCGeometry;
|
|
105
|
+
/**
|
|
106
|
+
* Makes the entry point with every part of the IFC library.
|
|
107
|
+
*/
|
|
108
|
+
constructor();
|
|
109
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { IFCAssemblies } from "./services/assemblies";
|
|
2
|
+
import { IFCBeams } from "./services/beams";
|
|
3
|
+
import { IFCColumns } from "./services/columns";
|
|
4
|
+
import { IFCDoors } from "./services/doors";
|
|
5
|
+
import { IFCGeometry } from "./services/geometry";
|
|
6
|
+
import { IFCMaterials } from "./services/materials";
|
|
7
|
+
import { IFCMembers } from "./services/members";
|
|
8
|
+
import { IFCModels } from "./services/model";
|
|
9
|
+
import { IFCOpenings } from "./services/openings";
|
|
10
|
+
import { IFCProperties } from "./services/properties";
|
|
11
|
+
import { IFCQuantities } from "./services/quantities";
|
|
12
|
+
import { IFCRoofs } from "./services/roofs";
|
|
13
|
+
import { IFCSite } from "./services/site";
|
|
14
|
+
import { IFCSlabs } from "./services/slabs";
|
|
15
|
+
import { IFCSpaces } from "./services/spaces";
|
|
16
|
+
import { IFCSpatial } from "./services/spatial";
|
|
17
|
+
import { IFCWalls } from "./services/walls";
|
|
18
|
+
import { IFCWindows } from "./services/windows";
|
|
19
|
+
/**
|
|
20
|
+
* The entry point to IFC, the open BIM exchange format: `model` creates, reads, writes and edits
|
|
21
|
+
* models; `spatial`, `spaces`, `materials` and `site` add storeys, rooms, materials and the terrain;
|
|
22
|
+
* `walls`, `openings`, `doors`, `windows`, `slabs`, `roofs`, `columns`, `beams` and `members` add
|
|
23
|
+
* elements, `assemblies` groups them; `properties` attaches property sets, `quantities` measures, and `geometry` describes
|
|
24
|
+
* elements as a recipe a kernel builds.
|
|
25
|
+
*
|
|
26
|
+
* A model is a value: every method that changes one returns a new model and leaves the one it was
|
|
27
|
+
* given as it was. Elements are parametric IFC4 that other BIM tools edit as walls, slabs and doors.
|
|
28
|
+
* Experimental: names and inputs may still change before the first stable version.
|
|
29
|
+
* @beta
|
|
30
|
+
*/
|
|
31
|
+
export class IFCService {
|
|
32
|
+
/**
|
|
33
|
+
* Makes the entry point with every part of the IFC library.
|
|
34
|
+
*/
|
|
35
|
+
constructor() {
|
|
36
|
+
this.model = new IFCModels();
|
|
37
|
+
this.spatial = new IFCSpatial();
|
|
38
|
+
this.spaces = new IFCSpaces();
|
|
39
|
+
this.materials = new IFCMaterials();
|
|
40
|
+
this.walls = new IFCWalls();
|
|
41
|
+
this.openings = new IFCOpenings();
|
|
42
|
+
this.doors = new IFCDoors();
|
|
43
|
+
this.windows = new IFCWindows();
|
|
44
|
+
this.slabs = new IFCSlabs();
|
|
45
|
+
this.roofs = new IFCRoofs();
|
|
46
|
+
this.site = new IFCSite();
|
|
47
|
+
this.columns = new IFCColumns();
|
|
48
|
+
this.beams = new IFCBeams();
|
|
49
|
+
this.members = new IFCMembers();
|
|
50
|
+
this.assemblies = new IFCAssemblies();
|
|
51
|
+
this.properties = new IFCProperties();
|
|
52
|
+
this.quantities = new IFCQuantities();
|
|
53
|
+
this.geometry = new IFCGeometry();
|
|
54
|
+
}
|
|
55
|
+
}
|