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

R11.12 fix surface display to correct storey #90

Closed mdengusiak closed 6 years ago

mdengusiak commented 6 years ago

few surface are displayed at ground level rather than level with space

2018-03-13 08_41_41

should be here 2018-03-13 08_42_36

Here is gbXML file CM_6.zip List of spaces: ID_Space43 ID_Space56 ID_Space61 ID_Space109 ID_Space142 ID_Space159

theo-armour commented 6 years ago

@mdengusiak

Thanks for submitting this example. Can we add it to the group of sample files?

The issue is interesting. We had similar problems in earlier releases - as displayed in the London Office building example - see #32

The issue arises because we want to define a plane in 3D using the coordinates of a surface. A plane is defined by three points that are not in a straight line / not co-linear,

Using the vertex telltale debugging tool in the right-side menu we can look at the coordinates of any surface. Here is a screen capture of one of the surfaces in question:

image

You will note in the image that the first six coordinates are co-linear. Because of the issues in the earlier releases, GV has been checking the first three coordinates for co-linearity. If the first three coordinates are co-linear then the script tries to define the plane using the fourth coordinate. Of course, with six co-linear coordinates, this strategy fails.

GV R11.12.5 has been updated to try another strategy: If the first three coordinates appear to be co-linear then try the last coordinate listed in the surface. Note that checking for co-linearity is 'expensive' in terms of resources and we want to do as little checking as possible

Fingers-crossed this new strategy helps and does not cause issues elsewhere. In any case the display error does not change the underlying gbXML data, it just affects your 3D viewing.

Just to be safe, the various read me files include a link back to GV R11.12.4

mdengusiak commented 6 years ago

OK I tested today and looks much better. Only one space not solved.

ID_Space_148

image

mdengusiak commented 6 years ago

OK, as agreed this will work under future R13