ladybug_display.geometry3d.plane module

A plane that can be displayed in 3D space.

class ladybug_display.geometry3d.plane.DisplayPlane(geometry, color=None, show_axes=False, show_grid=False)[source]

Bases: _SingleColorBase3D

A plane in 3D space with display properties.

Parameters
  • geometry – A ladybug-geometry Plane object.

  • color – A ladybug Color object. If None, a default black color will be used. (Default: None).

  • show_axes – A boolean to note whether the plane should be displayed with XY axes instead of just an origin point and a normal vector.

  • show_grid – A boolean to note whether the plane should be displayed with a grid.

Properties:
  • geometry

  • color

  • show_axes

  • show_grid

  • o

  • n

  • x

  • y

  • k

  • user_data

ToString()
duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Initialize a DisplayPlane from a dictionary.

Parameters

data – A dictionary representation of an DisplayPlane object.

move(moving_vec)

Move this geometry along a vector.

Parameters

moving_vec – A ladybug_geometry Vector with the direction and distance to move the geometry.

reflect(plane)

Reflect this geometry across a plane.

Parameters

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

rotate(axis, angle, origin)

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

Parameters
  • axis – A ladybug_geometry Vector3D axis representing the axis of rotation.

  • angle – An angle for rotation in degrees.

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

rotate_xy(angle, origin)

Rotate this geometry counterclockwise in the world XY plane by an 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)

Scale this geometry by a factor from an origin point.

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

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

to_dict()[source]

Return DisplayPlane as a dictionary.

property color

Get or set a color for this object.

property geometry

Get a ladybug_geometry object.

property k

Get a number for the constant of the plane.

property n

Get a Vector3D representing the normal of the plane.

property o

Get a Point3D representing the origin of the plane.

property show_axes

Get or set a boolean for whether to display the XY axes of the plane.

property show_grid

Get or set a boolean for whether to display the grid of the plane.

property user_data

Get or set an optional dictionary for additional meta data for this object.

This will be None until it has been set. All keys and values of this dictionary should be of a standard Python type to ensure correct serialization of the object to/from JSON (eg. str, float, int, list, dict)

property x

Get aVector3D representing the x axis of the plane.

property y

Get a Vector3D representing the y axis of the plane.