honeybee_plus.radiance.primitive module¶
Base class for Radiance Primitives.
Unless you are a developer you most likely want to use one of the subclasses of Primitive instead of using this class directly. Look under honeybee_plus.radiance.material and honeybee_plus.radiance.geometry
http://radsite.lbl.gov/radiance/refer/ray.html
-
class
honeybee_plus.radiance.primitive.
Primitive
(name, type, modifier=None, values=None, is_opaque=None)[source]¶ Bases:
object
Base class for Radiance Primitives.
-
name
¶ Primitive name as a string. Do not use white space and special character.
-
type
¶ One of Radiance standard Primitive types (e.g. glass, plastic, etc)
-
modifier
¶ Modifier. It can be primitive, mixture, texture or pattern. (Default: “void”).
-
values
¶ A dictionary of primitive data. key is line number and item is the list of values {0: [], 1: [], 2: [‘0.500’, ‘0.500’, ‘0.500’, ‘0.000’, ‘0.050’]}
-
GEOMETRYTYPES
= {'bubble', 'cone', 'cup', 'cylinder', 'instance', 'mesh', 'polygon', 'ring', 'source', 'sphere', 'tube'}¶
-
MATERIALTYPES
= {'BRTDfunc', 'BSDF', 'antimatter', 'ashik2', 'dielectric', 'glass', 'glow', 'illum', 'interface', 'light', 'metal', 'metal2', 'metdata', 'metfunc', 'mirror', 'mist', 'mixedfunc', 'plasdata', 'plasfunc', 'plastic', 'plastic2', 'prism1', 'prism2', 'spotlight', 'trans', 'trans2', 'transdata', 'transfunc', 'void'}¶
-
MIXTURETYPES
= {'mixdata', 'mixfunc', 'mixpict', 'mixtext'}¶
-
MODIFIERTYPES
= {'BRTDfunc', 'BSDF', 'antimatter', 'ashik2', 'brightdata', 'brightfunc', 'brighttext', 'colordata', 'colorfunc', 'colorpict', 'colortext', 'dielectric', 'glass', 'glow', 'illum', 'interface', 'light', 'metal', 'metal2', 'metdata', 'metfunc', 'mirror', 'mist', 'mixdata', 'mixedfunc', 'mixfunc', 'mixpict', 'mixtext', 'plasdata', 'plasfunc', 'plastic', 'plastic2', 'prism1', 'prism2', 'spotlight', 'texdata', 'texfunc', 'trans', 'trans2', 'transdata', 'transfunc', 'void'}¶
-
NONEOPAQUETYPES
= {'BRTDfunc', 'BSDF', 'dielectric', 'glass', 'mist', 'mixfunc', 'prism1', 'prism2', 'trans', 'trans2', 'transdata', 'transfunc'}¶
-
PATTERNTYPES
= {'brightdata', 'brightfunc', 'brighttext', 'colordata', 'colorfunc', 'colorpict', 'colortext'}¶
-
TEXTURETYPES
= {'texdata', 'texfunc'}¶
-
TYPES
= {'BRTDfunc', 'BSDF', 'antimatter', 'ashik2', 'brightdata', 'brightfunc', 'brighttext', 'bubble', 'colordata', 'colorfunc', 'colorpict', 'colortext', 'cone', 'cup', 'cylinder', 'dielectric', 'glass', 'glow', 'illum', 'instance', 'interface', 'light', 'mesh', 'metal', 'metal2', 'metdata', 'metfunc', 'mirror', 'mist', 'mixdata', 'mixedfunc', 'mixfunc', 'mixpict', 'mixtext', 'plasdata', 'plasfunc', 'plastic', 'plastic2', 'polygon', 'prism1', 'prism2', 'ring', 'source', 'sphere', 'spotlight', 'texdata', 'texfunc', 'trans', 'trans2', 'transdata', 'transfunc', 'tube', 'void'}¶
-
property
can_be_modifier
¶ Indicate if this object can be a modifier.
Materials, mixtures, textures or patterns can be modifiers.
-
classmethod
from_json
(mat_json)[source]¶ Make radiance primitive from json {
“modifier”: “”, // primitive modifier (Default: “void”) “type”: “custom”, // primitive type “base_type”: “type”, // primitive type “name”: “”, // primitive Name “values”: {} // values
}
-
classmethod
from_string
(primitive_string, modifier=None)[source]¶ Create a Radiance primitive from a string.
If the primitive has a modifier the modifier primitive should also be part of the string or should be provided using modifier argument.
-
head_line
(minimal=False, include_modifier=True)[source]¶ Return first line of primitive definition.
If primitive has a modifier it returns the modifier definition as well.
-
property
isRadianceGeometry
¶ Indicate if this object is a Radiance geometry.
-
property
isRadianceMaterial
¶ Indicate if this object is a Radiance material.
-
property
isRadianceMixture
¶ Indicate if this object is a Radiance geometry.
-
property
isRadiancePattern
¶ Indicate if this object is a Radiance geometry.
-
property
isRadiancePrimitive
¶ Indicate that this object is a Radiance primitive.
-
property
isRadianceTexture
¶ Indicate if this object is a Radiance geometry.
-
property
is_opaque
¶ Indicate if the primitive is opaque.
This property is used to separate opaque and non-opaque surfaces.
-
property
modifier
¶ Get/set primitive modifier.
-
property
name
¶ Get/set primitive name.
-
to_json
()[source]¶ Translate radiance primitive to json {
“modifier”: “”, // primitive modifier (Default: “void”) “type”: “custom”, // primitive type “base_type”: “type”, // primitive type “name”: “”, // primitive Name “values”: {} // values
}
-
property
type
¶ Get/set primitive type.
-
property
values
¶
-