MCPcopy
hub / github.com/CadQuery/cadquery / toTuple

Method toTuple

cadquery/occ_impl/assembly.py:262–269  ·  view source on GitHub ↗

Convert Color to RGB tuple.

(self)

Source from the content-addressed store, hash-verified

260 return self.toTuple() == other.toTuple()
261
262 def toTuple(self) -> Tuple[float, float, float, float]:
263 """
264 Convert Color to RGB tuple.
265 """
266 a = self.wrapped.Alpha()
267 rgb = self.wrapped.GetRGB().Values(Quantity_TOC_sRGB)
268
269 return (*rgb, a)
270
271 def __getstate__(self) -> Tuple[float, float, float, float]:
272

Callers 7

__hash__Method · 0.95
__eq__Method · 0.95
__getstate__Method · 0.95
__eq__Method · 0.45
toVTKAssyFunction · 0.45
toVTKFunction · 0.45
toJSONFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected