GithubHelp home page GithubHelp logo

ladybug-tools / spider-2020 Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 1.0 22.38 MB

Your 2020 3D happy place for online browsing of building data files

Home Page: http://ladybug.tools/spider-2020/

License: MIT License

HTML 34.08% JavaScript 61.17% CSS 4.75%
gbxml threejs ladybug-tools openstudio radiance aec webgl

spider-2020's Introduction

You are now in a GitHub source code view - click this link to view Read Me file as a web page

Your 2020 3D happy place for online browsing of many of the standard architecture, engineering and construction (AEC) open data file types.

Full screen: Spider gbXML Viewer

  • A template for building your own 3D viewers
  • Read Me
  • Work-in-progress
  • Many broken things; lousy user experience; no need to comment: And it just works

Where new Spider projects start

  • A major Spider project for this year
  • A single unified set of files for developing and testing the interaction between dozens of modules
  • Gather all the Spider 3D file viewers into a single cooperative framework
  • Enable new types of reports and presentations
  • Simplify testing and adding features across the range of viewers
  • Create a standard user experience across the range of Spider apps

Industry Foundation Classes (IFC)

  • Your 3D happy place for IFC files is over at xeoLabs. Tell Lindsay that Theo sent you.

spider-2020's People

Contributors

theo-armour avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

farzan505

spider-2020's Issues

COVID-19 Statistics: Scaling of data

@theo-armour the current log scaling doesn't distinguish enough between China and Europe, since the latter looks far worse and that's not the reality. How about a square root or some other power? Also, Iran doesn't appear to show up at all in the current iteration.

Update 2020-06-05: Having fun with numbers

@mostaphaRoudsari @chriswmackey @AntoineDao

Two toys to play with

Spider SQL Viewer

Last night I got all excited. I saw that the "Surfaces" table in several of the SPL files included azimuth, tilt, width and height. And I thought to myself: "Yay, something to draw!"

But today, I see that there is no origin for the surfaces that I can find. So here is an image of all the surfaces - with each surface placed one unit above the other. ;-(

The example files gallery allow you to open any of the SQL files.

I will be looking into Chris suggestions tomorrow.

image

Spider CSV Viewer

There is one CSV file in the tests/result folder. So I got at least one thing to chart today. And, of course, it's much more fun to play with the data so it doesn't look like printed on paper data. . The data seems to be abstract things like temperature, so let's make it look like cartoon mountains. And the text is long and boring, it would be nice if it just disappears into the fog.

image


I will be looking into generating some new building models. Question: What time of buildings would be helpfule] for me to start with.

Update ~ 2020-06-03 ~ Spider sqlLite Viewer

@mostaphaRoudsari @chriswmackey @AntoineDao @

Spider sqlLite Viewer

2020-06-03_sqllite

  • Ajax requests to Honeybee Energy repo on GitHub
  • Use sql.js to access data
  • Select and display data from sql files
    • Create menu with option list of tables
    • Display contents of table as list
  • Button to display number of items in table

After over thirty years of doing whatever it takes to avoid databases, here I am being dragged kicking and screaming into the tables. Thank goodness I waited. The required skill level has now dropped down to my designer-who-uses-code-but-is-not-a-programmer level of abilities.

I seem to have some basic thing that seems to be running. There are lots of tables and I have few clues as to what they for. I do see the occasional table with possibly interesting things - "Surfaces" see to be one. Also there is a ,CSV file with lots of numbers.

I will be playing with reading and visualizing these numbers in 3D the next few updates


Separately there were a lot of updates to the several viewers today. More about these effoets another day.

HBJSON loaded but not visible

Hi @theo-armour,

I wish to use the viewer to visualize HBJSON files. I observed that when an HBJSON is created from Honeybee Rooms (i.e. Solids), the HBJSON loads well into the viewer and I can see it. However, when an HBJSON is created from Honeybee Faces, the HBJSON loads but nothing is visible on the Canvas. You can use this HBJSON that I generated today.

pollination viewer

Thanks,
Devang

Rendering artifact for certain concave surface

I'm using https://www.ladybug.tools/spider-2020/spider-idf-viewer/v-2020-06-20/spider-idf-viewer.html

I have one surface which is rendering with what looks like an artifact included within the area of an external corner:

image

Here it is by itself:
image

BuildingSurface:Detailed,
  _main west_Floor22_{00077},             !- Name
  Floor,                                  !- Surface Type
  BW Std Slab Floor_{00011},              !- Construction Name
  Zone_unnamed space (2)_main west_{00227}, !- Zone Name
  Adiabatic,                              !- Outside Boundary Condition
  ,                                       !- Outside Boundary Condition Object
  NoSun,                                  !- Sun Exposure
  NoWind,                                 !- Wind Exposure
  ,                                       !- View Factor to Ground
  ,                                       !- Number of Vertices
  38.705, -36.617, 0,                     !- X,Y,Z Vertex 1 {m}
  27.735, -16.647, 0,                     !- X,Y,Z Vertex 2 {m}
  24.743, -16.647, 0,                     !- X,Y,Z Vertex 3 {m}
  29.883, -6.137, 0;                      !- X,Y,Z Vertex 4 {m}

Other concave shapes in the same model render OK.

Is this a problem with the input data? An issue in the viewer?

Let me know if I can add any other useful info... thanks

Sanitize point order for all honeybee models

Honeybee models provided with inconsistent (or even out of order) point data do not render correctly with the current three.js geometry creation routine. Concave shapes appear to be especially stubborn, but this might end up being a separate issue.

Per earlier discussion - sounds like the best move is to validate/sanitize point order for incoming honeybee geometry in the viewer itself. (Instead of expecting it to be right.)

@theo-armour pointed out that this should be possible with the ShapeUtils that ship with recent versions of three.js. The .isClockwise method, mixed with a good existing clockwise point ordering algorithm, makes a believable fix for a solution.

I plan to circle back with a solution in a few days. Wanted to open this up to get discussion going on any other strategies.

Update: Spider IDF Viewer v-2020-06-07

@ladybug-tools/spiders

https://www.ladybug.tools/spider-2020/sandbox/spider-idf-viewer/

image

Spider IDF Viewer

The script enables you to open EnergyPlus Input Data Files (IDF) from ypur computer or via a URL. Ths script locates all surfaces and windows data and displays the data in 3D in your browser.

  • You can rotate, zoom and pan the model by clicking or touching
  • Clicking on a surface allow you to display parametric data for the surface
  • Gallery menu allows you to load hundreds of demos

Issues

  • PopUps are broken
  • Not all files have been tested. Some files cause issues

To Do

  • Whatever you want

Backstory

On 2020-06-06 in issue #7 Mostapha said " since you have an importer for idf and OSM all the EnergyPlus users will be able to take advantage of this viewer even if they are not going to use honeybee schema. That is huge!"

This was a wonderful boost. The only problem was that yesterday Spider had an OSM file viewer but no IDF viewer. And we love huge and that was yesterday.

Here is the timeline for 2020-06-07:

  • First commit

12:27 ~
In this GitHub issue, Mostapha mentioned that we could view IDF files. In actual fact, the Spider team has a lot of 3D viewers but not one for IDF. So let's make one.

The core files are prepared. The Read Me is started.

It is worth considering that, as far as I know, I have never "seen" an IDF file. I do not know what IDF stands for. I have no clue as to what one should look like and how it should behave. I know 3D but I an a BEM newb.

15:07

We have Spider IDF Viewer! In two and a half hours. In 2015 it took me weeks to read OSM files and display in 3D. In 2017 it took me days to read gbXML files. Ditto RAD files.

And now it's like "Pff"

As of now it's lines for walls, door and window borders. Let's get some surfaces in here.

16:43 ~

Now we have meshes - but only in beige. Let's see if we can get some color.

19:19 ~

Now we have colors. And an "open all" button that opens and displays all the sample files in 3D.

And we have what are getting to be the usual features:

  • Open files on your computer
  • Open files on the Internet
  • Display surface data parameters when you click on a surface.

2020-06-08

00:10

Just discovered and added link to all 701 EnergyPlus testfiles . Started testing. None worked at first. ;-( Did a bunch of fixes. Now they seem to work mostly

Update: Spider gbXML Viewer v-2020-06-10 ~ now with JSON Tree View

@ladybug-tools/spiders

image

Spider gbXML Viewer v-2020-06-10

Some of the front end updates include:

  • File menu
    • New File Open JavaScript files
    • Open files using RESTful API
    • Open files using operating system dialog box
    • Open .XML and .GBXML files ( as required by the Autodesk Viewer)
    • Open gbXML files inside compressed .ZIP files (first file only)
  • Sample files gallery
    • Fixes to extensive library with dozens of samples files
  • View menu
    • Follows standard Spider viewer menu protocols
  • Data menu
    • New: Spider JSON Tree View
    • Converts XML data to JSON
    • Reasonably fast and produces nice-looking output
    • Complete JSON data for entire for every item in the gbXML file
    • All data accessible with just a few clicks

Details on back end updates in future posts.

Backstory

On Wednesdays I often have an online meetup with Stephen Roth of gbXML.org. It's nice to have shiny new things to show Stephen. Today was no exception but the new new thing took a bit longer to make so we postponed the meeting until Friday. So what's new?

A long standing vision for this project is great interchangeability between the XML and JSON. gbXML has the standing of twenty years of existence and millions (probably) of instances. JSON enables fast and easy front-end programming. As of today, the Spider gbXML Viewer now has a reasonably fast gbXML to JSON translator as part of the code base. Fingers crossed this enables things such as.

  • Faster, easier, better communication between you and the gbXML
  • Export gbXML as JSON while adhering to all aspects of the gbXML schema
  • Algorithms that help influence the creation of better buildings

The JSON is now visible in the "Data menu" at the bottom of the menu. In order to keep loading the files fast, the JSON is only created as and when you click on the menu item. It can therefore take a few seconds for the Tree View to be created. Please be patient while the menu is being created. A future version may improve things by calculating the menu quietly in the background after the 3D model has been generated.

There are many tricks to be add. These include clicking on spaces, zones, levels etc and having these be highlighted in the 3D model. Also you should be able to click items in the 3D models and see the associated section highlighted in the JSON Tree View.

In the meantime, here are some things to think about:

Users think "Don't make me think!" and "Don't make me change"

If you are a program user and have a workflow that is currently effective, efficient and providing good benefits, why should the program make you change? If you are a program developer and have a workflow that is effective etc, then you make changes to the program. Who is right?

I know this "stay or move" dilemma from personal experience. When I was designing AutoCAD R14 I made certain that there was a one or two letter shortcut for every command built into the product. Previous releases only provided shortcuts for a dozen or so commands. Users often added shortcuts of their own choosing. The shortcuts I provided disrupted the custom workflows of thousands of users.

But that was back then. There was only one current version available and one version was all your computer could take.

Today is different. You can take your choice. Use one or use them all. Here is a sample of what is available:

Programmers think "release early, release often" and "move fast and break things"

Being mostly a programmer these day, my heart is on this side. But with a huge difference: it's more like "move fast and remix new things from the old things so you don't have to touch the old things".

Times are changing. My dream a few years ago was to be like a person running a hospital: technologies and treatments would come and go, spaces would more into new uses but if you looked from the outside you did not see many changes. My dream today is to be more like a DJ: take all the soundtracks and videos you happen to have and remix them into new performances. It's the same old same old but it looks and feels totally new.


There's more to this new version than meets the eye. More about that in future posts.

COVID-19 Statistics: Add tooltip on hover

@theo-armour how about adding a tooltip displaying underlying data when hovering over a box? That would allow one to distinguish the test box off Africa from the real data.

P.S. never thought of using lookAt to rotate objects. Nifty trick!

Visualizing surface normals?

Is there anyway to turn on visualization of surface normal vectors? (As far as I can tell, there is not...)

Right now when checking data I have been manually looking at the winding order of the vertices for a surface. The viewer is a really good way to do this because it shows the surfaces and axes. But if there were some way of having it display the normal vector itself that would be much quicker and less error prone. (Especially for non-axis aligned surfaces).

I believe you can specify the intended winding order of vertices in an IDF file which would have to be taken into account.

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.