ladybug_vtk.from_display_geometry module

Functions to translate ladybug display geometry objects into VTK polydata objects.

This module currently ignores all the display attributes and only translates the geometry.

ladybug_vtk.from_display_geometry.from_displayarc3d(arc3d: DisplayArc3D, resolution: int = 3) PolyData[source]

Create Polydata from a Ladybug DisplayArc3D object.

Parameters:
  • arc3d – A Ladybug DisplayArc3D object.

  • resolution – The number of degrees per subdivision. The default is 3 that creates 120 segments for an full circle.

Returns:

Polydata containing an arc.

ladybug_vtk.from_display_geometry.from_displaycone(cone: DisplayCone, resolution: int = 2, cap: bool = True) PolyData[source]

Create Polydata from a Ladybug DisplayCone.

Parameters:
  • cone – A Ladybug DisplayCone object.

  • resolution – The number of segments into which the cone will be divided. If set to 0, a line will be created. If set to 1, a single triangle will be created. If set to 2, two crossed triangles will be created. If set to greater than 2, a 3D cone with the number of sides equal to the resolution will be created. Defaults to 2.

  • cap – Boolean to indicate whether the cone should capped or not. Default to True.

Returns:

Polydata containing a cone.

ladybug_vtk.from_display_geometry.from_displaycylinder(cylinder: DisplayCylinder, resolution: int = 50, cap: bool = True) PolyData[source]

Create Polydata from a Ladybug DisplayCylinder.

Parameters:
  • cylinder – A Ladybug DisplayCylinder object.

  • resolution – The number of segments into which the cylinder will be divided. Defaults to 25.

  • cap – Boolean to indicate whether the cylinder should capped or not. Default to True.

Returns:

Polydata containing a cylinder.

ladybug_vtk.from_display_geometry.from_displayface3d(face: DisplayFace3D) PolyData[source]

Create Polydata from a Ladybug DisplayFace3D.

Parameters:

face – A Ladybug DisplayFace3D object.

Returns:

Polydata containing face and points of a face.

ladybug_vtk.from_display_geometry.from_displayline2d(line: DisplayLineSegment2D) PolyData[source]

Create Polydata from a Ladybug DisplayLineSegment3D object.

Parameters:

line – A Ladybug DisplayLineSegment3D object.

Returns:

Polydata containing a line.

ladybug_vtk.from_display_geometry.from_displayline3d(line: DisplayLineSegment3D) PolyData[source]

Create Polydata from a Ladybug DisplayLineSegment3D object.

Parameters:

line – A Ladybug DisplayLineSegment3D object.

Returns:

Polydata containing a line.

ladybug_vtk.from_display_geometry.from_displaymesh2d(mesh: DisplayMesh2D) PolyData[source]

Create Polydata from a Ladybug DisplayMesh2D.

Parameters:

mesh – A Ladybug DisplayMesh2D object.

Returns:

Polydata containing face and points of a mesh.

ladybug_vtk.from_display_geometry.from_displaymesh3d(mesh: DisplayMesh3D) PolyData[source]

Create Polydata from a Ladybug DisplayMesh3D.

Parameters:

mesh – A Ladybug DisplayMesh3D object.

Returns:

Polydata containing face and points of a mesh.

ladybug_vtk.from_display_geometry.from_displaypoint2d(point: DisplayPoint2D) PolyData[source]

Create Polydata from a Ladybug DisplayPoint2D object.

Parameters:

point – A ladybug DisplayPoint object.

Returns:

Polydata containing a single point.

ladybug_vtk.from_display_geometry.from_displaypoint3d(point: DisplayPoint3D) PolyData[source]

Create Polydata from a Ladybug DisplayPoint3D object.

Parameters:

point – A ladybug DisplayPoint3D object.

Returns:

Polydata containing a single point.

ladybug_vtk.from_display_geometry.from_displaypoints2d(points: List[DisplayPoint2D], join: bool = False) PolyData[source]

Create Polydata from a list of Ladybug Point2D objects.

Parameters:
  • points – A list of Ladybug DisplayPoint2D objects.

  • join – Boolean to indicate whether the points should be joined into a polyline.

Returns:

Polydata containing all points or a polyline.

ladybug_vtk.from_display_geometry.from_displaypoints3d(points: List[DisplayPoint3D], join: bool = False) PolyData[source]

Create Polydata from a list of Ladybug DisplayPoint3D objects.

Parameters:
  • points – A list of Ladybug DisplayPoint3D objects.

  • join – Boolean to indicate whether the points should be joined into a polyline.

Returns:

Polydata containing all points or a polyline.

ladybug_vtk.from_display_geometry.from_displaypolyface3d(polyface: DisplayPolyface3D) PolyData[source]

Create Polydata from a Ladybug DisplayPolyface3D.

Parameters:

polyface – A Ladybug DisplayPolyface3D object.

Returns:

A list of Polydata. Each polydata contains a face and points of a face of Polyface.

ladybug_vtk.from_display_geometry.from_displaypolyline2d(polyline: DisplayPolyline2D) PolyData[source]

Create Polydata from a Ladybug Polyline3D object.

Parameters:

polyline – A Ladybug DisplayPolyline3D object.

Returns:

Polydata containing a polyline.

ladybug_vtk.from_display_geometry.from_displaypolyline3d(polyline: DisplayPolyline3D) PolyData[source]

Create Polydata from a Ladybug DisplayPolyline3D object.

Parameters:

polyline – A Ladybug DisplayPolyline3D object.

Returns:

Polydata containing a polyline.

ladybug_vtk.from_display_geometry.from_displaysphere(sphere: DisplaySphere, resolution: int = 50) PolyData[source]

Create Polydata from a Ladybug DisplaySphere.

Parameters:
  • sphere – A Ladybug DisplaySphere object.

  • resolution – The number of segments into which the sphere will be divided. Defaults to 25.

Returns:

Polydata containing a sphere.

ladybug_vtk.from_display_geometry.from_displaytext3d(text: DisplayText3D) PolyData[source]