Giter VIP home page Giter VIP logo

dotbim's Introduction

2022-05-18_21h42_20

dotbim (Version 1.0.0)

image

Introduction

Introducing an open-source, accessible, simple, minimalistic file format for BIM. Built to be easy to read and write.

Created by BIM developers for BIM developers.

An idiot admires complexity, while a genius appreciates simplicity - Terry Davis

Website: https://www.dotbim.net

Quick introduction video: https://www.youtube.com/watch?v=RSV-0-UrzhQ

BIM vs IFC comparison

.bim .ifc
Is it open? Yes Yes
Is it free? Yes Yes
Type Text file Text file
What it contains Geometry + data attached Geometry + data attached in a standardized way
Types of geometries allowed Triangulated meshes only A lot of different types: meshes, extrusions, b-reps etc.
Pages of documentation 1 100+

To see much more extended comparison check out Dion's comparison here: paireks#8

Guide for developers

If you're a developer, check out this document: https://github.com/paireks/dotbim/blob/master/DeveloperTips.md

Apps

dotbim drawio (7)

If you're building any app that will use .bim - let me know, I'll post it here :)

NuGet package

https://www.nuget.org/packages/dotbim/

It may require importing another nuget for Newtonsoft.Json library: https://www.nuget.org/packages/Newtonsoft.Json/13.0.1

Structure

bimdot_Structure Complete

Documentation

Main information

  • .bim
  • License: MIT
  • JSON structure
  • x, y, z coordinates should be in meters
  • Decimal point should be used
  • JSON objects and properties should start with lowercase and with underscore as a seperator between words, e.g. schema_version

file

File contains 4 properties:

bimdot_Structure GH

schema_version is the version of schema used in this file as string. Current one is "1.0.0".

mesh

bimdot_Mesh GH

mesh_id is integer >= 0 to reference this mesh later in element.

coordinates

It is a big array of all coordinates of a mesh. It is structured in this way:

[X0, Y0, Z0, X1, Y1, Z1, X2, Y2, Z2, X3, Y3, Z3, ..., XN, YN, ZN]

Let's say our mesh is defined by 3 vertices: (0.0, 0.0, 0.0), (10.0, 0.0, 0.0) and (10.0, 5.0, 0.0), then your vertices_coordinates will look like this:

[0.0, 0.0, 0.0, 10.0, 0.0, 0.0, 10.0, 5.0, 0.0]

Later in faces_ids we refer to these vertices by their order.

indices

It is a big array of ids (integers) that define all faces in a mesh. It is structured in this way:

[Face1_Id1, Face1_Id2, Face1_Id3, Face2_Id1, Face2_Id2, Face3_Id3, Face3_Id1, Face3_Id2, Face3_Id3, ..., FaceN_Id1, FaceN_Id2, FaceN_Id3]

If we'd like to create one-face mesh using vertices_coordinates from an example above, then it will look like this:

[0, 1, 2]

Pyramid example:

  "coordinates": [
    0.0,
    0.0,
    0.0,
    10.0,
    0.0,
    0.0,
    10.0,
    10.0,
    0.0,
    0.0,
    10.0,
    0.0,
    5.0,
    5.0,
    4.0
  ],
  "indices": [
    0,
    1,
    2,
    0,
    2,
    3,
    0,
    1,
    4,
    1,
    2,
    4,
    2,
    3,
    4,
    3,
    0,
    4
  ]

element

bimdot_Element GH guid is a string that can be used for comparison of different elements.

"guid": "76e051c1-1bd7-44fc-8e2e-db2b64055068"

vector

Vector places referenced mesh where it should be placed as an element. It should have 3 properties:

  1. x (value)
  2. y (value)
  3. z (value)
  "vector": {
    "x": 9.9266016462536122,
    "y": 3.3910972817343494,
    "z": 52.239445879618685
  }

rotation

Rotation rotates referenced mesh how it should be rotated as element. It is a quaternion. It should have 4 properties:

  1. qx (value) - first imaginary coefficient of the quaternion
  2. qy (value) - second imaginary coefficient of the quaternion
  3. qz (value) - third imaginary coefficient of the quaternion
  4. qw (value) - real part of the quaternion
  "rotation": {
    "qx": 0.63979295771454925,
    "qy": 0.10626982147910254,
    "qz": -0.12472093047736807,
    "qw": -0.7508770776915008
  }

color

color should have 3 properties:

  1. r (integer between 0-255) - red
  2. g (integer between 0-255) - green
  3. b (integer between 0-255) - blue
  4. a (integer between 0-255) - alpha
  "color": {
    "r": 255,
    "g": 255,
    "b": 0,
    "a": 255
  }

type

Element type. It is a string that specifies what mesh represents. E.g. "Beam", "Plate".

"type": "Beam"

info

info is just a dictionary with string as key and value.

  "info": {
    "Name": "Teapot",
    "Price": "2.50$"
  }

.bim file format encourages users to link their data by attaching URLs inside properties of file or specific elements. E.g.:

  "info": {
    "Name": "Metal sheet roofing",
    "Catalogue": "https://pruszynski.com.pl/t-20-roof,prod,99,2294.php"
  }

Such functionality allows also to link one model with another as well. If you're interested in this kind of linking, check this separate document about it: https://github.com/paireks/dotbim/blob/master/LinkingData.md

Tell me more

If you'd like to read more details about this project, a bit background + line-by-line explanation, you might find this article on BIM Corner interesting: https://bimcorner.com/a-new-bim-file-format/

Extensions

Author

  • Wojciech Radaczyński

Advisors

  • Tom Van Diggelen
  • Harry Collin
  • Marios Messios

dotbim's People

Contributors

paireks avatar ricaun avatar messiosmarios avatar harrycollin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.