NREL / floorspace.js

Other
68 stars 36 forks source link

Unable to connect same contiguous space #422

Open ramsey597 opened 1 year ago

ramsey597 commented 1 year ago

I have a building that is "V" shaped. I placed the exterior space in the Floorspacejs editor and then went back and connected the corridors with the polygon feature. However, the below image shows the same space (maroon color) produces a hole error when I try to connect them even though it is the same space and right next to each other. I can put in a new space, in the white area but if I try to use the same space (corridor) it gives the shown error. Connect Spaces

macumber commented 1 year ago

Could you provide a zoomed out view of the entire space you are trying to draw?

ramsey597 commented 1 year ago

Sorry that would have been helpful. Here it is. You can see the zoom in portion with the white area in the middle of the image.

Model Overview

macumber commented 1 year ago

Corridor 1 is definitely a space with holes in it, those aren't supported by Floorspace..js. My suggestion would be to break Corridor 1 up into at least two or more spaces (top and bottom, left and right, anything works) so there is no hole in the space polygon.

See this for a description of what a polygon with a hole is: https://en.wikipedia.org/wiki/Polygon_with_holes