draw_cylinders

compas_rhino.utilities.draw_cylinders(cylinders, cap=False, **kwargs)[source]

Draw cylinders and optionally set individual name, color, and layer properties.

Parameters
  • cylinders (list[dict]) – A list of cylinder dictionaries. See Notes, for more information about the structure of the dict.

  • cap (bool, optional) – If True, add caps.

Returns

list[System.Guid]

Notes

A cylinder dict has the following schema:

Schema({
    'start': And(list, lambda x: len(x) == 3),
    'end': And(list, lambda x: len(x) == 3),
    'radius': And(Or(int, float), lambda x: x > 0.0),
    Optional('name', default=''): str,
    Optional('color', default=None): (lambda x: len(x) == 3 and all(0 <= y <= 255 for y in x)),
    Optional('layer', default=None): str,
})