Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A client-side IFC parser

License

NotificationsYou must be signed in to change notification settings

andrewisen/bim-whale

Repository files navigation


Logo

The BIM Whale Project

BIMWHALE.js | A simple client-side IFC parser
View the demo »

Explore docs ·Access IFC sample files ·Report Bug ·Request Feature

Table of Contents
  1. About
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Extra

About

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.

FAQ

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

Getting Started

  1. A compiledJS bundle file is available here:

https://cdn.jsdelivr.net/gh/andrewisen/bim-whale/dist/BIMWHALE.min.js

  1. Add it to your project
<scriptsrc="https://cdn.jsdelivr.net/gh/andrewisen/bim-whale/dist/BIMWHALE.min.js"></script>
  1. Use the FileReader API and create a newIfcFile 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);
  1. See the docs for more information:docs.bimvalen.se

Local Development

These next steps will guide you to set up your own development platform.

Prerequisites

This repository uses Deno as the runtime for TypeScript.

Installation

  1. Clone the repo

    git clone https://github.com/andrewisen/bim-whale.git
  2. 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.

  1. Make sure you updatesrc/config.ts and provide a correctfilePath.You can download some sample files here:https://github.com/andrewisen/bim-whale-ifc-samples

  2. Check 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.

Usage

  • Run the app with:
   deno run --allow-read index.ts

SimpleWall Sample File

Download theSimpleWall Sample Filehere.The sample consist of:

  • A wall
  • A door

Here's a screenshot:

Screenshot

The IFC file has aProperty Set calledCustom_Pset.Please note that the file only contains dummy data.

Screenshot

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

Roadmap

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).

Contributing

This project is still in it's early development.But, any contributions you make aregreatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

SeeLICENSE for more information.

Contact

Extra

Not what you're looking for?Check out these projects instead!


[8]ページ先頭

©2009-2025 Movatter.jp