Spider IDF Viewer ~ alpha release

Spider IDF Viewer

Spider IDF Viewer

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

  • You may rotate, zoom and pan the model by clicking or touching it
  • Clicking on a surface allow you to display data for the surface
  • Sample files menu allows you to load hundreds of EnergyPlus demo files

Issues

  • May have issues with unzipping non-UTF-8 files
  • Only displays data with X, Y and Z coordinates
7 Likes

Tx @TheoA, this looks great.
I tried to see one of my files but unfortunately the screen shows nothing. It can be caused becouse the geometry is not at the origin point but i can’t tell.
This is the file in case you want to check …
Best,
-A.
in.zip (151.8 KB)

1 Like

This is useful, awesome! :clap:

1 Like

@AbrahamYezioro

1:40pm
Thanks for sending a test case. I will report back on what I find.

1:44pm

Ah, easy!

Looking at you file, starting at line 213.

Shading:Building:Detailed,
  shdSurface_0_0,                         !- Name
  ,                                       !- Transmittance Schedule Name
  ,                                       !- Number of Vertices
  1264.47692871094, -598.30517578125, 18.3299999237061, !- X,Y,Z Vertex 1 {m}
  1264.47692871094, -598.30517578125, 0,  !- X,Y,Z Vertex 2 {m}
  1261.41711425781, -573.459533691406, 0, !- X,Y,Z Vertex 3 {m}
  1261.41711425781, -573.459533691406, 18.3299999237061; !- X,Y,Z Vertex 4 {m}

On the line for number of vertices, no number is provided at the beginning of the line. The same is true for all the subsequent surfaces. @MichalDengusiak also sent me a file with a similar “feature”. This should be a fairly easy issue to overcome. Fingers crossed.

BTW, what program did you use to create this IDF file?

3:42pm

getting there…

Crossing fingers, if it is not yet solved.
The IDF was created in HB. The Shading:Building:Detailed is coming from HB_Context component.
Tx.
-A.

Nice work @TheoA! Number of vertices is optional. You should expect a lot of idf files which are missing this field.

@TheoA, One wish/feature that can be nice is to be able to pick windows. So far it pick the wall behind or the hosting wall.
-A.

@AbrahamYezioro

Updated version: Spider IDF Viewer v-2020-06-13

is up and should fix the lack of “Number of Vertices” issue.

Getting the file that you want to display in an iframe is tricky…

Window display

It all depends.

If you click on the windows in the very nice test case you sent, you will note that the PopUp displays windows data as anticipated. On other files - as you point out - the window data does not behave nicely. I believe, this is because the window data appears either after or before the surface data in the file.

Now, just having had this clever insight, it would seem to me that the clever action to take would be to draw all the surfaces and then draw all the windows.

Another clever thing would be to stop the windows and walls “jiggering”. We will get there one day

This is great @TheoA!!
Tx,
-A.

1 Like

Hi @TheoA,
I think i’ve found kind of a bug. See this image:


I uploaded a new model, which is the one you see in the front. But as you can see in the back, there is the first model (the one i sent yesterday).
I’m not sure both need to be there or just the last uploaded. Not sure also about the memory showing more than the last uploaded can have.
This is the second model if you want something “heavy and complicated”.
in_02.zip (125.8 KB)

Powerful it is!!
Tx,
-A.

1 Like

@AbrahamYezioro

this is the exact issue I’m working on right now as we speak. :wink:

btw, if you look in the data menu you will begin to see the start of a JSON tree view for the file

And thank you for the new test file. I very much appreciate it. because so many people work in private organizations, it’s can be hard to get test files

@AbrahamYezioro

If you look at the original post, fingers crossed, the viewer is now mostly working as expected.

You will note that your lates test case is the default model.

Please provide copyright and license details, so I can add these to the project.

This is great!!

Yes. Nice and thanks.

Well. The files are not real projects, but rather part of a research i’m doing.
You can quote the first one as:
Theoretical Residential Building - Center of Tel Aviv. By Abraham Yezioro and Elie Medioni
The second one as:
Theoretical Office building - Center of Tel Aviv. By Abraham Yezioro and Elie Medioni.

Best,
-A.

1 Like

@AbrahamYezioro

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

v-2020-06-15 is up

Adds quite a few new features.

Open the view menu to access a number of choices as to what to view.

Also - it takes a while to load and you need to zoom out - the credits are visible in the distance.

Getting a monospace font to work is an open issue

But what I need is the licence for your test cases

how about: https://creativecommons.org/licenses/by-nc/4.0/legalcode ??

@TheoA, You kill me with that … :smile:
Can you help me with this? I’m not used to those things …

Those are great and useful. Though i found something “interesting” that i hope is a mistake on your side and not on mine. When checking accordint to Zone Name tere are some that take various of them at the same time (for instance, Apafrtment_1_Floor_1 or Apartment_1_Floor_2 (in the default file).

i succeeded to see that for a while, but not anymore. It rotates with the model. I thing it better be part of the window settings as info and not as it is now.

Looking good!!
-A.

1 Like

I cant open idf files exported from DesignBuilder nor created in EP-launch.
The only idf I can open is the one created by Honeybee.
Why is that the case?

Ladybug.idf (196.0 KB) DB_export.idf (59.2 KB) EP.idf (105.9 KB)

1 Like

@Tokarzewski

Good question! I have not the faintest idea.

but with your test cases I can find an answer - and reply when I do. Thank you!

14:07:

Interesting stuff. The files you provided have a very different method to identify vertices

BuildingSurface:Detailed,
    Block2:Zone1_GroundFloor_0_0_0,  !- Name
    Floor,                   !- Surface Type
    BESTEST Floor,           !- Construction Name
    Block2:Zone1,            !- Zone Name
    Ground,                  !- Outside Boundary Condition
    ,                        !- Outside Boundary Condition Object
    NoSun,                   !- Sun Exposure
    NoWind,                  !- Wind Exposure
    AutoCalculate,           !- View Factor to Ground
    4,                       !- Number of Vertices
    8,                       !- Vertex 1 X-coordinate {m}
    0,                       !- Vertex 1 Y-coordinate {m}
    0,                       !- Vertex 1 Z-coordinate {m}
    0,                       !- Vertex 2 X-coordinate {m}
    0,                       !- Vertex 2 Y-coordinate {m}
    0,                       !- Vertex 2 Z-coordinate {m}
    0,                       !- Vertex 3 X-coordinate {m}
    6,                       !- Vertex 3 Y-coordinate {m}
    0,                       !- Vertex 3 Z-coordinate {m}
    8,                       !- Vertex 4 X-coordinate {m}
    6,                       !- Vertex 4 Y-coordinate {m}
    0;                       !- Vertex 4 Z-coordinate {m}

The files I have currently use

1200.50939941406, -578.038513183594, 0, !- X,Y,Z Vertex 2 {m}

or

1200.50939941406, -578.038513183594, 0, !- X,Y,Z Vertex ==> 2 {m}

I should be able to fix this reasonably easily. The interesting thing will be trying to identify easily which files uses which format.

@TheoA

I am not an expert but I can share what I know :slight_smile:

Geometry in all models was created using the same BuildingSurface:Detailed class.
However, Honeybee structures data a bit differently.
For the EP engine, it is exactly the same input, the method to identify vertices is exactly the same.
It is just a different method of structuring the text inside the IDF file.
Commas and semicolons are important and everything after exclamation marks is a comment and is not important. (at least for the EP)

Default structure from EnergyPlus:
image
that follows EP-launch structure

image
For EnergyPlus it is equal to this

image

idf structure goes like this
Class:input1,input2…inputn;

2 Likes

@Tokarzewski

Thank you for the insights. They help

I should be able to get onto this in a few hours.

1 Like

@Tokarzewski

here is the regex I’m using

`    IDF.itemsSurfaces = IDF.items.filter( item => item.includes( "Number of Vertices" ) );

    const coordinates = IDF.itemsSurfaces.map( item => item
        .slice( item.indexOf( "Number of Vertices" ) + 18 ) )
        .map( item => item.replace( /!-(.*?)m}|;/gi, "") )
        .map( item => item.split( "," )
        .map( item => + item.trim() )
    );`

Seems to be working. In any case it’s shorter and simpler to what was there before. Having more test cases really helps.

Also there are a bunch of other small fixes.

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

1 Like