Skip to content

Commit c7394a9

Browse files
committed
fix(shademesh): Avoid cryptic exceptions with inappropriate tolerance
1 parent 42eced2 commit c7394a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

honeybee/shademesh.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,8 @@ def triangulate_and_remove_degenerate_faces(self, tolerance=0.01):
233233
for shd in self.faces:
234234
shd_verts = [verts[v] for v in shd]
235235
shf = Face3D(shd_verts)
236-
if not shf.check_planar(tolerance, raise_exception=False):
236+
if len(shd_verts) == 4 and not \
237+
shf.check_planar(tolerance, raise_exception=False):
237238
shades = ((shd[0], shd[1], shd[2]), (shd[2], shd[3], shd[0]))
238239
for shade in shades:
239240
shd_verts = [verts[v] for v in shade]

0 commit comments

Comments
 (0)