ladybug_geometry.geometry3d.cone module

Cone

class ladybug_geometry.geometry3d.cone.Cone(vertex, axis, angle)[source]

Bases: object

Cone object.

Parameters
  • vertex – A Point3D at the tip of the cone.

  • axis – A Vector3D representing the direction and height of the cone. The vector extends from the vertex to the center of the base.

  • angle – An angle in radians representing the half angle between the axis and the surface.

Properties:
  • vertex

  • axis

  • angle

  • height

  • slant_height

  • radius

  • area

  • volume

  • min

  • max

  • base

ToString()[source]

Overwrite .NET ToString.

duplicate()[source]

Get a copy of this object.

classmethod from_dict(data)[source]

Create a Cone from a dictionary.

Parameters

data – A python dictionary in the following format

{
    "type": "Cone"
    "vertex": (10, 0, 0),
    "axis": (0, 0, 1),
    "angle": 1.0
}
move(moving_vec)[source]

Get a cone that has been moved along a vector.

Parameters

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

reflect(normal, origin)[source]

Get a cone reflected across a plane with the input normal vector and origin.

Parameters
  • normal – A Vector3D representing the normal vector for the plane across which the arc will be reflected. THIS VECTOR MUST BE NORMALIZED.

  • origin – A Point3D representing the origin from which to reflect.

rotate(axis, angle, origin)[source]

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

Right hand rule applies: If axis has a positive orientation, rotation will be clockwise. If axis has a negative orientation, rotation will be counterclockwise.

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

  • angle – An angle for rotation in radians.

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

rotate_xy(angle, origin)[source]

Get a cone that is rotated counterclockwise in the world XY plane by an angle.

Parameters
  • angle – An angle for rotation in radians.

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

scale(factor, origin=None)[source]

Scale a cone by a factor from an origin point.

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

  • origin – A 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 Cone as a dictionary.

property angle

Angle of cone

property area

Surface area of a cone

property axis

Axis of cone.

property base

Get an Arc3D representing the circular base of the cone.

property height

Height of cone

property max

A Point3D for the maximum bounding box vertex around this geometry.

property min

A Point3D for the minimum bounding box vertex around this geometry.

property radius

Radius of a cone

property slant_height

Slant height of a cone

property vertex

Vertex of cone.

property volume

Volume of a cone