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 of dict) – A list of cylinder dictionaries.

  • cap (bool, optional)

Returns

list of 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,
})