Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IFCManager

Ifcmanager

Hierarchy

  • IFCManager

Index

Methods

addModelJSONData

  • addModelJSONData(modelID: number, data: {}): void

applyWebIfcConfig

close

  • close(modelID: number, scene?: I3JS.Scene): void

createSubset

disposeMemory

  • disposeMemory(): void
  • Completely releases the WASM memory, thus drastically decreasing the memory use of the app. Only use this in the following scenarios:

    • If you don't need to access the properties of the IFC
    • If you will provide the properties as JSON.

    Returns void

getAllItemsOfType

  • getAllItemsOfType(modelID: number, type: number, verbose: boolean): any[]
  • Returns all items of the specified type. You can import the types from web-ifc.

    Example to get all the standard walls of a project:

    import { IFCWALLSTANDARDCASE } from 'web-ifc';
    const walls = ifcLoader.getAllItemsOfType(IFCWALLSTANDARDCASE) : this;
    modelid

    ID of the IFC model.

    ifctype

    type of IFC items to get.

    verbose

    If false (default), this only gets IDs. If true, this also gets the native properties of all the fetched items.

    Parameters

    • modelID: number
    • type: number
    • verbose: boolean

    Returns any[]

getExpressId

getIfcType

  • getIfcType(modelID: number, id: number): string

getItemProperties

  • getItemProperties(modelID: number, id: number, recursive?: boolean): any
  • Gets the native properties of the given element.

    modelid

    ID of the IFC model.

    id

    Express ID of the element.

    recursive

    Wether you want to get the information of the referenced elements recursively.

    Parameters

    • modelID: number
    • id: number
    • Optional recursive: boolean

    Returns any

getMaterialsProperties

  • getMaterialsProperties(modelID: number, id: number, recursive?: boolean): any[]
  • Gets the materials assigned to the given element.

    modelid

    ID of the IFC model.

    id

    Express ID of the element.

    recursive

    If true, this gets the native properties of the referenced elements recursively.

    Parameters

    • modelID: number
    • id: number
    • Optional recursive: boolean

    Returns any[]

getPropertySets

  • getPropertySets(modelID: number, id: number, recursive?: boolean): any[]
  • Gets the property sets assigned to the given element.

    modelid

    ID of the IFC model.

    id

    Express ID of the element.

    recursive

    If true, this gets the native properties of the referenced elements recursively.

    Parameters

    • modelID: number
    • id: number
    • Optional recursive: boolean

    Returns any[]

getSpatialStructure

  • getSpatialStructure(modelID: number): { children: never[]; expressID: number; type: string }
  • Gets the spatial structure of the project. The spatial structure is the hierarchical structure that organizes every IFC project (all physical items are referenced to an element of the spatial structure). It is formed by one IfcProject that contains one or more IfcSites, that contain one or more IfcBuildings, that contain one or more IfcBuildingStoreys, that contain one or more IfcSpaces.

    modelid

    ID of the IFC model.

    Parameters

    • modelID: number

    Returns { children: never[]; expressID: number; type: string }

    • children: never[]
    • expressID: number
    • type: string

getSubset

getTypeProperties

  • getTypeProperties(modelID: number, id: number, recursive?: boolean): any[]
  • Gets the properties of the type assigned to the element. For example, if applied to a wall (IfcWall), this would get back the information contained in the IfcWallType assigned to it, if any.

    modelid

    ID of the IFC model.

    id

    Express ID of the element.

    recursive

    If true, this gets the native properties of the referenced elements recursively.

    Parameters

    • modelID: number
    • id: number
    • Optional recursive: boolean

    Returns any[]

hideAllItems

  • hideAllItems(modelID: number): void

hideItems

  • hideItems(modelID: number, ids: number[]): void

parse

  • parse(buffer: ArrayBuffer): Promise<IFCModel>

removeSubset

setWasmPath

  • setWasmPath(path: string): void
  • Sets the relative path of web-ifc.wasm file in the project. Beware: you must serve this file in your page; this means that you have to copy this files from node_modules/web-ifc to your deployment directory.

    If you don't use this methods, IFC.js assumes that you are serving it in the root directory.

    Example if web-ifc.wasm is in dist/wasmDir: ifcLoader.setWasmPath("dist/wasmDir/") : this;

    path

    Relative path to web-ifc.wasm.

    Parameters

    • path: string

    Returns void

setupThreeMeshBVH

  • setupThreeMeshBVH(computeBoundsTree: any, disposeBoundsTree: any, acceleratedRaycast: any): void
  • Makes object picking a lot faster Courtesy of gkjohnson's work. Import these objects from his library and pass them as arguments. IFC.js takes care of the rest!

    Parameters

    • computeBoundsTree: any
    • disposeBoundsTree: any
    • acceleratedRaycast: any

    Returns void

showAllItems

  • showAllItems(modelID: number): void

showItems

  • showItems(modelID: number, ids: number[]): void

useJSONData

  • useJSONData(useJSON?: boolean): void
  • Enables the JSON mode (which consumes way less memory) and eliminates the WASM data. Only use this in the following scenarios:

    • If you don't need to access the properties of the IFC
    • If you will provide the properties as JSON.

    Parameters

    • Optional useJSON: boolean

    Returns void

Generated using TypeDoc