First time here? Check out the Help page!
1 | initial version |
This code snippet from the measures repo should help you:
# create a new set of vertices
newVertices = OpenStudio::Point3dVector.new
# get the existing vertices for this interior partition
vertices = surface.vertices
vertices.each do |vertex|
# initialize new vertex to old vertex
x = vertex.x
y = vertex.y
z = 0
# add point to new vertices
newVertices << OpenStudio::Point3d.new(x,y,z)
end
# set vertices to new vertices
surface.setVertices(newVertices) #todo check if this was made, and issue warning if it was not. Could happen if resulting surface not planar.
2 | No.2 Revision |
This code snippet from the measures repo should help you:
# create a new set of vertices
newVertices = OpenStudio::Point3dVector.new
# get the existing vertices for this interior partition
vertices = surface.vertices
vertices.each do |vertex|
# initialize new vertex to old vertex
x = vertex.x
y = vertex.y
z = 0
vertex.z - 1
# add point to new vertices
newVertices << OpenStudio::Point3d.new(x,y,z)
end
# set vertices to new vertices
surface.setVertices(newVertices) #todo check if this was made, and issue warning if it was not. Could happen if resulting surface not planar.