ladybug_rhino.togeometry module

Functions to create Ladybug geometries from Rhino geometries.

ladybug_rhino.togeometry.to_face3d(geo, meshing_parameters=None)[source]

List of Ladybug Face3D objects from a Rhino Brep, Surface or Mesh.

Parameters:
  • geo – A Rhino Brep, Surface, Extrusion or Mesh that will be converted into a list of Ladybug Face3D.

  • meshing_parameters – Optional Rhino Meshing Parameters to describe how curved faces should be converted into planar elements. If None, Rhino’s Default Meshing Parameters will be used.

ladybug_rhino.togeometry.to_gridded_mesh3d(brep, grid_size, offset_distance=0)[source]

Create a gridded Ladybug Mesh3D from a Rhino Brep.

This is useful since Rhino’s grid meshing is often more beautiful than what ladybug_geometry can produce. However, the ladybug_geometry Face3D.get_mesh_grid method provides a workable alternative to this if it is needed.

Parameters:
  • brep – A Rhino Brep that will be converted into a gridded Ladybug Mesh3D.

  • grid_size – A number for the grid size dimension with which to make the mesh.

  • offset_distance – A number for the distance at which to offset the mesh from the underlying brep. The default is 0.

ladybug_rhino.togeometry.to_joined_gridded_mesh3d(geometry, grid_size, offset_distance=0)[source]

Create a single gridded Ladybug Mesh3D from an array of Rhino geometry.

Parameters:
  • breps – An array of Rhino Breps and/or Rhino meshes that will be converted into a single, joined gridded Ladybug Mesh3D.

  • grid_size – A number for the grid size dimension with which to make the mesh.

  • offset_distance – A number for the distance at which to offset the mesh from the underlying brep. The default is 0.

ladybug_rhino.togeometry.to_linesegment2d(line)[source]

Ladybug LineSegment2D from Rhino LineCurve.

ladybug_rhino.togeometry.to_linesegment3d(line)[source]

Ladybug LineSegment3D from Rhino LineCurve.

ladybug_rhino.togeometry.to_mesh2d(mesh, color_by_face=True)[source]

Ladybug Mesh2D from Rhino Mesh.

ladybug_rhino.togeometry.to_mesh3d(mesh, color_by_face=True)[source]

Ladybug Mesh3D from Rhino Mesh.

ladybug_rhino.togeometry.to_plane(pl)[source]

Ladybug Plane from Rhino Plane.

ladybug_rhino.togeometry.to_point2d(point)[source]

Ladybug Point2D from Rhino Point3d.

ladybug_rhino.togeometry.to_point3d(point)[source]

Ladybug Point3D from Rhino Point3d.

ladybug_rhino.togeometry.to_polyface3d(geo, meshing_parameters=None)[source]

A Ladybug Polyface3D object from a Rhino Brep.

Parameters:
  • geo – A Rhino Brep, Surface or Mesh that will be converted into a single Ladybug Polyface3D.

  • meshing_parameters – Optional Rhino Meshing Parameters to describe how curved faces should be converted into planar elements. If None, Rhino’s Default Meshing Parameters will be used.

ladybug_rhino.togeometry.to_polygon2d(polygon)[source]

Ladybug Polygon2D from Rhino closed PolyLineCurve.

ladybug_rhino.togeometry.to_polyline2d(polyline)[source]

Ladybug Polyline2D from a Rhino PolyLineCurve.

A LineSegment2D will be returned if the input polyline has only two points.

ladybug_rhino.togeometry.to_polyline3d(polyline)[source]

Ladybug Polyline3D from a Rhino PolyLineCurve.

A LineSegment3D will be returned if the input polyline has only two points.

ladybug_rhino.togeometry.to_ray2d(ray)[source]

Ladybug Ray2D from Rhino Ray3d.

ladybug_rhino.togeometry.to_ray3d(ray)[source]

Ladybug Ray3D from Rhino Ray3d.

ladybug_rhino.togeometry.to_vector2d(vector)[source]

Ladybug Vector2D from Rhino Vector3d.

ladybug_rhino.togeometry.to_vector3d(vector)[source]

Ladybug Vector3D from Rhino Vector3d.