ifcopenshell 0.0.0-stage → 0.9.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 +38 -2
- package/dist/entity_instance.d.ts +44 -0
- package/dist/entity_instance.d.ts.map +1 -0
- package/dist/entity_instance.js +97 -0
- package/dist/entity_instance.js.map +1 -0
- package/dist/file.d.ts +52 -0
- package/dist/file.d.ts.map +1 -0
- package/dist/file.js +121 -0
- package/dist/file.js.map +1 -0
- package/dist/geom/index.d.ts +7 -0
- package/dist/geom/index.d.ts.map +1 -0
- package/dist/geom/index.js +5 -0
- package/dist/geom/index.js.map +1 -0
- package/dist/geom/iterator.d.ts +19 -0
- package/dist/geom/iterator.d.ts.map +1 -0
- package/dist/geom/iterator.js +26 -0
- package/dist/geom/iterator.js.map +1 -0
- package/dist/geom/settings.d.ts +10 -0
- package/dist/geom/settings.d.ts.map +1 -0
- package/dist/geom/settings.js +15 -0
- package/dist/geom/settings.js.map +1 -0
- package/dist/geom/shape.d.ts +5 -0
- package/dist/geom/shape.d.ts.map +1 -0
- package/dist/geom/shape.js +7 -0
- package/dist/geom/shape.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +27 -0
- package/dist/init.d.ts.map +1 -0
- package/dist/init.js +137 -0
- package/dist/init.js.map +1 -0
- package/dist/serializers/index.d.ts +46 -0
- package/dist/serializers/index.d.ts.map +1 -0
- package/dist/serializers/index.js +161 -0
- package/dist/serializers/index.js.map +1 -0
- package/dist/types.d.ts +116 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/util/color.d.ts +34 -0
- package/dist/util/color.d.ts.map +1 -0
- package/dist/util/color.js +52 -0
- package/dist/util/color.js.map +1 -0
- package/dist/util/index.d.ts +8 -0
- package/dist/util/index.d.ts.map +1 -0
- package/dist/util/index.js +8 -0
- package/dist/util/index.js.map +1 -0
- package/dist/util/inspect.d.ts +15 -0
- package/dist/util/inspect.d.ts.map +1 -0
- package/dist/util/inspect.js +24 -0
- package/dist/util/inspect.js.map +1 -0
- package/package.json +61 -4
package/README.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ifcopenshell
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeScript/JavaScript bindings for the IfcOpenShell WASM runtime.
|
|
4
|
+
|
|
5
|
+
IFC (Industry Foundation Classes) is the main open standard to encode our built environment in multi-faceted information models. A discipline called BIM (Building Information Modelling) that enables many novel use cases such as 3D coordination, scheduling, define handover information requirements and advanced spatial and programmatic analysis.
|
|
6
|
+
|
|
7
|
+
IfcOpenShell is the oldest and most mature open source IFC library available. It’s developed since 2011 by a community of hundreds of developers and trusted to deliver many AEC technologies that power our industry. IfcOpenShell is also taught in numerous universities and cited in hundreds of academic publications.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
import * as ifcopenshell from 'ifcopenshell';
|
|
11
|
+
import * as ifcopenshell_geom from 'ifcopenshell/geom';
|
|
12
|
+
|
|
13
|
+
const runtime = await ifcopenshell.init();
|
|
14
|
+
await runtime.loadPlugin('schema', 'ifc4');
|
|
15
|
+
using model = new ifcopenshell.File('IFC4');
|
|
16
|
+
const wall = model.create('IfcWall', { Name: 'Example' });
|
|
17
|
+
console.log(wall.id(), wall.get('Name'));
|
|
18
|
+
wall.set('Name', 'Updated');
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Geometry
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
await runtime.loadPlugin('mapping', 'ifc4');
|
|
25
|
+
await runtime.loadPlugin('kernel', 'manifold');
|
|
26
|
+
const settings = new ifcopenshell_geom.Settings();
|
|
27
|
+
settings.set('weld-vertices', false);
|
|
28
|
+
using iterator = new ifcopenshell_geom.Iterator(settings, model, {
|
|
29
|
+
geometryLibrary: 'manifold',
|
|
30
|
+
});
|
|
31
|
+
if (iterator.initialize()) do {
|
|
32
|
+
const shape = iterator.get()!;
|
|
33
|
+
// Read shape.asTriangulationElement().geometry() here.
|
|
34
|
+
} while (iterator.next());
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Documentation
|
|
38
|
+
|
|
39
|
+
See 
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IfcOpenshellInstance } from '@ifcopenshell/wasm/api';
|
|
2
|
+
import type { AttributeValueType as NativeAttributeValueType } from '@ifcopenshell/wasm/api';
|
|
3
|
+
/** Values decoded by the native WASM attribute typemap. */
|
|
4
|
+
export type AttributeValueType = NativeAttributeValueType<EntityInstance>;
|
|
5
|
+
export type EntityInfoValue<T = never> = null | boolean | number | bigint | string | EntityInstance | EntityInstanceInfo<T> | T | EntityInfoValue<T>[];
|
|
6
|
+
/** Flat dictionary returned by `EntityInstance.getInfo()`. */
|
|
7
|
+
export interface EntityInstanceInfo<T = never> {
|
|
8
|
+
id?: number;
|
|
9
|
+
type: string;
|
|
10
|
+
[attribute: string]: EntityInfoValue<T> | undefined;
|
|
11
|
+
}
|
|
12
|
+
export interface GetInfoOptions<T = EntityInstanceInfo> {
|
|
13
|
+
includeIdentifier?: boolean;
|
|
14
|
+
recursive?: boolean;
|
|
15
|
+
ignore?: readonly string[];
|
|
16
|
+
returnType?: (info: EntityInstanceInfo<unknown>) => T;
|
|
17
|
+
}
|
|
18
|
+
/** IFC entity instance with attribute conveniences. */
|
|
19
|
+
export declare class EntityInstance extends IfcOpenshellInstance {
|
|
20
|
+
constructor(handle: IfcOpenshellInstance);
|
|
21
|
+
isA(name: string): boolean;
|
|
22
|
+
isA(withSchema?: boolean): string;
|
|
23
|
+
get(nameOrIndex: string | number): AttributeValueType;
|
|
24
|
+
attributes(): string[];
|
|
25
|
+
entries(): [string, AttributeValueType][];
|
|
26
|
+
/**
|
|
27
|
+
* Return the entity id, type, and decoded forward attributes.
|
|
28
|
+
*
|
|
29
|
+
* With `recursive`, referenced entities are expanded as well.
|
|
30
|
+
*/
|
|
31
|
+
getInfo(options?: GetInfoOptions): EntityInstanceInfo;
|
|
32
|
+
getInfo<T>(options: Omit<GetInfoOptions<T>, 'returnType'> & {
|
|
33
|
+
returnType: (info: EntityInstanceInfo<unknown>) => T;
|
|
34
|
+
}): T;
|
|
35
|
+
inverseAttributes(): string[];
|
|
36
|
+
/** Return entities referenced by the named inverse attribute. */
|
|
37
|
+
inverse(name: string): EntityInstance[];
|
|
38
|
+
attributeIndex(name: string): number;
|
|
39
|
+
attributeName(index: number): string;
|
|
40
|
+
attributeType(nameOrIndex: string | number): string;
|
|
41
|
+
attributeCategory(name: string): number;
|
|
42
|
+
set(nameOrIndex: string | number, value: AttributeValueType): void;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=entity_instance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity_instance.d.ts","sourceRoot":"","sources":["../src/entity_instance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,kBAAkB,IAAI,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAG7F,2DAA2D;AAC3D,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAC;AAE1E,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,KAAK,IAAI,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,cAAc,GAAG,kBAAkB,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;AAEvJ,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB,CAAC,CAAC,GAAG,KAAK;IAC3C,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,SAAS,EAAE,MAAM,GAAG,eAAe,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IAIvC,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,EAAE,kBAAkB,GAAG,IAAI;CAMnE"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// This file was generated with the assistance of an AI coding tool.
|
|
2
|
+
import { IfcOpenshellInstance } from '@ifcopenshell/wasm/api';
|
|
3
|
+
import { IfcOpenShellError } from './init.js';
|
|
4
|
+
/** IFC entity instance with attribute conveniences. */
|
|
5
|
+
export class EntityInstance extends IfcOpenshellInstance {
|
|
6
|
+
constructor(handle) {
|
|
7
|
+
super(handle);
|
|
8
|
+
}
|
|
9
|
+
isA(nameOrSchema = false) {
|
|
10
|
+
return typeof nameOrSchema === 'string'
|
|
11
|
+
? super.isA(nameOrSchema)
|
|
12
|
+
: this.className(nameOrSchema);
|
|
13
|
+
}
|
|
14
|
+
get(nameOrIndex) {
|
|
15
|
+
if (typeof nameOrIndex === 'string') {
|
|
16
|
+
// Inverse attributes are served through the same accessor, as getattr() does in Python.
|
|
17
|
+
if (this.inverseAttributes().includes(nameOrIndex)) {
|
|
18
|
+
return this.inverse(nameOrIndex);
|
|
19
|
+
}
|
|
20
|
+
return this.getArgumentByName(nameOrIndex);
|
|
21
|
+
}
|
|
22
|
+
return this.getArgument(nameOrIndex);
|
|
23
|
+
}
|
|
24
|
+
attributes() {
|
|
25
|
+
return this.getAttributeNames();
|
|
26
|
+
}
|
|
27
|
+
entries() {
|
|
28
|
+
return this.attributes().map((name) => [name, this.get(name)]);
|
|
29
|
+
}
|
|
30
|
+
getInfo(options = {}) {
|
|
31
|
+
const active = new Set();
|
|
32
|
+
const ignore = new Set(options.ignore);
|
|
33
|
+
const mapValue = (value) => {
|
|
34
|
+
if (value instanceof EntityInstance) {
|
|
35
|
+
return buildInfo(value);
|
|
36
|
+
}
|
|
37
|
+
if (Array.isArray(value)) {
|
|
38
|
+
return value.map(mapValue);
|
|
39
|
+
}
|
|
40
|
+
return value;
|
|
41
|
+
};
|
|
42
|
+
const buildInfo = (instance) => {
|
|
43
|
+
const identity = instance.identity();
|
|
44
|
+
if (active.has(identity))
|
|
45
|
+
throw new RangeError('Cyclic entity reference in recursive getInfo');
|
|
46
|
+
active.add(identity);
|
|
47
|
+
const info = options.includeIdentifier ?? true
|
|
48
|
+
? { id: instance.id(), type: instance.isA() }
|
|
49
|
+
: { type: instance.isA() };
|
|
50
|
+
try {
|
|
51
|
+
for (const name of instance.attributes()) {
|
|
52
|
+
if (ignore.has(name))
|
|
53
|
+
continue;
|
|
54
|
+
const value = instance.get(name);
|
|
55
|
+
if (options.recursive) {
|
|
56
|
+
info[name] = mapValue(value);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
info[name] = value;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return options.returnType ? options.returnType(info) : info;
|
|
63
|
+
}
|
|
64
|
+
finally {
|
|
65
|
+
active.delete(identity);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
return buildInfo(this);
|
|
69
|
+
}
|
|
70
|
+
inverseAttributes() {
|
|
71
|
+
return this.getInverseAttributeNames();
|
|
72
|
+
}
|
|
73
|
+
/** Return entities referenced by the named inverse attribute. */
|
|
74
|
+
inverse(name) {
|
|
75
|
+
return this.getInverse(name);
|
|
76
|
+
}
|
|
77
|
+
attributeIndex(name) {
|
|
78
|
+
return this.getArgumentIndex(name);
|
|
79
|
+
}
|
|
80
|
+
attributeName(index) {
|
|
81
|
+
return this.getArgumentName(index);
|
|
82
|
+
}
|
|
83
|
+
attributeType(nameOrIndex) {
|
|
84
|
+
const index = typeof nameOrIndex === 'number' ? nameOrIndex : this.attributeIndex(nameOrIndex);
|
|
85
|
+
return this.getArgumentType(index);
|
|
86
|
+
}
|
|
87
|
+
attributeCategory(name) {
|
|
88
|
+
return this.getAttributeCategory(name);
|
|
89
|
+
}
|
|
90
|
+
set(nameOrIndex, value) {
|
|
91
|
+
if (typeof nameOrIndex === 'string' && this.inverseAttributes().includes(nameOrIndex)) {
|
|
92
|
+
throw new IfcOpenShellError(`Cannot set inverse attribute ${nameOrIndex}`);
|
|
93
|
+
}
|
|
94
|
+
this.setArgument(typeof nameOrIndex === 'number' ? nameOrIndex : this.getArgumentIndex(nameOrIndex), value);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=entity_instance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity_instance.js","sourceRoot":"","sources":["../src/entity_instance.ts"],"names":[],"mappings":"AAAA,oEAAoE;AAEpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAE9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAqB9C,uDAAuD;AACvD,MAAM,OAAO,cAAe,SAAQ,oBAAoB;IACtD,YACE,MAA4B;QAE5B,KAAK,CAAC,MAAM,CAAC,CAAC;IAChB,CAAC;IAIQ,GAAG,CAAC,eAAiC,KAAK;QACjD,OAAO,OAAO,YAAY,KAAK,QAAQ;YACrC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,YAAY,CAAC;YACzB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC;IAED,GAAG,CAAC,WAA4B;QAC9B,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;YACpC,wFAAwF;YACxF,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;gBACnD,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW,CAAkC,CAAC;YACpE,CAAC;YACD,OAAO,IAAI,CAAC,iBAAiB,CAAC,WAAW,CAAuB,CAAC;QACnE,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,WAAW,CAAuB,CAAC;IAC7D,CAAC;IAED,UAAU;QACR,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAClC,CAAC;IAED,OAAO;QACL,OAAO,IAAI,CAAC,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AAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,GAAG,CAAC,WAA4B,EAAE,KAAyB;QACzD,IAAI,OAAO,WAAW,KAAK,QAAQ,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;YACtF,MAAM,IAAI,iBAAiB,CAAC,gCAAgC,WAAW,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC;IAC9G,CAAC;CACF"}
|
package/dist/file.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { IfcOpenshellFile } from '@ifcopenshell/wasm/api';
|
|
2
|
+
import type { AttributeValueType, EntityInstance } from './entity_instance.js';
|
|
3
|
+
/** Options controlling IFC byte-stream loading. */
|
|
4
|
+
export interface OpenOptions {
|
|
5
|
+
/** Abort opening before native parsing begins. */
|
|
6
|
+
signal?: AbortSignal;
|
|
7
|
+
/** Open the native file in read-only mode when supported. */
|
|
8
|
+
readonly?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface GetInverseOptions {
|
|
11
|
+
allowDuplicate?: boolean;
|
|
12
|
+
withAttributeIndices?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/** High-level wrapper for an IFC file and its entity graph. */
|
|
15
|
+
export declare class File extends IfcOpenshellFile {
|
|
16
|
+
/** Create an empty file, or take ownership of an existing native file handle. */
|
|
17
|
+
constructor(schemaOrHandle?: string | IfcOpenshellFile);
|
|
18
|
+
/** Open IFC STEP bytes and retain ownership of the native file. */
|
|
19
|
+
static open(bytes: Uint8Array | ArrayBuffer, filename?: string, options?: OpenOptions): File;
|
|
20
|
+
get maxId(): number;
|
|
21
|
+
get ids(): number[];
|
|
22
|
+
get entityCount(): number;
|
|
23
|
+
byId: (id: number) => EntityInstance;
|
|
24
|
+
byGuid: (guid: string) => EntityInstance;
|
|
25
|
+
byType: (typeName: string) => EntityInstance[];
|
|
26
|
+
byTypeExclSubtypes: (typeName: string) => EntityInstance[];
|
|
27
|
+
traverse: (entity: EntityInstance, maxDepth: number) => EntityInstance[];
|
|
28
|
+
traverseBreadthFirst: (entity: EntityInstance, maxDepth: number) => EntityInstance[];
|
|
29
|
+
/** Create an entity with any of its IFC attributes, using their schema names. */
|
|
30
|
+
create(ifcClass: string, attributes?: Record<string, AttributeValueType>): EntityInstance;
|
|
31
|
+
/** General IFC schema version, without addendum or technical corrigendum suffixes. */
|
|
32
|
+
schema(): string;
|
|
33
|
+
/** Add an entity, assigning a new id unless `instanceId` is given explicitly. */
|
|
34
|
+
add(entity: EntityInstance, instanceId?: number): EntityInstance;
|
|
35
|
+
getInverse(entity: EntityInstance, options: {
|
|
36
|
+
allowDuplicate?: false;
|
|
37
|
+
withAttributeIndices?: false;
|
|
38
|
+
}): Set<EntityInstance>;
|
|
39
|
+
getInverse(entity: EntityInstance, options: {
|
|
40
|
+
allowDuplicate: true;
|
|
41
|
+
withAttributeIndices: true;
|
|
42
|
+
}): [EntityInstance, number][];
|
|
43
|
+
getInverse(entity: EntityInstance, options: {
|
|
44
|
+
allowDuplicate: true;
|
|
45
|
+
withAttributeIndices?: false;
|
|
46
|
+
}): EntityInstance[];
|
|
47
|
+
getInverse(entity: EntityInstance): Set<EntityInstance>;
|
|
48
|
+
getInverse(entity: EntityInstance, options: GetInverseOptions): Set<EntityInstance> | EntityInstance[] | [EntityInstance, number][];
|
|
49
|
+
}
|
|
50
|
+
/** Parse IFC bytes after explicitly loading their schema plugin. */
|
|
51
|
+
export declare function open(bytes: Uint8Array | ArrayBuffer, filename?: string, options?: OpenOptions): File;
|
|
52
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"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-level wrapper for an IFC file and its entity graph. */
|
|
4
|
+
export class File extends IfcOpenshellFile {
|
|
5
|
+
/** Create an empty file, or take ownership of an existing native file handle. */
|
|
6
|
+
constructor(schemaOrHandle = 'IFC4') {
|
|
7
|
+
const handle = typeof schemaOrHandle === 'string'
|
|
8
|
+
? ifcopenshell.parse.newFile(schemaOrHandle, 0, '')
|
|
9
|
+
: schemaOrHandle;
|
|
10
|
+
if (!handle || handle.ptr === 0)
|
|
11
|
+
throw new IfcOpenShellError('Failed to create IFC file');
|
|
12
|
+
super(handle);
|
|
13
|
+
}
|
|
14
|
+
/** Open IFC STEP bytes and retain ownership of the native file. */
|
|
15
|
+
static open(bytes, filename, options = {}) {
|
|
16
|
+
if (options.signal?.aborted) {
|
|
17
|
+
throw abortError('Opening IFC file was aborted', options.signal.reason);
|
|
18
|
+
}
|
|
19
|
+
const handle = ifcopenshell.parse.openBytes(bytes, filename, options.readonly ?? false);
|
|
20
|
+
if (options.signal?.aborted) {
|
|
21
|
+
handle?.destroy();
|
|
22
|
+
throw abortError('Opening IFC file was aborted', options.signal.reason);
|
|
23
|
+
}
|
|
24
|
+
if (!handle || handle.ptr === 0)
|
|
25
|
+
throw new IfcOpenShellError('Failed to open IFC file');
|
|
26
|
+
return new File(handle);
|
|
27
|
+
}
|
|
28
|
+
get maxId() {
|
|
29
|
+
return this.getMaxId();
|
|
30
|
+
}
|
|
31
|
+
get ids() {
|
|
32
|
+
// The C API yields entities in reverse insertion order; Python iterates by id.
|
|
33
|
+
return this.entityNames().sort((a, b) => a - b);
|
|
34
|
+
}
|
|
35
|
+
get entityCount() {
|
|
36
|
+
return this.ids.length;
|
|
37
|
+
}
|
|
38
|
+
/** Create an entity with any of its IFC attributes, using their schema names. */
|
|
39
|
+
create(ifcClass, attributes = {}) {
|
|
40
|
+
const entity = this.createEntityByName(ifcClass);
|
|
41
|
+
if (!entity)
|
|
42
|
+
throw new IfcOpenShellError(`Failed to create ${ifcClass}`);
|
|
43
|
+
try {
|
|
44
|
+
for (const [name, value] of Object.entries(attributes))
|
|
45
|
+
entity.set(name, value);
|
|
46
|
+
return entity;
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
this.remove(entity);
|
|
50
|
+
throw error;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
/** General IFC schema version, without addendum or technical corrigendum suffixes. */
|
|
54
|
+
schema() {
|
|
55
|
+
return this.schemaIdentifier().replace(/(_ADD|_TC)\d+.*$/, '');
|
|
56
|
+
}
|
|
57
|
+
/** Add an entity, assigning a new id unless `instanceId` is given explicitly. */
|
|
58
|
+
add(entity, instanceId = -1) {
|
|
59
|
+
const added = super.add(entity, instanceId);
|
|
60
|
+
if (!added)
|
|
61
|
+
throw new IfcOpenShellError(`Failed to add ${entity.isA()} to file`);
|
|
62
|
+
return added;
|
|
63
|
+
}
|
|
64
|
+
getInverse(entity, options = {}) {
|
|
65
|
+
const { allowDuplicate = false, withAttributeIndices = false } = options;
|
|
66
|
+
if (withAttributeIndices && !allowDuplicate) {
|
|
67
|
+
throw new IfcOpenShellError('withAttributeIndices requires allowDuplicate to be true');
|
|
68
|
+
}
|
|
69
|
+
const entities = this.getInverseList(entity);
|
|
70
|
+
if (withAttributeIndices) {
|
|
71
|
+
const indices = this.getInverseIndices(entity);
|
|
72
|
+
return entities.map((item, i) => [item, indices[i]]);
|
|
73
|
+
}
|
|
74
|
+
if (allowDuplicate)
|
|
75
|
+
return entities;
|
|
76
|
+
// JS Set uses object identity; native getters produce a fresh handle for each occurrence.
|
|
77
|
+
const unique = new Map();
|
|
78
|
+
for (const item of entities) {
|
|
79
|
+
if (!unique.has(item.identity()))
|
|
80
|
+
unique.set(item.identity(), item);
|
|
81
|
+
}
|
|
82
|
+
return new EntityInstanceSet(unique.values());
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/** Set membership follows IFC identity, like Python entity equality. */
|
|
86
|
+
class EntityInstanceSet extends Set {
|
|
87
|
+
byIdentity = new Map();
|
|
88
|
+
constructor(values) {
|
|
89
|
+
super();
|
|
90
|
+
for (const value of values)
|
|
91
|
+
this.add(value);
|
|
92
|
+
}
|
|
93
|
+
add(value) {
|
|
94
|
+
const identity = value.identity();
|
|
95
|
+
if (!this.byIdentity.has(identity)) {
|
|
96
|
+
this.byIdentity.set(identity, value);
|
|
97
|
+
super.add(value);
|
|
98
|
+
}
|
|
99
|
+
return this;
|
|
100
|
+
}
|
|
101
|
+
has(value) {
|
|
102
|
+
return this.byIdentity.has(value.identity());
|
|
103
|
+
}
|
|
104
|
+
delete(value) {
|
|
105
|
+
const identity = value.identity();
|
|
106
|
+
const member = this.byIdentity.get(identity);
|
|
107
|
+
if (!member)
|
|
108
|
+
return false;
|
|
109
|
+
this.byIdentity.delete(identity);
|
|
110
|
+
return super.delete(member);
|
|
111
|
+
}
|
|
112
|
+
clear() {
|
|
113
|
+
this.byIdentity.clear();
|
|
114
|
+
super.clear();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/** Parse IFC bytes after explicitly loading their schema plugin. */
|
|
118
|
+
export function open(bytes, filename, options) {
|
|
119
|
+
return File.open(bytes, filename, options);
|
|
120
|
+
}
|
|
121
|
+
//# sourceMappingURL=file.js.map
|
package/dist/file.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAexE,+DAA+D;AAC/D,MAAM,OAAO,IAAK,SAAQ,gBAAgB;IACxC,iFAAiF;IACjF,YAAY,iBAA4C,MAAM;QAC5D,MAAM,MAAM,GAAG,OAAO,cAAc,KAAK,QAAQ;YAC/C,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC,EAAE,EAAE,CAAC;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CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,GAAG,CAAC,KAAqB;QAChC,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC/C,CAAC;IAEQ,MAAM,CAAC,KAAqB;QACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC;QAClC,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7C,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAC1B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAC9B,CAAC;IAEQ,KAAK;QACZ,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;QACxB,KAAK,CAAC,KAAK,EAAE,CAAC;IAChB,CAAC;CACF;AAED,oEAAoE;AACpE,MAAM,UAAU,IAAI,CAAC,KAA+B,EAAE,QAAiB,EAAE,OAAqB;IAC5F,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Geometry settings, iteration and individual shapes. */
|
|
2
|
+
export { Settings } from './settings.js';
|
|
3
|
+
export type { SettingInput } from './settings.js';
|
|
4
|
+
export { Iterator } from './iterator.js';
|
|
5
|
+
export type { IteratorFilter, IteratorOptions } from './iterator.js';
|
|
6
|
+
export { createShape } from './shape.js';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/geom/index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/geom/index.ts"],"names":[],"mappings":"AAAA,0DAA0D;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IfcOpenshellGeomIterator } from '@ifcopenshell/wasm/api';
|
|
2
|
+
import type { File } from '../file.js';
|
|
3
|
+
import type { Settings } from './settings.js';
|
|
4
|
+
/** Entity ids or IFC type names, matching the native include/exclude filters. */
|
|
5
|
+
export type IteratorFilter = number[] | string[];
|
|
6
|
+
/** Optional native iterator configuration. */
|
|
7
|
+
export interface IteratorOptions {
|
|
8
|
+
numThreads?: number;
|
|
9
|
+
include?: IteratorFilter;
|
|
10
|
+
exclude?: IteratorFilter;
|
|
11
|
+
geometryLibrary?: string;
|
|
12
|
+
}
|
|
13
|
+
/** Synchronous native iterator. Load schema, mapping and kernel plugins before construction. */
|
|
14
|
+
export declare class Iterator extends IfcOpenshellGeomIterator {
|
|
15
|
+
readonly settings: Settings;
|
|
16
|
+
private readonly sourceFile;
|
|
17
|
+
constructor(settings: Settings, file: File, options?: IteratorOptions);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=iterator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterator.d.ts","sourceRoot":"","sources":["../../src/geom/iterator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAEvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AAEjD,8CAA8C;AAC9C,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gGAAgG;AAChG,qBAAa,QAAS,SAAQ,wBAAwB;IAIlD,QAAQ,CAAC,QAAQ,EAAE,QAAQ;IAH7B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAO;gBAGvB,QAAQ,EAAE,QAAQ,EAC3B,IAAI,EAAE,IAAI,EACV,OAAO,GAAE,eAAoB;CAiBhC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IfcOpenshellGeomIterator } from '@ifcopenshell/wasm/api';
|
|
2
|
+
import { IfcOpenShellError, ifcopenshell } from '../init.js';
|
|
3
|
+
/** Synchronous native iterator. Load schema, mapping and kernel plugins before construction. */
|
|
4
|
+
export class Iterator extends IfcOpenshellGeomIterator {
|
|
5
|
+
settings;
|
|
6
|
+
sourceFile;
|
|
7
|
+
constructor(settings, file, options = {}) {
|
|
8
|
+
const { numThreads = 1, include, exclude, geometryLibrary = 'opencascade' } = options;
|
|
9
|
+
if (include !== undefined && exclude !== undefined) {
|
|
10
|
+
throw new IfcOpenShellError('Specify either include or exclude, not both');
|
|
11
|
+
}
|
|
12
|
+
const geom = ifcopenshell.geom;
|
|
13
|
+
const filter = include ?? exclude;
|
|
14
|
+
const handle = filter === undefined
|
|
15
|
+
? geom.createIterator(geometryLibrary, settings, file, numThreads)
|
|
16
|
+
: filter.every(value => typeof value === 'number')
|
|
17
|
+
? geom.createIteratorWithIncludeExcludeId(geometryLibrary, settings, file, filter, include !== undefined, numThreads)
|
|
18
|
+
: geom.createIteratorWithIncludeExclude(geometryLibrary, settings, file, filter, include !== undefined, numThreads);
|
|
19
|
+
if (!handle || handle.ptr === 0)
|
|
20
|
+
throw new IfcOpenShellError('Failed to create iterator');
|
|
21
|
+
super(handle);
|
|
22
|
+
this.settings = settings;
|
|
23
|
+
this.sourceFile = file;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=iterator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iterator.js","sourceRoot":"","sources":["../../src/geom/iterator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAc7D,gGAAgG;AAChG,MAAM,OAAO,QAAS,SAAQ,wBAAwB;IAIzC;IAHM,UAAU,CAAO;IAElC,YACW,QAAkB,EAC3B,IAAU,EACV,UAA2B,EAAE;QAE7B,MAAM,EAAE,UAAU,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,eAAe,GAAG,aAAa,EAAE,GAAG,OAAO,CAAC;QACtF,IAAI,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACnD,MAAM,IAAI,iBAAiB,CAAC,6CAA6C,CAAC,CAAC;QAC7E,CAAC;QACD,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC;QAC/B,MAAM,MAAM,GAAG,OAAO,IAAI,OAAO,CAAC;QAClC,MAAM,MAAM,GAAG,MAAM,KAAK,SAAS;YACjC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,CAAC;YAClE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;gBAChD,CAAC,CAAC,IAAI,CAAC,kCAAkC,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAkB,EAAE,OAAO,KAAK,SAAS,EAAE,UAAU,CAAC;gBACjI,CAAC,CAAC,IAAI,CAAC,gCAAgC,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAkB,EAAE,OAAO,KAAK,SAAS,EAAE,UAAU,CAAC,CAAC;QACpI,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,GAAG,KAAK,CAAC;YAAE,MAAM,IAAI,iBAAiB,CAAC,2BAA2B,CAAC,CAAC;QAC1F,KAAK,CAAC,MAAM,CAAC,CAAC;QAhBL,aAAQ,GAAR,QAAQ,CAAU;QAiB3B,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IfcOpenshellGeomSettings } from '@ifcopenshell/wasm/api';
|
|
2
|
+
/** Value accepted by a geometry setting setter. */
|
|
3
|
+
export type SettingInput = boolean | number | string | number[] | string[];
|
|
4
|
+
/** Owned wrapper for native geometry interpretation settings. */
|
|
5
|
+
export declare class Settings extends IfcOpenshellGeomSettings {
|
|
6
|
+
constructor();
|
|
7
|
+
value(name: string): SettingInput;
|
|
8
|
+
names(): string[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=settings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/geom/settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAGlE,mDAAmD;AACnD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;AAC3E,iEAAiE;AACjE,qBAAa,QAAS,SAAQ,wBAAwB;;IAKpD,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY;IAIjC,KAAK,IAAI,MAAM,EAAE;CAGlB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IfcOpenshellGeomSettings } from '@ifcopenshell/wasm/api';
|
|
2
|
+
import { ifcopenshell } from '../init.js';
|
|
3
|
+
/** Owned wrapper for native geometry interpretation settings. */
|
|
4
|
+
export class Settings extends IfcOpenshellGeomSettings {
|
|
5
|
+
constructor() {
|
|
6
|
+
super(ifcopenshell.geom.createSettings());
|
|
7
|
+
}
|
|
8
|
+
value(name) {
|
|
9
|
+
return this.get(name);
|
|
10
|
+
}
|
|
11
|
+
names() {
|
|
12
|
+
return this.settingNames();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../../src/geom/settings.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,iEAAiE;AACjE,MAAM,OAAO,QAAS,SAAQ,wBAAwB;IACpD;QACE,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC,CAAC;IAC5C,CAAC;IAED,KAAK,CAAC,IAAY;QAChB,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC;IAED,KAAK;QACH,OAAO,IAAI,CAAC,YAAY,EAAE,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Settings } from './settings.js';
|
|
2
|
+
import type { EntityInstance } from '../entity_instance.js';
|
|
3
|
+
/** Create one shape. Load the schema mapping and geometry kernel beforehand. */
|
|
4
|
+
export declare function createShape(settings: Settings, instance: EntityInstance, representation?: EntityInstance, geometryLibrary?: string): import("ifcopenshell-api").IfcOpenshellGeomElement | null;
|
|
5
|
+
//# sourceMappingURL=shape.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.d.ts","sourceRoot":"","sources":["../../src/geom/shape.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,CAAC,EAAE,cAAc,EAAE,eAAe,SAAgB,6DAEzI"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// This file was generated with the assistance of an AI coding tool.
|
|
2
|
+
import { ifcopenshell } from '../init.js';
|
|
3
|
+
/** Create one shape. Load the schema mapping and geometry kernel beforehand. */
|
|
4
|
+
export function createShape(settings, instance, representation, geometryLibrary = 'opencascade') {
|
|
5
|
+
return ifcopenshell.geom.createShape(settings, instance, representation ?? null, geometryLibrary);
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=shape.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shape.js","sourceRoot":"","sources":["../../src/geom/shape.ts"],"names":[],"mappings":"AAAA,oEAAoE;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI1C,gFAAgF;AAChF,MAAM,UAAU,WAAW,CAAC,QAAkB,EAAE,QAAwB,EAAE,cAA+B,EAAE,eAAe,GAAG,aAAa;IACxI,OAAO,YAAY,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,QAAQ,EAAE,cAAc,IAAI,IAAI,EAAE,eAAe,CAAC,CAAC;AACpG,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core `ifcopenshell` API.
|
|
3
|
+
*
|
|
4
|
+
* @module Core
|
|
5
|
+
*/
|
|
6
|
+
export { init, schemaByName, ifcopenshell, IfcOpenShellError, IfcOpenShellErrorCode, IfcOpenShellErrorKind, abortError, isIfcOpenShellAbortError, } from './init.js';
|
|
7
|
+
export type { IfcOpenShell } from './init.js';
|
|
8
|
+
export { File, open } from './file.js';
|
|
9
|
+
export type { GetInverseOptions, OpenOptions } from './file.js';
|
|
10
|
+
export { EntityInstance } from './entity_instance.js';
|
|
11
|
+
export type { AttributeValueType, EntityInfoValue, EntityInstanceInfo, GetInfoOptions } from './entity_instance.js';
|
|
12
|
+
export { exportToBuffer } from './serializers/index.js';
|
|
13
|
+
export type { OperationProgress, ExportOptions, ExportResult, SerializerFormat, } from './serializers/index.js';
|
|
14
|
+
export type { EmscriptenFS, EmscriptenOption, EmscriptenOptions, EmscriptenModuleFactory, IfcOpenshellApiFactory, IfcOpenshellModule, InitOptions, PluginEntry, PluginKind, PluginLoader, PluginManifest, Ptr, WasmAssets, } from './types.js';
|
|
15
|
+
export * as util from './util/index.js';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAGH,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,GACzB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACvC,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,eAAe,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EACV,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EACV,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,kBAAkB,EAClB,WAAW,EACX,WAAW,EACX,UAAU,EACV,YAAY,EACZ,cAAc,EACd,GAAG,EACH,UAAU,GACX,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core `ifcopenshell` API.
|
|
3
|
+
*
|
|
4
|
+
* @module Core
|
|
5
|
+
*/
|
|
6
|
+
export { init, schemaByName, ifcopenshell, IfcOpenShellError, IfcOpenShellErrorCode, IfcOpenShellErrorKind, abortError, isIfcOpenShellAbortError, } from './init.js';
|
|
7
|
+
export { File, open } from './file.js';
|
|
8
|
+
export { EntityInstance } from './entity_instance.js';
|
|
9
|
+
export { exportToBuffer } from './serializers/index.js';
|
|
10
|
+
export * as util from './util/index.js';
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAGH,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,YAAY,EACZ,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAsBxD,OAAO,KAAK,IAAI,MAAM,iBAAiB,CAAC"}
|
package/dist/init.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { IfcOpenShellError, IfcOpenShellErrorCode, IfcOpenShellErrorKind, abortError, isIfcOpenShellAbortError } from '@ifcopenshell/wasm/api';
|
|
2
|
+
import type { EmscriptenFS, IfcOpenshellModule, InitOptions, PluginKind } from './types.js';
|
|
3
|
+
/** Initialized IfcOpenShell runtime and its ergonomic low-level API. */
|
|
4
|
+
export interface IfcOpenShell {
|
|
5
|
+
readonly raw: IfcOpenshellModule;
|
|
6
|
+
readonly fs: EmscriptenFS | null;
|
|
7
|
+
loadPlugin(kind: PluginKind, id: string): Promise<void>;
|
|
8
|
+
loadedPlugins(): string[];
|
|
9
|
+
}
|
|
10
|
+
export { IfcOpenShellError, IfcOpenShellErrorCode, IfcOpenShellErrorKind, abortError, isIfcOpenShellAbortError, };
|
|
11
|
+
/**
|
|
12
|
+
* Initialize the packaged or explicitly configured WASM runtime.
|
|
13
|
+
*
|
|
14
|
+
* Plugins are loaded lazily through {@link IfcOpenShell.loadPlugin}.
|
|
15
|
+
* File and Iterator support explicit disposal; other handles use GC cleanup.
|
|
16
|
+
*
|
|
17
|
+
* @param options Asset locations and optional plugin-loader overrides.
|
|
18
|
+
* @returns An initialized, frozen runtime facade.
|
|
19
|
+
*/
|
|
20
|
+
export declare function init(options?: InitOptions): Promise<IfcOpenShell>;
|
|
21
|
+
/** Native module, available after awaiting init(). */
|
|
22
|
+
export declare let ifcopenshell: IfcOpenshellModule;
|
|
23
|
+
/** Retrieve the loaded schema declaration by its full identifier. */
|
|
24
|
+
export declare function schemaByName(name: string): import("ifcopenshell-api").IfcOpenshellSchema | null;
|
|
25
|
+
/** Emscripten filesystem, available after awaiting init(). */
|
|
26
|
+
export declare let fs: EmscriptenFS | null;
|
|
27
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,EACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,YAAY,EAGZ,kBAAkB,EAClB,WAAW,EACX,UAAU,EAEX,MAAM,YAAY,CAAC;AAEpB,wEAAwE;AACxE,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACjC,QAAQ,CAAC,EAAE,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,UAAU,CAAC,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,aAAa,IAAI,MAAM,EAAE,CAAC;CAC3B;AAED,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACrB,UAAU,EACV,wBAAwB,GACzB,CAAC;AAEF;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,YAAY,CAAC,CAgBrE;AAED,sDAAsD;AACtD,eAAO,IAAI,YAAY,EAAE,kBAAkB,CAAC;AAC5C,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,wDAExC;AAED,8DAA8D;AAC9D,eAAO,IAAI,EAAE,EAAE,YAAY,GAAG,IAAI,CAAC"}
|