draw_spheres

compas_rhino.utilities.draw_spheres(spheres, **kwargs)[source]

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

Parameters

spheres (list[dict]) – A list of sphere dictionaries. See Notes, for more information about the structure of the dict.

Returns

list[System.Guid]

Notes

A sphere dict has the following schema:

Schema({
    'pos': 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): And(lambda x: len(x) == 3, all(0 <= y <= 255 for y in x)),
    Optional('layer', default=None): str,
})