HB model from OSM

I’ve just updated to the last 1.3.0 release on my Mac OS, but I couldn’t load a OSM file to an HB model.
As I’ve set the proper path and toggled it to “true” an error comes (shown in the figure). How could I solve this problem?

Hi @adrianodilopes ,

Thanks for reporting the issue. Can you upload the OSM file so that we can try to recreate the issue on our end?

Also, just to be sure, are you using OpenStudio 3.2 as you see in the compatibility matrix?

Hey @chris , thank you very much for the reply!
I’ve checked again with the proper version of each software but the error is recurrent.

teste.xml (65.7 KB)
teste.osm (194.4 KB)

Ah, you have a bunch of Non-ASCII characters in your OSM:

These are illegal in EnergyPlus but I know OpenStuido just translates them to gibberish when it makes the IDF. Let me see if I can implement something similar in the honeybee translators.

Ok. I just pushed some changes to the development version of the plugin, which should fix this case:

You should be able to get it on your end with the LB Versioner in an hour hour so.

It seems the issue was particularly with illegal characters in your constructions since the geometry all seems to be named with legal characters. The new fix will “escape” these characters when translating to HBJSON (aka. convert them to the same gibberish that OpenStudio does when it translates things to IDF).

1 Like

Thank you once again!
I’ve tried just renaming some objects, but it didn’t worked before your update.
By the way, I couldn’t even understand the errors reported.

I’ll try in an hour and I’ll make you know if it worked!

Thank you!!!

Yes, unfortunately the error handling on the Ruby/OpenStudio SDK side of things isn’t all that great. But, with the current changes, the risk of those errors should drop by a lot.

If you confirm that everything works for you after the update, I think I’ll update the installer on Foo4Rhino with this fix so that others who install version 1.3 don’t encounter the issue.

Hey @chris, unfortunately it didn’t work for me.
I’ve set true to the LB Versioner and then I reopened Rhino.
As I used once again the Load component it returned the same error.
Is there any trustful sample file I could use to try again?

This is odd. It’s definitely working on my end after the recent fix:

You restarted Rhino/Grasshopper after using the LB Versioner, right?

I see that there’s an error that’s being raised in IronPython. What version of Rhino are you using? Can you try updating your Rhino version and running it again?

Yes I restarted them after using LB Versioner.
My version of Rhino is “Version 6 (6.35.21222.17002, 2021-08-10)”.
An window came as well asking for the GCC installation which probably is related to the IronPython error you’ve pointed.

Hm. I also just noticed that you are using Rhino for Mac. It’s possible that the issue you are experiencing is specific to Rhino 6 and Mac. Are you also unable to load this HBJSON file of your OSM using the HB Load Objects component?
teste.hbjson (42.8 KB)

Also, what version of Mac OS are you using?

Hey @chris,

I’ve just updated my OS to the latest Big Sur and checked up the compatibility matrix, but it’s not working yet :frowning:
Although, I used the HB Load Objects and it worked. I’m still investigating what should this problem be.

Ah, this is good to know. If you are still able to load the HBJSON, then the issue is on the OpenStudio side of things and isn’t specific to Rhino 6. Can you upload the file that should be in the following location:

Users/adrianodilopes/simulation/temp_translate/run/run.log

And could you also upload the following file?

Users/adrianodilopes/simulation/temp_translate/teste_02.hbjson

That should hopefully give me what I need to fix this. Thanks again for testing this, @adrianodilopes .

Hey @chris here are the files. Thanks a lot and I hope it helps to solve this issue.

run.log (151 Bytes)
teste_02.hbjson (39.7 KB)

Ok, the issue seems even more trivial than I realized. So you have a complete and valid HBJSON file on your machine that’s derived from the OSM. You should be able to load that teste_02.hbjson file with the “HB Load Objects” component like so:

The issue just seems to be with how this HBJSON is getting passed from the HBJSON file to Rhino. I attached two variations on the “HB Load gbXML” component in the following .gh file:
fix_for_osm_import_on_mac.gh (12.7 KB)

Do either (or both) of these two components import your OSM correctly?

@adrianodilopes

I think that I will just go with the second version of the component in the .gh file that I sent. It’s hard to imagine that version not working based on everything that you sent me. I’ going to update the Food4Rhino installer now.

It finally worked, even if I couldn’t understand quite a lot because the top component still doesn’t load the gbxml, but the bottom one does. :slight_smile: Thank you very much.

Wonderful! Thanks for testing, @adrianodilopes . I just updated the installer.gh on Food4Rhino to use the second (lower) component that we know works well. I’m sure that you saved a lot of Mac users from a major headache here.