gbXML export - Surface type issues

Hey @piusto ,

What you are seeing is not a bug but rather just the nature of the gbXML file schema. gbXML is a non-manifold geometry schema, which means that there is only one of the two adjacent internal Faces included for each interior face pair in the model. I guess this non-manifold structure served some of the goals of the original gbXML authors but it makes it practically impossible to treat Rooms as self-contained units, making it very hard to edit gbXML files on a room-by-room basis. This is one of the many reasons why OpenStudio team (and we) have decided not to use non-manifold geometry in our own schemas, even though it’s technically what engines like EnergyPlus are using under the hood. Instead, each Room is a closed volume, which results in two adjacent face pairs for each interior Face of the model.

Whichever of the two interior Faces that actually makes it from the Pollination Model/HBJSON/OSM into the gbXML file is essentially a selection based on whichever one the OpenStudio translator finds first. This is why it seems kinda random that there are some interior floors and some interior ceilings.

But, long story short, we are exporting the gbXML correctly and interfaces like DesignBuilder should not have an issue importing the gbXMl that you have saved. I don’t have experience with Lesosai but, if their gbXML importer is as good ad DesignBuilder, it also should not have any issues.

Spider is just going to show you the true nature of the gbXML, which may be a little ugly sometimes but that is not your fault.

1 Like

FYI, that old OpenStudio issue is about the gbXML importer built into OpenStudio. NOT the gbXML exporter that we are using here.

Granted that GitHub issue was fixed a long time ago but you can imagine that it would be easy to create bugs about normal direction when trying to convert from gbXML’s non-manifold schema back to a schema of complete Room volumes like what OpenStudio uses.

Also, you know that I will always agree with this:

Not that the gbXML route is impossible but we know OpenStudio isn’t the only BEM platform that has struggled to translate back and forth between the non-manifold schema.

1 Like

Thank you, @chriswmackey for the clarification. @piusto, does Lesosai gives you an error when you import the gbXML file that is created by Pollination? Based on Chris’s comments what you see in Spider is the expected output.

Here is a gbXML file that I exported from Pollination after cleaning up your model.

Es 1.3.3_Pollination_Solve Adj_B_msr.xml (219.5 KB)

Let us know what you think is the best way forward.

Hi @chriswmackey @mostapha ,

fist of all thanks for the feedback, it’s great to see such a dedicated team like yours!

Regarding the issue #2

I see the problem with the gbXML export/schema limitations… although does this happen with all the models exported with Pollination?
we are testing it because we want to move away from creating gbXML with Revit. We had many issues with exporting gbXML with Revit although the floor/ceiling interpretation was always correct. So there might be something under the hood that the Revit converter is doing better then OpenStudio/Pollination?
(at least for that part… we know about the other atrocities that Revit does when exporting to gbXML :woozy_face: )

Anyway this is not a major issue as we might be able to fix it afterward in Lesosai…

Regarding issue #1

This does not seem as a gbXML issue as the incorrect surface interpretation is evident in pollination already. And there seems to be no manual workaround to change the surface type afterward… is this correct?

Regarding Lesosai:

Yes we can definitely get you in touch with their development team.
I don’t know about how much we can interact with Lesosai native file but I will also have a look into that…

Regarding why we are using it: Lesosai is the only certified software in Switzerland that has been tested for different local regulations regarding the evaluation of gray energy and natural lighting.

Hey @piusto ,

I’m not sure if my explanation was clear but the gbXMLs that Pollination and OpenStudio export are correct according to the gbXML committee and its validation routines.

But it sounds like you (and I guess Lesosai?) have some other criteria in addition to this base validation for what you expect a “correct” gbXML to be. This kinda illustrates the problem with gbXML that everyone came up with their own definition of what they thought was “correct” and, by the time that the gbXML committee started writing validators to establish what is objectively considered correct, it was too late.

But maybe we can add an option for some other rule that you (or Lesosai?) have if talking do the Lesosai developers doesn’t provide us with a better route. You’d just have to let us know what you are expecting here. Should all interior horizontal faces be floors? Or should they all be ceilings? I guess we have established that having some floors and others ceilings is not what you want.

Hi @piusto, thank you for the kind words!

Can you share a simple sample file with us that is exported from Revit. There might be a workaround that we are not aware of.

Hmm. I will double check, but I believe the boundary conditions are exported correctly.

That would be great!

Is it possible for you to save your project from Lesosai? In that case, how does the file look like? If it is an ASCII file, we should be able to figure it out.

Understood! We had a couple of other users bringing up the software. We’re keen to provide a reliable integration with Lesosai.

This one for instance was exported from Revit, it has many other issues but at least the floor / ceilings are defined correctly:
FP5_NO HVAC Zone_OK.xml (954.1 KB)

Will provide you one very soon…

It might be a smaller user base… but if it could work then a lot of modelers would use Pollination in Switzerland…!

Hi @chriswmackey

As I mentioned we should distinguish issue #1 from issue #2 (I should have made two posts…)

Issue #1 is still unresolved, @mostapha is looking into it, this one has a major impact on the export of gbXML as it results in having roof surfaces inside the building (where they obviously should not be). This issue is already evident in the pollination interface before exporting.

Issue #2 regard the misplaced floor / ceiling surfaces, we understood this issue is generated by the “nature” of the gbXML schema. This is not as important as issue #1 as the surface type can be fixed afterward in Lesosai… Of course what a “correct” schema could have multiple interpretation but I think we all agree we should have uniformity across floor surfaces of a multi story building?

Thanks, @piusto . This is helpful:

From your file, I can see that your interpretation of “correct floor / ceilings” just means that you never use the gbXML interior “Ceiling” type and you represent all interior horizontal surfaces with the gbXML “InteriorFloor” type. I did a little cleanup on your gbXML model with the Rhino plugin and, using the gbXML exported from Pollination, I just did a find and replace to change “Ceiling” to “InteriorFloor” in the gbXML. Here is the result:

FP5_NO HVAC Zone_OK_FIXED.xml (293.6 KB)

If you confirm that this is what you were looking for, then it should be easy for us to add an option into our gbXML export routine that just replaces all of the interior “Ceilings” with “InteriorFloor” so that you can get exactly what you want without having to do a find and replace.

1 Like

Hi @piusto, @chriswmackey already answered the other question, and we can add an option to make the selection of ceiling vs interior floors consistent.

For the flipped face, it was happening because your model was invalid. Here is the fixed model and the exported gbXML.

Es 1.3.3_Pollination_Solve Adj_B.3dm (1.5 MB)
Es 1.3.3_Pollination_Solve Adj_B.xml (242.3 KB)

Here is how I fixed your model.

There were also some invalid interior doors which I didn’t fix.

One last question, if you have these models inside Revit why don’t you use the Pollination Revit plugin to export them to gbXML? You don’t have to go through Rhino.

Beautiful!

Yes I think such option would definitely solve issue #2

1 Like

@mostapha
Wow, thank you so much for the fix and the explaining video…! I guess I was not really fixing the validation issues and also I was not aware of commands like PO_OffsetChildObjects. I will definitely study the manual a bit more, but the video is great and show clearly how to fix the issues.

Regarding this: as I mentioned we are trying to move away from the modeling with Revit as we want to create a new workflow for a class @Usi

Our students will create some energy models starting from scratch from many different buildings. So the workflow we are defining will be replicated by them on their specific project. We figured the Rhino approach would have been the easiest one as we model the gbXML geometries directly (and not indirectly as it happens in Revit).

So it’s important for us also to understand how to fix these model issues as I am sure there will be some in their exercises…

In the meantime thank you very much for your help, I think it’s clear we can integrate Pollination in our course workflow now!

1 Like

Hi, @piusto,

I’m glad to hear that. @chriswmackey has already implemented this option in the core library, we will expose it in the Rhino plugin soon.

No problem! I would suggest watching this workshop for now, until we update all the other videos. It covers most of the commands for fixing the models.

I missed the context here. If you have the option to use Rhino directly, then I strongly recommend using Rhino over Revit for your class.

My pleasure! It would be great if you could still put us in touch with the developers of Lesosai to explore a direct integration. Hopefully, the gbXML workflow will be good enough for your studio but having a direct export will be more reliable in the future.

Glad to hear it. I just merged in a change that allows you to set all of the interior horizontal faces to be an InteriorFloor:

It’s exposed on the latest HB Dump gbXML Grasshopper component if you want to try it out yourself:

Otherwise, @mingbo can expose it on the “Save As gbXML” capability of the Rhino plugin as soon as he gets the chance.

Hi @chriswmackey, is this option also exposed for the command: honeybee_energy translate model-to-gbxml?

Yes, you can see the new command in the docs here:
https://www.ladybug.tools/honeybee-energy/docs/cli/translate.html#honeybee-energy-translate-model-to-gbxml

Admittedly, the command is a little different than how I exposed it on the Grasshopper component but I think you can just have a similar boolean/check-box input as an option on the “Save As gbXML” menu for “All Interior Floors” and that would mean that you just add the following to the command:

--interior-face-type InteriorFloor

Ok, thanks @chriswmackey.

Hi @piusto, in the next release version, this setting will be available for exporting the gbxml.

3 Likes

@piusto, the new version is now publicly available (v1.43.12). It includes the option that @mingbo mentioned above and here is what the exported gbXML looks like.

Keep in mind that the option is not selected by default, and you have to select it when it exporting the model to gbXML.

Es 1.3.3_Pollination_Solve Adj_B_Int_Only.xml (225.1 KB)

2 Likes

A post was split to a new topic: Issues with fixing missing adjacencies for interior doors