Open aaron-boranian opened 6 months ago
Thanks for the bug report @aaron-boranian. This happens because the FloorspaceJS data model is based around stories, a space cannot exist in that model without a story (which is different than the OpenStudio Model's scheme in which a space can exist without a story). I think the right fix for this would be to disable deleting stories from spaces if the space came from FloorpsaceJS. The other issue would be if you deleted a story in the OS App, that wouldn't immediately delete the spaces assigned to that story in the OS App but would after merging with the geometry editor.
I think for the purpose of your example, you'd have to think of story as a required field for space. You could have spaces without thermal zone assignments but you can't have a space without a story assigned if you are using FloorspaceJS.
Issue overview
If a user mistakenly deleted a Story assignment for a Space, even after setting the Story back to what it was, they cannot view the Space's floor plan or update its render color in the Geometry / Editor tab that connects to FloorspaceJS. If the user then merged FloorspaceJS data with the current model, some Spaces are deleted.
For background information, I was hoping to develop a hands-on exercise for an OpenStudio Application training workshop where the attendee would inherit a half-complete model where various Spaces are missing, or the Spaces that are existing have some key attributes (Story, Thermal Zone, etc.) unassigned. The attached ZIP folder has three OSM files:
Current Behavior
When a Space does not have a Story assigned, it is not listed in the Geometry / Editor tab.
After a Story has been assigned to a Space, the Space is then listed in the Geometry / Editor tab, but the floor plan for the Space is not visible in the grid and the Render Color input for the Space cannot be set.
Expected Behavior
If a Space has its Story setting deleted, setting the Story again should allow the user to edit the Space further on the Geometry / Editor tab:
Steps to Reproduce
When a Space does not have a Story assigned, it is not listed in the Geometry / Editor tab (see below).
After a Story has been assigned to a Space, the Space is then listed in the Geometry / Editor tab (refer to attached 'Exercise-01-assign-story.osm'). However, the floor plan is not visible in the grid and the Render Color input cannot be set.
For testing, I also tried deleting the Render Color assignment from a Space by:
Deleting and assigning a new Render Color like this is working in the Geometry / Editor tab correctly and that is the expected behavior.
Possible Solution
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context
For background information, I was hoping to develop a hands-on exercise for an OpenStudio Application training workshop where the attendee would inherit a half-complete model where various Spaces are missing, or the Spaces that are existing have some key attributes (Story, Thermal Zone, etc.) unassigned.