draw_spheres

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

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

Parameters

spheres (list of dict) – A list of sphere dictionaries.

Returns

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