Skip to content

Commit

Permalink
fix(fromgeometry): Add method to extract wireframes from meshes
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Dec 12, 2023
1 parent 1b5f6a0 commit b8f8e53
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions ladybug_rhino/fromgeometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,21 @@ def from_polyface3d_to_wireframe(polyface):
return [f for face in polyface.faces for f in from_face3d_to_wireframe(face)]


def from_mesh3d_to_wireframe(mesh):
"""Rhino LineCurves from ladybug Mesh3D.
Args:
mesh: A Ladybug Mesh3D object to be translated to a wireframe.
Returns:
A list of Rhino polyline curves for the mesh edges.
"""
line_curves = []
for edge in mesh.edges:
line_curves.append(rg.LineCurve(from_point3d(edge.p1), from_point3d(edge.p2)))
return line_curves


def from_face3d_to_solid(face, offset):
"""Rhino Solid Brep from a ladybug Face3D and an offset from the base face.
Expand Down

0 comments on commit b8f8e53

Please sign in to comment.