@@ -76,11 +76,10 @@ def trimesh_gaussian_curvature(M):
7676 # (0) see if input is already Rhino.Geometry.Mesh
7777 mesh = Rhino .Geometry .Mesh ()
7878 if not isinstance (M , Rhino .Geometry .Mesh ):
79- for vertices , faces in M :
80- for x , y , z in vertices :
81- mesh .Vertices .Add (x , y , z )
82- for face in faces :
83- mesh .Faces .AddFace (* face )
79+ for x , y , z in M [0 ]:
80+ mesh .Vertices .Add (x , y , z )
81+ for face in M [1 ]:
82+ mesh .Faces .AddFace (* face )
8483 else :
8584 mesh = M
8685
@@ -170,11 +169,10 @@ def trimesh_mean_curvature(M):
170169 # (0) see if input is already Rhino.Geometry.Mesh
171170 mesh = Rhino .Geometry .Mesh ()
172171 if not isinstance (M , Rhino .Geometry .Mesh ):
173- for vertices , faces in M :
174- for x , y , z in vertices :
175- mesh .Vertices .Add (x , y , z )
176- for face in faces :
177- mesh .Faces .AddFace (* face )
172+ for x , y , z in M [0 ]:
173+ mesh .Vertices .Add (x , y , z )
174+ for face in M [1 ]:
175+ mesh .Faces .AddFace (* face )
178176 else :
179177 mesh = M
180178
@@ -275,11 +273,10 @@ def trimesh_principal_curvature(M):
275273 # (0) see if input is already Rhino.Geometry.Mesh
276274 mesh = Rhino .Geometry .Mesh ()
277275 if not isinstance (M , Rhino .Geometry .Mesh ):
278- for vertices , faces in M :
279- for x , y , z in vertices :
280- mesh .Vertices .Add (x , y , z )
281- for face in faces :
282- mesh .Faces .AddFace (* face )
276+ for x , y , z in M [0 ]:
277+ mesh .Vertices .Add (x , y , z )
278+ for face in M [1 ]:
279+ mesh .Faces .AddFace (* face )
283280 else :
284281 mesh = M
285282
0 commit comments