2

Reverse face in OpenStudio API

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".

Julien Marrec's avatar
29.7k
Julien Marrec
asked 2017-09-27 02:48:56 -0500
__AmirRoth__'s avatar
4.4k
__AmirRoth__
updated 2017-09-27 19:19:56 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

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

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

rpg777's avatar
7k
rpg777
answered 2017-09-27 10:24:59 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments