DuplicateVertices function is missing from rhinoscriptsyntax.
Can we implement it to the next release?
def DuplicateVertices(object_id, select=False):
"""Duplicates the corner vertices of a surface or polysurface.
Parameters:
object_id = The identifier of the surface or polysurface object.
select [opt] = Select the duplicated corner vertices. The default is not
to select (False).
Returns:
A list of Guids identifying the newly created point objects if successful.
None if not successful, or on error.
"""
brep = rhutil.coercebrep(object_id, True)
corner_vertices = brep.DuplicateVertices()
vertices = []
for vertex in corner_vertices:
if vertex.IsValid:
rc = scriptcontext.doc.Objects.AddPoint(vertex)
if rc==System.Guid.Empty: return None
vertices.append(rc)
if select: rhobject.SelectObject(rc)
if vertices: scriptcontext.doc.Views.Redraw()
return vertices