ladybug-tools / spider

:spider_web: 3D interactive analysis in your browser mostly written around the Three.js JavaScript library
http://www.ladybug.tools/spider
44 stars 15 forks source link

gbxml export issue: polyloop coordinate ordering is always wrong for roofs #77

Closed chiensiTB closed 6 years ago

chiensiTB commented 6 years ago

I checked a single story building, and found:

Roof polyloops are in the wrong direction. Using the right hand rule, these polyloops should be oriented away from the volume's interior (outwards).

I find they are always pointing inwards.

theo-armour commented 6 years ago

@chiensiTB

Thank you for having a look.

Can you supply a link to the file in question? I may not have exported all the samples using the latest version of the exporter.

But more important, can you help me establish a test(s) for validating normals. Is there a way of doing something in Open Studio that would help. Currently I just open the file in the Open Studio geometry tab and check the colors.

theo-armour commented 6 years ago

@chiensiTB

I have had a further look. I can reproduce the error:

image

Normals not visible on top of roof


image

Normals visible on underside of roof


I also observe that different footprint types draw the roof normals in different ways. I will try to fix and standardize roof and other slab normals in an upcoming release.

Thanks for the heads-up.

chiensiTB commented 6 years ago

Hi @theo-armour

In my code fork I've fixed this problem. You can choose to merge my cookbook code with yours, or ping me if you want to discuss further. My solution is only very basic.

theo-armour commented 6 years ago

@chiensiTB

Can you supply a link to your code?

mdengusiak commented 6 years ago

I will close this as no action, respond ... we come back to this later