MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / clr

Function clr

src/ifcopenshell-python/ifcopenshell/draw.py:394–398  ·  view source on GitHub ↗
(c)

Source from the content-addressed store, hash-verified

392 # the factor determines how much white will be interpolated
393 # into the style diffuse color.
394 def clr(c):
395 if isinstance(c, ifcopenshell.ifcopenshell_wrapper.colour):
396 return c.r(), c.g(), c.b()
397 else:
398 return c
399
400 clr = numpy.array(clr(style.diffuse) if style else (0.6, 0.6, 0.6))
401 factor = (math.log(elements[0].distance + 2.0) / 7.0) * (1.0 - 0.5 * abs(elements[0].dot_product))

Callers 2

SerializationMethod · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected