Skip to main content

IfcGeometryTiler

A component that handles the tiling of IFC geometries for efficient streaming. 📕 Tutorial. 📘 API.

Extends

Implements

Properties

enabled

enabled: boolean = true

Component.enabled

Overrides

Component . enabled


onAssetStreamed

readonly onAssetStreamed: AsyncEvent <StreamedAsset[]>

Event triggered when assets are streamed. Contains the streamed assets.


onDisposed

readonly onDisposed: Event<unknown>

Disposable.onDisposed

Implementation of

Disposable . onDisposed


onGeometryStreamed

readonly onGeometryStreamed: AsyncEvent<object>

Event triggered when geometry is streamed. Contains the streamed geometry data and its buffer.

Type declaration

buffer

buffer: Uint8Array

data

data: StreamedGeometries


onIfcLoaded

readonly onIfcLoaded: AsyncEvent<Uint8Array>

Event triggered when the IFC file is loaded. Contains the loaded IFC file data.


onProgress

readonly onProgress: AsyncEvent<number>

Event triggered to indicate the progress of the streaming process. Contains the progress percentage.


settings

settings: IfcStreamingSettings

Settings for the IfcGeometryTiler.


webIfc

webIfc: IfcAPI

The WebIFC API instance used for IFC file processing.


uuid

static readonly uuid: "d9999a00-e1f5-4d3f-8cfe-c56e08609764"

A unique identifier for the component. This UUID is used to register the component within the Components system.

Methods

dispose()

dispose(): void

Disposable.dispose

Returns

void

Implementation of

Disposable . dispose


isConfigurable()

isConfigurable(): this is Configurable<any, any>

Whether is component is Configurable.

Returns

this is Configurable<any, any>

Inherited from

Component . isConfigurable


isDisposeable()

isDisposeable(): this is Disposable

Whether is component is Disposable.

Returns

this is Disposable

Inherited from

Component . isDisposeable


isHideable()

isHideable(): this is Hideable

Whether is component is Hideable.

Returns

this is Hideable

Inherited from

Component . isHideable


isResizeable()

isResizeable(): this is Resizeable

Whether is component is Resizeable.

Returns

this is Resizeable

Inherited from

Component . isResizeable


isUpdateable()

isUpdateable(): this is Updateable

Whether is component is Updateable.

Returns

this is Updateable

Inherited from

Component . isUpdateable


streamFromBuffer()

streamFromBuffer(data): Promise<void>

This method streams the IFC file from a given buffer.

Parameters

ParameterTypeDescription
dataUint8ArrayThe Uint8Array containing the IFC file data.

Returns

Promise<void>

A Promise that resolves when the streaming process is complete.

Remarks

This method cleans up any resources after the streaming process is complete.

Example

const ifcData = await fetch('path/to/ifc/file.ifc');
const rawBuffer = await response.arrayBuffer();
const ifcBuffer = new Uint8Array(rawBuffer);
await ifcGeometryTiler.streamFromBuffer(ifcBuffer);

streamFromCallBack()

streamFromCallBack(loadCallback): Promise<void>

This method streams the IFC file from a given callback.

Parameters

ParameterTypeDescription
loadCallbackModelLoadCallbackThe callback function that will be used to load the IFC file.

Returns

Promise<void>

A Promise that resolves when the streaming process is complete.

Remarks

This method cleans up any resources after the streaming process is complete.