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(togeometry): Rejoin Breps when cleaning planarized versions #249

Merged
merged 1 commit into from Feb 23, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions ladybug_rhino/togeometry.py
Expand Up @@ -30,6 +30,7 @@
raise ImportError("Failed to import Rhino.\n{}".format(e))

import ladybug_rhino.planarize as _planar
from .fromgeometry import from_face3ds_to_joined_brep
from .config import tolerance


Expand Down Expand Up @@ -182,8 +183,8 @@ def to_polyface3d(geo, meshing_parameters=None):
"""
mesh_par = meshing_parameters or rg.MeshingParameters.Default # default
if not isinstance(geo, rg.Mesh) and _planar.has_curved_face(geo): # keep solidity
return Polyface3D.from_faces(
_planar.curved_solid_faces(geo, mesh_par), tolerance)
new_brep = from_face3ds_to_joined_brep(_planar.curved_solid_faces(geo, mesh_par))
return Polyface3D.from_faces(to_face3d(new_brep[0], mesh_par), tolerance)
return Polyface3D.from_faces(to_face3d(geo, mesh_par), tolerance)


Expand Down