Using polyline to create a Room in Honeybee

Hi guys,

I want to extend the example honeybee script to measure iluminance in a rectangular room by creating a room that is L-shaped (or any other shape created from a polyline). I was thinking of modifying the Room class to accept arguments like this:

Any thoughts on this? Or if anyone knows if such a script is already written?

What might be the problems to modify the class in this manner? I think that the walls of the room are currently accessible using “front”, “left”, etc strings. Would it make sense if they are only enumerated instead?

Hi!

There are a couple of options I see here. I think you could indeed modify the class and make a PR to the main repository. If you do so be sure to run the tests and fix any that might fail. We use pytest so you should be able to run python -m pytest and see if anything breaks :slight_smile:

If you are only looking to do daylight simulations then I think you can get away just modelling surfaces and not a room. If you do this you could play with the different surface objects and manipulate them through code or generate geometry JSON files and then import them as surfaces using the from_dict methods.

How much experience do you have with python at this point? This will help me gauge which route might be more useful for your use case :slight_smile:

I’m not at my computer right now but if this all seems super complex/fuzzy I can try to write up an example for you. I’d strongly encourage checking out the API docs first however so you get a feel for what can be done: https://www.ladybug.tools/apidoc/honeybee/