Skip to content

Commit c530699

Browse files
author
Robin Oval
committed
helper mesh_move_vertices
1 parent 573abef commit c530699

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/compas_rhino/helpers/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
mesh_update_edge_attributes
4343
mesh_update_face_attributes
4444
mesh_move_vertex
45+
mesh_move_vertices
4546
mesh_identify_vertices
4647
4748

src/compas_rhino/helpers/mesh.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
'mesh_update_edge_attributes',
5353
'mesh_update_face_attributes',
5454
'mesh_move_vertex',
55+
'mesh_move_vertices',
5556
'mesh_identify_vertices',
5657
]
5758

@@ -890,6 +891,23 @@ def mesh_move_vertex(mesh, key, constraint=None, allow_off=False):
890891
"""
891892
return VertexModifier.move_vertex(mesh, key, constraint=constraint, allow_off=allow_off)
892893

894+
def mesh_move_vertices(mesh, keys):
895+
"""Move on vertices of the mesh.
896+
897+
Parameters
898+
----------
899+
mesh : compas.datastructures.Mesh
900+
A mesh object.
901+
keys : list
902+
The vertices to move.
903+
constraint : Rhino.Geometry (None)
904+
A Rhino geometry object to constrain the movement to.
905+
By default the movement is unconstrained.
906+
allow_off : bool (False)
907+
Allow the vertex to move off the constraint.
908+
909+
"""
910+
return VertexModifier.move_vertices(mesh, keys)
893911

894912
def mesh_update_edge_attributes(mesh, keys, names=None):
895913
"""Update the attributes of the edges of a mesh.

0 commit comments

Comments
 (0)