-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
gbXML export is not reproducible #4438
Comments
Sort surfaces here: https://github.com/NREL/OpenStudio/blob/develop/src/gbxml/ForwardTranslator.cpp#L463 Sort other objects as needed |
@ggartside is this something you could add to your list? It should be pretty straightforward |
Assuming this is related? #4375 @ggartside? |
They are kind of related but this one is on export and the other is on import |
Yes I can do, Assuming that by reproducible you mean deterministic? So with the same input and conditions we always get the same output? |
In github is there not a way to create a branch from the issue report page? Anyone know? |
Issue overview
Objects export order is not reproducible in the gbXML ForwardTranslator. The ForwardTranslator should sort objects to ensure the export is reproducible.
Current Behavior
Objects are exported in non-reproducible order.
Expected Behavior
Objects are exported in reproducible order.
Steps to Reproduce
Create an OSM model via a script, export to gbXML. Repeat, exported gbXML is not in same order. This is especially problematic for interior floor/ceilings as sometimes the floor is exported and sometimes the ceiling is. Sorting by surface type would ensure that interior floors are always exported (the interior ceiling would be listed as the adjacent surface).
Possible Solution
Sort all objects when doing gbXML export. Need to sort surfaces by surface type (Wall, Roof, Floor, etc) first. Need to figure out sorting criteria for each objects (probably want to sort spaces by story or min z coord, then maybe min x and min y coords, then name)
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context
Topologic Energy uses OpenStudio's gbXML export, this issue causes confusion and possible wrong results when the results imported into other tools such as Spider Aragog gbXML Viewer.
Reported by @wassimj at https://unmethours.slack.com/archives/C0ADY1ZRB/p1631800632015300
The text was updated successfully, but these errors were encountered: