Web Worker for extracting properties from IFC Model.
- 🌐 Written in vanilla Javascript
- 🛒 Zero Dependencies
- 💻 Run Locally in the browser
- 🐋 Capable of handling large file
The typical format for an IFC file is STEP, where each line contains a single source of information.
The IFC Extractor extracts data from an IFC file and outputs the results in JSON format, containing every element with its parameters and properties.
The IFC Extractor is used in the IFC-SG Validator to validate an IFC model for IFC-SG compliance.
The IFC Extractor uses a web worker that processes your IFC model. It extracts data from an Industry Foundation Classes (IFC) file. The function takes in two parameters, a file and a mapping.
file
: The IFC file that is to be parsed.mapping
: An object that contains list of IfcEntity.
Data are extracted from the IFC File, specifically from the ENTITY
, PROPERTYSET
, and VALUE
sections of the file. It then stores this data in maps, which are used to organize the extracted data.
It then loops through the entities in the ENTITY map and appends relevant property sets and property values to each entity. The extracted data is then mapped to each entity, and the result is returned as an object.
Promises are used to wait for all results.
IFC Extractor is optimized for efficient processing of IFC models and uses a technique that splits the file into chunks, allowing for processing of very large files without loading the entire file into memory.
The processing time is relatively fast, at near-native performance.
This demo is built with Svelte
and SvelteKit
.
Using npm or pnpm
npm install
pnpm install
npm run dev
pnpm dev