Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
3

Measure coloring PlanarSurfaces?

asked 2015-06-27 14:41:56 -0600

updated 2015-07-10 13:31:58 -0600

Thanks as always for all the kind answers.

I was wondering if I could color the PlanarSurfaces with the colors I want. I was reading the OpenStudio Plugin's code and I'm really lost there. But I really don't know how to change the colors? At first I thought

PlanarSurface.outside_color = Sketchup::Color.new (255, 255, 255, 1.0)

Would work but well it's not and then I thought I should access it via the entity way:

if drawing_interface = space.drawing_interface
    if entity = drawing_interface.entity
        entity.visible = false
    end
end

But it doesn't work there either. So the question is how does one fills the PlanarSurfaces with the desired color?

Thank you as always. Your answers helped me so much till now

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
4

answered 2015-06-27 14:58:40 -0600

Great question! Currently, surfaces do not have colors associated with them directly. The SketchUp plug-in supports the idea of render modes. We have thought about adding a way for users to easily define their own render modes but have not implemented it at this time. If you are ok modifying the source code directly, you could add some render modes directly. You would need to add menu items in MenuManager.rb and then add the code to paint the surfaces in PlanarSurface.rb.

edit flag offensive delete link more

Comments

Hm... that is a bit sad as it's not a measure but mostly a plugin that we're going to make public for who knows how many users. But well thank you so much. I really hope someday there be this API

Pouya Kary's avatar Pouya Kary  ( 2015-06-27 16:00:39 -0600 )edit

@Pouya Kary, you can render surface by construction, and construction objects in OpenStudio do store color. Are you trying to represent something else other than what color the surfaces would be based on the construction? Also soon we will have a measure that renders surfaces based on time-series output, such as surface temperature or insolation value.

David Goldwasser's avatar David Goldwasser  ( 2015-06-27 22:14:10 -0600 )edit

Hi @david-goldwasser thanks a lot. Actually yes, I'm developing an OpenStudio/SketchUp plugin to check if a building is compatible with our national regulation for energy in buildings and the thing is we want to color zones with their heat loss coefficient. So yes unfortunately it's not construction-dependent

Pouya Kary's avatar Pouya Kary  ( 2015-06-28 22:34:41 -0600 )edit

Maybe you can set thermal zone color based on the zone's heat loss coef. Then just use render by thermal zone. Thermal zone colors dont' have to be unique. If there is an EnergyPlus measure for heat loss coef. then our upcoming measure may also be helpful.

David Goldwasser's avatar David Goldwasser  ( 2015-06-29 00:02:33 -0600 )edit

@david-goldwasser, Ah yes that is one good idea. Let me play a little bit with it and then I'll ask if it be necessary. Thanks a lot!

Pouya Kary's avatar Pouya Kary  ( 2015-06-29 01:13:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

2 followers

Stats

Asked: 2015-06-27 14:41:56 -0600

Seen: 212 times

Last updated: Jun 27 '15