Skip to content

Commit

Permalink
minor bugfix
Browse files Browse the repository at this point in the history
should be OR, not AN;  color is spelled without U everywhere else; exception call itself was breaking
  • Loading branch information
Demetrio92 authored and aothms committed Oct 17, 2019
1 parent d917e73 commit e6cae6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def display_shape(shape, clr=None, viewer_handle=None):
raise Exception("No color named '%s'" % clr.upper())
elif isinstance(clr, Iterable):
clr = tuple(clr)
if len(clr) < 3 and len(clr) > 4:
raise Exception("Need 3 or 4 colour components. Got '%r'." % clr)
if len(clr) < 3 or len(clr) > 4:
raise Exception("Need 3 or 4 color components. Got '%r'." % len(clr))
qclr = OCC.Quantity.Quantity_Color(clr[0], clr[1], clr[2], OCC.Quantity.Quantity_TOC_RGB)
elif isinstance(clr, OCC.Quantity.Quantity_Color):
qclr = clr
Expand Down

0 comments on commit e6cae6e

Please sign in to comment.