honeybee.radiance package

Subpackages

Submodules

honeybee.radiance.analysisgrid module

Honeybee PointGroup and TestPointGroup.

class honeybee.radiance.analysisgrid.AnalysisGrid(analysis_points, name=None, window_groups=None)[source]

Bases: object

A grid of analysis points.

analysis_points

A collection of analysis points.

ToString()[source]

Overwrite ToString .NET method.

add_result_files(file_path, hoys, start_line=None, is_direct=False, header=True, mode=0)[source]

Add new result files to grid.

Use this methods if you want to get annual metrics without loading the values for each point. This method is only useful for cases with no window groups and dynamic blind states. After adding the files you can call ‘annualMetrics’ method.

analysis_points

Return a list of analysis points.

annual_metrics(da_threshhold=None, udi_min_max=None, blinds_state_ids=None, occ_schedule=None)[source]

Calculate annual metrics.

Daylight autonomy, continious daylight autonomy and useful daylight illuminance.

Parameters:
  • da_threshhold – Threshhold for daylight autonomy in lux (default: 300).
  • udi_min_max – A tuple of min, max value for useful daylight illuminance (default: (100, 3000)).
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
  • occ_schedule – An annual occupancy schedule.
Returns:

Daylight autonomy, Continious daylight autonomy, Useful daylight illuminance, Less than UDI, More than UDI

annual_sunlight_exposure(threshhold=None, blinds_state_ids=None, occ_schedule=None, target_hours=None, target_area=None)[source]

Annual Solar Exposure (ASE)

As per IES-LM-83-12 ase is the percent of sensors that are found to be exposed to more than 1000lux of direct sunlight for more than 250hrs per year. For LEED credits No more than 10% of the points in the grid should fail this measure.

Parameters:
  • threshhold – Threshhold for for solar exposure in lux (default: 1000).
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1. ase must be calculated without dynamic blinds but you can use this option to study the effect of different blind states.
  • occ_schedule – An annual occupancy schedule.
  • target_hours – Minimum targe hours for each point (default: 250).
  • target_area – Minimum target area percentage for this grid (default: 10).
Returns:

Success as a Boolean, ase values for each point, Percentage area, Problematic points, Problematic hours for each point

combined_value_by_id(hoy=None, blinds_state_ids=None)[source]

Get combined value from all sources based on state_id.

Parameters:
  • hoy – hour of the year.
  • blinds_state_ids – List of state ids for all the sources for an hour. If you want a source to be removed set the state to -1.
Returns:

total, direct values.

combined_values_by_id(hoys=None, blinds_state_ids=None)[source]

Get combined value from all sources based on state_ids.

Parameters:
  • hoys – A collection of hours of the year.
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
Returns:

Return a generator for (total, direct) values.

digit_sign
duplicate()[source]

Duplicate AnalysisGrid.

classmethod from_file(file_path)[source]

Create an analysis grid from a pts file.

Parameters:file_path – Full path to points file
classmethod from_json(ag_json)[source]

Create an analysis grid from json objects.

classmethod from_points_and_vectors(points, vectors=None, name=None, window_groups=None)[source]

Create an analysis grid from points and vectors.

Parameters:
  • points – A flatten list of (x, y ,z) points.
  • vectors – An optional list of (x, y, z) for direction of test points. If not provided a (0, 0, 1) vector will be assigned.
has_direct_values

Check if direct values are available for this point.

In point-in-time and 3phase recipes only total values are available.

has_values

Check if this analysis grid has result values.

hoys

Return hours of the year for results if any.

isAnalysisGrid

Return True for AnalysisGrid.

is_results_point_in_time

Return True if the grid has the results only for an hour.

load_values_from_files()[source]

Load grid values from self.result_files.

max_values_by_id(hoys=None, blinds_state_ids=None)[source]

Get maximum value for all the hours.

Parameters:
  • hoys – A collection of hours of the year.
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
Returns:

Return a tuple for sum of (total, direct) values.

name

AnalysisGrid name.

parse_blind_states(blinds_state_ids)[source]

Parse input blind states.

The method tries to convert each state to a tuple of a list. Use this method to parse the input from plugins.

Parameters:blinds_state_ids – List of state ids for all the sources for an hour. If you want a source to be removed set the state to -1. If not provided a longest combination of states from sources (window groups) will be used. Length of each item in states should be equal to number of sources.
parse_header(inf, start_line, hoys, check_point_count=False)[source]

Parse radiance matrix header.

points

A generator of points as x, y, z.

result_files

Return result files as a list [[total files], [direct files]].

set_coupled_values_from_file(total_file_path, direct_file_path, hoys=None, source=None, state=None, start_line=None, header=True, check_point_count=True, mode=0)[source]

Load direct and total values for test points from two files.

Parameters:
  • file_path – Full file path to the result file.
  • hoys – A collection of hours of the year for the results. If None the default will be range(0, len(results)).
  • source – Name of the source.
  • state – Name of the state.
  • start_line – Number of start lines after the header from 0 (default: 0).
  • header – A Boolean to declare if the file has header (default: True).
  • mode – 0 > load the values 1 > load values as binary. Any non-zero value will be 1. This is useful for studies such as sunlight hours. 2 > load the values divided by mode number. Use this mode for daylight factor or radiation analysis.
set_values(hoys, values, source=None, state=None, is_direct=False)[source]
set_values_from_file(file_path, hoys=None, source=None, state=None, start_line=None, is_direct=False, header=True, check_point_count=True, mode=0)[source]

Load values for test points from a file.

Parameters:
  • file_path – Full file path to the result file.
  • hoys – A collection of hours of the year for the results. If None the default will be range(0, len(results)).
  • source – Name of the source.
  • state – Name of the state.
  • start_line – Number of start lines after the header from 0 (default: 0).
  • is_direct – A Boolean to declare if the results is direct illuminance (default: False).
  • header – A Boolean to declare if the file has header (default: True).
  • mode – 0 > load the values 1 > load values as binary. Any non-zero value will be 1. This is useful for studies such as sunlight hours. 2 > load the values divided by mode number. Use this mode for daylight factor or radiation analysis.
sources

Get sorted list fo sources.

spatial_daylight_autonomy(da_threshhold=None, target_da=None, blinds_state_ids=None, occ_schedule=None)[source]

Calculate Spatial Daylight Autonomy (sDA).

Parameters:
  • da_threshhold – Minimum illuminance threshhold for daylight (default: 300).
  • target_da – Minimum threshhold for daylight autonomy in percentage (default: 50%).
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
  • occ_schedule – An annual occupancy schedule.
Returns:

Spatial daylight autonomy as percentage of analysis points. DA: Daylight autonomy for each analysis point. Problematic points: List of problematic points.

Return type:

sDA

sum_values_by_id(hoys=None, blinds_state_ids=None)[source]

Get sum of value for all the hours.

This method is mostly useful for radiation and solar access analysis.

Parameters:
  • hoys – A collection of hours of the year.
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
Returns:

Return a collection of sum values as (total, direct) values.

to_json()[source]

Create json object from analysisGrid.

to_rad_string()[source]

Return analysis points group as a Radiance string.

unload()[source]

Remove all the sources and values from analysis_points.

vectors

Get generator of vectors as x, y , z.

window_groups

A list of window group names that are related to this analysis grid.

exception honeybee.radiance.analysisgrid.EmptyFileError(file_path=None)[source]

Bases: exceptions.Exception

Exception for trying to load results from an empty file.

honeybee.radiance.analysispoint module

class honeybee.radiance.analysispoint.AnalysisPoint(location, direction)[source]

Bases: object

A radiance analysis point.

location

Location of analysis points as (x, y, z).

direction

Direction of analysis point as (x, y, z).

This class is developed to enable honeybee for running daylight control studies with dynamic shadings without going back to several files.

Each AnalysisPoint can load annual total and direct results for every state of each source assigned to it. As a result once can end up with a lot of data for a single point (8760 * sources * states for each source). The data are sorted as integers and in different lists for each source. There are several methods to set or get the data but if you’re interested in more details read the comments under __init__ to know how the data is stored.

In this class:
  • Id stands for ‘the id of a blind state’. Each state has a name and an ID will be assigned to it based on the order of loading.
  • coupledValue stands for a tuple of (total, direct) values. If one the values is not available it will be set to None.
ToString()[source]

Overwrite .NET ToString.

annual_metrics(da_threshhold=None, udi_min_max=None, blinds_state_ids=None, occ_schedule=None)[source]

Calculate annual metrics.

Daylight autonomy, continious daylight autonomy and useful daylight illuminance.

Parameters:
  • da_threshhold – Threshhold for daylight autonomy in lux (default: 300).
  • udi_min_max – A tuple of min, max value for useful daylight illuminance (default: (100, 2000)).
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
  • occ_schedule – An annual occupancy schedule (default: Office Schedule).
Returns:

Daylight autonomy, Continious daylight autonomy, Useful daylight illuminance, Less than UDI, More than UDI

annual_sunlight_exposure(threshhold=None, blinds_state_ids=None, occ_schedule=None, target_hours=None)[source]

Annual Solar Exposure (ASE).

Calculate number of hours that this point is exposed to more than 1000lux of direct sunlight. The point meets the traget in the number of hours is less than 250 hours per year.

Parameters:
  • threshhold – Threshhold for daylight autonomy in lux (default: 1000).
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1. ase must be calculated without dynamic blinds but you can use this option to study the effect of different blind states.
  • occ_schedule – An annual occupancy schedule.
  • target_hours – Target minimum hours (default: 250).
Returns:

Success as a Boolean, Number of hours, Problematic hours

blind_state_id(source, state)[source]

Get state id if available.

blinds_state(hoys=None, blinds_state_ids=None, *args, **kwargs)[source]

Calculte blinds state based on a control logic.

Overwrite self.logic to overwrite the logic for this point.

Parameters:
  • hoys – List of hours of year. If None default is self.hoys.
  • blinds_state_ids – List of state ids for all the sources for an hour. If you want a source to be removed set the state to -1. If not provided a longest combination of states from sources (window groups) will be used. Length of each item in states should be equal to number of sources.
  • args – Additional inputs for self.logic. args will be passed to self.logic
  • kwargs – Additional inputs for self.logic. kwargs will be passed to self.logic
combined_value_by_id(hoy, blinds_state_ids=None)[source]

Get combined value from all sources based on state_id.

Parameters:
  • hoy – hour of the year.
  • blinds_state_ids – List of state ids for all the sources for an hour. If you want a source to be removed set the state to -1.
Returns:

total, direct values.

combined_values_by_id(hoys=None, blinds_state_ids=None)[source]

Get combined value from all sources based on state_id.

Parameters:
  • hoys – A collection of hours of the year.
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
Returns:

Return a generator for (total, direct) values.

coupled_value(hoy, source=None, state=None)[source]

Get total and direct values for an hoy.

coupled_value_by_id(hoy, source_id=None, state_id=None)[source]

Get total and direct values for an hoy.

coupled_values(hoys=None, source=None, state=None)[source]

Get total and direct values for several hours of year.

coupled_values_by_id(hoys=None, source_id=None, state_id=None)[source]

Get total and direct values for several hours of year by source id.

Use this method to load the values if you have the ids for source and state.

Parameters:
  • hoys – A collection of hoys.
  • source_id – Id of source as an integer (default: 0).
  • state_id – Id of state as an integer (default: 0).
daylight_autonomy(da_threshhold=None, blinds_state_ids=None, occ_schedule=None)[source]

Calculate daylight autonomy and continious daylight autonomy.

Parameters:
  • da_threshhold – Threshhold for daylight autonomy in lux (default: 300).
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
  • occ_schedule – An annual occupancy schedule.
Returns:

Daylight autonomy, Continious daylight autonomy

details

Human readable details.

direct_value(hoy, source=None, state=None)[source]

Get direct value for an hour of the year.

direct_values(hoys=None, source=None, state=None)[source]

Get direct values for several hours of the year.

direction

Direction of analysis points as Point3.

duplicate()[source]

Duplicate the analysis point.

classmethod from_json(ap_json)[source]

Create an analysis point from json object. {“location”: [x, y, z], “direction”: [x, y, z]}

classmethod from_raw_values(x, y, z, x1, y1, z1)[source]

Create an analysis point from 6 values.

x, y, z are the location of the point and x1, y1 and z1 is the direction.

has_direct_values

Check if direct values are loaded for this point.

In some cases and based on the recipe only total values are available.

has_values

Check if this point has results values.

hoys

Return hours of the year for results if any.

location

Location of analysis points as Point3.

logic
longest_state_ids

Get longest combination between blind states as blinds_state_ids.

max_values_by_id(hoys=None, blinds_state_ids=None)[source]

Get maximum value for all the hours.

Parameters:
  • hoys – A collection of hours of the year.
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
Returns:

Return a tuple for sum of (total, direct) values.

moys

Return minutes of the year for results if any.

static parse_blind_states(blinds_state_ids)[source]

Parse input blind states.

The method tries to convert each state to a tuple of a list. Use this method to parse the input from plugins.

Parameters:blinds_state_ids – List of state ids for all the sources for an hour. If you want a source to be removed set the state to -1. If not provided a longest combination of states from sources (window groups) will be used. Length of each item in states should be equal to number of sources.
set_coupled_value(value, hoy, source=None, state=None)[source]

Set both total and direct values for a specific hour of the year.

Parameters:
  • value – Value as as tuples (total, direct).
  • hoy – The hour of the year that corresponds to this value.
  • source – Name of the source of light. Only needed in case of multiple sources / window groups (default: None).
  • state – State of the source if any (default: None).
set_coupled_values(values, hoys, source=None, state=None)[source]

Set total and direct values for several hours of the year.

Parameters:
  • values – List of values as tuples (total, direct).
  • hoys – List of hours of the year that corresponds to input values.
  • source – Name of the source of light. Only needed in case of multiple sources / window groups (default: None).
  • state – State of the source if any (default: None).
set_value(value, hoy, source=None, state=None, is_direct=False)[source]

Set value for a specific hour of the year.

Parameters:
  • value – Value as a number.
  • hoy – The hour of the year that corresponds to this value.
  • source – Name of the source of light. Only needed in case of multiple sources / window groups (default: None).
  • state – State of the source if any (default: None).
  • is_direct – Set to True if the value is direct contribution of sunlight.
set_values(values, hoys, source=None, state=None, is_direct=False)[source]

Set values for several hours of the year.

Parameters:
  • values – List of values as numbers.
  • hoys – List of hours of the year that corresponds to input values.
  • source – Name of the source of light. Only needed in case of multiple sources / window groups (default: None).
  • state – State of the source if any (default: None).
  • is_direct – Set to True if the value is direct contribution of sunlight.
source_id(source)[source]

Get source id from source name.

sources

Get sorted list of light sources.

In most of the cases light sources are window groups.

states

Get list of states names for each source.

sum_values_by_id(hoys=None, blinds_state_ids=None)[source]

Get sum of value for all the hours.

This method is mostly useful for radiation and solar access analysis.

Parameters:
  • hoys – A collection of hours of the year.
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
Returns:

Return a tuple for sum of (total, direct) values.

to_json()[source]

Create an analysis point from json object. {“location”: [x, y, z], “direction”: [x, y, z]}

to_rad_string()[source]

Return Radiance string for a test point.

unload()[source]

Unload values and sources.

useful_daylight_illuminance(udi_min_max=None, blinds_state_ids=None, occ_schedule=None)[source]

Calculate useful daylight illuminance.

Parameters:
  • udi_min_max – A tuple of min, max value for useful daylight illuminance (default: (100, 2000)).
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
  • occ_schedule – An annual occupancy schedule.
Returns:

Useful daylight illuminance, Less than UDI, More than UDI

value(hoy, source=None, state=None)[source]

Get total value for an hour of the year.

values(hoys=None, source=None, state=None)[source]

Get values for several hours of the year.

honeybee.radiance.datatype module

Descriptors, factory classes etc for the Radiance library.

class honeybee.radiance.datatype.RadiancePath(name, descriptive_name=None, relative_path=None, check_exists=False, extension=None)[source]

Bases: honeybee.radiance.datatype.RadianceDefault

This input is expected to be a file path.

(Attributes inherited from base-class are explained there.) .. attribute:: name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.
descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

relative_path

Optional. Start folder for relative path. Default is None which returns absolute path.

check_exists

Optional. Check if the file exists. Useful in the case of input files such as epw files etc. where it is essential for those files to exist before the command executes.

extension

Optional. Test the extension of the file.

class honeybee.radiance.datatype.RadianceNumber(name, descriptive_name=None, valid_range=None, accepted_inputs=None, num_type=None, check_positive=False, default_value=None)[source]

Bases: honeybee.radiance.datatype.RadianceDefault

This input is expected to be an integer or floating point number.

name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

accepted_inputs

Optional. List of inputs that are permissible for a particular command option. For example, the -h flag in rcollate only accepts ‘i’ or ‘o’ as options. So, in cases where permissible inputs are known it is recommended that this input be specified.If the user-specified input doesn’t exist in _accepted_inputs then a value error will be raised.

valid_range

Optional. The valid range for several prominent radiance parameters is between 0 and 1. There are likely to be other parameters with similar valid ranges. If _valid_range is specified, a warning will be issued in case the provided input is not within that range.

check_positive

Optional. Check if the number should be greater than or equal to zero.

num_type

Optional. Acceptable inputs are float or int. If specified, the __set__ method will ensure that the value is stored in that type. Also, if the number changes (for example from 4.212 to 4 due to int being specified as _type_), then a warning will be issued.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

class honeybee.radiance.datatype.RadianceBoolFlag(name, descriptive_name=None, default_value=None, is_dual_sign=False)[source]

Bases: honeybee.radiance.datatype.RadianceDefault

This input is expected to a boolean value (i.e. True or False).

name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

is_dual_sign

Set to True if the Boolean should return +/- value. (i.e. +I/-I) (Default: False)

class honeybee.radiance.datatype.RadianceTuple(name, descriptive_name=None, valid_range=None, accepted_inputs=None, tuple_size=None, num_type=None, default_value=None, test_type=True)[source]

Bases: honeybee.radiance.datatype.RadianceDefault

This input is expected to be a numeric tuple like (0.5,0.3,0.2) etc.

(Attributes inherited from base-class are explained there.) .. attribute:: name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.
descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

accepted_inputs

Optional. List of inputs that are permissible for a particular command option. For example, the -h flag in rcollate only accepts ‘i’ or ‘o’ as options. So, in cases where permissible inputs are known it is recommended that this input be specified.If the user-specified input doesn’t exist in _accepted_inputs then a value error will be raised.

valid_range

Optional. The valid range for several prominent radiance parameters is between 0 and 1. There are likely to be other parameters with similar valid ranges. If _valid_range is specified, a warning will be issued in case the provided input is not within that range.

tuple_size

Optional. Specify the number of inputs that are expected.

num_type

Optional. Acceptable inputs are float or int. If specified, the __set__ method will ensure that the value is stored in that type.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

class honeybee.radiance.datatype.RadianceValue(name, descriptive_name=None, accepted_inputs=None, default_value=None, is_joined=False)[source]

Bases: honeybee.radiance.datatype.RadianceDefault

A Radiance string value.

name

Required for all cases. Name of the flag, like ‘ab’ for ‘-ab 5’ in rtrace etc. Note that some of the radiance flags are actually keywords in python. For example -or in rcollate or -as in rtrace. In such cases the name of the flag should be specified as orX or asX respectively. Refer the rcollate definition for an example.

descriptive_name

This is the human-readable name of the flag. For example ‘ambient divisions’ for ‘ab’, ‘view file’ for ‘vf’ etc. These descriptions are usually available in the manual pages of Radiance. Although this is an optional input, for the purposes of debugging and readability, it is strongly suggested that this input be specified for all instances.

accepted_inputs

Optional. List of inputs that are permissible for a particular command option. For example, the -h flag in rcollate only accepts ‘i’ or ‘o’ as options. So, in cases where permissible inputs are known it is recommended that this input be specified.If the user-specified input doesn’t exist in _accepted_inputs then a value error will be raised.

default_value

Optional. The value to be assigned in case no value is assigned by the user. If the default value is not specified then the attribute won’t be considered int the creation of the to_rad_string string representation of the component.

is_joined

Set to True if the Boolean should be returned as a joined output (i.e. -of, -od) (Default: False)

Usage:
o = RadianceValue(‘o’, ‘output format’, default_value=’f’,
accepted_inputs=(‘f’, ‘d’))
class honeybee.radiance.datatype.RadianceReadOnly(name)[source]

Bases: object

A descriptor for creating Readonly values.

honeybee.radiance.factory module

Material utility.

honeybee.radiance.factory.material_from_json(mat_json)[source]

Create Honeybee Radiance material from string.

Parameters:mat_json – A radiance modifier string. The input can be a multi-line string.
Returns:A list of Honeybee Radiance materials.
honeybee.radiance.factory.material_from_string(mat_string)[source]

Create Honeybee Radiance material from string.

Parameters:mat_string – A radiance modifier string. The input can be a multi-line string.
Returns:A list of Honeybee Radiance materials.
honeybee.radiance.factory.primitive_from_json(prm_json)[source]
Parameters:prm_json – A radiance modifier as a dictionary.
Returns:A list of Honeybee Radiance primitives. If input includes polygons and materials, materials will be added to polygons as modifiers. This method will return all the polygons and only the materials that are not used.
honeybee.radiance.factory.primitive_from_string(prm_string)[source]

Create Honeybee Radiance primitives from string.

Parameters:prim_string – A radiance modifier string. The input can be a multi-line string.
Returns:A list of Honeybee Radiance primitives. If input includes polygons and materials, materials will be added to polygons as modifiers. This method will return all the polygons and only the materials that are not used.

honeybee.radiance.imagecollection module

Image collection class.

Image collection class is similar to AnalysisGrid but for image-based analysis. Use ImageCollection to collect the path to different images and generate their combinations using pcomb.

class honeybee.radiance.imagecollection.ImageCollection(name='untitled', output_folder=None)[source]

Bases: object

Image collection.

Image collection class is similar to AnalysisGrid but for image-based analysis. Use ImageCollection to collect the path to different images and generate their combinations using pcomb.

ToString()[source]

Overwrite ToString .NET method.

add_coupled_image_files(file_paths, hoys, source=None, state=None)[source]

Set total, direct and sun file paths for several hours of the year.

Parameters:
  • file_paths – List of filepaths as tuples (total, direct, sun).
  • hoys – List of hours of the year that corresponds to input values.
  • source – Name of the source of light. Only needed in case of multiple sources / window groups (default: None).
  • state – State of the source if any (default: None).
add_image_file(file_path, hoy, source=None, state=None, index=0)[source]

Set value for a specific hour of the year.

Parameters:
  • value – Value as a number.
  • hoy – The hour of the year that corresponds to this value.
  • source – Name of the source of light. Only needed in case of multiple sources / window groups (default: None).
  • state – State of the source if any (default: None).
  • index – 0 > Default scene, 1 > Direct, 2 > Sun.
add_image_files(file_paths, hoys, source=None, state=None, index=0)[source]

Set values for several hours of the year.

Parameters:
  • file_paths – List of file paths as string.
  • hoys – List of hours of the year that corresponds to input values.
  • source – Name of the source of light. Only needed in case of multiple sources / window groups (default: None).
  • state – State of the source if any (default: None).
  • index – 0 > Default scene, 1 > Direct, 2 > Sun.
blind_state_id(source, state)[source]

Get state id if available.

details

Human readable details.

generate_combined_image_by_id(hoy, blinds_state_ids=None, mode=0, output=None)[source]

Get combined value from all sources based on state_id.

Parameters:
  • hoy – hour of the year.
  • blinds_state_ids – List of state ids for all the sources for an hour. If you want a source to be removed set the state to -1.
  • mode – 0 > combined scene, 1 > Default scene, 2 > Direct, 3 > Sun.
Returns:

combined image from all sources.

generate_combined_images_by_id(hoys=None, blinds_state_ids=None, mode=0, outputs=None)[source]

Get combined value from all sources based on state_id.

Parameters:
  • hoys – A collection of hours of the year.
  • blinds_state_ids – List of state ids for all the sources for input hoys. If you want a source to be removed set the state to -1.
Returns:

Return a generator for (total, direct) values.

generate_image(hoy, source=None, state=None, mode=0, output=None)[source]

Generate the image for an hour of the year for input blindStates.

generate_image_by_id(hoy, sid=None, stateid=None, mode=0, output=None)[source]

Generate the image for an hour of the year for input blindStates.

generate_images(hoys, source=None, state=None, mode=0, outputs=None)[source]

Generate images for several hours of the year for input blindStates.

generate_images_by_id(hoys, sid=None, stateid=None, mode=0, outputs=None)[source]

Generate images for several hours of the year for input blindStates.

get_image(hoy, source=None, state=None)[source]

Get list of images for an hour in the year.

get_image_by_id(hoy, sid=None, stateid=None)[source]

Get list of images for an hour in the year.

get_images(hoys, source=None, state=None)[source]

Get list of images for an hour in the year.

get_images_by_id(hoys, sid=None, stateid=None)[source]

Get list of images for an hour in the year.

has_values

Check if this point has results values.

hoys

Return hours of the year for results if any.

static parse_blind_states(blinds_state_ids)[source]

Parse input blind states.

The method tries to convert each state to a tuple of a list. Use this method to parse the input from plugins.

Parameters:blinds_state_ids – List of state ids for all the sources for an hour. If you want a source to be removed set the state to -1. If not provided a longest combination of states from sources (window groups) will be used. Length of each item in states should be equal to number of sources.
source_id(source)[source]

Get source id from source name.

source_state_name(sid, stateid)[source]

Get source and state name based on ids.

sources

Get sorted list of light sources.

In most of the cases light sources are window groups.

states

Get list of states names for each source.

honeybee.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.radiance.material and honeybee.radiance.geometry

http://radsite.lbl.gov/radiance/refer/ray.html

class honeybee.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 = set(['instance', 'cylinder', 'polygon', 'cup', 'tube', 'sphere', 'source', 'mesh', 'cone', 'ring', 'bubble'])
MATERIALTYPES = set(['metfunc', 'plasdata', 'plastic2', 'mirror', 'mist', 'BRTDfunc', 'transdata', 'ashik2', 'antimatter', 'plastic', 'BSDF', 'mixedfunc', 'metdata', 'illum', 'void', 'transfunc', 'trans2', 'metal2', 'glass', 'prism1', 'plasfunc', 'interface', 'dielectric', 'glow', 'prism2', 'light', 'metal', 'trans', 'spotlight'])
MIXTURETYPES = set(['mixtext', 'mixpict', 'mixdata', 'mixfunc'])
MODIFIERTYPES = set(['plastic2', 'metal2', 'metfunc', 'colorpict', 'ashik2', 'void', 'colordata', 'illum', 'trans2', 'transfunc', 'glass', 'prism1', 'brighttext', 'plasfunc', 'mirror', 'interface', 'prism2', 'mist', 'dielectric', 'BRTDfunc', 'glow', 'mixtext', 'brightdata', 'texdata', 'mixpict', 'texfunc', 'transdata', 'light', 'mixfunc', 'plasdata', 'antimatter', 'plastic', 'BSDF', 'brightfunc', 'mixedfunc', 'colortext', 'metal', 'trans', 'colorfunc', 'spotlight', 'mixdata', 'metdata'])
NONEOPAQUETYPES = set(['mist', 'transdata', 'mixfunc', 'transfunc', 'trans2', 'glass', 'prism1', 'BSDF', 'BRTDfunc', 'prism2', 'trans', 'dielectric'])
PATTERNTYPES = set(['brightdata', 'colorpict', 'colordata', 'colorfunc', 'brighttext', 'brightfunc', 'colortext'])
TEXTURETYPES = set(['texdata', 'texfunc'])
TYPES = set(['cylinder', 'brightdata', 'metfunc', 'metal', 'illum', 'colorfunc', 'sphere', 'brighttext', 'cone', 'mirror', 'ring', 'mist', 'BRTDfunc', 'instance', 'mixfunc', 'texdata', 'polygon', 'transdata', 'tube', 'ashik2', 'antimatter', 'plastic', 'source', 'BSDF', 'brightfunc', 'mixedfunc', 'bubble', 'metdata', 'plastic2', 'colorpict', 'void', 'colordata', 'transfunc', 'trans2', 'metal2', 'glass', 'prism1', 'mesh', 'plasfunc', 'interface', 'dielectric', 'glow', 'mixtext', 'mixpict', 'texfunc', 'prism2', 'light', 'cup', 'plasdata', 'colortext', 'trans', 'spotlight', 'mixdata'])
ToString()[source]

Overwrite .NET ToString.

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.

isRadianceGeometry

Indicate if this object is a Radiance geometry.

isRadianceMaterial

Indicate if this object is a Radiance material.

isRadianceMixture

Indicate if this object is a Radiance geometry.

isRadiancePattern

Indicate if this object is a Radiance geometry.

isRadiancePrimitive

Indicate that this object is a Radiance primitive.

isRadianceTexture

Indicate if this object is a Radiance geometry.

is_opaque

Indicate if the primitive is opaque.

This property is used to separate opaque and non-opaque surfaces.

modifier

Get/set primitive modifier.

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

}

to_rad_string(minimal=False, include_modifier=True)[source]

Return full radiance definition.

type

Get/set primitive type.

values
class honeybee.radiance.primitive.Void[source]

Bases: object

Void modifier.

ToString()[source]

Overwrite .NET ToString.

can_be_modifier

True.

is_opaque

False for a void.

name

Void.

to_json()[source]

Return void.

to_rad_string()[source]

Return full radiance definition.

honeybee.radiance.properties module

Radiance Properties for HBSurfaces.

class honeybee.radiance.properties.RadianceProperties(material=None, black_material=None, glow_material=None)[source]

Bases: object

Radiance properties for HBSurface.

Parameters:
  • material – Radiance material. Use honeybee.radiace.material to create a radiance material (Default: None).
  • black_material – A material that will be used for blacking out this surface or in direct daylight calculations. By default black material is set to black color with no reflectance. In cases such as interior glass black material should be set to the original glass material.
  • glow_material – A material that will be used for daylight coefficeint calculation. By default black material is set to whitw glow.
ToString()[source]

Overwrite .NET ToString method.

black_material

Radiance black material.

This material is used for direct daylight calculation.

duplicate()[source]

Duplicate RadianceProperties.

glow_material

Radiance glow material.

This material will be used for daylight coefficeint calculation.

isRadianceProperties

Indicate this object is RadianceProperties.

is_black_material_set_by_user

Return True if black material is set by user.

is_glow_material_set_by_user

Return True if glow material is set by user.

material

Return Radiance Material.

to_rad_string()[source]

Get Radiance definition for honeybee surfaces if any.

honeybee.radiance.radfile module

Radiance file.

Create, modify and generate radiance files from a collection of hbobjects.

class honeybee.radiance.radfile.RadFile(hb_surfaces, additional_materials=None)[source]

Bases: object

Radiance file.

Create, modify and generate radiance files from a collection of hbobjects. You can also use this class for a single HBSurface or HBZone to get to_rad_string.

hb_surfaces

A collection of honeybee surfaces.

additional_materials

Additional radiance material objects that will be added on top of the file.

ToString()[source]

Overwrite .NET’s ToString.

additional_materials
static copy_and_replace_xml_files(material_string, bsdf_materials, target_folder)[source]

Find and replace xml files full path and copy XML files under bsdf folder.

The root folder in Radiance is the place that commands are executed which in honeybee is the root so the relative path is scene/bsdf this will make this mathod fairly inflexible.

Parameters:
  • material_string – A joined string of radiance materials.
  • bsdf_materials – A collection of BSDF materials.
  • target_folder – The study folder where the materials will be written.
find_bsdf_materials(mode=1)[source]

Return a list fo BSDF materials if any.

classmethod from_file(file_paths)[source]

create a RadFile from Radiance files.

geometries(mode=1, join=False, flipped=False)[source]

Get geometry as a list of radiance strings.

Parameters:
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • join – Set to True to join the output strings (Default: False).
  • flipped – Flip the surface geometry.
static get_surface_rad_string(surface, flipped=False)[source]

Get the polygon definition for a honeybee surface.

This is a static method. For the full string try geometries method.

hb_surfaces
static header()[source]
materials(mode=1, join=False, blacked=False, glowed=False)[source]

Get materials as a list of radiance strings.

Parameters:
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • join – Set to True to join the output strings (Default: False).
  • blacked – If True materials will all be set to plastic 0 0 0 0 0.
radiance_material_names(mode=1)[source]

Get list of material names.

Parameters:mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
to_rad_string(mode=1, include_materials=True, flipped=False, blacked=False, glowed=False)[source]

Get full radiance file as a string.

Parameters:
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • include_materials – Set to False if you only want the geometry definition (default:True).
  • flipped – Flip the surface geometry.
  • blacked – If True materials will all be set to plastic 0 0 0 0 0.
write(folder, filename, mode=1, include_materials=True, flipped=False, blacked=False, glowed=False, mkdir=False)[source]

write materials and geometries to a file.

Parameters:
  • folder – Target folder.
  • filename – File name and extension as a string.
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • include_materials – Set to False if you only want the geometry definition (default:True).
  • flipped – Flip the surface geometry.
  • blacked – If True materials will all be set to plastic 0 0 0 0 0.
  • mkdir – Create the folder if does not exist already.
write_black_material(folder, filename, mkdir=False)[source]

Write black material to a file.

write_geometries(folder, filename, mode=1, flipped=False, mkdir=False)[source]

write geometries to a file. :param folder: Target folder. :param filename: File name and extension as a string. :param mode: An integer 0-2 (Default: 1)

0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
Parameters:
  • flipped – Flip the surface geometry.
  • mkdir – Create the folder if does not exist already.
write_geometries_blacked(folder, filename, mode=0, flipped=False, mkdir=False)[source]

Write all the surfaces to a file with BlackMaterial.

Use this method to write objects like window-groups.

write_geometries_glowed(folder, filename, mode=0, flipped=False, mkdir=False)[source]

Write all the surfaces to a file with WhiteGlow.

Use this method to write objects like window-groups.

write_glow_material(folder, filename, mkdir=False)[source]

Write white glow material to a file.

write_materials(folder, filename, mode=1, blacked=False, glowed=False, mkdir=False)[source]

Write materials to a file.

Parameters:
  • folder – Target folder.
  • filename – File name and extension as a string.
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • include_materials – Set to False if you only want the geometry definition (default:True).
  • flipped – Flip the surface geometry.
  • blacked – If True materials will all be set to plastic 0 0 0 0 0 0 0.
  • glowed – If True materials will all be set to glow 0 0 1 1 1 0. You can either use blacked or glowed.
  • mkdir – Create the folder if does not exist already.

honeybee.radiance.radparser module

A collection of auxiliary funtions for working with radiance files and objects.

honeybee.radiance.radparser.parse_from_file(file_path)[source]

Parse Radiance file and return a list of radiance objects as separate strings.

Parameters:file_path – Path to Radiance file
Returns:A list of strings. Each string represents a different Radiance Object
Usage:
get_radiance_objects_from_file(“C:/ladybug/21MAR900/imageBasedSimulation/21MAR900.rad”)
honeybee.radiance.radparser.parse_from_string(full_string)[source]

separate a Radiance file string into multiple strings for each object.

Parameters:rad_fileString – Radiance data as a single string. The string can be multiline.
Returns:A list of strings. Each string represents a different Radiance Object

honeybee.radiance.scene module

Radiance scene.

class honeybee.radiance.scene.Scene(opaque_surfaces=None, non_opaque_surfaces=None, dynamic_surfaces=None, static_scene=None)[source]

Bases: object

Radiance scene.

A scene includes all the surfaces and modifiers in a radiance model. Sky is not included in the scene and should be added to the secne for simulation based on the recipe.

Parameters:
  • opaque_surfaces – A list of surfaces with opaque modifiers.
  • non_opaque_surfaces – A list of non_opaque surfaces like glass and tranlucent surfaces.
  • dynamic_surfaces – A list of dynamic surfaces. Dynamic surfaces are surfaces like window groups which have more than one state.
  • static_scene – A honeybee StaticScene which inludes radiance files which will be included in simulations as part of the octree.
ToString()[source]

Overwrite ToString .NET method.

analemma_folder

Folder to write analemma files.

aperture_folder

Folder to write aperture surfaces.

bsdf_folder

Folder to write bsdf materials.

create_folder_structure(folder, remove_content=False, include_readme=False)[source]

Create folder structure for honeybee daylight study.

Parameters:
  • folder – Target folder to write the scene.
  • remove_content – Set to True to remove current content (default: False).
  • included_readme – Include readme.md files in each folder which includes a brief description of files inside each folder (default: False)
dynamic_aperture_file(surface, state=0)[source]

Path to file for a dynamic aperture aka window-group.

Parameters:
  • surface – Name of dynamic aperture.
  • state – Current state of dynamic aperture. -2 > glowed, -1 > blacked, 0 > default material, 1 > first state, …
dynamic_surfaces
electric_lighting_folder

Folder to write electric lighting IES files.

classmethod from_folder(folder)[source]

Create scene from a project folder.

The folder should be strutured as a standard Honeybee folder for daylight. Use create_folder_structure method to create empty folders with README files.

classmethod from_surfaces(surfaces=None, static_scene=None)[source]

Create scene from a list of honeybee surfaces.

This method separates opaque, non_opaque and dynamic surfaces based on modifiers.

grid_folder

Folder to write analysis grid files.

light_source_folder

Folder to write light sourcesself.

light sources include sky, enalemma and lighting fixture files.

matrix_folder

Folder to write daylight coeff matrices files.

mixed_folder

Folder to write surfaces with mixed materials.

non_opaque_surfaces
octree_file()[source]

List of input files for creating octree of the scene.

octree_file_blackedout()[source]

List of input files for a blackedout octree.

target_dynamic_surface is the dynamic surface which should not be blacked out.

octree_folder

Folder to write octree files.

opaque_files(blackedout=False)[source]

List of files for opaque surfaces.

opaque_folder

Folder to write opaque surfaces.

opaque_geometry_file

Full path to opaque geometry file.

opaque_geometry_file_balckedout

Full path to blackedout opaque geometry file.

opaque_material_file

Full path to material file for opaque geometries.

opaque_material_file_balckedout

Full path to material file for blackedout opaque geometries.

opaque_surfaces

List of surfaces with opaque modifiers.

options_folder

Folder to write radiance options for radiance commands.

output_folder

Folder to write output files.

result_folder

Folder to write final result files.

sky_folder

Folder to write sky files.

static_aperture_file

Path to file for static aperture in scene.

This file includes all non-opa

static_scene_non_opaque_folder

Folder to write static radiance files added as StaticScene.

static_scene_opaque_folder

Folder to write static radiance files added as StaticScene.

temp_folder

Folder to write temporary files.

The content inside this folder will be removed once the simulation is over.

view_folder

Folder to write view files.

wea_folder

Folder to write wea file.

write(folder)[source]

Write all geometries to folder.

write_dynamic_folder(folder)[source]

Write files to dynamic folder.

Files will be written to folder/self.non_opaque_folder. Use non_opaque_files method to see the list of files which will be written to opaque folder.

write_non_opaque_folder(folder)[source]

Write files to non_opaque folder.

Files will be written to folder/self.non_opaque_folder. Use non_opaque_files method to see the list of files which will be written to opaque folder.

write_opaque_folder(folder)[source]

Write files to opaque_folder.

Files will be written to folder/self.opaque_folder. Use opaque_files method to see the list of files which will be written to opaque folder.

write_static_scene(folder)[source]

Write static_scene to folder.

Files will be written to folder/self.static_scene_folder.

honeybee.radiance.staticscene module

Radiance scene.

class honeybee.radiance.staticscene.StaticScene(files, copy_local=True, overwrite=False)[source]

Bases: object

Radiance base scene.

Use this class to create a base for the radiance studies by using a number of radiance files. The main advantage of creating a scene is to avoid re-creating the geometries and writing the files in parametric studies.

Parameters:
  • files – List of radiance files. Valid files are *.rad, *.mat and *.oct.
  • copy_local – Set to True to copy the files to the analysis folder (Default: True).
  • overwrite – Set to True to overwrite the files if already exist.
ToString()[source]

Overwrite ToString .NET method.

file_count

Number of total files in the scene.

files

A named tuple of radiance files.

keys are: (mat, oct, rad)

to_rad_string()[source]

Return list of files as single string.

honeybee.radiance.view module

Create a radiance view.

class honeybee.radiance.view.View(name, view_point=None, view_direction=None, view_up_vector=None, view_type=0, view_h_size=60, view_v_size=60, x_resolution=64, y_resolution=64, view_shift=0, view_lift=0)[source]

Bases: object

A radiance view.

view_point

Set the view point (-vp) to (x, y, z). This is the focal point of a perspective view or the center of a parallel projection. Default: (0, 0, 0)

view_direction

Set the view direction (-vd) vector to (x, y, z). The length of this vector indicates the focal distance as needed by the pixle depth of field (-pd) in rpict. Default: (0, 0, 1)

view_up_vector

Set the view up (-vu) vector (vertical direction) to (x, y, z) default: (0, 1, 0).

view_type
Set view type (-vt) to one of the choices below.
0: Perspective (v) 1: Hemispherical fisheye (h) 2: Parallel (l) 3: Cylindrical panorma (c) 4: Angular fisheye (a) 5: Planisphere [stereographic] projection (s)

For more detailed description about view types check rpict manual page: (http://radsite.lbl.gov/radiance/man_html/rpict.1.html)

view_h_size

Set the view horizontal size (-vh). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.

view_v_size

Set the view vertical size (-vv). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.

x_resolution

Set the maximum x resolution (-x) to an integer.

y_resolution

Set the maximum y resolution (-y) to an integer.

view_shift

Set the view shift (-vs). This is the amount the actual image will be shifted to the right of the specified view. This option is useful for generating skewed perspectives or rendering an image a piece at a time. A value of 1 means that the rendered image starts just to the right of the normal view. A value of −1 would be to the left. Larger or fractional values are permitted as well.

view_lift

Set the view lift (-vl) to a value. This is the amount the actual image will be lifted up from the specified view.

Usage:

v = View() # set x and y resolution v.x_resolution = v.y_resolution = 600 # add a fore clip v.add_fore_clip(distance=100) print(v)

> -vtv -vp 0.000 0.000 0.000 -vd 0.000 0.000 1.000 -vu 0.000 1.000
0.000 -vh 60.000 -vv 60.000 -x 600 -y 600 -vo 100.000

# split the view into a view grid gridViews = v.calculate_view_grid(2, 2) for g in gridViews:

print(g)
> -vtv -vp 0.000 0.000 0.000 -vd 0.000 0.000 1.000 -vu 0.000 1.000
0.000 -vh 29.341 -vv 32.204 -x 300 -y 300 -vs -0.500 -vl -0.500 -vo 100.000
> -vtv -vp 0.000 0.000 0.000 -vd 0.000 0.000 1.000 -vu 0.000 1.000
0.000 -vh 29.341 -vv 32.204 -x 300 -y 300 -vs 0.500 -vl -0.500 -vo 100.000
> -vtv -vp 0.000 0.000 0.000 -vd 0.000 0.000 1.000 -vu 0.000 1.000
0.000 -vh 29.341 -vv 32.204 -x 300 -y 300 -vs -0.500 -vl 0.500 -vo 100.000
> -vtv -vp 0.000 0.000 0.000 -vd 0.000 0.000 1.000 -vu 0.000 1.000
0.000 -vh 29.341 -vv 32.204 -x 300 -y 300 -vs 0.500 -vl 0.500 -vo 100.000
ToString()[source]

Overwrite .NET ToString.

add_fore_clip(distance)[source]

Set view fore clip (-vo) at a distance from the view point.

The plane will be perpendicular to the view direction for perspective and parallel view types. For fisheye view types, the clipping plane is actually a clipping sphere, centered on the view point with radius val. Objects in front of this imaginary surface will not be visible. This may be useful for seeing through walls (to get a longer perspective from an exterior view point) or for incremental rendering. A value of zero implies no foreground clipping. A negative value produces some interesting effects, since it creates an inverted image for objects behind the viewpoint.

calculate_view_grid(x_div_count=1, y_div_count=1)[source]

Return a list of views for grid of views.

Views will be returned row by row from right to left. :param x_div_count: Set number of divisions in x direction (Default: 1). :param y_div_count: Set number of divisions in y direction (Default: 1).

Returns:A tuple of views. Views are sorted row by row from right to left.
get_view_dimension(max_x=None, max_y=None)[source]

Get dimensions for this view as x, y.

This method is same as vwrays -d

isView

Return True for view.

name = None

View name.

save_to_file(working)[source]

Save view to a file.

to_rad_string()[source]

Return full Radiance definition.

view_direction = (0, 0, 1)

Set the view direction (-vd) vector to (x, y, z).

view_h_size = None

Set the view horizontal size (-vs). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.

view_lift = None

Set the view lift (-vl) to a value. This is the amount the actual image will be lifted up from the specified view.

view_point = (0, 0, 0)

Set the view point (-vp) to (x, y, z).

view_shift = None

Set the view shift (-vs). This is the amount the actual image will be shifted to the right of the specified view.

view_type

Set and get view type (-vt) to one of the choices below (0-5). 0: Perspective (v), 1: Hemispherical fisheye (h), 2: Parallel (l), 3: Cylindrical panorma (c), 4: Angular fisheye (a), 5: Planisphere [stereographic] projection (s)

view_up_vector = (0, 1, 0)

Set the view up (-vu) vector (vertical direction) to (x, y, z).

view_v_size = None

Set the view vertical size (-vv). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.

x_resolution = None

Set the maximum x resolution (-x).

y_resolution = None

Set the maximum y resolution (-y).

Module contents

Honeybee Radiance libraries.