omarkawach / COVID-BIM

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

COVID-BIM-V2

The CSV files are too large to upload on github, if you need to run this project please email Dr. Vinu Subashini Rajus at vinu.rajus@carleton.ca

Getting Started

Clone the repository
Get dependencies

npm install

npm i -S fast-csv

npm install csv-split-stream

Make a Forge Account

Autodesk Forge

Use Forge Credentials to Run the Application

See launch.json in the .vscode folder. Enter your client ID and secret there.

Convert Simulation Results to CSV

Place your state.txt file into the scripts folder, then cd into the scripts folder and run the following command in terminal:

cat state.txt | python state_txt_to_csv-VCP.py

This will output state_change.csv

Create Folder(s) for Simulation Data

In the public folder, unzip the data.zip file. This is what will create our data folder along with some sample CSV files to try. Next, create a folder in the data folder called output. This is where the split CSVs will be stored.

Things to Watch out for

  • The filepath of the CSV being read (see extraExtension.js)

  • Solving the number of cells in a time step depends on the time steps in the data

  • Visualization playback

    • The time variable: How often to read a new CSV file
    • The speed variable: Reduces the number of files to read
      • Ex. If the speed is 10 then only every 10th CSV file will be read
  • Find the max state in a cell through csvStreamer.js and update this.maxState in extraExtension.js

  • csvStreamer.js has req.setTimeout(0) for users with slow computers. Remove the timeout callback when running the application outside of localhost.

Plans for the Future

  • Look into flags for WebGL errors
  • Add a pause button
  • Solve how to find max number of viral particles without slowing things down
  • Save state_change.csv to public/data automatically after running Python script?
  • Stop sprites / icons from changing size when zooming in or out
    • Could potentially be done through the size parameter in the shader

Important Links

Cadmium simulator

CO2 model

Indoor Virus Spread model

BIM-to-DEVS

Resources

Graphics reference for shaders - Explains types of qualifiers (uniform, varying, etc.)

gl_FragCoord - Might help with camera view of sprites / icons

Data Types (OpenGL) - Scalars and vectors

3D Markup with icons and info-Card - Discusses spritesheets and clickable geometries

Using PointCloud in Forge Viewer - Uses three.js (r71)

Fast-CSV - CSV Parser and Formatter

csv-split-stream - Split a CSV read stream into multiple write streams

File stream - Node.js stream readable

Other Resources

Michael Beale

Basic Skeleton Extension

Handle Selection Extension

Basic PointClouds in Forge Viewer

Consume AEC Data

2D Minimap

Set Theming Color

Forge Fader

Forge Heat Map Extension

Custom Shader Materials in Forge Viewer

Forge PointCloud Animation

Custom Model Browser

Dynamic Textures on Flat Surface

SVF2 Public Beta

SFV Extractor

Forge Fader

HTTP Live Streaming

M3U8 File for HTTP Live Stream

OpenVDB for Particle-based Fluid Simulation

Forge Viewer Extract Spreadsheet

Forge APIs

THREE.js OBJLoader

Free OBJ Models for Viewer

Woman Sitting OBJ

About


Languages

Language:JavaScript 82.6%Language:HTML 8.7%Language:CSS 6.3%Language:Python 2.4%