Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(fromgeometry): Add method to extract wireframes from meshes #318

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading