honeybee_radiance.putil module

Primitive utility functions.

honeybee_radiance.putil.dict_to_primitive(pdict)[source]

Convert a dictionary representation of any primitive to a class instance.

The returned object will have the correct class type and will not be the generic Primitive base class. Note that this function is recursive and will re-serialize modifiers of modifiers.

Parameters

pdict – A dictionary of any Radiance Primitive (Geometry or Modifier).

honeybee_radiance.putil.primitive_class_from_type_string(type_string)[source]

Get the class of any primitive using its ‘type’ string.

Note that this function returns the class itself and not a class instance.

Parameters

type_string – Text for the name of a primitive module/class. This should usually be lowercase and should be the same as the ‘type’ key used in the dictionary representation of the primitive.