Closes a model and frees all related memory
Model handle retrieved by OpenModel, model must be closed after use
Creates a new ifc entity
Model handle retrieved by OpenModel
Type code
Arguments required by the entity
An object contining the parameters of the new entity
Creates a new ifc globally unqiue ID
Model handle retrieved by OpenModel
An randomly generated globally unique ID
Creates a new ifc type i.e. IfcLabel, IfcReal, ...
Model handle retrieved by OpenModel
Type code
Type value
An object with the parameters of the type
Creates a new model and returns a modelID number
Optionalsettings: LoaderSettingsModelID
Deletes an IFC line from the model
Model handle retrieved by OpenModel
express ID of the line to remove
Closes all models and frees all related memory. Please note that after calling this you must call Init() again to ensure web-ifc is in a working state.
Returns all alignments contained in the IFC model (IFC4x3 or superior)
model ID
Lists with horizontal and vertical curves as sets of points
Returns all crossSections in 2D contained in IFCSECTIONEDSOLID, IFCSECTIONEDSURFACE, IFCSECTIONEDSOLIDHORIZONTAL (IFC4x3 or superior)
model ID
Lists with the cross sections curves as sets of points
Returns all crossSections in 3D contained in IFCSECTIONEDSOLID, IFCSECTIONEDSURFACE, IFCSECTIONEDSOLIDHORIZONTAL (IFC4x3 or superior)
model ID
Lists with the cross sections curves as sets of points
Get all line IDs of a model
model ID
vector of all line IDs
Gets the list of all ifcTypes contained in the model
Model handle retrieved by OpenModel
Array of objects containing typeID and typeName
Get the coordination matrix
model ID
flat 4x4 matrix as array[16]
Looks up an entities express ID from its GlobalID.
Model handle retrieved by OpenModel
GobalID to be looked up
expressID numerical value
Load geometry for a single element
Model handle retrieved by OpenModel
ExpressID of the element
Whether to apply the model's linear scaling factor to the geometry (default: true)
FlatMesh object
Retrieves the geometry of an element
Model handle retrieved by OpenModel
express ID of the element
Geometry of the element as a list of vertices and indices
Looks up an entities GlobalID from its ExpressID.
Model handle retrieved by OpenModel
express ID to be looked up
globalID string value
Gets the header information required by the user
Model handle retrieved by OpenModel
Type of header data you want to retrieve ifc.FILE_NAME, ifc.FILE_DESCRIPTION or ifc.FILE_SCHEMA
An object with parameters ID, type and arguments
Returns a list with all entity types that are present in the current schema
Model handle retrieved by OpenModel
Array of type codes
Gets the ifc line data for a given express ID
Model handle retrieved by OpenModel
express ID of the line
recursively flatten the line, default false
get the inverse properties of the line, default false
filters out all other properties from a inverse search, for a increase in performance. Default null
lineObject
Get all line IDs of a specific ifc type
model ID
ifc type,
if true, also returns all inherited types
vector of line IDs
Gets the ifc line data for a given express ID
Model handle retrieved by OpenModel
recursively flatten the line, default false
get the inverse properties of the line, default false
filters out all other properties from a inverse search, for a increase in performance. Default null
lineObject
Returns the type of a given ifc entity in the fiule.
Model handle retrieved by OpenModel
Line Number
IFC Type Code
Returns the maximum ExpressID value in the IFC file, ex.- #9999999
Model handle retrieved by OpenModel
Express numerical value
Fetches the ifc schema version of a given model
Model ID
IFC Schema version
Gets the name from a type code
Code
Name
Gets the next unused expressID
Model handle retrieved by OpenModel
Starting expressID value
The next unused expressID starting from the value provided
Section (or floor plan, with a horizontal plane) of a whole model: every element whose geometry the plane crosses, cut as one mesh (all its pieces, placed). Coordinates are web-ifc's model frame (Y up, metres when applyLinearScalingFactor is true, the same frame as StreamAllMeshes + flatTransformation).
Model handle retrieved by OpenModel
the plane, in the model frame
see SectionMesh (default weld 1e-5, closeGap 1e-3 here: model units after scaling)
one entry per element crossed, with its expressID and the colour of its first piece
The swept disks of a product (e.g. reinforcing bars) without meshing them: per IfcSweptDiskSolid item, its placement and colour as StreamMeshes would give them, the directrix it is swept along (any curve: arcs and trims evaluated as for the mesh) and its radius. No tube is built and nothing stays cached. Other items of the product are not returned.
Gets the type code from a name code
type code
Returns the version number of web-ifc
The current version number as a string
Whether this build carries the brep geometry engine.
Initializes the WASM module (WebIFCWasm), required before using any other functionality.
OptionalcustomLocateFileHandler: LocateFileHandlerFn
An optional locateFile function that let's you override the path from which the wasm module is loaded.
Evaluates if a type is subtype of IfcElement
Type code
True if subtype of Ifcelement, False if it is not subtype
Checks if a specific model ID is open or closed
Model handle retrieved by OpenModel
true if model is open, false if model is closed
Opens a model and returns a modelID number
Buffer containing IFC data (bytes)
Optionalsettings: LoaderSettings
Settings for loading the model
ModelID or -1 if model fails to open
Opens a model and returns a modelID number
a function of signature (offset:number, size: number) => Uint8Array that will retrieve the IFC data
Optionalsettings: LoaderSettings
Settings for loading the model
ModelID or -1 if model fails to open
Opens a set of models and returns model IDs
Array of Buffers containing IFC data (bytes)
Optionalsettings: LoaderSettings
Settings for loading the model
Array of model IDs
Resets the Cached IFC Data - useful when changing the geometry of a model
Model handle retrieved by OpenModel
Saves a model to a Buffer
Model ID
Buffer containing the model data
Saves a model to a Buffer
Model ID
Buffer containing the model data
Section of one triangle mesh by a plane: the cut lines and the cut area (cap), triangulated. The mesh is not
modified (hiding the part in front of the plane is up to the viewer, e.g. a clipping plane).
Tolerant of real-world meshes: flipped triangles do not matter, loops are nested by containment (holes are
kept), chains that do not close are closed when their ends are nearer than closeGap, and whatever stays
open is returned as lines only (counted in openChains).
x, y, z per vertex (any frame, any units)
3 per triangle
the plane, through point with normal normal, in the same frame as the positions
weld: distance under which two cut points are the same (default 1e-6); closeGap: largest gap closed between the ends of open chains (default 0 = never)
capPositions (x, y, z) + capIndices, lines (x1, y1, z1, x2, y2, z2 per segment) and counters
Registers an external boolean engine used as a RESERVE: web-ifc always runs its own boolean chain first; only when the result of a chain has open (naked) edges is the whole chain redone with this function, and the result with fewer naked edges is kept (tie → web-ifc). If the function throws or returns an invalid mesh, web-ifc's result is kept. Pass null to unregister. The function is called synchronously as fn(op, A, B, { unitToMetre }) with op 'DIFFERENCE' | 'UNION' and A/B = { positions: Float64Array (x,y,z in model units), indices: Uint32Array }; it must return { positions, indices }. Counters: globalThis.__morphBoolStats (chainsChecked, chainsOpen, chainsRedone, chainsKeptGeokernel, chainsKeptWebifc, geokernelFails, calls, ok, fallback, ms). BY DEFAULT the bundled geokernel is registered by Init(); call SetBooleanFallback(null) to disable it (pure web-ifc), or pass another function to replace it.
the external boolean function, or null
The brep engine on booleans only: Body items that are IfcBooleanResult / IfcBooleanClippingResult (or belong to a product with openings) go to the brep kernel, everything else is meshed by web-ifc as with StreamMeshes, keeping its shared geometries.
Set the transformation matrix
model ID
transformation matrix, flat 4x4 matrix as array[16]
Sets the path to the wasm file
path to the wasm file
if true, path is absolute, otherwise it is relative to executing script
As StreamAllMeshes, with the brep kernel as the geometry engine (builds with BREP_ENGINE only).
Each Body item the kernel builds comes as a shell instead of a mesh: its geometry in mesh has no
vertices, and shells holds { id, points, rings } for it -- points in file units, in the frame
the geometry's flatTransformation places; rings per face: ring count, then each ring's length
and point indices, the first ring the outer one. The arrays view wasm memory and are valid
during the callback only. Anything the kernel does not build comes as an ordinary mesh.
Streams all meshes of a model
Model handle retrieved by OpenModel
callback function that is called for each mesh
Whether to apply the model's linear scaling factor to the geometry (default: true)
Streams all meshes of a model with a specific ifc type
Model handle retrieved by OpenModel
types of elements to stream
callback function that is called for each mesh
Whether to apply the model's linear scaling factor to the geometry (default: true)
Streams meshes of a model with specific express id
Model handle retrieved by OpenModel
expressIDs of elements to stream
callback function that is called for each mesh
Whether to apply the model's linear scaling factor to the geometry (default: true)
Writes a set of line to the model, can be used to write new lines or to update existing lines
Model handle retrieved by OpenModel
line object to write
Writes a line to the model, can be used to write new lines or to update existing lines
Model handle retrieved by OpenModel
Contains all the logic and methods regarding properties, psets, qsets, etc.