- Notifications
You must be signed in to change notification settings - Fork4
andrewisen/bim-whale
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
BIMWHALE.js | A simple client-side IFC parser
View the demo »
Explore docs ·Access IFC sample files ·Report Bug ·Request Feature
Table of Contents
The BIM Whale (Swedish:BIM-valen) is a project about the Industry Foundation Classes (IFC) format.The aim of this project is to:
I: Introduce and explain the basics of IFC schema
II: Teach people how to parse an IFC file and retrieve basic information
In more specific terms, the goal of this project is to:
A: Provide a simple and fast IFC parser
B: Provide learning resources (documentation, videos, power points) to people within the AEC industry
Goal A has been realized asBIMWHALE.js, i.e. this repo.BIMWHALE.js is a simple client-side IFC parser built using TypeScript.
Please note that the BIMWHALE.js isNOT supposed to be an all singing, all dancing parser.This project is only looking to parse information that we know exists, so-calledUser Defined IFC Property Sets
.
Again, the focus with The BIM Whale Project is to educate people.The code itself and its functionality are secondary.
Explore thedocs for more information.
Question: What doesThe BIM Whale do?
Answer: Parse so-calledUser Defined IFC Property Sets
from an IFC file
Q: What doesThe BIM Whale NOT do?
A: Parse entity attributes, parse geometry, follow the EXPRESS standard, etc. etc.
Q: What is an IFC file?
A: Industry Foundation Classes (IFC) is a standardized, digital description of a BIM model. SeeIFC for more information.
Q: What is a STEP file?
A: A STEP-File is the format IFC uses. SeeISO 10303-21 for more information
Q: Is this code "hand made"?
A: Yes, the code is hand made. The parsing is not derived from an EXPRESS definition.
Q: Is the code ready for production?
A: No, not yet. Seeopen issues for more info
- A compiledJS bundle file is available here:
https://cdn.jsdelivr.net/gh/andrewisen/bim-whale/dist/BIMWHALE.min.js
- Add it to your project
<scriptsrc="https://cdn.jsdelivr.net/gh/andrewisen/bim-whale/dist/BIMWHALE.min.js"></script>
- Use the FileReader API and create a new
IfcFile
object
// The libary is called: BIMWHALEvarfileReader=newFileReader();fileReader.onload=function(e){constlines=e.target.result.split(/\r\n|\n/);letifcFile=newBIMWHALE.IfcFile(lines,config);ifcFile.parseIfcFile();};fileReader.readAsText(file);
- See the docs for more information:docs.bimvalen.se
These next steps will guide you to set up your own development platform.
This repository uses Deno as the runtime for TypeScript.
- Install Deno.See instruction athttps://deno.land
Clone the repo
git clone https://github.com/andrewisen/bim-whale.git
Replace the following files with your own content.
index.ts
src/config.ts
The easiest approach is to copy content of theexample.NAME.ts
file.
In other words:Replaceindex.ts
with the content insideexample.index.ts
.
Make sure you update
src/config.ts
and provide a correctfilePath.You can download some sample files here:https://github.com/andrewisen/bim-whale-ifc-samplesCheck if Deno is working
deno run --allow-read checkDeno.ts
Any errors until this point are likely due to Deno.Submit an issue if have any problems.
- Run the app with:
deno run --allow-read index.ts
Download theSimpleWall Sample File
here.The sample consist of:
- A wall
- A door
Here's a screenshot:
The IFC file has aProperty Set calledCustom_Pset
.Please note that the file only contains dummy data.
Make sure to updatesrc/config.ts
and provide a correctfilePath.You should get the following result:
{TypeMark:"_TYPE-MARK_",Keynote:"_KEYNOTE_",StoreyName:"Level: Level 1",TypeDescription:"_DESCRIPTION_",StatusConstruction:"New Construction",NetArea:"14.04739",Height:"4000.",Width:"200.",Length:"4000.",Hyperlink:"_URL_"}{TypeMark:"20",Keynote:"--KEYNOTE--",StoreyName:"Level: Level 1",TypeDescription:"--DESCRIPTION--",StatusConstruction:"New Construction",NetArea:"3.18957899999998",Height:"2134.",Width:"915.",SillHeight:"0.",Hyperlink:"--URL--"}
In summary:We have performed a simple parsing.
We have only includedwalls
anddoors
in our config file. See:const selectedEntities: string[] = ["IFCDOOR", "IFCWALLSTANDARDCASE"];
TODO
This project is still in it's early development. And yes, it still has some bugs.Please be patience!
See theopen issues for a list of proposed features (and known issues).
This project is still in it's early development.But, any contributions you make aregreatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
SeeLICENSE
for more information.
- Email:andre.wisen@gmail.com
- LinkedIn:https://linkedin.com/in/andrewisen/
Not what you're looking for?Check out these projects instead!
About
A client-side IFC parser