Skip to content

Commit 5003d03

Browse files
chriswmackeyChris Mackey
authored and
Chris Mackey
committed
fix(face): Ensuring upper-left vertices do not change for horizontals
1 parent 9372d9e commit 5003d03

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ladybug_geometry/geometry3d/face.py

+4
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,8 @@ def upper_left_counter_clockwise_vertices(self):
490490
This is useful for getting the vertices of several faces aligned with the
491491
same global geometry rules for export to engines like EnergyPlus.
492492
"""
493+
if self._plane.n.z == 1or self._plane.n.z == -1: # no vertex is above another
494+
return self.vertices
493495
# get a 2d polygon in the face plane that has a positive Y axis.
494496
if self._plane.y.z < 0:
495497
ref_plane = self._plane.rotate(self._plane.n, math.pi, self._plane.o)
@@ -511,6 +513,8 @@ def upper_left_counter_clockwise_vertices(self):
511513
def upper_left_counter_clockwise_boundary(self):
512514
"""Get this face's boundary starting from the upper left and moving counterclockwise.
513515
"""
516+
if self._plane.n.z == 1 or self._plane.n.z == -1: # no vertex is above another
517+
return self.boundary
514518
# get a 2d polygon in the face plane that has a positive Y axis.
515519
if self._plane.y.z < 0:
516520
ref_plane = self._plane.rotate(self._plane.n, math.pi, self._plane.o)

0 commit comments

Comments
 (0)