WebifyBim is a command line application that convert BIM Files in form of IFC files and converts them to WEXBIM, a format optimized for the web. This also generates database entries for all instances in the models
- Windows, this sadly only runs on Windows. This is caused by the used geometry library that converts the files to WEXBIM. See XbimGeometry#306.
- Postgres Database, all converted data is inserted into a Postgres database. Therefore, a reachable database is necessary.
Download the latest EXE from the releases tab. Then call the EXE from a shell (like cmd or powershell).
# Options are options flags, see below
# Files are paths to IFC files
WebifyBim.exe [Options...] [Files...]Note Models of an entire building may take several minutes up to some hours!
By passing option flags you can specify the behaviour of the application.
-n, --nameset the name of the model-d, --descriptionset the description of the model-f, --forceforce inserting the files even if they already exist in the database-e, --envpass a dotenv file to set environment variables-l, --loglevelset the log level of the application, defaults to$env:LOG_LEVELor"info"-u, --userset the username for the postgres db, defaults to$env:PG_USERor"postgres"-h, --hostset the host name of the postgres db, defaults to$env:PG_HOSTor"localhost"-P, --portset the port of the postgres db, defaults to$env:PG_PORTor5432(the default postgres port)-p, --passwordset the password for the postgres db user, beware of usage in CI, defaults to$env:PG_PASS-D, --databaseset the database name for the data to insert into, defaults to$env:PG_DBor"wisdom"--hash-algoset the hashing algorithm for the source files, defaults to$env:HASH_ALGOor"md5"--hash_lenset the length of hashes generated by the hash algo, defaults to$env:HASH_LENor32
Most of the option flags may be set using environment variables. The order of values used is as follows:
passed flag to command > environment variable > static default
Using the flag --env you can pass a
dotenv
file to set environment variables.
This application can easily be built and bundled on your machine if you have all the necessary SDKs installed.
# clone the repository
git clone https://github.com/wisdom-oss/webify-bim.git
# navigate into cloned repository
cd webify-bim
# let npm install all dependencies
npm install
# run the bundle scripts, this also builds the application
npm run bundleAfter that in the dist directory you find a .exe of the application.
Upon start the application runs the create_schema.sql query to create a new schema for the bim files if not already existent.
The schema also expects the size of the hashes used to check if files are already in the database. Therefore, the hash algorithm and size should always be the same!
The entire insertion is handled within a transaction to keep the database persistent.
This tool uses the XbimEssentials
and the XbimGeometry packages to
convert the given .ifc files to .wexbim and .xml.
Since most of this application is written in
TypeScript the conversion part is just a small
cli written in C# and built as a standalone .exe.
This tool is meant to be used on devices that do not have any SDKs installed, therefore the entire application is bundled using caxa.