ladybug_rhino.planarize module

Functions to convert curved Rhino geometries into planar ladybug ones.

ladybug_rhino.planarize.curved_solid_faces(brep, meshing_parameters, ignore_sliver=True)[source]

Extract Face3D objects from a curved solid brep.

This method ensures that the resulting Face3Ds sill form a closed solid if the input brep is closed. This is accomplished by meshing the solid Brep altogether.

Parameters:
  • brep – A curved solid brep.

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

  • ignore_sliver – A Boolean to note whether tiny sliver faces should simply be excluded from the output (True) or whether a None should be put in their place (False). The latter is useful when reporting to the user that certain tiny geometries interfered with the planarization process and the Rhino model tolerance should probably be lowered in order to get a better planar representation. (Default: True).

Returns:

A list of ladybug Face3D objects that together approximate the input brep.

ladybug_rhino.planarize.curved_surface_faces(b_face, meshing_parameters)[source]

Extract Face3D objects from a curved brep face.

Parameters:
  • b_face – A curved brep face.

  • meshing_parameters – Rhino Meshing Parameters to describe how curved edge should be converted into planar elements.

Returns:

A list of ladybug Face3D objects that together approximate the input curved surface.

ladybug_rhino.planarize.has_curved_face(brep)[source]

Test if a Rhino Brep has a curved face.

Parameters:

brep – A Rhino Brep to test whether it has a curved face.

ladybug_rhino.planarize.mesh_faces_to_face3d(mesh)[source]

Convert a curved Rhino mesh faces into planar ladybug_geometry Face3D.

Parameters:

mesh – A curved Rhino mesh.

Returns:

A list of ladybug Face3D objects derived from the input mesh faces.

ladybug_rhino.planarize.planar_face_curved_edge_vertices(b_face, count, meshing_parameters)[source]

Extract vertices from a planar brep face loop that has one or more curved edges.

This method ensures vertices along the curved edge are generated in a way that they align with an extrusion of that edge. Alignment may not be possible when the adjoining curved surface is not an extrusion.

Parameters:
  • b_face – A brep face with the curved edge.

  • count – An integer for the index of the loop to extract.

  • meshing_parameters – Rhino Meshing Parameters to describe how curved edge should be converted into planar elements.

Returns:

A list of ladybug Point3D objects representing the input planar face.