honeybee_radiance.sensor module

A light version of test points.

class honeybee_radiance.sensor.Sensor(pos=None, dir=None)[source]

Bases: object

A radiance sensor.

Parameters
  • pos – Position of sensor as (x, y, z) (Default: (0, 0, 0)).

  • dir – Direction of sensor as (x, y, z) (Default: (0, 0, 1)).

Properties:
  • pos

  • dir

ToString()[source]

Overwrite .NET ToString.

duplicate()[source]

Duplicate the sensor.

classmethod from_dict(sensor_dict)[source]

Create a sensor from dictionary.

{
'pos': [0, 0, 0],  # array of 3 numbers for the sensor position
'dir': [0, 0, 1]  # array of 3 numbers for the sensor direction
}
classmethod from_raw_values(x=0, y=0, z=0, dx=0, dy=0, dz=1)[source]

Create a sensor from 6 values.

x, y, z are the position of the point and dx, dy and dz is the direction.

move(moving_vec)[source]

Move this sensor along a vector.

Parameters

moving_vec – A ladybug_geometry Vector3D with the direction and distance to move the sensor.

reflect(plane)[source]

Reflect this sensor across a plane.

Parameters

plane – A ladybug_geometry Plane across which the object will be reflected.

rotate(angle, axis, origin)[source]

Rotate this sensor by a certain angle around an axis and origin.

Parameters
  • angle – An angle for rotation in degrees.

  • axis – Rotation axis as a Vector3D.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

rotate_xy(angle, origin)[source]

Rotate this sensor counterclockwise in the world XY plane by a certain angle.

Parameters
  • angle – An angle in degrees.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

scale(factor, origin=None)[source]

Scale this sensor by a factor from an origin point.

Parameters
  • factor – A number representing how much the object should be scaled.

  • origin – A ladybug_geometry Point3D representing the origin from which to scale. If None, it will be scaled from the World origin (0, 0, 0).

to_dict()[source]

Get the sensor as a dictionary.

{
'pos': [0, 0, 0],  # array of 3 numbers for the sensor position
'dir': [0, 0, 1]  # array of 3 numbers for the sensor direction
}
to_radiance()[source]

Return Radiance string for a test point.

property dir

Get or set the dir of the sensor as a tuple of 3 (x, y, z) numbers.

property pos

Get or set the position of the sensor as a tuple of 3 (x, y, z) numbers.