diff --git a/CHANGELOG.md b/CHANGELOG.md index 26f2b0a3c7a9..cd70c5ca8e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * Changed directory where ghuser components are installed. * Added ghuser components directory to those removed by the `clean` task. * Clean up the ghuser directory before building ghuser components. -* Fixed bug in `compas.geometry.distance.closest_point_on_segment_xy` +* Fixed bug in `compas.geometry.distance.closest_point_on_segment_xy`. +* Fixed bug in Rhino implementations of `trimesh` curvature functions. ### Removed diff --git a/src/compas_rhino/geometry/trimesh/curvature.py b/src/compas_rhino/geometry/trimesh/curvature.py index 78eed3b5b732..007e8b65d1b4 100644 --- a/src/compas_rhino/geometry/trimesh/curvature.py +++ b/src/compas_rhino/geometry/trimesh/curvature.py @@ -76,11 +76,10 @@ def trimesh_gaussian_curvature(M): # (0) see if input is already Rhino.Geometry.Mesh mesh = Rhino.Geometry.Mesh() if not isinstance(M, Rhino.Geometry.Mesh): - for vertices, faces in M: - for x, y, z in vertices: - mesh.Vertices.Add(x, y, z) - for face in faces: - mesh.Faces.AddFace(*face) + for x, y, z in M[0]: + mesh.Vertices.Add(x, y, z) + for face in M[1]: + mesh.Faces.AddFace(*face) else: mesh = M @@ -170,11 +169,10 @@ def trimesh_mean_curvature(M): # (0) see if input is already Rhino.Geometry.Mesh mesh = Rhino.Geometry.Mesh() if not isinstance(M, Rhino.Geometry.Mesh): - for vertices, faces in M: - for x, y, z in vertices: - mesh.Vertices.Add(x, y, z) - for face in faces: - mesh.Faces.AddFace(*face) + for x, y, z in M[0]: + mesh.Vertices.Add(x, y, z) + for face in M[1]: + mesh.Faces.AddFace(*face) else: mesh = M @@ -275,11 +273,10 @@ def trimesh_principal_curvature(M): # (0) see if input is already Rhino.Geometry.Mesh mesh = Rhino.Geometry.Mesh() if not isinstance(M, Rhino.Geometry.Mesh): - for vertices, faces in M: - for x, y, z in vertices: - mesh.Vertices.Add(x, y, z) - for face in faces: - mesh.Faces.AddFace(*face) + for x, y, z in M[0]: + mesh.Vertices.Add(x, y, z) + for face in M[1]: + mesh.Faces.AddFace(*face) else: mesh = M