mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
minor bugfix
should be OR, not AN; color is spelled without U everywhere else; exception call itself was breaking
This commit is contained in:
committed by
Thomas Krijnen
parent
d917e738db
commit
e6cae6e7b9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user