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

Reverse face in OpenStudio API

asked 2017-09-27 02:48:56 -0600

updated 2017-09-27 19:19:56 -0600

Is there a built-in way to reverse a surface in the OpenStudio API? By that I mean I want to do a 180° rotation of the surface's outward normal.

Assuming I have an array of all my guilty surfaces, I just want to achieve the same behavior that I would get by manually right clicking on each in Sketchup and do "Reverse faces".

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2017-09-27 10:24:59 -0600

Yeah, you have to reverse the order of the vertices, like so:

surface.setVertices(OpenStudio::reverse(surface.vertices))

edit flag offensive delete link more

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

1 follower

Stats

Asked: 2017-09-27 02:48:56 -0600

Seen: 234 times

Last updated: Sep 27 '17