honeybee_3dm.togeometry module

Functions to create Ladybug Geometry objects from Rhino3dm objects.

honeybee_3dm.togeometry.brep_to_face3d(brep, tolerance, obj)[source]

Get a list of Ladybug Face3D objects from a planar rhino3dm Brep.

Parameters
  • brep – A rhino3dm Brep.

  • tolerance – A rhino3dm tolerance object. Tolerance set in the rhino file.

  • obj – A rhino3dm object.

Returns

A list of Ladybug Face3D objects.

honeybee_3dm.togeometry.brep_to_mesh_to_face3d(brep)[source]

Get a list of Ladybug Face3D objects from a rhino3dm Brep.

Parameters

brep – A rhino3dm Brep.

Returns

A list of Ladybug Face3D objects.

honeybee_3dm.togeometry.brep_to_meshed_face3d(brep, tolerance)[source]

Get a Ladybug Face3D object from a planar rhino3dm Brep.

This method meshes the brep in order to create a Ladybug Face3D object.

Parameters
  • brep – A rhino3dm Brep.

  • tolerance – A rhino3dm tolerance object. Tolerance set in the rhino file.

Returns

A Ladybug Face3D object.

honeybee_3dm.togeometry.check_planarity(brep, tolerance)[source]

Check the planarity of a Brep.

Parameters
  • brep – Geometry of a Rhino3dm Brep.

  • tolerance – A rhino3dm tolerance object. Tolerance set in the rhino file.

Returns

Bool. True if planar. Otherwise False.

honeybee_3dm.togeometry.extract_mesh_faces_colors(mesh, color_by_face=False)[source]

Extract face indices and colors from a Rhino mesh.

Parameters
  • mesh – Rhino3dm mesh.

  • color_by_face – Bool. True will derive colors from mesh faces.

Returns

A tuple of mesh faces and mesh colors.

honeybee_3dm.togeometry.extrusion_to_face3d(extrusion, tolerance)[source]

Get a list of Ladybug Face3D objects from a rhino3dm Extrusion.

Parameters
  • brep – A rhino3dm Extrusion.

  • tolerance – A number for tolerance value. Tolerance will only be used for converting mesh geometries.

Returns

A list of Ladybug Face3D objects.

honeybee_3dm.togeometry.mesh_to_face3d(mesh)[source]

Get a list of Ladybug Face3D objects from a rhino3dm Mesh.

Parameters

mesh – A rhino3dm mesh geometry.

Returns

A list of Ladybug Face3D objects.

honeybee_3dm.togeometry.mesh_to_mesh3d(mesh, color_by_face=True)[source]

Get a Ladybug Mesh3D object from a Rhino3dm Mesh.

Parameters
  • mesh – Rhino3dm mesh.

  • color_by_face – Bool. True will derive colors from mesh faces.

Returns

A Ladybug Mesh3D object.

honeybee_3dm.togeometry.multiface_brep_to_face3d(brep, tolerance, obj)[source]

Get a list of Ladybug Face3D objects from a Brep with multiple Brep faces.

Parameters
  • brep – A rhino3dm Brep.

  • tolerance – A rhino3dm tolerance object. Tolerance set in the rhino file.

  • obj – A rhino3dm object.

Returns

A list of Ladybug Face3D objects.

honeybee_3dm.togeometry.remove_dup_vertices(vertices, tolerance)[source]

Remove vertices from an array of Point3Ds that are equal within the tolerance.

Parameters
  • vertices – A list of Ladybug Point3D objects.

  • tolerance – A number for model tolerance. By default the tolerance is set to the ModelAbsoluteTolerance value in input 3DM file.

Returns

A list of Ladybug Point3D objects with duplicate points removed.

honeybee_3dm.togeometry.to_face3d(obj, tolerance, *, raise_exception=False)[source]

Convert Rhino objects to Ladybug Face3D objects.

Supported object types are Brep, Extrusion and Meshes. If raise_exception is set to True this method will raise a ValueError for unsupported object types.

Parameters
  • obj – A Rhino3dm object.

  • tolerance – A number for tolerance value. Tolerance will only be used for converting mesh geometries.

  • raise_exception – A Boolean to raise an exception for unsupported object types. default is False.

Returns

A list of Ladybug Face3D objects.

honeybee_3dm.togeometry.to_point3d(point)[source]

Create a Ladybug Point3D object from a rhino3dm point.

Parameters

point – A rhino3dm point.

Returns

A Ladybug Point3D object.

honeybee_3dm.togeometry.to_vector3d(vector)[source]

Create a Ladybug Vector3D from a rhino3dm Vector3d.

Parameters

vector – A rhino3dm vector3d.

Returns

A Ladybug Vector3D object.